Skip to content

Commit 32d5d20

Browse files
committed
Added history and cleaned up
1 parent 4c85e80 commit 32d5d20

16 files changed

+494
-274
lines changed

docs/API/bundle.mdx

Lines changed: 127 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Endpoint (note: no resource type in the path):
1212

1313
## Example
1414

15-
```
15+
```bash
1616
POST /fhir/<bucket>/
1717
e.g. POST http://localhost/fhir/acme/
1818
```
@@ -21,7 +21,7 @@ e.g. POST http://localhost/fhir/acme/
2121

2222
#### JSON Body
2323

24-
```
24+
```json
2525
{
2626
"resourceType": "Bundle",
2727
"type": "transaction",
@@ -125,139 +125,137 @@ e.g. POST http://localhost/fhir/acme/
125125

126126
#### Response - 200 OK
127127

128-
```
128+
```json
129129
{
130-
"resourceType": "Bundle",
131-
"id": "5ab72487-9469-4240-a3a0-b418b1b1e7c3",
132-
"meta": {
133-
"lastUpdated": "2025-10-09T19:54:36.095+00:00"
130+
"resourceType": "Bundle",
131+
"id": "5ab72487-9469-4240-a3a0-b418b1b1e7c3",
132+
"meta": {
133+
"lastUpdated": "2025-10-09T19:54:36.095+00:00"
134+
},
135+
"type": "transaction-response",
136+
"timestamp": "2025-10-09T19:54:36.095+00:00",
137+
"link": [
138+
{
139+
"relation": "self",
140+
"url": "http://localhost/fhir/acme/"
141+
}
142+
],
143+
"entry": [
144+
{
145+
"resource": {
146+
"resourceType": "Patient",
147+
"id": "8c350e25-1640-421b-a1e1-e6d077873728",
148+
"meta": {
149+
"versionId": "1",
150+
"lastUpdated": "2025-10-09T19:54:35.974+00:00",
151+
"tag": [
152+
{
153+
"system": "http://couchbase.fhir.com/fhir/custom-tags",
154+
"code": "created-by",
155+
"display": "user:anonymous"
156+
}
157+
]
158+
},
159+
"identifier": [
160+
{
161+
"system": "http://hospital.smarthealthit.org",
162+
"value": "MRN001"
163+
}
164+
],
165+
"name": [
166+
{
167+
"use": "official",
168+
"family": "Doe",
169+
"given": ["Jane"]
170+
}
171+
],
172+
"gender": "female",
173+
"birthDate": "1970-12-01"
174+
},
175+
"response": {
176+
"status": "201 Created",
177+
"location": "Patient/8c350e25-1640-421b-a1e1-e6d077873728"
178+
}
134179
},
135-
"type": "transaction-response",
136-
"timestamp": "2025-10-09T19:54:36.095+00:00",
137-
"link": [
138-
{
139-
"relation": "self",
140-
"url": "http://localhost/fhir/acme/"
141-
}
142-
],
143-
"entry": [
144-
{
145-
"resource": {
146-
"resourceType": "Patient",
147-
"id": "8c350e25-1640-421b-a1e1-e6d077873728",
148-
"meta": {
149-
"versionId": "1",
150-
"lastUpdated": "2025-10-09T19:54:35.974+00:00",
151-
"tag": [
152-
{
153-
"system": "http://couchbase.fhir.com/fhir/custom-tags",
154-
"code": "created-by",
155-
"display": "user:anonymous"
156-
}
157-
]
158-
},
159-
"identifier": [
160-
{
161-
"system": "http://hospital.smarthealthit.org",
162-
"value": "MRN001"
163-
}
164-
],
165-
"name": [
166-
{
167-
"use": "official",
168-
"family": "Doe",
169-
"given": [
170-
"Jane"
171-
]
172-
}
173-
],
174-
"gender": "female",
175-
"birthDate": "1970-12-01"
176-
},
177-
"response": {
178-
"status": "201 Created",
179-
"location": "Patient/8c350e25-1640-421b-a1e1-e6d077873728"
180+
{
181+
"resource": {
182+
"resourceType": "Observation",
183+
"id": "e00a7f2e-1a42-446b-ba5a-9f412afc4fe2",
184+
"meta": {
185+
"versionId": "1",
186+
"lastUpdated": "2025-10-09T19:54:36.050+00:00",
187+
"tag": [
188+
{
189+
"system": "http://couchbase.fhir.com/fhir/custom-tags",
190+
"code": "created-by",
191+
"display": "user:anonymous"
180192
}
193+
]
181194
},
182-
{
183-
"resource": {
184-
"resourceType": "Observation",
185-
"id": "e00a7f2e-1a42-446b-ba5a-9f412afc4fe2",
186-
"meta": {
187-
"versionId": "1",
188-
"lastUpdated": "2025-10-09T19:54:36.050+00:00",
189-
"tag": [
190-
{
191-
"system": "http://couchbase.fhir.com/fhir/custom-tags",
192-
"code": "created-by",
193-
"display": "user:anonymous"
194-
}
195-
]
196-
},
197-
"status": "final",
198-
"category": [
199-
{
200-
"coding": [
201-
{
202-
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
203-
"code": "vital-signs",
204-
"display": "Vital Signs"
205-
}
206-
]
207-
}
208-
],
209-
"code": {
210-
"coding": [
211-
{
212-
"system": "http://loinc.org",
213-
"code": "85354-9",
214-
"display": "Blood pressure panel with all children optional"
215-
}
216-
]
217-
},
218-
"subject": {
219-
"reference": "Patient/8c350e25-1640-421b-a1e1-e6d077873728"
220-
},
221-
"effectiveDateTime": "2023-06-01T12:00:00Z",
222-
"component": [
223-
{
224-
"code": {
225-
"coding": [
226-
{
227-
"system": "http://loinc.org",
228-
"code": "8480-6",
229-
"display": "Systolic blood pressure"
230-
}
231-
]
232-
},
233-
"valueQuantity": {
234-
"value": 120,
235-
"unit": "mmHg"
236-
}
237-
},
238-
{
239-
"code": {
240-
"coding": [
241-
{
242-
"system": "http://loinc.org",
243-
"code": "8462-4",
244-
"display": "Diastolic blood pressure"
245-
}
246-
]
247-
},
248-
"valueQuantity": {
249-
"value": 80,
250-
"unit": "mmHg"
251-
}
252-
}
253-
]
195+
"status": "final",
196+
"category": [
197+
{
198+
"coding": [
199+
{
200+
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
201+
"code": "vital-signs",
202+
"display": "Vital Signs"
203+
}
204+
]
205+
}
206+
],
207+
"code": {
208+
"coding": [
209+
{
210+
"system": "http://loinc.org",
211+
"code": "85354-9",
212+
"display": "Blood pressure panel with all children optional"
213+
}
214+
]
215+
},
216+
"subject": {
217+
"reference": "Patient/8c350e25-1640-421b-a1e1-e6d077873728"
218+
},
219+
"effectiveDateTime": "2023-06-01T12:00:00Z",
220+
"component": [
221+
{
222+
"code": {
223+
"coding": [
224+
{
225+
"system": "http://loinc.org",
226+
"code": "8480-6",
227+
"display": "Systolic blood pressure"
228+
}
229+
]
254230
},
255-
"response": {
256-
"status": "201 Created",
257-
"location": "Observation/e00a7f2e-1a42-446b-ba5a-9f412afc4fe2"
231+
"valueQuantity": {
232+
"value": 120,
233+
"unit": "mmHg"
258234
}
259-
}
260-
]
235+
},
236+
{
237+
"code": {
238+
"coding": [
239+
{
240+
"system": "http://loinc.org",
241+
"code": "8462-4",
242+
"display": "Diastolic blood pressure"
243+
}
244+
]
245+
},
246+
"valueQuantity": {
247+
"value": 80,
248+
"unit": "mmHg"
249+
}
250+
}
251+
]
252+
},
253+
"response": {
254+
"status": "201 Created",
255+
"location": "Observation/e00a7f2e-1a42-446b-ba5a-9f412afc4fe2"
256+
}
257+
}
258+
]
261259
}
262260
```
263261

docs/API/conditional.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Conditional Updates apply to PUT, PATCH and DELETE operations.
1111

1212
Lets create a Patient
1313

14-
```
14+
```json
1515
curl --request PUT 'http://localhost/fhir/acme/Patient/100' \
1616
--header 'Content-Type: application/json' \
1717
--data '{
@@ -35,7 +35,7 @@ Response:
3535

3636
Lets add deceasedDateTime, but this time, lets say we do not know the id but search for name.
3737

38-
```
38+
```json
3939
curl --request PUT 'http://localhost/fhir/acme/Patient?name=Doe' \
4040
--header 'Content-Type: application/json' \
4141
--data '{
@@ -89,7 +89,7 @@ For this usage, it's best to ensure your search criteria are unique enough to av
8989

9090
Using name can be ambiguous. Prefer a unique identifier:
9191

92-
```
92+
```bash
9393
PUT /fhir/<bucket>/Patient?identifier=http://hospital.smarthealthit.org|1032702
9494
```
9595

0 commit comments

Comments
 (0)