From 5aa961ade72e821b79942682d7686055d4c02d84 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Sat, 21 Dec 2019 11:56:31 -0500 Subject: [PATCH] Docs tweak --- .../ca/uhn/hapi/fhir/docs/client/examples.md | 68 ++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/client/examples.md b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/client/examples.md index 41b8a37fe79..0203bf6c684 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/client/examples.md +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/client/examples.md @@ -12,7 +12,73 @@ The following example shows how to post a transaction with two resources, where This code creates the following transaction bundle: - +**JSON**: + +```json +{ + "resourceType": "Bundle", + "type": "transaction", + "entry": [ + { + "fullUrl": "urn:uuid:3bc44de3-069d-442d-829b-f3ef68cae371", + "resource": { + "resourceType": "Patient", + "identifier": [ + { + "system": "http://acme.org/mrns", + "value": "12345" + } + ], + "name": [ + { + "family": "Jameson", + "given": [ + "J", + "Jonah" + ] + } + ], + "gender": "male" + }, + "request": { + "method": "POST", + "url": "Patient", + "ifNoneExist": "identifier=http://acme.org/mrns|12345" + } + }, + { + "resource": { + "resourceType": "Observation", + "status": "final", + "code": { + "coding": [ + { + "system": "http://loinc.org", + "code": "789-8", + "display": "Erythrocytes [#/volume] in Blood by Automated count" + } + ] + }, + "subject": { + "reference": "urn:uuid:3bc44de3-069d-442d-829b-f3ef68cae371" + }, + "valueQuantity": { + "value": 4.12, + "unit": "10 trillion/L", + "system": "http://unitsofmeasure.org", + "code": "10*12/L" + } + }, + "request": { + "method": "POST", + "url": "Observation" + } + } + ] +} +``` + +**XML**: ```xml