Skip to content

Commit 824c868

Browse files
authored
Merge pull request #431 from cds-hooks/propose-allergyintolerance-create-hook
create allergyintolerance-create.md
2 parents 45b12dc + a9956eb commit 824c868

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed
+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# `allergyintolerance-create`
2+
3+
| Metadata | Value
4+
| ---- | ----
5+
| specificationVersion | 1.0
6+
| hookVersion | 0.1.0
7+
| hookMaturity | 1 - Submitted
8+
9+
## Workflow
10+
11+
The `allergyintolerance-create` hook fires when when a clinician adds a new allergy or intolerance to a patient's list of allergies.
12+
This hook fires during the act of finalizing the entry of a new allergy, such that the decision support returned from the CDS Service can guide the clinician to cancel the addition of the allergy. The context of the hook include the AllergyIntolerance resource that's about to be added to the patient's list of allergies.
13+
14+
## Context
15+
16+
Field | Optionality | Prefetch Token | Type | Description
17+
----- | -------- | ---- | ---- | ----
18+
`userId` | REQUIRED | Yes | *string* | The id of the current user.<br />For this hook, the user is expected to be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html).<br />For example, `Practitioner/123`
19+
`patientId` | REQUIRED | Yes | *string* | The FHIR `Patient.id` of the current patient in context
20+
`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the current encounter in context
21+
`allergyIntolerance` | REQUIRED | No | *object* | R4/STU3/DSTU2 - FHIR AllergyIntolerance instance
22+
23+
24+
### Examples
25+
26+
### Example (R4)
27+
28+
```json
29+
{
30+
"context": {
31+
"userId": "Practitioner/123",
32+
"patientId": "1288992",
33+
"encounterId": "89284",
34+
"allergyIntolerance": {
35+
"resource": {
36+
"resourceType": "AllergyIntolerance",
37+
"id": "RES163672",
38+
"clinicalStatus": "active",
39+
"verificationStatus": "confirmed",
40+
"type": "allergy",
41+
"category": [
42+
"food"
43+
],
44+
"criticality": "high",
45+
"code": {
46+
"coding": [
47+
{
48+
"system": "http://snomed.info/sct",
49+
"code": "424213003",
50+
"display": "Allergy to bee venom"
51+
}
52+
]
53+
},
54+
"patient": {
55+
"reference": "Patient/1288992"
56+
},
57+
"assertedDate": "2018-11-15T07:05:57-05:00"
58+
}
59+
}
60+
}
61+
}
62+
```
63+
64+
65+
### Example (STU3)
66+
67+
```json
68+
{
69+
"context": {
70+
"userId": "Practitioner/123",
71+
"patientId": "1288992",
72+
"encounterId": "89284",
73+
"allergyIntolerances": {
74+
"resourceType": "Bundle",
75+
"entry": [
76+
{
77+
"resource": {
78+
"resourceType": "AllergyIntolerance",
79+
"id": "RES163672",
80+
"clinicalStatus": "active",
81+
"verificationStatus": "confirmed",
82+
"type": "allergy",
83+
"category": [
84+
"food"
85+
],
86+
"criticality": "high",
87+
"code": {
88+
"coding": [
89+
{
90+
"system": "http://snomed.info/sct",
91+
"code": "424213003",
92+
"display": "Allergy to bee venom"
93+
}
94+
]
95+
},
96+
"patient": {
97+
"reference": "Patient/1288992"
98+
},
99+
"assertedDate": "2018-11-15T07:05:57-05:00"
100+
}
101+
}
102+
]
103+
}
104+
}
105+
}
106+
```
107+
108+
### Example (DSTU2)
109+
110+
```json
111+
{
112+
"context": {
113+
"userId": "Practitioner/123",
114+
"patientId": "1288992",
115+
"encounterId": "89284",
116+
"allergyIntolerances": {
117+
"resourceType": "Bundle",
118+
"entry": [
119+
{
120+
"resource": {
121+
"resourceType": "AllergyIntolerance",
122+
"id": "RES443610",
123+
"recordedDate": "1992-05-28T17:22:05-04:00",
124+
"patient": {
125+
"reference": "Patient/1288992"
126+
},
127+
"substance": {
128+
"coding": [
129+
{
130+
"system": "http://snomed.info/sct",
131+
"code": "424213003",
132+
"display": "Allergy to bee venom"
133+
}
134+
]
135+
},
136+
"status": "active",
137+
"criticality": "low",
138+
"type": "allergy",
139+
"category": "food"
140+
}
141+
}
142+
]
143+
}
144+
}
145+
}
146+
```
147+
148+
## Change Log
149+
150+
Version | Description
151+
---- | ----
152+
0.1.0 | Initial Release

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ nav:
1818
- '1.0 (external link)': https://cds-hooks.hl7.org/1.0/
1919
- Hooks:
2020
- 'new-hook-template' : 'hooks/template.md'
21+
- 'allergyintolerance-create 1': 'hooks/allergyintolerance-create.md'
2122
- 'patient-view 5' : 'hooks/patient-view.md'
2223
- 'medication-prescribe 🚫' : 'hooks/medication-prescribe.md'
2324
- 'order-dispatch 0' : 'hooks/order-dispatch.md'

0 commit comments

Comments
 (0)