SMART writing

And hot on the heels of the last post that referenced a ‘FAQ’ from the SMART on FHIR Support group is this question about using the SMART interface for writing as well as reading data.

The question:

looking at the docs they all show how to get data and launch apps but nothing about sending data. Is the import also fhir or do I have to hack the database instead?

And the reply from Josh:

Great question! The answer boils down to “yes we support writes, but…” 🙂
So here’s the deal: SMART on FHIR uses the FHIR REST API to allow apps to communicate with an EHR system. As such, the API itself provides support for reading as well as writing data. So you’ll see, for example, in our permission model that an app can ask for read-only permissions like “patient/Observation.read” (which allows an app to read all observations about the patient-in-context), or an app can ask for write permissions like “patient/Observation.write” (or “patient/Observation.*”, which is read + write together).
Now in the real world, and especially early on in the adoption curve, we expect that most EHRs will have much better support for read access. So if you’re looking at building an application that runs in as many places as possible, it’s definitely best to think about limiting your access to read-only. (We expect that EHRs will begin to support writes very cautiously, perhaps into some kind of scratchpad area that requires end-user curation before being fully incorporated into a patient’s record. This is an area we’re excited to explore with willing vendors.)
That said, SMART’s reference server supports writing data to the system. Indeed, that’s how we bootstrap our own server: by POSTing patient records to server using a FHIR “transaction” interaction. So if you’re interested in running your own copy of our reference stack, for development/debugging purposes, you can install a copy of our server locally and just POST to it to store your own data.

(As it turns out, our public sandbox also supports write access — but we don’t make any guarantees that we’ll keep your data around for very long. We reset the state or our public sandbox periodically to maintain a working environment. If you’re interested in contributing permanent sample data to our default pool, so that is persists across resets,

we’re happy to accept contributions via fhir/sample-patients .)

About David Hay
I'm a Product Strategist at Orion Health, Chair emeritus of HL7 New Zealand and co-Chair of the FHIR Management Group. I have a keen interest in health IT, especially health interoperability with HL7 and the new FHIR standard.

2 Responses to SMART writing

  1. David – In this tutorial http://docs.smarthealthit.org/tutorials/server-quick-start/ there are two curls reqiuests – 1) Retrieve Patient Demographics 2) Retrieve Vitals. A curl example or a tutorial which updates a vital (e.g. BP or Oxygen) would go a long way for application developers. BTW our company (www.safetylabs.org) has developed an IOT which cooperate over a large facility and wirelessly collects vitals over the whole facility. We are looking for ways to demonstrate the capability to display patient vitals, where patients are free to move within a facility. Thanks for your help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: