Stream: IG creation
Topic: Logical Models: snapshot Vs differential
Giorgio Cangioli (Jun 01 2019 at 09:20):
I noticed that there are different expectations about LM from different tools: forge specifies LM using snapshots, the IG builder expects to have the elements in the differential.
Is there any way to by-pass this ?
I.e. Allow forge to save as differential and/or permit the IG publisher to build the IG without failures if the LMs are specified as snapshot.
Michel Rutten (Jun 03 2019 at 10:06):
FYI Forge serializes logical models to a snapshot component because Grahame once instructed me to do so (over 1y ago). I'm a bit surprised that the IG builder has different expectations.
Grahame Grieve (Jun 03 2019 at 10:13):
? what different expectations?
Giorgio Cangioli (Jun 03 2019 at 15:20):
just to be more clear :-)
to have the IG correctly built by the IG builder I specified my Logical Models by using the differential.
If someone tries to edit my logical models with forge , the new version is saved as snapshot, this is the result with the IG builder
org.hl7.fhir.exceptions.FHIRException: Differential is empty generating hierarchical table
Giorgio Cangioli (Jun 03 2019 at 15:25):
so my question is if there is a way to force forge to save the logical models as differential and/or to have the IG builder accepting logical models having only the snapshot
Grahame Grieve (Jun 04 2019 at 00:30):
well, @Michel Rutten will have to deal with Forge but I can look at hte IG Publisher
Michel Rutten (Jun 04 2019 at 08:47):
As I mentioned, the Forge implementation follows your guidelines. However if I misunderstood and/or need to change something, let me know.
Brian Reinhold (Jun 04 2019 at 11:12):
@Michel Rutten What would it take to port my IG built using Lloyd's framework to Forge/Simplifier or whatever it is called now? The content I create is xml structure definitions and markdown pages and json examples. I have not created any html files. The framework takes these and creates the web pages IG. I have no idea how that part works. The most difficult part for me was the creation of the structure definition xml files. I did it using Notepad++. The files are hard to read and it was very error prone.
Michel Rutten (Jun 04 2019 at 11:25):
Hi @Brian Reinhold, I assume that you reverted to manual (Notepad++) profile authoring because you need R4 support? Recently we published Forge for R4, so you don't need to edit XML/JSON anymore.
Simplifier now also supports FHIR R4. So you can upload your profiles to Simplifier and use the online IG editor to create a new guide. There is not automatic tool to convert an existing IG from IG Publisher input format to Simplifier. However you can copy/paste the markdown, formatting is the same. Then you'd have to manually replace special "placeholders" for the IG Publisher with placeholders supported by Simplifier, e.g. to render a profile tree.
I suggest you try it out with a small (dummy) IG and a couple of pages, to get an indication of the amount of work involved to port the full IG.
Brian Reinhold (Jun 04 2019 at 11:29):
@Michel Rutten Yes, I needed R4 support. The IG publisher gives validation of examples as well. That is pretty important. I suppose the same is true in Simplifier/Forge?
Michel Rutten (Jun 04 2019 at 11:48):
Yes, you can upload examples to Simplifier and validate them, provided that they contain a meta.profile claim and the target profile can be resolved. Simplifier will then validate the example against the referenced target profile.
Michel Rutten (Jun 04 2019 at 11:50):
Please note that Simplifier and IG publisher validation features/reports are similar, but not identical.
Jose Costa Teixeira (Sep 02 2019 at 09:51):
@Michel Rutten can we make a Logical Model from a resource in Forge? I thought we could only start from Element..
Michel Rutten (Sep 02 2019 at 10:48):
Hi @Jose Costa Teixeira, I'm not sure I understand your question. Would you like to transform an existing resource into a (similar) logical model? You can manually edit the XML/JSON and update StructureDefinition.kind
to logical
.
In Forge, a Logical Model is always based on Element
, as Grahame once suggested to me. However theoretically, you could also derive a logical model from another base class such as Resource
or DomainResource
. Not sure if FHIR (R4) allows this?
Jose Costa Teixeira (Sep 02 2019 at 10:51):
Yes, from this thread, that is what I understood people were talking about - using a resource to create a similar logical model.
Jose Costa Teixeira (Sep 02 2019 at 10:51):
If that is not foreseen, there is no problem, I just thought it was what was being discussed in this thread, and I wondered if I was missing out on that.
Michel Rutten (Sep 02 2019 at 11:08):
Current behavior has been developed historically. If FHIR also allows other base classes for Logical Models, such as Resource
and/or DomainResource
, I could easily update Forge to support that.
Jose Costa Teixeira (Sep 02 2019 at 11:14):
thanks
Grahame Grieve (Sep 02 2019 at 19:46):
I don't think we've ever talked about it
Michel Rutten (Sep 03 2019 at 10:44):
I'm open for suggestions
Jose Costa Teixeira (Sep 03 2019 at 11:27):
I think we can live quite well with changing .kind to logical. I was wondering if there was a way to do that in Forge directly.
If the discussion is "should a LM be based on something else then Element", I don't see a reason why we'd want that.
Michel Rutten (Sep 03 2019 at 11:48):
Hi @Jose Costa Teixeira, thanks for the helpful feedback. It's relatively easy to implement a command in Forge to create a new logical model based on an existing profile. However we don't want to (further) clutter the UI - the learning curve is already quite steep. Therefore I am reluctant to introduce advanced new features for very specific use cases. Do you think this would be frequently used?
Jose Costa Teixeira (Sep 03 2019 at 11:50):
only in a ramp-up phase, I guess.
Perhaps this is just a matter of documentation / academy than changing the UI indeed
Michel Rutten (Sep 03 2019 at 11:51):
For coincidental use, I guess it's not that hard to hack the StructureDefinition.kind
value using a plain text editor.
Jose Costa Teixeira (Sep 03 2019 at 11:52):
when we create a new LM, it provides a list with just one entry. My question started because I thought I was missing something
Jose Costa Teixeira (Sep 03 2019 at 11:53):
I wondered if besides profile-type.xml (Definition for Element) we would have something else. Not change to the UI.
Jose Costa Teixeira (Sep 03 2019 at 11:54):
yes, I will just take a bunch of StructureDefinitions, change them to reuse in Logical Models.
Jose Costa Teixeira (Sep 03 2019 at 11:54):
thanks, @Michel Rutten
Michel Rutten (Sep 03 2019 at 11:57):
Theoretically, one could define a derived logical model based upon another logical model. Not sure if this is actually useful and/or helpful...?
Michel Rutten (Sep 03 2019 at 11:58):
We could also allow slicing & extensions in logical models, but again, not sure if this would provide any value.
Last updated: Apr 12 2022 at 19:14 UTC