This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

201601 PATCH Connectathon Track Proposal

From HL7Wiki
Revision as of 15:24, 9 January 2016 by Jenni syed (talk | contribs) (Add tracking spreadsheet)
Jump to navigation Jump to search


FHIR PATCH for MedicationStatement

Skype: https://join.skype.com/xUx16MpXljhv Connectathon 11 Tracking spreadsheet: https://docs.google.com/spreadsheets/d/13WB1dsQ3Dt8n7s-gOBG7HEpaWL_FFCV_QWM5ea64rV8/edit?usp=sharing

Submitting WG/Project/Implementer Group

This is something FHIR Core requested feedback on DSTU 2: http://hl7.org/fhir/dstu2/http.html#update

Justification

There are real world use cases for some form of PATCH, for example, to update only the status of a specific resource, to update or add a comment, and many other single or limited field updates. With the way FHIR currently defines an update, the client should send in the full resource exactly as received, with the single field changed. This is sometimes challenging, both for the FHIR server and the Client. For example, if a client application does not support storing a specific field the server exposes, how will it send it back? If the FHIR server receives an update request where a field is missing, how does it know the intention was to blank/null that field out?

Proposed Track Lead

Jenni Syed

  Email: jenni dot syed at cerner dot com
  Skype: jenni.syed

Expected participants

Cerner (Jenni Syed)

Grahame Grieve


Roles

EHR

Exposes the FHIR MedicationStatement resource with GET (search) and PATCH methods available.

FHIR Client

Has the ability to GET and PATCH MedicationStatement.


Scenarios

Search MedicationStatement

Action: FHIR Client sends GET to EHR /MedicationStatement resource with patient parameter
Precondition: EHR should expose GET resource with the JSON format
Success Criteria:
Bonus point: MedicationStatement must expose the meta.versionId and meta.lastUpdated fields and support search by patient.

Patch MedicationStatement

Action: FHIR Client sends PATCH to EHR /MedicationStatement resource using JSON Patch format to update the MedicationStatement.status
Precondition: EHR should expose PATCH resource honoring the JSON Patch format.
Success Criteria:
Bonus point: Rejecting the update if there is a version conflict. Support for updating other fields (eg: note).

Grahame's comment: JSON Patch is pretty dumb. There should be better ways to patch. I'll propose one....

Example Patch

PATCH open/Patient/1 HTTP/1.1 Content-Type: application/json-patch+json

[{ "op": "add", "path": "/active", "value": "false" }]

TestScript(s)