Stream: IG creation
Topic: generated examples when have >1 types error
Eric Haas (Apr 17 2018 at 06:59):
Here is my SD :
<element id="omh-heart-rate.effectiveTimeFrame"> <path value="omh-heart-rate.effectiveTimeFrame"/> <definition value="A time frame as a point in time or a time interval."/> <min value="0"/> <max value="1"/> <type> <code value="dateTime"/> </type> <type> <code value="Period"/> </type> <example> <label value="example-2"/> <valueDateTime value="2014-02-27T02:17:19Z"/> </example> <mustSupport value="false"/> <isModifier value="false"/> <ma...
Here is the error when try to generate example using the ig-pub....
Check Generate /Users/ehaas/Documents/FHIR/IG-Template2/generated_output/temp/omh-heart-rate-omh-heart-rate-genexample.html (00:40:11.0658sec) Exception in thread "main" java.lang.Error: logic error, gettype when types > 1, name mismatch for effectiveTimeFrame on at omh-heart-rate.effectiveTimeFrame at org.hl7.fhir.r4.elementmodel.Property.getType(Property.java:89) at org.hl7.fhir.r4.elementmodel.Element.isPrimitive(Element.java:423) at org.hl7.fhir.r4.elementmodel.XmlParser.composeElement(XmlParser.java:414) at org.hl7.fhir.r4.elementmodel.XmlParser.composeElement(XmlParser.java:459) at org.hl7.fhir.r4.elementmodel.XmlParser.compose(XmlParser.java:392) at org.hl7.fhir.igtools.publisher.Publisher.saveDirectResourceOutputs(Publisher.java:3724) at org.hl7.fhir.igtools.publisher.Publisher.generateOutputs(Publisher.java:3604) at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:2461) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:473) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4378) Erics-Air-2:IG-Template2 ehaas$
Grahame Grieve (Apr 17 2018 at 09:23):
hmm. I think the IG publisher should accept just getting a snapshot, but I didn't think of it when writing that bit
Michel Rutten (Apr 17 2018 at 09:50):
Does this make sense though? I would expected concrete example list items to be constrained to the (single) type of the actual example.
Eric Haas (Apr 17 2018 at 15:46):
Its not supported in Forge, but I would expect an example for a choice element to be common - especially in the case where are trying to use tooling to generate examples from the SD. Personally for me is not a big deal, I can generate offline.
Michel Rutten (Apr 17 2018 at 16:10):
But if .example.value[x]
is not constrained to a single type, then you cannot specify an example value? Rather, choice type elements could specify multiple example components, one for each supported element type.
Eric Haas (Apr 17 2018 at 16:20):
Already is supported with example.valueDateTime vs example.valuePeriod. I'm not sure what you mean.
Michel Rutten (Apr 17 2018 at 16:23):
ElementDefinition.example component is defined as 0...*, so you can add multiple examples, e.g. one per datatype.
Last updated: Apr 12 2022 at 19:14 UTC