Stream: implementers
Topic: Importing fhir definitions and examples into HAPI FHIR
Djura (May 17 2021 at 09:43):
Hi everyone,
At the moment I'm working on creating a development setup with a HAPI fhir server using the "hapiproject/hapi:latest" docker image.
I'm trying to import the basic FHIR definitions and examples (version STU3) into this server using the hapi server CLI tool ( https://hapifhir.io/hapi-fhir/docs/tools/hapi_fhir_cli.html ).
The import of basic FHIR definitions seems to go just fine. However, the examples fail to be uploaded because they are referencing codes that are not currently in any of the valuesets on my server.
Example:
definition-importer_1 | 2021-05-17 09:00:02.100 [main] INFO c.u.f.c.ExampleDataUploader Found example valueset-valueset-vision-eye-codes(vision-eye-codes).json - ValueSet - 1791 chars
definition-importer_1 | 2021-05-17 09:00:02.103 [main] INFO c.u.f.c.ExampleDataUploader FAILED to validate example valueset-valueset-vision-eye-codes(vision-eye-codes).json - ValidationResult{messageCount=5, isSuccessful=false, description='ERROR - The value provided ('generated') is not in the value set http://hl7.org/fhir/ValueSet/narrative-status (http://hl7.org/fhir/ValueSet/narrative-status), and a code is required from this value set) (error message = Validation failed) - ValueSet.text.status'}
definition-importer_1 | 2021-05-17 09:00:02.103 [main] INFO c.u.f.c.ExampleDataUploader Found example valueset-valueset-vision-product(vision-product).json - ValueSet - 1940 chars
definition-importer_1 | 2021-05-17 09:00:02.106 [main] INFO c.u.f.c.ExampleDataUploader FAILED to validate example valueset-valueset-vision-product(vision-product).json - ValidationResult{messageCount=4, isSuccessful=false, description='ERROR - The value provided ('generated') is not in the value set http://hl7.org/fhir/ValueSet/narrative-status (http://hl7.org/fhir/ValueSet/narrative-status), and a code is required from this value set) (error message = Validation failed) - ValueSet.text.status'}
Here it complains about the code "generated" not being in the narrative-status valueset. When I inspect my server this indeed appears to be the case. The narrative-status valueset is defined but it does not contain any values.
When I inspect the official FHIR STU3 valueset definitions I see that narrative-status is defined twice. I've included these pieces of the valuesets json in this message.
Could anyone advise me on how to fix my setup? valueset_full.json valueset_empty.json
Edit: I crossposted this in the hapi channel as well, which is perhaps the more appropriate channel. I'm still new to this community.
Djura (May 17 2021 at 11:18):
I think I understand the difference now between the two entries of narrative-status. One is a valueset and one is a codesystem.
The definitions of the codes are listed as codesystem. Then why do these examples fail to validate?
Another example from the cli
2021-05-17 13:12:47.914 [main] [ExampleDataUploader.java:200] INFO c.u.f.c.ExampleDataUploader Found example valueset-valueset-vision-product(vision-product).json - ValueSet - 1940 chars
2021-05-17 13:12:47.917 [main] [ExampleDataUploader.java:204] INFO c.u.f.c.ExampleDataUploader FAILED to validate example valueset-valueset-vision-product(vision-product).json - ValidationResult{messageCount=4, isSuccessful=false, description='ERROR - The value provided ('generated') is not in the value set http://hl7.org/fhir/ValueSet/narrative-status (http://hl7.org/fhir/ValueSet/narrative-status), and a code is required from this value set) (error message = Validation failed) - ValueSet.text.status'}
John Moehrke (May 17 2021 at 13:03):
please ask on the #hapi stream
Last updated: Apr 12 2022 at 19:14 UTC