How to update a record on the SMART on FHIR tutorial

306 views
Skip to first unread message

Caleb Linduff

unread,
May 29, 2018, 10:43:26 AM5/29/18
to SMART on FHIR
I am in the process of learning how to write apps using smart-on-fhir. I have gone through the tutorials on http://docs.smarthealthit.org/tutorials/ , and I am running into some issues regarding updating a record. 

The first tutorial has a simple program on plnkr and I put in an update:

    smart.api.update({type: pt.resourceType, data: JSON.stringify(pt), id: pt.id});

(Note: I found this method of updating on https://healthservices.atlassian.net/wiki/spaces/HSPC/pages/64585804/How+to+Update+a+Patient+Record . I have not been able to find any documentation that shows the syntax for updating. If someone can link to any documentation, that would be helpful.)

This allowed me, as far as I can tell, to successfully change something in pt (gender, for example). Then when I read into pt again, it would have the changes that I put. 

I tried the same thing with the Cerner Sandbox SMART-on-FHIR Tutorial. When I try to update, it gives a 404 error (not found). I checked the 3 parameters, and they seem to be inputting the right data, but for some reason, it isn't working. 

I am thinking this might have something to do with the second example needing authorization. Or maybe the environment, code.cerner.com , doesn't allow for updates.

If anyone has any info that would help me figure out my problem, I would greatly appreciate it!


Michele Mottini

unread,
May 29, 2018, 10:51:59 AM5/29/18
to SMART on FHIR
Cerner does not support updating patient's - see https://fhir.cerner.com/millennium/dstu2/individuals/patient/

Documentation of updates is at http://hl7.org/fhir/http.html#update

  - Michele
  CareEvolution Inc


Caleb Linduff

unread,
May 31, 2018, 8:19:39 AM5/31/18
to SMART on FHIR
Interesting. So my task is that when we receive new information (BP, heart rate, general notes), we are to update the electronic health record to show those changes. Maybe I am approaching this the wrong way.

Do you know how I would go about getting this done? 

Thanks!

Michele Mottini

unread,
May 31, 2018, 9:44:34 AM5/31/18
to SMART on FHIR
BP and Heart Rate would be FHIR Observation; general notes would be FHIR DiagnosticReport maybe - but both of those cannot be created on Cerner though.

What can be created on Cerner are FHIR DocumentReference - maybe those can be used for notes (see https://fhir.cerner.com/millennium/dstu2/infrastructure/document-reference/)

I don't think updating the health record is something that can be done consistently using FHIR as it is currently implemented by vendors. It is mostly to read data, not to create/modify it

   - Michele
  CareEvolution Inc

Jenni Syed (Cerner)

unread,
Jun 1, 2018, 10:27:46 AM6/1/18
to SMART on FHIR
Hi Caleb,

Notes would be DocumentReference (which you can create on our server). The vitals you list would be Observation, which we don't currently support for write.

You could make the application gracefully degrade by reading the Conformance/CapabilityStatement document to determine what is supported up front. This also assumes the application still provides benefit with the supported subset of functionality.

Also, if you have questions specifically about Cerner's FHIR server, feel free to ask on our google group: https://groups.google.com/forum/#!forum/cerner-fhir-developers

Regards,
Jenni
Reply all
Reply to author
Forward
0 new messages