Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose order-select hook #428

Merged
merged 11 commits into from
Feb 23, 2019
366 changes: 366 additions & 0 deletions docs/hooks/order-select.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,366 @@
# `order-select`

| Metadata | Value
| ---- | ----
| specificationVersion | 1.0
| hookVersion | 0.1.0

## Workflow

The `order-select` hook fires when a clinician selects one or more orders to place for a patient, (including orders for medications, procedures, labs and other orders).
This hook is among the first workflow events for an order entering a draft status.
The context of this hook may include defaulted order details
as it occurs immediately upon the clinician selecting the order from the order catalogue of the CPOE,
but before she manually specifies order details (e.g. dose, quantity, route, etc).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This distinction is unclear to me -- is it proposing that clinician-supplied details like dosing would not be passed along with this hook? I'm concerned that we're deprecating a simple model (an in-progress hook that re-fires any time an in-progress order changes) in favor of a complex model (#418) *but we've only introducing support for one step of the complex model.

This strikes me as a net reduction in functionality without simplifying the problem.

it is possible I have misunderstood the intention of this hook, in which case it would be good to clarify here and in the definition.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jmandel ,

I think that you definitely understand the intention of this hook. It fires as early as possible in the ordering workflow and will not contain clinician-specified details. It's contrasted with the order-sign, which fires at the last possible step in the ordering workflow and does contain all details.

an in-progress hook that re-fires any time an in-progress order changes

Neither med-prescribe nor order-review are documented nor, per my impression, understood nor implemented to behave in the way you're describing (frequent re-firing).

The Jan, 30th CDS WG call talked through a potential order-accept hook which would implement an additional middle step between order-select and order-sign and represent some intermediate point at which the provider tentatively accepted order details, but before she signed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmandel / @isaacvetter - What if this hook was invoked both when then order is first selected and then also can be invoked each time the clinician specifies/selects a new detail?

FWIW, Cerner's current CPOE functionality today only triggers CDS when the order is first selected and then upon signing the order. So, exactly as how @isaacvetter has proposed here today. So, we wouldn't be able to support this in-progress hooking today.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither med-prescribe nor order-review are documented nor, per my impression, understood nor implemented to behave in the way you're describing (frequent re-firing).

FWIW, the sandbox implements them this way -- which is "code as documentation". (Seriously though, it's been the only way that developers have been able to use/test the functionality, so it's what people expect/believe about how the hook works.)

From my perspective right now, this change is introducing a more complicated system and reducing functionality. I can be led to reason, though! Could you help articulate the value it's introducing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmandel - What I was trying to ask/propose is what if we documented order-select at behaving in the way you describe but keep flexibility if a CPOE system only wanted to invoke order-select when the user first selects the order. Basically, I'm trying to strike a balance between the reality of some major CPOE systems today and what a re-envisioned (or newer) CPOE system should be capable of doing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're talking in circles :-)

I obviously think the behavior is important even if it has historically been under-specified. I'm trying to prevent the behavior from be being specified out of existence, by instead clarifying our language in a way that affirms the behavior.

if it keeps popping up an alert

In my opinion, very little or none of this advice should ever pop up an alert; that's up to each CDS client to define, of course. In any case, I think we both agree that popping up alerts in the middle of workflow makes for a frustrating UX.

To be clear, @kpshek's proposed language wouldn't require you to re-trigger the hook if you thought it would mean a performance hit within your system. It proposed an option.

Re: applying decision support at order signing, this is in my opinion a very late stage at which to be introducing changes to a dose. Much better to provide feedback early and often (and ambiently, rather than interruptively, if I can use adjectives loosely).

Copy link
Contributor

@mattvarghese mattvarghese Feb 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is a proposed option that wouldn't require re triggering every time. But the option was discussed in the HL7 call, and as far as I could tell there were two conclusions

  1. it was preferred to have a separate order-detail-select / order-accept hook. If we do that, then @kpshek 's proposed language will conflict with that hook. So if this need is there, a separate hook needs to be written up.
  2. There did not seem like there was an urgent need for this hook during the call. At least it did not to me, and it was agreed that the order-select and order-sign hooks can be published and marked as deprecating medication-prescribe and order-review without this new hook being written up. The writing up of the new hook can be deferred till later, until good thought and use-cases can be factored into it.

(Also, pop-up vs, a div that appears in line is not very different with regard to distraction. I meant them all by one appellation of popup).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: Josh, I myself was the person who suggested in the HL7 call that we should allow order-select hook to fire at the time of accepting order edits. I was convinced by others in the call that a spearate hook is the better option. It's in the minutes:

Matt – EHR could implement order-select hook at time of accept as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my own comment in the pull request for order-sign #429 (comment), I am withdrawing my disagreement with adding the below to the description of order-select in the interest of closure.

If supported by the CDS Client, this hook may also be invoked each time the clinician selects a detail regarding the order.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@jmandel, when you get a chance, will you please re-review/approve and resolve, if appropriate?

Then I'll merge ... and we'll have our first proposed hook since 2015 or so! 🎉

Additionally, the context may include previously selected orders that are not yet signed from the same ordering session.
The `order-select` hook occurs after the clinician selects the order, but before she fills out (configures) the order.
isaacvetter marked this conversation as resolved.
Show resolved Hide resolved

## Context

The context of this hook distinguishes between the list of unsigned orders from the clinician's ordering session, and one or orders just added to this list. The `selections` field contains a list of ids of these newly selected orders; the `draftOrders` Bundle contains an entry for all unsigned orders from this session, including newly selected orders.

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
`selections` | REQUIRED | No| *array* | The FHIR id of the newly selected order(s).<br />The `selections` field references FHIR resources in the `orders` Bundle. For example, `MedicationRequest/103`.
`draftOrders` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of MedicationOrder, DiagnosticOrder, DeviceUseRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription with _draft_ status <br/> STU3 - FHIR Bundle of MedicationRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription with _draft_ status



### Examples

### Example (STU3)

```json
{
"context":{
"userId":"Practitioner/123",
"patientId":"1288992",
"encounterId":"89284",
"selections": [ "NutritionOrder/pureeddiet-simple", "MedicationRequest/smart-MedicationRequest-103" ],
"draftOrders":{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"NutritionOrder",
"id":"pureeddiet-simple",
"identifier":[
{
"system":"http://goodhealthhospital.org/nutrition-requests",
"value":"123"
}
],
"status":"draft",
"patient":{
"reference":"Patient/1288992"
},
"dateTime":"2014-09-17",
"orderer":{
"reference":"Practitioner/example",
"display":"Dr Adam Careful"
},
"oralDiet":{
"type":[
{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"226211001",
"display":"Pureed diet"
},
{
"system":"http://goodhealthhospital.org/diet-type-codes",
"code":"1010",
"display":"Pureed diet"
}
],
"text":"Pureed diet"
}
],
"schedule":[
{
"repeat":{
"boundsPeriod":{
"start":"2015-02-10"
},
"frequency":3,
"period":1,
"periodUnit":"d"
}
}
],
"texture":[
{
"modifier":{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"228055009",
"display":"Liquidized food"
}
],
"text":"Pureed"
}
}
],
"fluidConsistencyType":[
{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"439021000124105",
"display":"Dietary liquid consistency - nectar thick liquid"
}
],
"text":"Nectar thick liquids"
}
]
},
"supplement":[
{
"type":{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"442971000124100",
"display":"Adult high energy formula"
},
{
"system":"http://goodhealthhospital.org/supplement-type-codes",
"code":"1040",
"display":"Adult high energy pudding"
}
],
"text":"Adult high energy pudding"
},
"productName":"Ensure Pudding 4 oz container",
"instruction":"Ensure Pudding at breakfast, lunch, supper"
}
]
}
},
{
"resource":{
"resourceType":"MedicationRequest",
"id":"smart-MedicationRequest-103",
"meta":{
"lastUpdated":"2018-04-30T13:25:40.845-04:00"
},
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension (rxnorm: 617993)</div>"
},
"status":"draft",
"intent":"order",
"medicationCodeableConcept":{
"coding":[
{
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
"code":"617993",
"display":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
}
],
"text":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
},
"subject":{
"reference":"Patient/1288992"
},
"dosageInstruction":[
{
"text":"5 mL bid x 10 days",
"timing":{
"repeat":{
"boundsPeriod":{
"start":"2005-01-04"
},
"frequency":2,
"period":1,
"periodUnit":"d"
}
},
"doseQuantity":{
"value":5,
"unit":"mL",
"system":"http://unitsofmeasure.org",
"code":"mL"
}
}
],
"dispenseRequest":{
"numberOfRepeatsAllowed":1,
"quantity":{
"value":1,
"unit":"mL",
"system":"http://unitsofmeasure.org",
"code":"mL"
},
"expectedSupplyDuration":{
"value":10,
"unit":"days",
"system":"http://unitsofmeasure.org",
"code":"d"
}
}
}
}
]
}
}
}
```

### Example (DSTU2)

```json
"context":{
"userId":"Practitioner/123",
"patientId":"1288992",
"encounterId":"89284",
"selections":[ "NutritionOrder/nest-patient-1-NUTR1", "MedicationOrder/smart-MedicationOrder-103" ],
"draftOrders":{
"resourceType":"Bundle",
"entry":[
{
"resource":{
"resourceType":"NutritionOrder",
"id":"nest-patient-1-NUTR1",
"patient":{
"reference":"Patient/1288992"
},
"orderer":{
"display":"Dr Adam Careful"
},
"identifier":[
{
"system":"http://goodhealthhospital.org/nutrition-orders",
"value":"123"
}
],
"dateTime":"2014-09-17",
"status":"draft",
"oralDiet":{
"type":[
{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"435801000124108",
"display":"Texture modified diet"
},
{
"system":"http://goodhealthhospital.org/diet-type-codes",
"code":"1010",
"display":"Texture modified diet"
}
],
"text":"Texture modified diet"
}
],
"schedule":[
{
"repeat":{
"boundsPeriod":{
"start":"2015-02-10"
},
"frequency":3,
"period":1,
"periodUnits":"d"
}
}
],
"texture":[
{
"modifier":{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"228049004",
"display":"Chopped food"
}
],
"text":"Regular, Chopped Meat"
},
"foodType":{
"coding":[
{
"system":"http://snomed.info/sct",
"code":"22836000",
"display":"Vegetable"
}
],
"text":"Regular, Chopped Meat"
}
}
]
}
}
},
{
"resource":{
"resourceType":"MedicationOrder",
"id":"smart-MedicationOrder-103",
"status":"draft",
"patient":{
"reference":"Patient/1288992"
},
"medicationCodeableConcept":{
"coding":[
{
"system":"http://www.nlm.nih.gov/research/umls/rxnorm",
"code":"617993",
"display":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
}
],
"text":"Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension"
},
"dosageInstruction":[
{
"text":"5 mL bid x 10 days",
"timing":{
"repeat":{
"boundsPeriod":{
"start":"2005-01-04"
},
"frequency":2,
"period":1,
"periodUnits":"d"
}
},
"doseQuantity":{
"value":5,
"unit":"mL",
"system":"http://unitsofmeasure.org",
"code":"mL"
}
}
],
"dispenseRequest":{
"numberOfRepeatsAllowed":1,
"quantity":{
"value":1,
"unit":"mL",
"system":"http://unitsofmeasure.org",
"code":"mL"
},
"expectedSupplyDuration":{
"value":10,
"unit":"days",
"system":"http://unitsofmeasure.org",
"code":"d"
}
}
}
}
]
}
}
```

## Change Log

Version | Description
---- | ----
0.1.0 | Initial Release
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ nav:
- 'patient-view 4' : 'hooks/patient-view.md'
- 'medication-prescribe 2' : 'hooks/medication-prescribe.md'
- 'order-review 3' : 'hooks/order-review.md'
- 'order-select 1' : 'hooks/order-select.md'

- Quick Start: 'quickstart.md'
- Best Practices: 'best-practices.md'
- Examples: 'examples.md'
Expand Down