FHIR Chat · ClinFHIR · shorthand

Stream: shorthand

Topic: ClinFHIR


view this post on Zulip Craig Anderson (Jan 05 2022 at 12:53):

@David Hay , happy new year David,

Is there a way for ClinFHIR to build bundles in FSH? Or does it only build the bundle in JSON?

I used ClinFHIR to build the bundle and pasted the JSON output into https://fshschool.org/FSHOnline/#/ to convert it to FSH.

The FSH online site either just spins forever and produces nothing or it gives me one error: 'error Definition of ResourceType not found for undefined. Cannot export any Assignment Rules'

view this post on Zulip Chris Moesel (Jan 05 2022 at 13:20):

@Craig Anderson - I know you asked a question of David, but I’m interested in the bit about FSH Online. If the bundle is extremely large, it’s possible that FSH Online is just bumping into limitations based on browser memory. Or something else could be going on. If you want us to look into it, please attach the bundle to this thread or DM it to me.

view this post on Zulip David Hay (Jan 05 2022 at 16:44):

I was also going to suggest that you mention the issue to the mitre team! Assuming that you're using graphbuilder. then there' an option to save the FSH directly to a file - in the content tab of a view there's a link to the right 'Download all FSH'. Could you do that and upload the result here? Could be some issue with the FSH generation in CF...

view this post on Zulip Craig Anderson (Jan 05 2022 at 20:28):

@Chris Moesel , see attached for a copy of the JSON and, as @David Hay suggested, a copy of the Download all FSH file.

Vulcan-ePI-Sample-Initial-view-fsh-3.fsh Vulcan-ePI-Sample-Initial-view-3.json

view this post on Zulip David Hay (Jan 05 2022 at 23:22):

So I was able to paste into fshschool - but quite a few errors, and only 10 of the instances were converted. @Chris Moesel could it be related to R5 (which is what this graph is)? @Craig Anderson - can you save to the library and send me the link?

view this post on Zulip Chris Moesel (Jan 05 2022 at 23:29):

Oh. Yeah. FSH Online only supports R4 at the moment. So that would probably be important in this case.

view this post on Zulip Jens Villadsen (Jan 05 2022 at 23:31):

@Chris Moesel what about gofsh- does that support 5.0.0-snapshot1?

view this post on Zulip Chris Moesel (Jan 05 2022 at 23:32):

Uhhh.... that's a GREAT question that I honestly do not remember. I will have to look it up.

view this post on Zulip Chris Moesel (Jan 05 2022 at 23:45):

So the answer is no, GoFSH does not currently support 5.0.0-snapshot1. GoFSH uses the dependency loader from SUSHI, but the current release uses the SUSHI 2.2.4 loader, and 5.0.0-snapshot1 support was added in SUSHI 2.2.5. We should be able to update GoFSH pretty easily though. Probably tomorrow.

view this post on Zulip Craig Anderson (Jan 06 2022 at 00:12):

David Hay said:

So I was able to paste into fshschool - but quite a few errors, and only 10 of the instances were converted. Chris Moesel could it be related to R5 (which is what this graph is)? Craig Anderson - can you save to the library and send me the link?

Having some trouble saving the latest one but here is a link to a recent one that is similar: http://gb2.clinfhir.com#cfsb1639492546985.

Here's a smaller and less complicated one: http://gb2.clinfhir.com#id1639753349790

view this post on Zulip David Hay (Jan 06 2022 at 00:55):

What sort of trouble?

view this post on Zulip David Hay (Jan 06 2022 at 01:00):

and that first graph certainly is complex! Interesting that the narrative is so large as well. Might be worth having a separate view to show narrative - I'll think on it... The other thing I'll look at doing is to import from FSH. For simplicities sake, I'll assume a single FSH file that has all the resources instances in it. That way, the FSH download can act as a kind of backup in case of issues.

view this post on Zulip Craig Anderson (Jan 06 2022 at 10:28):

David Hay said:

What sort of trouble?

Went into Save to Server (HAPI R5) > Prepare to Save and it showed errors that were not picked up by the normal validation step when the resources were built. For example,

  1. All resources had this error
    dom-6: 'A resource should have narrative for robust management' Rule 'A resource should have narrative for robust management' Failed

  2. Got this error for both Composition resources Package Leaflet 120 mg and Package Leaflet 30 mg

dom-6: 'A resource should have narrative for robust management' Rule 'A resource should have narrative for robust management' Failed
None of the codings provided are in the value set http://hl7.org/fhir/ValueSet/doc-typecodes (http://hl7.org/fhir/ValueSet/doc-typecodes), and a coding is recommended to come from this value set) (codes = https://spor.ema.europa.eu/#100000155538)
The value provided ('unrestricted') is not in the value set http://terminology.hl7.org/ValueSet/v3-Confidentiality|2.0.0|2.0.0 (http://terminology.hl7.org/ValueSet/v3-Confidentiality), and a code is required from this value set) (error message = Unknown code 'unrestricted' for in-memory expansion of ValueSet 'http://terminology.hl7.org/ValueSet/v3-Confidentiality')

  1. Numerous errors where I used to capture the ISO country code and system. This one should be an easy fix so not a big deal.
    Unknown code 'urn:iso:std:iso:3166#eu' for 'urn:iso:std:iso:3166#eu'
    Unknown code 'urn:iso:std:iso:3166#eu' for 'urn:iso:std:iso:3166#eu'

view this post on Zulip Craig Anderson (Jan 06 2022 at 10:35):

David Hay said:

and that first graph certainly is complex! Interesting that the narrative is so large as well. Might be worth having a separate view to show narrative - I'll think on it... The other thing I'll look at doing is to import from FSH. For simplicities sake, I'll assume a single FSH file that has all the resources instances in it. That way, the FSH download can act as a kind of backup in case of issues.

Agreed. Based on our experience so far, these Electronic Product Information (ePI) documents (a.k.a medicinal product labels) involve about 90 resources. And that narrative text is just the short version! That is only the patient leaflet which is normally a few pages. The document for healthcare professionals can range anywhere from 40 pages for a simple product up to 200 pages for a complex biologic product.

Import from FSH would be great. Yes, a single file sounds easiest.

Also, I notice how in the Prepare to Save window, clicking on the resource name brings you to the edit resource window. Could that feature be added to the Resource References tab view? Since the resource list is so long, to edit the ones at the bottom you have to scroll down, select it, then scroll up to the top to click on the Resource Content tab to edit the resource content.

view this post on Zulip David Hay (Jan 06 2022 at 17:49):

So the 'prepare to save' has 2 main steps:

  1. Call the sushi API for all resources - this returns 'sushi level' validation which is (deliberately) not comprehensive. You cannot save to a server if any resources fail this step.
  2. Then calls the $validate operation on the data server. This tends to be more comprehensive - but errors / warnings here won't prevent an attempted save (hapi is quite forgiving of issues). Most of the errors you mention came from this step and - generally - can be disregarded (for our purposes anyway). eg whether a given code is in the ValueSet. Up to you to fix if that is important to you.

wrt the edit resource comment - one thing that might work for you is to select that tab, then in the right hand pane select the resource content tab. As you select a resource in the left side, the FSH content is shown in the right. You can edit the text directly in the text box (it will save automatically) or click the edit icon at the top right to enter the editor. Will that work for you? There's also a refresh icon next to the edit icon that calls the sushi API.

btw - given the amount of work you are putting into this, I'd recommend regularly downloading the FSH into a file. It would be a tragedy for there to be some browser based issue and you lose the lot! The import FSH that I'll implement would allow you to recover from this... Actually, another option might be to allow a save the FSH to a Binary or DocumentReference resource on the server with a subsequent import.

bbtw - what's the performance like with these big graphs? I haven't really tried to optimize for performance thus far but you are pushing the boundaries! (a good thing :) )

view this post on Zulip David Hay (Jan 06 2022 at 19:13):

Actually - thinking of big graphs - they are stored in the browser cache, which has a limited size. Not sure what will happen if a graph gets over large.. (actually all the graphs a user has)...

view this post on Zulip Chris Moesel (Jan 06 2022 at 19:48):

@Jens Villadsen - the new GoFSH 1.4.3 now supports FHIR 5.0.0-snapshot1.

view this post on Zulip Craig Anderson (Jan 07 2022 at 00:11):

@David Hay , performance is great! To the point I haven’t even thought about it until you asked.

When you first open the ski Lawrence sample, it takes a few seconds (maybe 4s) for the graph to appear but no big deal. all the resources appear in the References tab right away anyways so it’s not like anything slows me down.

Validation and building bundles is pretty fast too.

view this post on Zulip Craig Anderson (Jan 07 2022 at 00:13):

Thanks for the tip on graph size and backups. Will use the download all FSH and the bundle to save offline just in case.

view this post on Zulip David Hay (Jan 07 2022 at 22:26):

That's good! Almost finished the import from FSH option, so will ping you when that's done.


Last updated: Apr 12 2022 at 19:14 UTC