Skip to content

Commit f94e86d

Browse files
isaacvetterkpshek
authored andcommitted
add STU3 examples to hooks (#388)
* spelling fix - add dash to "non secured" Fixes #297 * consistent tense in quickstart guide specifically the enumerated list of steps and corresponding headers of the Building an EHR service section of the document * Update quickstart.md Change header from "Building an EHR Service" to "Integrating CDS Services into an EHR" * SMART app is optional Fixes #294 * add STU3 example to med-prescribe Also change patient id in MedicationOrder resource to be consistent with CDS Hooks request wrapper. Fixes #293 FHIR Med Order and MedRequest resources stolen from: - https://r3.smarthealthit.org/MedicationRequest/smart-MedicationRequest-103?_format=json - https://r3.smarthealthit.org/MedicationRequest/smart-MedicationRequest-104?_format=json * add STU3 example STU3 NutritionOrder from https://www.hl7.org/fhir/nutritionorder-example-pureeddiet-simple.json.html STU3 MedRequest from https://r3.smarthealthit.org/MedicationRequest/smart-MedicationRequest-103?_format=json * MedRequest is STU3, MedOrder DSTU2 med-prescribe hook page incorrectly refers to STU3 MedicationOrder resource. Correct table's reference from STU3 MedOrder to STU3 MedRequest. Fixes #292 * valid json! Ack! Thank you, Kevin! * valid json 2 * tabs -> spaces, fix syntax
1 parent a675d54 commit f94e86d

File tree

2 files changed

+425
-101
lines changed

2 files changed

+425
-101
lines changed

docs/hooks/medication-prescribe.md

Lines changed: 244 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -19,131 +19,278 @@ Field | Optionality | Prefetch Token | Type | Description
1919
`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the current encounter in context
2020
`medications` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of _draft_ MedicationOrder resources <br/> STU3 - FHIR Bundle of _draft_ MedicationRequest resources
2121

22-
### Example (DSTU2)
22+
### Example (STU3)
2323

24-
```json
25-
"context":{
26-
"patientId":"1288992",
27-
"encounterId":"89284",
28-
"medications":{
29-
"resourceType":"Bundle",
30-
"entry":[
31-
{
32-
"resource":{
33-
"resourceType":"MedicationOrder",
34-
"id":"smart-MedicationOrder-103",
35-
"status":"draft",
36-
"patient":{
37-
"reference":"Patient/smart-1081332"
38-
},
39-
"medicationCodeableConcept":{
40-
"coding":[
24+
```json
25+
{
26+
"context":{
27+
"patientId":"1288992",
28+
"encounterId":"89284",
29+
"medications":{
30+
"resourceType":"Bundle",
31+
"entry":[
32+
{
33+
"resource":{
34+
"resourceType":"MedicationRequest",
35+
"id":"smart-MedicationRequest-103",
36+
"meta":{
37+
"lastUpdated":"2018-04-30T13:25:40.845-04:00"
38+
},
39+
"text":{
40+
"status":"generated",
41+
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension (rxnorm: 617993)</div>"
42+
},
43+
"status":"draft",
44+
"intent":"order",
45+
"medicationCodeableConcept":{
46+
"coding":[
47+
{
48+
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
49+
"code":"617993",
50+
"display":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
51+
}
52+
],
53+
"text":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
54+
},
55+
"subject":{
56+
"reference":"Patient/1288992"
57+
},
58+
"dosageInstruction":[
4159
{
42-
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
43-
"code":"617993",
44-
"display":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
60+
"text":"5 mL bid x 10 days",
61+
"timing":{
62+
"repeat":{
63+
"boundsPeriod":{
64+
"start":"2005-01-04"
65+
},
66+
"frequency":2,
67+
"period":1,
68+
"periodUnit":"d"
69+
}
70+
},
71+
"doseQuantity":{
72+
"value":5,
73+
"unit":"mL",
74+
"system":"http://unitsofmeasure.org",
75+
"code":"mL"
76+
}
4577
}
4678
],
47-
"text":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
48-
},
49-
"dosageInstruction":[
50-
{
51-
"text":"5 mL bid x 10 days",
52-
"timing":{
53-
"repeat":{
54-
"boundsPeriod":{
55-
"start":"2005-01-04"
56-
},
57-
"frequency":2,
58-
"period":1,
59-
"periodUnits":"d"
60-
}
61-
},
62-
"doseQuantity":{
63-
"value":5,
79+
"dispenseRequest":{
80+
"numberOfRepeatsAllowed":1,
81+
"quantity":{
82+
"value":1,
6483
"unit":"mL",
6584
"system":"http://unitsofmeasure.org",
6685
"code":"mL"
86+
},
87+
"expectedSupplyDuration":{
88+
"value":10,
89+
"unit":"days",
90+
"system":"http://unitsofmeasure.org",
91+
"code":"d"
6792
}
6893
}
69-
],
70-
"dispenseRequest":{
71-
"numberOfRepeatsAllowed":1,
72-
"quantity":{
73-
"value":1,
74-
"unit":"mL",
75-
"system":"http://unitsofmeasure.org",
76-
"code":"mL"
94+
}
95+
},
96+
{
97+
"resource":{
98+
"resourceType":"MedicationRequest",
99+
"id":"smart-MedicationRequest-104",
100+
"meta":{
101+
"lastUpdated":"2018-04-30T13:26:48.124-04:00"
102+
},
103+
"text":{
104+
"status":"generated",
105+
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">Azithromycin 20 MG/ML Oral Suspension [Zithromax] (rxnorm: 211307)</div>"
77106
},
78-
"expectedSupplyDuration":{
79-
"value":10,
80-
"unit":"days",
81-
"system":"http://unitsofmeasure.org",
82-
"code":"d"
107+
"status":"draft",
108+
"intent":"order",
109+
"medicationCodeableConcept":{
110+
"coding":[
111+
{
112+
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
113+
"code":"211307",
114+
"display":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]"
115+
}
116+
],
117+
"text":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]"
118+
},
119+
"subject":{
120+
"reference":"Patient/1288992"
121+
},
122+
"dosageInstruction":[
123+
{
124+
"text":"15 mL daily x 3 days",
125+
"timing":{
126+
"repeat":{
127+
"boundsPeriod":{
128+
"start":"2005-01-18"
129+
},
130+
"frequency":1,
131+
"period":1,
132+
"periodUnit":"d"
133+
}
134+
},
135+
"doseQuantity":{
136+
"value":15,
137+
"unit":"mL",
138+
"system":"http://unitsofmeasure.org",
139+
"code":"mL"
140+
}
141+
}
142+
],
143+
"dispenseRequest":{
144+
"numberOfRepeatsAllowed":1,
145+
"quantity":{
146+
"value":1,
147+
"unit":"mL",
148+
"system":"http://unitsofmeasure.org",
149+
"code":"mL"
150+
},
151+
"expectedSupplyDuration":{
152+
"value":3,
153+
"unit":"days",
154+
"system":"http://unitsofmeasure.org",
155+
"code":"d"
156+
}
83157
}
84158
}
85159
}
86-
},
87-
{
88-
"resource":{
89-
"resourceType":"MedicationOrder",
90-
"id":"smart-MedicationOrder-104",
91-
"status":"draft",
92-
"patient":{
93-
"reference":"Patient/smart-1081332"
94-
},
95-
"medicationCodeableConcept":{
96-
"coding":[
160+
]
161+
}
162+
}
163+
}
164+
```
165+
166+
### Example (DSTU2)
167+
168+
```json
169+
{
170+
"context":{
171+
"patientId":"1288992",
172+
"encounterId":"89284",
173+
"medications":{
174+
"resourceType":"Bundle",
175+
"entry":[
176+
{
177+
"resource":{
178+
"resourceType":"MedicationOrder",
179+
"id":"smart-MedicationOrder-103",
180+
"status":"draft",
181+
"patient":{
182+
"reference":"Patient/1288992"
183+
},
184+
"medicationCodeableConcept":{
185+
"coding":[
186+
{
187+
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
188+
"code":"617993",
189+
"display":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
190+
}
191+
],
192+
"text":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
193+
},
194+
"dosageInstruction":[
97195
{
98-
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
99-
"code":"211307",
100-
"display":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]"
196+
"text":"5 mL bid x 10 days",
197+
"timing":{
198+
"repeat":{
199+
"boundsPeriod":{
200+
"start":"2005-01-04"
201+
},
202+
"frequency":2,
203+
"period":1,
204+
"periodUnits":"d"
205+
}
206+
},
207+
"doseQuantity":{
208+
"value":5,
209+
"unit":"mL",
210+
"system":"http://unitsofmeasure.org",
211+
"code":"mL"
212+
}
101213
}
102214
],
103-
"text":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]"
104-
},
105-
"dosageInstruction":[
106-
{
107-
"text":"15 mL daily x 3 days",
108-
"timing":{
109-
"repeat":{
110-
"boundsPeriod":{
111-
"start":"2005-01-18"
112-
},
113-
"frequency":1,
114-
"period":1,
115-
"periodUnits":"d"
116-
}
117-
},
118-
"doseQuantity":{
119-
"value":15,
215+
"dispenseRequest":{
216+
"numberOfRepeatsAllowed":1,
217+
"quantity":{
218+
"value":1,
120219
"unit":"mL",
121220
"system":"http://unitsofmeasure.org",
122221
"code":"mL"
222+
},
223+
"expectedSupplyDuration":{
224+
"value":10,
225+
"unit":"days",
226+
"system":"http://unitsofmeasure.org",
227+
"code":"d"
123228
}
124229
}
125-
],
126-
"dispenseRequest":{
127-
"numberOfRepeatsAllowed":1,
128-
"quantity":{
129-
"value":1,
130-
"unit":"mL",
131-
"system":"http://unitsofmeasure.org",
132-
"code":"mL"
230+
}
231+
},
232+
{
233+
"resource":{
234+
"resourceType":"MedicationOrder",
235+
"id":"smart-MedicationOrder-104",
236+
"status":"draft",
237+
"patient":{
238+
"reference":"Patient/1288992"
239+
},
240+
"medicationCodeableConcept":{
241+
"coding":[
242+
{
243+
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
244+
"code":"211307",
245+
"display":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]"
246+
}
247+
],
248+
"text":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]"
133249
},
134-
"expectedSupplyDuration":{
135-
"value":3,
136-
"unit":"days",
137-
"system":"http://unitsofmeasure.org",
138-
"code":"d"
250+
"dosageInstruction":[
251+
{
252+
"text":"15 mL daily x 3 days",
253+
"timing":{
254+
"repeat":{
255+
"boundsPeriod":{
256+
"start":"2005-01-18"
257+
},
258+
"frequency":1,
259+
"period":1,
260+
"periodUnits":"d"
261+
}
262+
},
263+
"doseQuantity":{
264+
"value":15,
265+
"unit":"mL",
266+
"system":"http://unitsofmeasure.org",
267+
"code":"mL"
268+
}
269+
}
270+
],
271+
"dispenseRequest":{
272+
"numberOfRepeatsAllowed":1,
273+
"quantity":{
274+
"value":1,
275+
"unit":"mL",
276+
"system":"http://unitsofmeasure.org",
277+
"code":"mL"
278+
},
279+
"expectedSupplyDuration":{
280+
"value":3,
281+
"unit":"days",
282+
"system":"http://unitsofmeasure.org",
283+
"code":"d"
284+
}
139285
}
140286
}
141287
}
142-
}
143-
]
288+
]
289+
}
144290
}
145291
}
146292
```
293+
147294
## Change Log
148295

149296
Version | Description

0 commit comments

Comments
 (0)