Stream: IG creation
Topic: IG input validation
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:
- base : all the necessary parameters for the publisher and template to be able to work
- hl7: all the additional constraints for the HL7 templates to work
(3. same for IHE but that was on another thread)
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?
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)
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
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
Grahame Grieve (May 15 2020 at 20:36):
I admit to not understanding what the point of this is.
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.
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
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.
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.
Grahame Grieve (May 15 2020 at 20:41):
and then produce output in qa.html?
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
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
Jose Costa Teixeira (Aug 18 2020 at 21:52):
- is this using the validator mechanism?
- if so, can we tell it to validate another profile, e.g. profiles.ihe.net/fhir/StructureDefinition/ihe-implementationguide ?
Grahame Grieve (Aug 18 2020 at 21:52):
I don't follow either question
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..."
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)?
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.
Jose Costa Teixeira (Aug 18 2020 at 21:58):
if it is feasible/sensible, then I will create an issue in the github repo.
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