Stream: hapi
Topic: HAPI JPA Server and Implementation Guides
Kevin Mayfield (Dec 03 2019 at 12:20):
Is it possible to specify an ImplementationGuide that the HAPI JPA server will follow.
I'm thinking of something like this:
My server needs to conform to this IG https://hl7-uk.github.io/UK-STU3
So it will only accept Patient resources that conform to (or validate as) https://hl7-uk.github.io/UK-STU3/CareConnect-Patient-1.html
Kevin Mayfield (Dec 03 2019 at 12:21):
Probably driven by a CapabilityStatement in the IG
Jens Villadsen (Dec 05 2019 at 19:40):
I have forced profile validation server side specified in a custom interceptor explicitly to do so on a range of profile definitions. It is however not strictly linked to an IG
Jens Villadsen (Dec 05 2019 at 19:40):
It could might as well have been made to do so on the basis of an IG
Jens Villadsen (Dec 06 2019 at 14:55):
now it is ;)
Sajith Jamal (Feb 11 2020 at 03:00):
@Jens Villadsen could you elaborate a bit please?....I am trying to do the same but haven't gotton anywhere
Jens Villadsen (Feb 11 2020 at 10:51):
I've loaded the IG into the server and added an extended FhirInstanceValidator to the RequestValidatingInterceptor. The FhirInstanceValidator then intercepts the incoming resources and finds the SD that matches the profile stated in the resource and runs the validation
Patrick Werner (Feb 11 2020 at 10:52):
I've loaded the IG into the server
manually, or did you create a FHIR package endpoint?
Jens Villadsen (Feb 11 2020 at 10:55):
I download the package.tgz from the IG compile time and then runtime add/update the FHIR server with the contents.
Jens Villadsen (Feb 11 2020 at 10:55):
automatically
Patrick Werner (Feb 11 2020 at 10:59):
we are implementing IG validation in a similar way (Inteceptor, PrePopulatedValidatinSupport). Jsut thought for a second that hapi has package awareness now (which would be really nice to have)
Jens Villadsen (Feb 11 2020 at 10:59):
I'll gladly share the contents that does the loading
Jens Villadsen (Feb 11 2020 at 11:01):
if it has any interest
Jens Villadsen (Feb 11 2020 at 11:03):
I also do some filtering in regards to what profiles that are of interest. As our server is in a setup of a distributed setup, we 'only care' about the resources that our server 'own'. For that, we use the https://www.hl7.org/fhir/stu3/capabilitystatement-definitions.html#CapabilityStatement.profile in the capabilitystatement
Jens Villadsen (Feb 11 2020 at 11:04):
eg. https://docs.ehealth.sundhed.dk/latest/ig/CapabilityStatement-patient.html
Jens Villadsen (Feb 08 2021 at 14:27):
@Patrick Werner / @Kevin Mayfield revisiting this: A client of mine would like to have this enabled https://hapifhir.io/hapi-fhir/docs/validation/repository_validating_interceptor.html#using-the-repository-validating-interceptor - so I'll probably soon add this as an option for the HAPI fhir starter project
Patrick Werner (Feb 08 2021 at 15:27):
sounds great
Jens Villadsen (Feb 10 2021 at 15:58):
done: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/tree/interceptor-wiring-rework
Jens Villadsen (Feb 10 2021 at 15:59):
ready for takeoff for testing. Will be merged to master once HAPI 5.3.0 is released
Jens Villadsen (Feb 10 2021 at 15:59):
PR is here: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/pull/210
Jens Villadsen (Feb 10 2021 at 16:01):
When combining this https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/5aec4b7e18948b797d77f449793be53d083bc51f/src/main/java/ca/uhn/fhir/jpa/starter/RepositoryValidationInterceptorFactoryR4.java#L45 with the feature of installing IG's you'll have an out-of-the-box validation on anything stored in the HAPI FHIR starter service. Only requirement is a few lines of configuration - @Patrick Werner
Last updated: Apr 12 2022 at 19:14 UTC