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

Validator fails for validating value from value set where codesystem versions in compose are defined by asterisk #5848

Open
Mandalka opened this issue Apr 15, 2024 · 0 comments

Comments

@Mandalka
Copy link

Mandalka commented Apr 15, 2024

Describe the bug
The HAPI Validator fails for validating a value from a value set where codesystem versions are defined by asterisk with error message
HAPI-0702: Unable to expand ValueSet because CodeSystem could not be found: http://fhir.de/CodeSystem/bfarm/icd-10-gm|*)

To Reproduce
Steps to reproduce the behavior:

Provision the validator by environment variables like

      HAPI_FHIR_IMPLEMENTATIONGUIDES_DEBASIS_NAME: "de.basisprofil.r4"
      HAPI_FHIR_IMPLEMENTATIONGUIDES_DEBASIS_VERSION: "1.4.0"

      HAPI_FHIR_IMPLEMENTATIONGUIDES_MIIKDSMETA_NAME: "de.medizininformatikinitiative.kerndatensatz.meta"
      HAPI_FHIR_IMPLEMENTATIONGUIDES_MIIKDSMETA_VERSION: "1.0.3"

      HAPI_FHIR_IMPLEMENTATIONGUIDES_MIIKDSDIAGNOSE_NAME: "de.medizininformatikinitiative.kerndatensatz.diagnose"
      HAPI_FHIR_IMPLEMENTATIONGUIDES_MIIKDSDIAGNOSE_VERSION: "2024.0.0"

Validation of diagnoses with correct values from Valueset http://fhir.de/ValueSet/bfarm/icd-10-gm

Expected behavior
Expand ValueSet if codesystem versions defined by asterisk.

Environment (please complete the following information):

  • HAPI FHIR Version 7
  • OS: Official HAPI Docker image runned by Docker on Debian Linux

Additional context
The HAPI Validator fails for validating a value from a value set where versions are defined by asterisk (https://www.hl7.org/fhir/valueset-definitions.html#ValueSet.compose.include.version "The version of the code system that the codes are selected from, or the special version '*' for all versions.") like:

"compose": {
    "include":  [
        {
            "system": "http://fhir.de/CodeSystem/bfarm/icd-10-gm",
            "version": "*"
        }
    ]
}

in URI http://fhir.de/ValueSet/bfarm/icd-10-gm (https://simplifier.net/packages/de.basisprofil.r4/1.4.0/files/656611/~json)

which should use multiple same code system URIs but with different versions like "2014" to "2024". The codesystems are imported by an other package (de.medizininformatikinitiative.kerndatensatz.diagnose).

The validator error message for valid values:

The Coding provided (http://fhir.de/CodeSystem/bfarm/icd-10-gm#CensoredICDCode) is not in the value set 'ICD10GM' (http://fhir.de/ValueSet/bfarm/icd-10-gm|1.4.0), and a code is required from this value set. (error message = Failed to expand ValueSet 'http://fhir.de/ValueSet/bfarm/icd-10-gm' (in-memory). Could not validate code http://fhir.de/CodeSystem/bfarm/icd-10-gm#CensoredICDCode. Error was: HAPI-0702: Unable to expand ValueSet because CodeSystem could not be found: http://fhir.de/CodeSystem/bfarm/icd-10-gm|*)

If i manipulate the ValueSet by defining multiple concrete versions instead of *, the error "Unable to expand ValueSet because CodeSystem could not be found" does not occur anymore and values can be validated.

But even in this case HAPI seems to use not all codesystem versions/their values on validation, so some valid values which are not in newest codesystem version (or latest version defined in valueset?) anymore but in defined other versions are returned as not valid.

@Mandalka Mandalka changed the title Validator fails for validating a value set where codesystem versions in compose are defined by asterisk Validator fails for validating value from value set where codesystem versions in compose are defined by asterisk Apr 23, 2024
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