Stream: IG creation
Topic: not the right kind of structure to generate schematrons for
Chris Moesel (Nov 02 2018 at 19:31):
Running a somewhat recent (Oct 1) IG publisher on a DSTU2 IG and I'm getting these errors on all my profiles:
Exception generating resource /Users/cmoesel/dev/standardhealth/shr-cli/out/fhir/guide/resources/structuredefinition-shr-simple-Observation::StructureDefinition/shr-simple-Observation: not the right kind of structure to generate schematrons for (29.0935sec) org.hl7.fhir.exceptions.DefinitionException: not the right kind of structure to generate schematrons for at org.hl7.fhir.r4.conformance.ProfileUtilities.generateSchematrons(ProfileUtilities.java:3171) at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsStructureDefinition(Publisher.java:4460) at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:4055) at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:2775) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:581) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:510) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4895) org.hl7.fhir.r4.conformance.ProfileUtilities.generateSchematrons(ProfileUtilities.java:3171) (29.0935sec) org.hl7.fhir.igtools.publisher.Publisher.generateOutputsStructureDefinition(Publisher.java:4460) (29.0935sec) org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:4055) (29.0935sec) org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:2775) (29.0935sec) org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:581) (29.0935sec) org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:510) (29.0935sec) org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4895) (29.0936sec)
It seems to work fine when generating STU3 IGs, but (obviously) not on DSTU2 IGs. Looking at the source code it references, it appears that error is thrown when structure.getDerivation() != TypeDerivationRule.CONSTRAINT
. In DSTU2, StructureDefinition
doesn't have a derivation
element (it was added in STU3). Might that be the problem?
Grahame Grieve (Nov 09 2018 at 06:42):
problem in my converter then - how do I reproduce this?
(btw, sorry for the tardiness on this stream - I had a long weekend last week and then I've been closing out the main build)
Chris Moesel (Nov 13 2018 at 18:24):
I'll try to get you something to reproduce. I was out at AMIA last week, so I'm catching up as well.
Chris Moesel (Nov 19 2018 at 17:33):
I've looked into this one further and determined the cause of the issue. Although I was setting the base
to the URL for the resource I was profiling, I was not setting the constrainedType
to the name of the resource I was profiling. Once I added constrainedType
, the schematron issue went away.
Jose Costa Teixeira (Oct 22 2019 at 12:07):
I have the same issue (in 4.0.0). I am just trying to create a datatype - a string with up to 320 characters.
Any idea on what to look for or how to fix this?
Last updated: Apr 12 2022 at 19:14 UTC