Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a new Observation (and possibly a new Patient, if needed)

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".

{
"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
You can’t perform that action at this time.