FHIR Chat · Edit existing resource instance? · clinFHIR

Stream: clinFHIR

Topic: Edit existing resource instance?


view this post on Zulip Dave Carlson (Sep 09 2017 at 23:11):

Hi David, we are looking at clinFHIR in the care plan track. If I have an existing CarePlan instance on the data server, is there any way to open this resource in the scenario builder, edit it, and save back to to the server? It appears that we can only create a new resource instance.

view this post on Zulip David Hay (Sep 10 2017 at 00:03):

Hi Dave - couple of ways.
You could either paste the current resource in to the SB then save it back, or create a scenario and select the patient from the server when starting. Then you can load the CP directly and edit/update.
To do that, create a new scenario -then select the description tab and in teh middle of that tab is a button where you can select the patient from the server (It's not that well labelled actually - I should correct that).
Once you've selected a patient in that way, when adding a resource to the scenario there a new tab to the right labelled 'Existing Resources' where you can pull existing resources for that patient from the server, edit and update.

view this post on Zulip David Hay (Sep 10 2017 at 00:03):

Couple of caveats:

view this post on Zulip David Hay (Sep 10 2017 at 00:04):

The data server needs to support the $everything operation to work properly

view this post on Zulip David Hay (Sep 10 2017 at 00:05):

And the careplan is a complex resource - I'm not sure that CF will edit it correctly (but keen to find out any issues of course!). Provided that the server supports versions, then you can always go back to previous version in the event of issues...

view this post on Zulip David Hay (Sep 10 2017 at 00:05):

Let me know how you get on!

view this post on Zulip Dave Carlson (Sep 10 2017 at 00:06):

Great, thanks David! I'll work through this tonight and (hopefully) share the process with our group in the morning.

view this post on Zulip David Hay (Sep 10 2017 at 00:08):

Good oh! it's afternoon for me so available for any issues...

view this post on Zulip Dave Carlson (Sep 10 2017 at 00:08):

I am using the HSPC server which is based on HAPI, so does have support for $everything and resource versions. I'll report back on my experience!

view this post on Zulip Dave Carlson (Sep 10 2017 at 22:22):

Hi David, we were successful at creating a scenario using an existing patient and care plan, then creating and adding goals and activities. Thanks so much for providing guidance! However, we still had a challenge attempting to collaborate between two or more authors. Person A creates a new resource and adds to the care plan in their clinFHIR scenario, saves their library, and updates the server. I can see these changes on the HSPC Care Plan server. Person B previously created a scenario including the same patient and care plan resources, but cannot see updates to CarePlan made by Person A. Any ideas how to support this collaboration? Thanks!!

view this post on Zulip David Hay (Sep 11 2017 at 04:10):

Glad that it all worked out! wrt the collaborators - an interesting challenge - the next frontier! (In fact I do recall Viet asking about this as well)... Assuming that the collaborators can talk to another then I do have a couple of ideas. I'm guessing that this will be useful for the Clinician On FHIR event on friday?

view this post on Zulip David Hay (Sep 11 2017 at 04:24):

In the meantime, could you try this out.

  • User 1 create a scenario, linking to an existing patient (create a scenario, then select the patient using the button in the middle of the description tab. Choose a patient without too many existing resources.
  • create a scenario and save back to the server
  • User 2 create a new scenario for the same patient. They select the existing resources using the 'Existing Resources' tab on the right that appears when you click the 'Add Resource button'. They should see all the resources - including the ones created by user 1. Create a scenario - selecting the existing resources where possible. Eventually save back to the server.
  • User 1 creates a new scenario for the patient. Again they should be able to see (and select) the existing resources.
  • rinse and repeat.

If this works, I'll look to streamline things so if you can check it out asap that would be great. (What I'm thinking is a way to make it easier to add a lot of existing resources into the scenario rather than selecting them individually. In fact, an 'edit scenario' option that does this might be the way to go - once I figure out how to do that!)

view this post on Zulip David Hay (Sep 11 2017 at 04:31):

Actually, another possibility comes to mind. Perhaps something like a 'refresh scenario' that works on an existing scenario and pulls in the latest versions of resources in that scenario (plus any new ones references by those resources) from the server might be tidier. Does still depend on choosing existing resources during the 'Add resource' process where possible though...

view this post on Zulip David Hay (Sep 12 2017 at 01:35):

OK - have added a 'refresh scenario' (top right) to the scenario builder that will update the contents of the the current scenario from the server resources. Use it like this.

User 1
1. Create a new scenario, and select a patient from the server
2. Add whatever resources you want (direct or select)
3. Make sure they are all valid (validate all function)
4. save to the server
5. save to the library (now in the gear icon)

User2
1. Go to the library, locate the scenario and download
2. Make any changes, and save to the server

User1
1. Use the 'refresh Scenario' to update the resources in the scenario from the server.

At this stage, both users are 'connected' to the same scenario and should be able to share updates.

Some caveats:

  • There is no checking to see which is the most up to date - when you refresh a scenario the resources in your copy will be replaced by the server ones. I'm planning to create a local version before the update occurs - but should I track versions?
  • Right now, if user2 adds a resource it won't be present when user1 refreshes - only the resources currently in the local scenario will be updated. I'm working in this...

So have a play and let me know how it works out...

view this post on Zulip Dave Carlson (Sep 12 2017 at 15:16):

Thanks David, as always, really appreciate your help and quick response! Have been wrapped up in the WGM, but will try and test this scenario update with a few folks this week before the clinicians on FHIR.

view this post on Zulip Dave Carlson (Sep 13 2017 at 20:57):

Hi David, during the FHIR connectathon you removed the "connectathon 14" server from clinFHIR default list. @Viet Nguyen just asked me if this server can be added back, he has a test example on this server for Clinicians on FHIR. Thanks. URL is https://api3.hspconsortium.org/fhirconnect14/open

view this post on Zulip David Hay (Sep 13 2017 at 21:05):

will do. I'm right in the middle of refactoring the ExtensionDefinition editor right now so probably won't be for several hours. @Viet Nguyen if you need to test before then, just add the server manually. I'll ping here when I update...

view this post on Zulip Dave Carlson (Sep 13 2017 at 21:14):

Thanks David! I already send the server URL to Viet.

view this post on Zulip David Hay (Sep 13 2017 at 21:54):

All done! I called it HSPC-14 ...


Last updated: Apr 12 2022 at 19:14 UTC