QI-Core in HAPI FHIR

98 views
Skip to first unread message

Gregory Akins

unread,
Dec 15, 2021, 9:21:23 AM12/15/21
to HAPI FHIR
I'm looking for a shorter path to adding QI-Core support in HAPI-FHIR JPA if it exists.

What I've done so far is add the Structure Definition json files to the path and included a org.hl7.fhir.common.hapi.validation.validator.BaseValidatorBridge in the validation chain.

This was for a Plain Server that obviously had a lot of customization.

Is there an easier path for enabling QI-Core in a HAPI FHIR JPA Server?

I looked through the HAPI-FHIR Documentation, but didn't find any more direct suggestions.

--
Greg Akins
Principal Software Developer

James Agnew

unread,
Dec 16, 2021, 6:02:07 AM12/16/21
to Gregory Akins, HAPI FHIR
Does this just involve making the StructureDefinition/ValueSet/CodeSystem resources available to the validator, or are there other needs in addition? Assuming that's all you need to do, my recommendation would be to import the NPM package on startup. There are examples of how to do this in the application.yaml file.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/CAPJLOZKjXUxtKqNXvBevgBp31K3GL%2B%3D5e%3DNPQgsoGi9yAycE7g%40mail.gmail.com.

Gregory Akins

unread,
Dec 16, 2021, 8:18:47 AM12/16/21
to James Agnew, HAPI FHIR
Thanks, James.  That is all I need.

So, if I'm understanding correctly, it appears that I can just add the following and don't have to add any custom code to load additional validation interceptors.  

    implementationguides:

      qi-core:

        name: hl7.fhir.us.qicore

        version: 4.0.0


Gregory Akins

unread,
Dec 16, 2021, 8:43:13 AM12/16/21
to James Agnew, HAPI FHIR
On Thu, Dec 16, 2021 at 8:18 AM Gregory Akins <gregor...@semanticbits.com> wrote:
So, if I'm understanding correctly, it appears that I can just add the following and don't have to add any custom code to load additional validation interceptors.  

    implementationguides:

      qi-core:

        name: hl7.fhir.us.qicore

        version: 4.0.0



I'm sure I'm missing something because that doesn't seem to make a difference.  My simple test case is  to create a Patient with a missing name.family, which is required by QI-Core according to http://hl7.org/fhir/us/qicore/STU32/StructureDefinition-qicore-patient.html

I'm sure I'm missing something.. I tried doing a search for more information on that attribute, but didn't find it.    Examining the code shows me code in BaseJpaRestfulServer iterates through the list of implementation guides, but I'm not sure what happens once they get loaded.

Any help, or pointers to other resources would be much apprecated.

Gregory Akins

unread,
Dec 16, 2021, 1:38:45 PM12/16/21
to HAPI FHIR
Hm.. I can see the package being indexed during startup. 

2021-12-16 13:26:17.450 [main] INFO  c.u.f.jpa.packages.JpaPackageCache [JpaPackageCache.java:319] Package[hl7.fhir.us.qicore#4.9.0] Indexing StructureDefinition Resource[package/StructureDefinition-qicore-patient.json] with URL: http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient|4.0.0

Still just don't see any validation errors when I create a Patient.  I'm expecting either a fatal error on the Outcome, or at least a header entry indicating a non-fatal validation error.

Any suggestions for what I can look for to see if I have something setup incorrectly? Or.. should is the expected behavior different from what I'm expecting?

Gregory Akins

unread,
Dec 16, 2021, 6:12:19 PM12/16/21
to HAPI FHIR
Thanks to Jens Villadsen on Zulip, I found the missing piece

    implementationguides:

      qicore:

        name: hl7.fhir.us.qicore 

        version: 4.9.0

    enable_repository_validating_interceptor: true


The enable_repository_validating_interceptor has to be set to true.

Reply all
Reply to author
Forward
0 new messages