Skip to content

Commit

Permalink
Merge pull request #651 from cds-hooks/add-desc-for-orders-element-cl…
Browse files Browse the repository at this point in the history
…arify-what-fhir-resources

Add desc for orders element clarify what fhir resources
  • Loading branch information
isaacvetter authored Feb 2, 2024
2 parents 6a46a5e + 099bf0e commit bcc72e5
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 7 deletions.
15 changes: 10 additions & 5 deletions docs/hooks/order-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,27 @@ This hook occurs when a clinician initially selects one or more new orders from

This hook is intended to replace (deprecate) the medication-prescribe hook.

## Context
![Ordering Flow Diagram](../images/orderingflow.png)

Decision support should focus on the 'selected' orders - those that are newly selected or actively being authored. The non-selected orders are included in the context to provide context and to allow decision support to take into account other pending actions that might not yet be stored in the system (and therefore not queryable).
The context of this hook distinguishes between the list of unsigned orders from the clinician's ordering session, and the one or more 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.
## Context

The selected order(s) may or may not define the additional details necessary to finalize the order (such as route, dose, etc). Note that at the point of the related order-sign hook, all order details are known.
Decision support should focus on the 'selected' orders - those that are newly selected or currently being authored. The non-selected orders are included in the context to provide context and to allow decision support to take into account other pending actions that might not yet be stored in the system (and therefore not queryable).
The context of this hook distinguishes between the list of unsigned orders from the clinician's ordering session, and the one or more 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) or [PractitionerRole](https://www.hl7.org/fhir/practitionerrole.html).<br />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 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 `draftOrders` 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 <br/> R4 - FHIR Bundle of DeviceRequest, MedicationRequest, NutritionOrder, ServiceRequest, VisionPrescription with _draft_ status
`draftOrders` | REQUIRED | No | *object* | A Bundle of FHIR request resources with a draft status, representing orders that aren't yet signed from the current ordering session.

### A Note Concerning FHIR Versions

CDS Hooks is designed to be agnostic of FHIR version. For example, all versions of FHIR can represent in-progress orders but over time, the specific resource name and some of the important elements have changed. Below are some of the mosty commonly used FHIR resources for representing an order in CDS Hooks. This list is intentionally not comprehensive.
* DSTU2 - FHIR Bundle of MedicationOrder, ProcedureRequest
* STU3 - FHIR Bundle of MedicationRequest, ProcedureRequest
* R4 - FHIR Bundle of MedicationRequest, ServiceRequest

## Examples

Expand Down
11 changes: 9 additions & 2 deletions docs/hooks/order-sign.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@ mixture of new and revised orders.

This hook is intended to replace (deprecate) the `medication-prescribe` and `order-review` hooks.

![Ordering Flow Diagram](../images/orderingflow.png)

## 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) or [PractitionerRole](https://www.hl7.org/fhir/practitionerrole.html).<br />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 current encounter in context
`draftOrders` | REQUIRED | No | *object* | DSTU2 - FHIR Bundle of MedicationOrder, DiagnosticOrder, DeviceUseRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription (typically with _draft_ status) <br/> STU3 - FHIR Bundle of MedicationRequest, ReferralRequest, ProcedureRequest, NutritionOrder, VisionPrescription (typically with _draft_ status) <br/> R4 - FHIR Bundle of DeviceRequest, MedicationRequest, NutritionOrder, ServiceRequest, VisionPrescription (typically with _draft_ status)
`draftOrders` | REQUIRED | No | *object* | A Bundle of FHIR request resources with a draft status, representing orders that aren't yet signed from the current ordering session.

### A Note Concerning FHIR Versions

CDS Hooks is designed to be agnostic of FHIR version. For example, all versions of FHIR can represent in-progress orders but over time, the specific resource name and some of the important elements have changed. Below are some of the mosty commonly used FHIR resources for representing an order in CDS Hooks. This list is intentionally not comprehensive.
* DSTU2 - FHIR Bundle of MedicationOrder, ProcedureRequest
* STU3 - FHIR Bundle of MedicationRequest, ProcedureRequest
* R4 - FHIR Bundle of MedicationRequest, ServiceRequest

## Examples

Expand Down Expand Up @@ -548,4 +555,4 @@ Version | Description
---- | ----
1.0 | Initial Release
1.0.1 | Add DeviceRequest to list of order resources for R4.
1.1.0 | Updated hook to all for use in order-revision situations
1.1.0 | Updated hook to all for use in order-revision situations
Binary file added docs/images/orderingflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions docs/images/orderingflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bcc72e5

Please sign in to comment.