From c195d207c93c5a98c1ce84f0f86111923238d2e4 Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Thu, 15 Nov 2018 16:58:15 -0600 Subject: [PATCH 1/8] create medication-refill.md --- docs/hooks/medication-refill.md | 174 ++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 docs/hooks/medication-refill.md diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md new file mode 100644 index 00000000..8dc0a22f --- /dev/null +++ b/docs/hooks/medication-refill.md @@ -0,0 +1,174 @@ +# `medication-refill` + +| Metadata | Value +| ---- | ---- +| specificationVersion | 1.0 +| hookVersion | 0.1.0 + +## Workflow + +The `medication-refill` hook fires when a medication refill is requested for an existing prescription of a specific medication. A refill request may be made as part of an encounter or out-of-band through a pharmacy. There may not be either an encounter or user in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. + +## Context + +The set of medications proposed or in progress of being prescribed. All FHIR resources in this context MUST be based on the same FHIR version. All FHIR resources in the medications object MUST have a status of _draft_. + +Field | Optionality | Prefetch Token | Type | Description +----- | -------- | ---- | ---- | ---- +`userId` | OPTIONAL | Yes | *string* | The id of the current user.
For this hook, the user is expected to be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html).
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 +`medications` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of _draft_ MedicationOrder resources
STU3 - FHIR Bundle of _draft_ MedicationRequest resources + +### Example (STU3) + +```json +{ + "context":{ + "userId":"Practitioner/123", + "patientId":"1288992", + "encounterId":"89284", + "medications":{ + "resourceType":"Bundle", + "entry":[ + { + "resource":{ + "resourceType":"MedicationRequest", + "id":"smart-MedicationRequest-104", + "status":"draft", + "intent":"order", + "medicationCodeableConcept":{ + "coding":[ + { + "system":"http://www.nlm.nih.gov/research/umls/rxnorm", + "code":"211307", + "display":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]" + } + ], + "text":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]" + }, + "subject":{ + "reference":"Patient/1288992" + }, + "dosageInstruction":[ + { + "text":"15 mL daily x 3 days", + "timing":{ + "repeat":{ + "boundsPeriod":{ + "start":"2005-01-18" + }, + "frequency":1, + "period":1, + "periodUnit":"d" + } + }, + "doseQuantity":{ + "value":15, + "unit":"mL", + "system":"http://unitsofmeasure.org", + "code":"mL" + } + } + ], + "dispenseRequest":{ + "numberOfRepeatsAllowed":1, + "quantity":{ + "value":1, + "unit":"mL", + "system":"http://unitsofmeasure.org", + "code":"mL" + }, + "expectedSupplyDuration":{ + "value":3, + "unit":"days", + "system":"http://unitsofmeasure.org", + "code":"d" + } + } + } + } + ] + } + } +} +``` + +### Example (DSTU2) + +```json +{ + "context":{ + "userId":"Practitioner/123", + "patientId":"1288992", + "encounterId":"89284", + "medications":{ + "resourceType":"Bundle", + "entry":[ + { + "resource":{ + "resourceType":"MedicationOrder", + "id":"smart-MedicationOrder-104", + "status":"draft", + "patient":{ + "reference":"Patient/1288992" + }, + "medicationCodeableConcept":{ + "coding":[ + { + "system":"http://www.nlm.nih.gov/research/umls/rxnorm", + "code":"211307", + "display":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]" + } + ], + "text":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]" + }, + "dosageInstruction":[ + { + "text":"15 mL daily x 3 days", + "timing":{ + "repeat":{ + "boundsPeriod":{ + "start":"2005-01-18" + }, + "frequency":1, + "period":1, + "periodUnits":"d" + } + }, + "doseQuantity":{ + "value":15, + "unit":"mL", + "system":"http://unitsofmeasure.org", + "code":"mL" + } + } + ], + "dispenseRequest":{ + "numberOfRepeatsAllowed":1, + "quantity":{ + "value":1, + "unit":"mL", + "system":"http://unitsofmeasure.org", + "code":"mL" + }, + "expectedSupplyDuration":{ + "value":3, + "unit":"days", + "system":"http://unitsofmeasure.org", + "code":"d" + } + } + } + } + ] + } + } +} +``` + +## Change Log + +Version | Description +---- | ---- +0.1.0 | Initial Release From 6e1c6d74436fc6b4acdeccbbbe7a1450149a000b Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Mon, 19 Nov 2018 16:35:24 -0600 Subject: [PATCH 2/8] add draft med-refill hook to menu --- mkdocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs.yml b/mkdocs.yml index e00528bd..9be72404 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,6 +18,7 @@ nav: - 'new-hook-template' : 'hooks/template.md' - 'patient-view' : 'hooks/patient-view.md' - 'medication-prescribe' : 'hooks/medication-prescribe.md' + - 'medication-refill' : 'hooks/medication-refill.md' - 'order-review' : 'hooks/order-review.md' - Quick Start: 'quickstart.md' - Examples: 'examples.md' From a5eaf0fcea018f230755a0ca3ff0d971c978ab68 Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Wed, 20 Sep 2023 16:31:32 -0500 Subject: [PATCH 3/8] Update medication-refill.md clarification of workflow. need to updates examples. --- docs/hooks/medication-refill.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md index 8dc0a22f..9be18105 100644 --- a/docs/hooks/medication-refill.md +++ b/docs/hooks/medication-refill.md @@ -9,18 +9,20 @@ The `medication-refill` hook fires when a medication refill is requested for an existing prescription of a specific medication. A refill request may be made as part of an encounter or out-of-band through a pharmacy. There may not be either an encounter or user in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. +This hook does not fire for an initial prescription (see order-sign). + ## Context -The set of medications proposed or in progress of being prescribed. All FHIR resources in this context MUST be based on the same FHIR version. All FHIR resources in the medications object MUST have a status of _draft_. +The set of medications in the process of being refilled. All FHIR resources in this context MUST be based on the same FHIR version. All FHIR resources in the medications object MUST have a status of _draft_. Field | Optionality | Prefetch Token | Type | Description ----- | -------- | ---- | ---- | ---- `userId` | OPTIONAL | Yes | *string* | The id of the current user.
For this hook, the user is expected to be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html).
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 -`medications` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of _draft_ MedicationOrder resources
STU3 - FHIR Bundle of _draft_ MedicationRequest resources +`medications` | REQUIRED | No | *object* | R4 - FHIR Bundle of _draft_ MedicationRequest resources -### Example (STU3) +### Example (R4) ```json { @@ -35,17 +37,11 @@ Field | Optionality | Prefetch Token | Type | Description "resource":{ "resourceType":"MedicationRequest", "id":"smart-MedicationRequest-104", - "status":"draft", - "intent":"order", - "medicationCodeableConcept":{ - "coding":[ - { - "system":"http://www.nlm.nih.gov/research/umls/rxnorm", - "code":"211307", - "display":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]" - } - ], - "text":"Azithromycin 20 MG/ML Oral Suspension [Zithromax]" + "status":"active", + "intent":"proposal", + "medicationReference": { + "reference": "Medication/eFnx9hyX.YTNJ407PR9g4zpiT8lXCElOXkldLgGDYrAU-fszvYmrUZlYzRfJl-qKj3", + "display": "oxybutynin (DITROPAN XL) CR tablet" }, "subject":{ "reference":"Patient/1288992" From 651084d7a8d65fed191bd2d3bb8e006baff1675d Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Fri, 22 Sep 2023 14:28:50 -0500 Subject: [PATCH 4/8] clarify user and encounter --- docs/hooks/medication-refill.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md index 9be18105..8921bf4c 100644 --- a/docs/hooks/medication-refill.md +++ b/docs/hooks/medication-refill.md @@ -7,7 +7,7 @@ ## Workflow -The `medication-refill` hook fires when a medication refill is requested for an existing prescription of a specific medication. A refill request may be made as part of an encounter or out-of-band through a pharmacy. There may not be either an encounter or user in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. +The `medication-refill` hook fires when a medication refill is requested for an existing prescription of a specific medication. A refill request may be made as part of an encounter or out-of-band through a pharmacy. Since a prescription refill is requested outside of the prescriber's workflow (by the patient or pharmacy), there often is not a user in context. There may not be either an encounter or user in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. This hook does not fire for an initial prescription (see order-sign). @@ -17,9 +17,9 @@ The set of medications in the process of being refilled. All FHIR resources in t Field | Optionality | Prefetch Token | Type | Description ----- | -------- | ---- | ---- | ---- -`userId` | OPTIONAL | Yes | *string* | The id of the current user.
For this hook, the user is expected to be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html).
For example, `Practitioner/123` +`userId` | OPTIONAL | Yes | *string* | The id of the current user entering the refill request within the CPOE.
For this hook, the user is expected to be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html).
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 +`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the encounter associated with the refill of the prescription. `medications` | REQUIRED | No | *object* | R4 - FHIR Bundle of _draft_ MedicationRequest resources ### Example (R4) From 71677d150903d0e632c231c5f9b5f5171c3a209d Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Mon, 25 Sep 2023 14:50:36 -0500 Subject: [PATCH 5/8] Update medication-refill.md Clarify workflow --- docs/hooks/medication-refill.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md index 8921bf4c..6e1dbf69 100644 --- a/docs/hooks/medication-refill.md +++ b/docs/hooks/medication-refill.md @@ -7,9 +7,9 @@ ## Workflow -The `medication-refill` hook fires when a medication refill is requested for an existing prescription of a specific medication. A refill request may be made as part of an encounter or out-of-band through a pharmacy. Since a prescription refill is requested outside of the prescriber's workflow (by the patient or pharmacy), there often is not a user in context. There may not be either an encounter or user in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. +The `medication-refill` hook fires when a medication refill request for an existing prescription of a specific medication is received. A refill request may be made as part of an encounter or out-of-band through a pharmacy or patient portal. Since a prescription refill is requested outside of the prescriber's workflow, there often is not a user in context. Similarly, the encounter may be an auto-generated refill encounter or there may not be an encounter in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. Given the asynchronous workflow of refill requests, the guidance returned by the service may be viewed immediately, or not. -This hook does not fire for an initial prescription (see order-sign). +This hook does not fire for an initial prescription (see order-sign). "Re-prescribing" or replacing a previously active prescription with a new perscription for the same medication may not fire the medication-refill. ## Context @@ -17,10 +17,10 @@ The set of medications in the process of being refilled. All FHIR resources in t Field | Optionality | Prefetch Token | Type | Description ----- | -------- | ---- | ---- | ---- -`userId` | OPTIONAL | Yes | *string* | The id of the current user entering the refill request within the CPOE.
For this hook, the user is expected to be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html).
For example, `Practitioner/123` +`userId` | OPTIONAL | Yes | *string* | In the case when this field is empty, consider the FHIR resource's requestor and recorder elements.
The id of the current user entering the refill request within the CPOE. For this hook, the user is expected to be of type Practitioner or PractitionerRole. For example, PractitionerRole/123 or Practitioner/abc. `patientId` | REQUIRED | Yes | *string* | The FHIR `Patient.id` of the current patient in context `encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of the encounter associated with the refill of the prescription. -`medications` | REQUIRED | No | *object* | R4 - FHIR Bundle of _draft_ MedicationRequest resources +`medications` | REQUIRED | No | *object* | R4 - FHIR Bundle of _draft_, _order_ MedicationRequest resources ### Example (R4) @@ -37,8 +37,8 @@ Field | Optionality | Prefetch Token | Type | Description "resource":{ "resourceType":"MedicationRequest", "id":"smart-MedicationRequest-104", - "status":"active", - "intent":"proposal", + "status":"draft", + "intent":"order", "medicationReference": { "reference": "Medication/eFnx9hyX.YTNJ407PR9g4zpiT8lXCElOXkldLgGDYrAU-fszvYmrUZlYzRfJl-qKj3", "display": "oxybutynin (DITROPAN XL) CR tablet" From 159c3c6ba3d375c21f346ccbfbd4697673b722cf Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Wed, 4 Oct 2023 11:45:16 -0500 Subject: [PATCH 6/8] from may not to does not per feedback from CDS workgroup --- docs/hooks/medication-refill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md index 6e1dbf69..95619ef4 100644 --- a/docs/hooks/medication-refill.md +++ b/docs/hooks/medication-refill.md @@ -9,7 +9,7 @@ The `medication-refill` hook fires when a medication refill request for an existing prescription of a specific medication is received. A refill request may be made as part of an encounter or out-of-band through a pharmacy or patient portal. Since a prescription refill is requested outside of the prescriber's workflow, there often is not a user in context. Similarly, the encounter may be an auto-generated refill encounter or there may not be an encounter in context when the refill request is received. A CDS service may use this hook to deliver medication refill protocol guidance to a clinician. Given the asynchronous workflow of refill requests, the guidance returned by the service may be viewed immediately, or not. -This hook does not fire for an initial prescription (see order-sign). "Re-prescribing" or replacing a previously active prescription with a new perscription for the same medication may not fire the medication-refill. +This hook does not fire for an initial prescription (see order-sign). "Re-prescribing" or replacing a previously active prescription with a new perscription for the same medication does not fire the medication-refill. ## Context From 7270de6e5aafe3a29b41426cca47adad761e3347 Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Wed, 4 Oct 2023 11:47:43 -0500 Subject: [PATCH 7/8] hook spec to 2.0 from 1.0 per CDS wg --- docs/hooks/medication-refill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md index 95619ef4..dea724ca 100644 --- a/docs/hooks/medication-refill.md +++ b/docs/hooks/medication-refill.md @@ -2,7 +2,7 @@ | Metadata | Value | ---- | ---- -| specificationVersion | 1.0 +| specificationVersion | 2.0 | hookVersion | 0.1.0 ## Workflow From 188b319e6fe35b127583953ecb2bc1d3fe8c6cea Mon Sep 17 00:00:00 2001 From: Isaac Vetter Date: Fri, 6 Oct 2023 14:24:46 -0500 Subject: [PATCH 8/8] trigger checks --- docs/hooks/medication-refill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hooks/medication-refill.md b/docs/hooks/medication-refill.md index dea724ca..59d4b176 100644 --- a/docs/hooks/medication-refill.md +++ b/docs/hooks/medication-refill.md @@ -167,4 +167,4 @@ Field | Optionality | Prefetch Token | Type | Description Version | Description ---- | ---- -0.1.0 | Initial Release +0.1.0 | Initial Release