Skip to content

Commit

Permalink
Merge pull request #431 from cds-hooks/propose-allergyintolerance-cre…
Browse files Browse the repository at this point in the history
…ate-hook

create allergyintolerance-create.md
  • Loading branch information
isaacvetter authored Feb 2, 2024
2 parents 45b12dc + a9956eb commit 824c868
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 0 deletions.
152 changes: 152 additions & 0 deletions docs/hooks/allergyintolerance-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# `allergyintolerance-create`

| Metadata | Value
| ---- | ----
| specificationVersion | 1.0
| hookVersion | 0.1.0
| hookMaturity | 1 - Submitted

## Workflow

The `allergyintolerance-create` hook fires when when a clinician adds a new allergy or intolerance to a patient's list of allergies.
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.

## Context

Field | Optionality | Prefetch Token | Type | Description
----- | -------- | ---- | ---- | ----
`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`
`patientId` | REQUIRED | Yes | *string* | The FHIR `Patient.id` of the current patient in context
`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the current encounter in context
`allergyIntolerance` | REQUIRED | No | *object* | R4/STU3/DSTU2 - FHIR AllergyIntolerance instance


### Examples

### Example (R4)

```json
{
"context": {
"userId": "Practitioner/123",
"patientId": "1288992",
"encounterId": "89284",
"allergyIntolerance": {
"resource": {
"resourceType": "AllergyIntolerance",
"id": "RES163672",
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"type": "allergy",
"category": [
"food"
],
"criticality": "high",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "424213003",
"display": "Allergy to bee venom"
}
]
},
"patient": {
"reference": "Patient/1288992"
},
"assertedDate": "2018-11-15T07:05:57-05:00"
}
}
}
}
```


### Example (STU3)

```json
{
"context": {
"userId": "Practitioner/123",
"patientId": "1288992",
"encounterId": "89284",
"allergyIntolerances": {
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "AllergyIntolerance",
"id": "RES163672",
"clinicalStatus": "active",
"verificationStatus": "confirmed",
"type": "allergy",
"category": [
"food"
],
"criticality": "high",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "424213003",
"display": "Allergy to bee venom"
}
]
},
"patient": {
"reference": "Patient/1288992"
},
"assertedDate": "2018-11-15T07:05:57-05:00"
}
}
]
}
}
}
```

### Example (DSTU2)

```json
{
"context": {
"userId": "Practitioner/123",
"patientId": "1288992",
"encounterId": "89284",
"allergyIntolerances": {
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "AllergyIntolerance",
"id": "RES443610",
"recordedDate": "1992-05-28T17:22:05-04:00",
"patient": {
"reference": "Patient/1288992"
},
"substance": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "424213003",
"display": "Allergy to bee venom"
}
]
},
"status": "active",
"criticality": "low",
"type": "allergy",
"category": "food"
}
}
]
}
}
}
```

## Change Log

Version | Description
---- | ----
0.1.0 | Initial Release
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ nav:
- '1.0 (external link)': https://cds-hooks.hl7.org/1.0/
- Hooks:
- 'new-hook-template' : 'hooks/template.md'
- 'allergyintolerance-create 1': 'hooks/allergyintolerance-create.md'
- 'patient-view 5' : 'hooks/patient-view.md'
- 'medication-prescribe 🚫' : 'hooks/medication-prescribe.md'
- 'order-dispatch 0' : 'hooks/order-dispatch.md'
Expand Down

0 comments on commit 824c868

Please sign in to comment.