FHIR Chat · IG input validation · IG creation

Stream: IG creation

Topic: IG input validation


view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:12):

One idea to quickly catch some errors in the IG input: we could define StructureDefs on the ImplementationGuide resource, for a few constraints:

  1. base : all the necessary parameters for the publisher and template to be able to work
  2. hl7: all the additional constraints for the HL7 templates to work
    (3. same for IHE but that was on another thread)

view this post on Zulip Lloyd McKenzie (May 15 2020 at 20:15):

We could possibly have template pass parameters to the IGPublisher that indicate profiles to use for validating specific types of artifacts on load. Not sure how feasible that is though. Thoughts @Grahame Grieve?

view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:18):

(We could ask the build script to call the validator but that would mean adding a command-line option)

view this post on Zulip Lloyd McKenzie (May 15 2020 at 20:27):

The validator has a commandline option. The bigger issue is that launching the validator is slow - and we'd want to use different profiles for different artifacts, which would mean launching it multiple times and probably adding a few minutes or more to the overall build

view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:35):

sorry, I meant adding a command-line option to the Publisher - we don't want to have 2 large jars if 1 could do it

view this post on Zulip Grahame Grieve (May 15 2020 at 20:36):

I admit to not understanding what the point of this is.

view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:37):

This would be a sanity check so I think it would save time - and we could make it an option so we can turn it off.

view this post on Zulip Grahame Grieve (May 15 2020 at 20:37):

the template should check any input parameters it depends on. And the publisher already checks everything it needs up front

view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:40):

yes, each template should check those parameters.
This could be done with xslt - which is what happens now, and the output is somewhere in the console output.
OR we could validate the source against a profile - which is an available functionality in the validator.

view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:41):

doing it with a profile allows ups to maintain the rules separately from the xslt. Depending on who we ask, maintaining a structureDef is easier to maintain than xslt.

view this post on Zulip Grahame Grieve (May 15 2020 at 20:41):

and then produce output in qa.html?

view this post on Zulip Jose Costa Teixeira (May 15 2020 at 20:41):

i was not thinking of producing qa, but could be - depends on what the validator can do

view this post on Zulip Jose Costa Teixeira (Aug 18 2020 at 21:49):

I see an error that may relate to this:
Validation_VAL_Profile_Minimum
Profile http://hl7.org/fhir/StructureDefinition/ImplementationGuide, Element 'ImplementationGuide.definition.resource': minimum required = 1, but only found 0

view this post on Zulip Jose Costa Teixeira (Aug 18 2020 at 21:52):

  1. is this using the validator mechanism?
  2. if so, can we tell it to validate another profile, e.g. profiles.ihe.net/fhir/StructureDefinition/ihe-implementationguide ?

view this post on Zulip Grahame Grieve (Aug 18 2020 at 21:52):

I don't follow either question

view this post on Zulip Jose Costa Teixeira (Aug 18 2020 at 21:55):

say in IHE we want to have constraints on the input IG, like "contact[0] must be a url for ihe, contact[1] must be a url for the ihe domain, contact[2] must be an email..."

view this post on Zulip Jose Costa Teixeira (Aug 18 2020 at 21:56):

if we define those constraints in a structuredef, can we tell publisher to validate the ig.xml against that structuredef (instead of against the core hl7.org/fhir/structuredefinition/implementationguide)?

view this post on Zulip Jose Costa Teixeira (Aug 18 2020 at 21:57):

I'm not requesting this feature, i'm just asking if the code that gives me that error could allow that.

view this post on Zulip Jose Costa Teixeira (Aug 18 2020 at 21:58):

if it is feasible/sensible, then I will create an issue in the github repo.

view this post on Zulip Grahame Grieve (Aug 18 2020 at 22:13):

I'm not sure about this. The IG itself is the master definition. It can invoke the profile on itself in ImplementationGuide.meta.profile. But since it's the master, where else can you impose a rule like that?


Last updated: Apr 12 2022 at 19:14 UTC