FHIR Chat · Slice validation · hapi

Stream: hapi

Topic: Slice validation


view this post on Zulip Damian Murphy (May 25 2017 at 21:50):

I've been looking at the profile validation in HAPI FHIR 2.3, with a view to incorporating it in various projects. The interface modelling team here makes extensive use of slicing so validating those would be a useful capability. Immediate interest is in DSTU2, with STU3 at some point in the future.

We have essentially two options - either wait until the HAPI FHIR developers introduce slice validation, or work on the code and add it ourselves to contribute back into the community. What I don't know is the priority this has amongst the HAPI developers, and how close the code is to including slice validation anyway.

So:
1. Is this a high priority for anybody (else)
2. Is it likely to appear soon

and if the answer to those resolved to "no", is there interest in a volunteer to add it ?

view this post on Zulip Grahame Grieve (May 26 2017 at 21:06):

the FHIR team is putting all the work into the current build validator. It is able to validate version 1.0.2, 1.4, 3.0, and current. It is very good at slice validation. @James Agnew - need to work on moving HAPI to use the current build validator

view this post on Zulip Damian Murphy (May 31 2017 at 08:43):

Thanks - that should save a bunch of effort. Is this the one from the HL7 FHIR site, or in the HAPI Maven repository ? (The precise relationship between HAPI and the official validator is something I'm a little unclear on since the newer validator from the HL7 site includes HAPI classes).

view this post on Zulip Grahame Grieve (May 31 2017 at 20:32):

HAPI uses code from the build. In order to get the code from the build to integrate into HAPI properly, some of the HAPI infrastructure is in the build, but only supporting code - it's not HAPI itself.

view this post on Zulip Grahame Grieve (May 31 2017 at 20:33):

what we usually say to people is: if you're doing implementations, you should use HAPI, not the code in the build (though you can, and people do) - but code from the build is not, e.g. distributed via Maven - we do that through HAPI

view this post on Zulip Damian Murphy (Jun 02 2017 at 11:50):

Just taken a look at the validator.zip from the HL7 FHIR site. That removes some of the abrupt user feedback from the current sources on GitHub (throw new Error) but it isn't clear that it is actually validating slices (InstanceValidator.getValueForDiscriminator(), at least in all cases: for example returning null and valueMatches() always returning false - I did those sorts of things myself). It looks like there is a route through the code where it is validating for url discriminators, but in some cases the profiles I'm looking at use a coding system as discriminator.

view this post on Zulip Grahame Grieve (Jun 02 2017 at 22:51):

can you provide a profile and instance for testing? I'm working on unit tests for the validator at the moment

view this post on Zulip Damian Murphy (Jun 05 2017 at 13:30):

Yes, I'll dig some out. They're the ones from the NHS UK "Care Connect" API on github.

view this post on Zulip Damian Murphy (Jun 05 2017 at 21:47):

Sorry about the wait. Line 661 of the structure definition has a slice with a system as discriminator (patient ids using national or local identifiers). Plus an example.,SD_ADW-Patient-1-0-Ex01.xml EX_ADW-Patient-1-0-Ex01.xml

view this post on Zulip Grahame Grieve (Jun 07 2017 at 01:33):

which profile - I didn't find the patient profile in any branch? (or I looked in the wrong repository)

view this post on Zulip Damian Murphy (Jun 07 2017 at 19:09):

They're in the attached files. Those were made for me for testing validation (basically small enough for debugging easily) and I don't think they're in any repo.

view this post on Zulip Grahame Grieve (Jun 07 2017 at 23:28):

oops. so they are. I'll need the extension definitions too


Last updated: Apr 12 2022 at 19:14 UTC