FHIR Chat · Validation against custom profiles · hapi

Stream: hapi

Topic: Validation against custom profiles


view this post on Zulip Nadis Suraweera (Jun 19 2019 at 10:00):

Hi,
I have a custom profile for patient with an extension for the given name to recognize which given name should be used as the preferred name.
Profile.JPG
i have included the structure definitions for profile and also for the extension in the hapi-fhir server that i am implementing.
Implemented a custom validator as per the instructions available in http://hapifhir.io/doc_validation.html
When i am validating the resource, it says success. But it gives following issues(warning and information)
<issue>
<severity value="information"></severity>
<code value="processing"></code>
<diagnostics value="Unknown extension http://example.com/fhir/StructureDefinition/PrefferedNameExtension"></diagnostics>
<location value="Patient.name.given[2].extension"></location>
</issue>
<issue>
<severity value="warning"></severity>
<code value="processing"></code>
<diagnostics value="StructureDefinition reference "http://example.com/fhir/StructureDefinition/DemoPatient" could not be resolved"></diagnostics>
<location value="Patient.meta.profile[0]"></location>
</issue>

Looks like it validates against the standard Patient profile than the profile that i have given to validate.
Then i tried standard validator and downloaded from here. https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.validator.jar
when i validated the resource against standard patient profile i got similar warnings.
How i can validate together with extensions? does this feature available in HAPI framework?
Thanks for your support..
Best Regards,
Nadis

view this post on Zulip Nick Robison (Jul 06 2019 at 22:43):

I think I've run into a similar issue where my resources aren't being validated against my custom profiles. I'm sure I'm doing something incorrectly, just not sure what.

Are there any examples of custom profile validation that I can reference? I've tried a couple of different things, but to no avail.

Does anyone else have experience using custom profiles?

view this post on Zulip Vadim Peretokin (Jul 08 2019 at 09:16):

Asking the 101 question - does your resource declare conformance to a profile in it's meta element?

view this post on Zulip Nick Robison (Jul 08 2019 at 19:53):

That was indeed one of our issues! Thanks, I was under the impression that profiles would be automatically applied to any matching base resource. There were a couple of other tweaks we needed to make, but this got us headed in the right direction!

view this post on Zulip Vadim Peretokin (Jul 09 2019 at 07:41):

Perfect.


Last updated: Apr 12 2022 at 19:14 UTC