Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid OMB Race Code "2028-9" Flagged as Invalid by HAPI FHIR Validator 7.4.0 #6348

Open
Shreeja-dev opened this issue Oct 4, 2024 · 0 comments

Comments

@Shreeja-dev
Copy link

Shreeja-dev commented Oct 4, 2024

While validating a Bundle payload using the HAPI FHIR 7.4.0 validator, we encountered an error when providing a valid value for race. Specifically, the value "Asian" with code "2028-9" was reported as invalid, despite being part of the OMB Race Categories value set.

We are using Java 21 and HAPI FHIR validator 7.4.0. We are validating using packages as outlined in the documentation (HAPI FHIR Instance Validator Documentation - Section 14.2.5).

To Reproduce
Steps to reproduce the behavior:

  1. Create a FHIR patient profile with race:

    {
        "extension": [
            {
                "url": "ombCategory",
                "valueCoding": {
                    "system": "urn:oid:2.16.840.1.113883.6.238",
                    "code": "2028-9",
                    "display": "Asian"
                }
            },
            {
                "url": "text",
                "valueString": "Asian"
            }
        ],
        "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"
    }
  2. Validate the Bundle using the HAPI FHIR validator with the below package above,(using NpmPackageValidationSupport)

    We have added the following packages to our classpath :

  3. Observe the following error message:

    {
        "extension": [
            {
                "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
                "valueInteger": 1
            },
            {
                "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
                "valueInteger": 5201
            },
            {
                "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
                "valueString": "Terminology_TX_NoValid_12"
            }
        ],
        "severity": "error",
        "code": "processing",
        "details": {
            "coding": [
                {
                    "system": "http://hl7.org/fhir/java-core-messageId",
                    "code": "Terminology_TX_NoValid_12"
                }
            ]
        },
        "diagnostics": "The Coding provided (urn:oid:2.16.840.1.113883.6.238#2028-9) was not found in the value set 'OMB Race Categories' ([http://hl7.org/fhir/us/core/ValueSet/omb-race-category|7.0.0](http://hl7.org/fhir/us/core/ValueSet/omb-race-category%7C7.0.0)), and a code is required from this value set.  (error message = Unknown code 'urn:oid:2.16.840.1.113883.6.238#2028-9' for in-memory expansion of ValueSet 'http://hl7.org/fhir/us/core/ValueSet/omb-race-category')",
        "location": [
            "Bundle.entry[0].resource/*Patient/PatientExample*/.extension[0].extension[0].value.ofType(Coding)",
            "Line[1] Col[5201]"
        ]
    }

Expected behavior
The code "2028-9" with the display "Asian" should be recognized as valid according to the OMB Race Categories value set, and the validator should not return an error for this valid entry.

Additional context
We have also tried validating through the Instance Validator approach as mentioned in the HAPI FHIR Documentation (Validation Support Modules - Section 14.3.14). It gives the same error.

Could you please investigate and provide suggestion for why the code "2028-9" is being flagged as invalid despite being a recognized value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant