Stream: shorthand
Topic: Logical Models
Richard Kavanagh (Apr 07 2020 at 15:55):
Is the latest version of SUSHI able to create logical models? I took a look at https://build.fhir.org/ig/HL7/fhir-shorthand/reference.html and there was nothing I could see that suggests it can.
If it can, is there an example somewhere that can be shared.
Jose Costa Teixeira (Apr 07 2020 at 15:58):
I don't think it is yet (I'm waiting for it)
David Hay (Apr 07 2020 at 18:39):
Just out of interest, how do you get a Logical Model into the IG publisher?
Jose Costa Teixeira (Apr 07 2020 at 19:30):
with sushi?
Jose Costa Teixeira (Apr 07 2020 at 19:30):
or in general?
Chris Moesel (Apr 07 2020 at 19:50):
Just confirming... we've talked about supporting logical models in FHIR Shorthand / SUSHI, but we haven't gone very far with design -- and haven't even started implementation. We're trying to nail down the profiling bits of the language before embarking on the logical model journey.
Chris Moesel (Apr 07 2020 at 19:52):
@David Hay -- logical models are just instances of StructureDefinition
(like resources and profiles). If you set kind
to logical
, then the IG Publisher knows it is a logical model and treats it as such.
David Hay (Apr 07 2020 at 20:25):
ta! (I do have a tool that creates them - just wasn't sure how to get them into the IG publisher...) I am setting kind correctly, but it doesn't seem to appear. Will investigate further...
BTW - when copying pages from ig-data/input/pagecontent sushi adds the warning header about not editing it. It shouldn't really do so as can muck up page generation - especially xml files...
Bob Milius (Apr 07 2020 at 20:51):
@David Hay I added the structure definition of the logicial model to build/input/profiles and then edited the build/ImplementationGuide-[igname].json file to add it as another resource. It then shows up in the artifact list. Not sure if that's the correct way tho.
David Hay (Apr 07 2020 at 21:15):
Thanks Bob - I did try that but didn't seem to work. Where in the IG did the LM appear? I'm using LM's from the clinFHIR Logical Modeller, so quite likely that the issue is there...
Bob Milius (Apr 07 2020 at 21:25):
A co-worker gave me a structure definition of a logical model she created in forge. It seems pretty empty when rendered in the IG, but it shows up in toc.html and in artifacts.html. I have it in build/input/profiles/StructureDefinition-mylogicalmodel.xml and the resources entry in the build/ImplemenationGuide-myigname.json file looks like this:
{ "reference": { "reference": "StructureDefinition/mylogicalmodel" }, "name": "MyLogicalModel", "description": "A Logical model", "exampleBoolean": false },
then I just run the publisher via./_genonce.sh
Jose Costa Teixeira (Apr 07 2020 at 21:31):
I make my logical models outside of sushi and pass them through the normal IG build.
This means typing xml by hand (not the most efficient use of one's time...)
Jose Costa Teixeira (Apr 07 2020 at 21:31):
a few here:
http://build.fhir.org/ig/hl7-be/be-core/branches/master/artifacts.html
David Hay (Apr 07 2020 at 21:35):
Did you need to modify the template? Or did the standard one just work...
Jose Costa Teixeira (Apr 07 2020 at 21:35):
standard template
Jose Costa Teixeira (Apr 07 2020 at 21:36):
i have a different template but it doesn't impact logical models
Chris Moesel (Apr 09 2020 at 12:38):
BTW - when copying pages from ig-data/input/pagecontent sushi adds the warning header about not editing it. It shouldn't really do so as can muck up page generation - especially xml files...
There was a bug in where we were putting the warnings in XML files. That's fixed in the next release, due today.
David Hay (Apr 09 2020 at 19:31):
I like fridays! Kinda like a mini-christmas present to look forward to!
David Hay (Apr 11 2020 at 02:30):
So I created a small model and placed it in input/models. It shows up in the IG Ok, but there are no elements displayed (apart from an extension) and I note that the IG publisher (most recent version) adds the following extensions to the first snapshot element, then flags them as an error in the QA
Extensions added:
"extension" : [ { "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status", "valueCode" : "normative" }, { "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version", "valueCode" : "4.0.0" } ],
Original model:
{ "resourceType": "StructureDefinition", "id": "MyPatient", "url": "http://hl7.org.nz/fhir/StructureDefinition/MyPatient", "name": "MyPatient", "purpose": "MyPatient", "status": "draft", "date": "2020-03-31T10:52:15+13:00", "kind": "logical", "abstract": false, "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element", "type": "MyPatient", "derivation": "specialization", "fhirVersion" : "4.0.1", "snapshot": {"element": [ { "label": "MyPatient", "id": "MyPatient", "path": "MyPatient", "definition": "No description", "min": 1, "max": "1", "base": { "path": "Element", "min": 0, "max": "1" } }, { "label": "NHI", "id": "MyPatient.NHI", "path": "MyPatient.NHI", "short": "NHI", "definition": "The National Health Identifier. This is the 'live' identifier. Any previous merged identifiers will be present in the 'dormant' NHI list.", "min": 1, "max": "1", "mustSupport": true, "mapping": [{ "identity": "fhir", "map": "Patient.identifier|" }], "type": [{ "code": "Identifier" }], "base": { "path": "MyPatient.NHI", "min": 0, "max": "1" }, "fixedString": "{\"system\":\"https://standards.digital.health.nz/id/nhi\",\"use\":\"official\"}" } ]} }
Jose Costa Teixeira (Apr 11 2020 at 04:05):
I believe you must have a differential
Jose Costa Teixeira (Apr 11 2020 at 04:05):
@David Hay just replace snapshot by differential and see how it goes
David Hay (Apr 11 2020 at 06:21):
Nicely done! Looks like that did it, thanks :)
Last updated: Apr 12 2022 at 19:14 UTC