FHIR Chat · Logical Models: snapshot Vs differential · IG creation

Stream: IG creation

Topic: Logical Models: snapshot Vs differential


view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Jun 03 2019 at 10:13):

? what different expectations?

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip 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?

view this post on Zulip 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.

view this post on Zulip Michel Rutten (Jun 04 2019 at 11:50):

Please note that Simplifier and IG publisher validation features/reports are similar, but not identical.

view this post on Zulip 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..

view this post on Zulip 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?

view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip Jose Costa Teixeira (Sep 02 2019 at 11:14):

thanks

view this post on Zulip Grahame Grieve (Sep 02 2019 at 19:46):

I don't think we've ever talked about it

view this post on Zulip Michel Rutten (Sep 03 2019 at 10:44):

I'm open for suggestions

view this post on Zulip 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.

view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip 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.

view this post on Zulip Jose Costa Teixeira (Sep 03 2019 at 11:54):

thanks, @Michel Rutten

view this post on Zulip 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...?

view this post on Zulip 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