Stream: IG creation
Topic: Logical Models
John Moehrke (Feb 06 2019 at 18:05):
Does the IG build support Logical Models? I have one created in Forge, but it fails in the build. Likely I am doing something wrong. please point me at a IG that uses a logical model
Lloyd McKenzie (Feb 06 2019 at 18:08):
What's the failure message?
John Moehrke (Feb 06 2019 at 18:15):
[java] java.lang.Exception: Unable to determine type for C:\Users\john.moehrke\Git\eLTSS\src\resources\eltss-logical-model: Resource has no id in C:\Users\john.moehrke\Git\eLTSS\src\resources\eltss-logical-model.xml [java] at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2402) [java] at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:1786) [java] at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:583) [java] at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:527) [java] at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4933) [java] Caused by: java.lang.Exception: Resource has no id in C:\Users\john.moehrke\Git\eLTSS\src\resources\eltss-logical-model.xml [java] at org.hl7.fhir.igtools.publisher.Publisher.loadAsElementModel(Publisher.java:2349) [java] ... 4 more
John Moehrke (Feb 06 2019 at 18:16):
I added it to my IG xml file as such
<resource> <reference> <reference value="StructureDefinition/eltss-logical-model"/> </reference> <name value="LogicalModel"/> <description value="Defines the Logocal Model for eLTSS."/> <exampleBoolean value="false"/> <groupingId value="general"/> </resource>
John Moehrke (Feb 06 2019 at 18:17):
it is all checked in with this commented out https://github.com/HL7/eLTSS
Lloyd McKenzie (Feb 06 2019 at 18:18):
Ok. And does the referenced resource in fact have an id?
John Moehrke (Feb 06 2019 at 18:31):
well.... no.
John Moehrke (Feb 06 2019 at 18:32):
odd that Forge left it that way...
John Moehrke (Feb 06 2019 at 18:32):
<StructureDefinition xmlns="http://hl7.org/fhir">
<url value="http://example.org/fhir/StructureDefinition/eLTSS" />
<name value="eLTSS" />
<status value="draft" />
<fhirVersion value="3.0.1" />
<kind value="logical" />
....
Chris Moesel (Feb 06 2019 at 18:33):
FYI -- our BreastCancer IG has logical models. Note, however, that it was built a while ago (not with the latest publisher).
Chris Moesel (Feb 06 2019 at 18:33):
And we didn't use Forge.
John Moehrke (Feb 06 2019 at 18:36):
added an id element... got a different failure
[java] C:\Users\john.moehrke\Git\eLTSS\src\resources\eltss-logical-model
[java] Publishing Content Failed: Differential is empty generating hierarchical table for http://example.org/fhir/StructureDefinition/eLTSS (49.0270sec)
[java] (49.0270sec)
[java] Use -? to get command line help (49.0270sec)
[java] (49.0271sec)
[java] Stack Dump (for debugging): (49.0271sec)
[java] org.hl7.fhir.exceptions.FHIRException: Differential is empty generating hierarchical table for http://example.org/fhir/StructureDefinition/eLTSS
[java] at org.hl7.fhir.r4.conformance.ProfileUtilities.generateTable(ProfileUtilities.java:2217)
Eric Haas (Feb 06 2019 at 18:43):
I had created one a while back ... will try to resurrect it...
John Moehrke (Feb 06 2019 at 19:14):
Is this an issue with how Forge exported? Meaning is there alternatives in Forge for export? @Michel Rutten
Lloyd McKenzie (Feb 06 2019 at 19:26):
Is there a differential? I believe there should be, even for logical models
John Moehrke (Feb 06 2019 at 19:33):
It only has snapshot..
Lloyd McKenzie (Feb 06 2019 at 19:51):
I think that's an error with Forge. There should always be a differential that indicates the delta from the base - which for a logical model, might be nothing. That's how it's handled with resources. And logical models can build on other logical models just like resources.
John Moehrke (Feb 06 2019 at 20:03):
okay, I am going to try to get better output from Forge
Chris Moesel (Feb 06 2019 at 21:25):
Yep -- I can confirm that our logical models definitely populated snapshot and differential -- with the same exact data (since they weren't based on anything).
John Moehrke (Feb 06 2019 at 22:52):
@Michel Rutten need help with forge...
Michel Rutten (Feb 11 2019 at 11:06):
Indeed, Forge persists logical model constraints in the snapshot component. This is something I discussed and harmonized with @Grahame Grieve a long time ago. If rules have changed, I'd certainly like to know.
Grahame Grieve (Feb 11 2019 at 16:33):
I don't know about any change here
Lloyd McKenzie (Feb 11 2019 at 16:46):
Does that mean you can have a logical model with no differential? (In which case the problem is that the tooling is trying to re-calculate a snapshot from a differential when it shouldn't) Or does it mean that logical models need to have differential (in which case the understanding of Forge and Firely is incorrect)?
Grahame Grieve (Feb 11 2019 at 16:47):
I'd have to investigate. I don't remember
Michel Rutten (Feb 11 2019 at 17:00):
I recall a discussion about this specific topic in the core team. IIRC, conclusion was that a Logical model is not constraining anything, but defining, therefore constraints are serialized into the snapshot component. I don't have a strong preference, easy to implement either way, just want to make sure that all tools are in sync. Note that the current Forge behavior exists for quite some time, certainly hasn't changed recently. And we haven't received any reports about compatibility/interoperability issues with logical model definitions.
Last updated: Apr 12 2022 at 19:14 UTC