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

Validation returns "None of the codings provided are in the value set", despite ValueSets defined in IG and terminology server #235

Open
benjamin-reddy opened this issue Apr 19, 2024 · 10 comments

Comments

@benjamin-reddy
Copy link

benjamin-reddy commented Apr 19, 2024

I am running a HAPI FHIR server locally, which is connected to a copy of the tx.fhir.org terminology server running locally. When I try to validate my submission, I get multiple errors saying "None of the codings provided are in the value set". However, the ValueSets are all defined in the custom FHIR IG that my HAPI FHIR server is using, and the terminology server database has these ValueSets.

For example, my submission is using the code 34391-3.
<type> <coding> <system value="http://loinc.org"/> <code value="34391-3"/> <display value="HUMAN PRESCRIPTION DRUG LABEL"/> </coding> </type>

The FHIR IG I am using has it defined here:
SPL Section Codes 3

The same ValueSet code can be found in the terminology server. This applies to both the live tx.fhir.org and the cloned one I am running.
Terminology local result

In my HAPI FHIR code, I am using RemoteTerminologyServiceValidationSupport in the StarterJpaConfig to connect to my terminology server using R4. However, I receive errors like this as a result.
<severity value="error"/> <code value="processing"/> <details> <coding> <system value="http://hl7.org/fhir/java-core-messageId"/> <code value="Terminology_TX_NoValid_1_CC"/> </coding> </details> <diagnostics value="None of the codings provided are in the value set 'SPL Document Codes' (http://hl7.org/fhir/us/spl/ValueSet/splDocumentCodes|0.1.0), and a coding from this value set is required) (codes = http://loinc.org#34391-3)"/> <location value="Bundle.entry[0].resource.type"/> <location value="Line[33] Col[15]"/>

Other codes have passed validation however. For example, my submission contains C64637.
<type> <coding> <system value="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl"/> <code value="C64637"/> </coding> </type>

I do not get any errors from this code. When I change the code value slightly, for example "X64637", I receive a validation error for it.
<severity value="error"/> <code value="processing"/> <details> <coding> <system value="http://hl7.org/fhir/java-core-messageId"/> <code value="TYPE_CHECKS_PATTERN_CC"/> </coding> </details> <diagnostics value="The pattern [system http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl, code C64637, and display 'null'] defined in the profile http://hl7.org/fhir/us/spl/StructureDefinition/SubmittedMedicinalProduct|0.1.0 not found. Issues: [ValidationMessage[level=ERROR,type=VALUE,location=Bundle.entry[0].resource.entry[1].resource/*MedicinalProductDefinition/AllopurinolUSPDefinition*/.crossReference[0].type.coding.code,message=Value is 'X64637' but must be 'C64637']]"/> <location value="Bundle.entry[0].resource.entry[1].resource/*MedicinalProductDefinition/AllopurinolUSPDefinition*/.crossReference[0].type"/> <location value="Line[558] Col[17]"/>

I need help with figuring out why I am getting validation errors for ValueSets such as 34391-3. I'm not sure if the issue is related to something on my end, or an issue with connecting to the terminology server.

@grahamegrieve
Copy link
Collaborator

Does it work using the command line validator?

@benjamin-reddy
Copy link
Author

I downloaded the fhir command line validator from this link:
https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar

I ran different versions of the command line using my FHIR bundle test and my custom FHIR IG. For example:
java -jar validator_cli.jar HapiFhir-Bundle-AllopurinolTabletLabelBundle.xml -version 4.3 -ig hl7.fhir.us.spl.tgz -profile http://hl7.org/fhir/us/spl/StructureDefinition/ProductSubmissionBundle

I also tried changing the -tx parameter to my local terminology server and tx.fhir.org/r4. However, I still get the same errors regarding ValueSets:
FHIR validator CLI error

@benjamin-reddy
Copy link
Author

The ValueSets are defined in the custom IG package, but it doesn't specify the list of codes. It specifies the rules to determine the codes. Something has to take those rules and come up with an expansion of the value set that lists the codes.

Is the HAPI FHIR JPA server the one that takes these rules from the IG package and comes up with an expansion of the value sets that lists the codes? If so, is there a way to check if my server is doing that?

If the terminology server is the one that uses these rules, how do I give it the value set rules?

Additionally, do I need to load the IG package onto the terminology server so that it knows about the value sets? If so, how do I do that?

@grahamegrieve
Copy link
Collaborator

the validator does the expansion internally. Sounds like the problem is with the validator to me - can you post your HapiFhir-Bundle-AllopurinolTabletLabelBundle.xml ?

@benjamin-reddy
Copy link
Author

Here is the zip file containing the XML. Let me know if you have any questions about the file.

HapiFhir-Bundle-AllopurinolTabletLabelBundle.zip

@benjamin-reddy
Copy link
Author

I am sending the link to the custom FHIR IG package just in case you need to use it for testing. Jean Duteau authored this IG package.

https://github.com/HL7/fhir-spl/blob/main/package/hl7.fhir.us.spl.tgz

If you encounter an issue with loading the package, you need to unzip the .tgz file and remove three files called .index.json, .index.db, and usage.ini. After deleting the files, tar the package folder back into a .tgz file. The commands I used to do this are the following:
tar -xvzf hl7.fhir.us.spl.tgz rm .index.json .index.db usage.ini hl7.fhir.us.spl.tgz tar -cvzf hl7.fhir.us.spl.tgz package

Inside IG tgz

@grahamegrieve
Copy link
Collaborator

I don't understand why you're doing any of that. Just use -ig hl7.fhir.us.spl#current

@grahamegrieve
Copy link
Collaborator

Looks like the reason is because your display names are wrong, so the code is considered wrong. You might want to read the documentation here: https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator#UsingtheFHIRValidator-Displaywarnings

@benjamin-reddy
Copy link
Author

I did a test where I changed the display name for the code 34391-3 to "FDA product label Human prescription drug label", which is the LOINC display value listed in the IG. When I used the command line FHIR validator, I don't get the ValueSet error for 34391-3 in the output.

However, when I use my HAPI FHIR server to validate the same XML input with the display name change, I still get the same ValueSet errors. The same result happens whether I set the terminology server to tx.fhir.org or my local one.

Do you know what could be causing this issue on my HAPI FHIR server? Is the HAPI FHIR server is doing something differently in terms of validation? My application.yaml file currently has these parameters related to validation:

hapi.fhir.enable_repository_validating_interceptor = true
hapi.fhir.tester.home.validation.requests_enabled = true
hapi.fhir.tester.home.validation.responses_enabled = true

I also have my StarterJpaConfig look like this for remote terminology for validation. (The cropped out section is my IP address to connect to my local terminology server)
StarterJpaConfig terminology

@grahamegrieve
Copy link
Collaborator

I don't know. you'll have to ask HAPI support somewhere.

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

2 participants