Goal of the transaction below: "Always create a new lab Observation, and also -- if needed -- create a new Patient to serve as the subject of that observation".
Last active
August 29, 2015 14:18
-
-
Save jmandel/3f5fa196295ac3799325 to your computer and use it in GitHub Desktop.
Create a new Observation (and possibly a new Patient, if needed)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resourceType": "Bundle", | |
"id": "bundle-transaction", | |
"type": "transaction", | |
"base": "http://client-specific-namespace.org/base", | |
"entry": [ | |
{ | |
"resource": { | |
"resourceType": "Patient", | |
"id": "temporary-id-one", | |
"identifier": { | |
"system": "http://hospital.org/mrn", | |
"value": "123456" | |
} | |
"gender": ... | |
}, | |
"transaction": { | |
"method": "POST", | |
"url": "Patient?identifier=http://hospital.org/mrn|123456" | |
} | |
}, | |
{ | |
"resource": { | |
"resourceType": "Observation", | |
"subject": { | |
"reference": "Patient/temporary-id-one" | |
} | |
"appliesDateTime": ... | |
}, | |
"transaction": { | |
"method": "POST", | |
"url": "Observation" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment