FHIR Clinical Guidelines (v1.0.0) (STU1)

This page is part of the Clinical Guidelines (v1.0.0: STU 1) based on FHIR R4. This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

Bundle-activity-example-administermedication

Formats: XML, JSON, Turtle

Bundle activity-example-administermedication of type collection


Entry 1 - Full URL = http://example.org/Library/activity-example-administermedication

Resource Library:

Related Artifacts

Depends Onhttp://hl7.org/fhir/Library/FHIR-ModelInfo|4.0.1
Depends Onhttp://hl7.org/fhir/Library/FHIRHelpers|4.0.1
Depends OnCPG Activity Type
Composed OfActivity Example Administer Medication
Composed OfAdminister Medication
Composed OfActivity Example Administer Medication

Entry 2 - Full URL = http://example.org/Library/AdministerMedication

Resource Library:

Related Artifacts

Depends Onhttp://hl7.org/fhir/Library/FHIR-ModelInfo|4.0.1
Depends Onhttp://hl7.org/fhir/Library/FHIRHelpers|4.0.1
Depends OnCPG Activity Type

Parameters

PatientOut01Patient
Medication ProposalOut0*MedicationRequest
Medication Not ProposedOut0*MedicationRequest
Inclusion CriteriaOut01boolean
Active or Completed Medication AdministrationOut0*MedicationAdministration
Medication Administration Not DoneOut0*MedicationAdministration
Administer ProposalOut0*Task
Administer Proposal RejectedOut0*Task
Is Recommendation ApplicableOut01boolean

Data Requirements

Type: MedicationRequest (MedicationRequest)
Type: MedicationRequest (MedicationRequest)
Type: MedicationAdministration (MedicationAdministration)
Type: MedicationAdministration (MedicationAdministration)
Type: Task (Task)
Type: Task (Task)

Contents

text/cql

library AdministerMedication

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

codesystem "Activity Type": 'http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-activity-type'

code "Administer medication": 'administer-medication' from "Activity Type"

context Patient

/* Recommendation to administer an existing order for a medication */

/*
Positive recommendation:

If the medication has been ordered but has not been administered
  Propose administering the medication

Given a proposal, the user can:
  Accept the proposal
  Ignore the proposal
  Reject the proposal without reason
  Reject the proposal with reason

Scenario 1: No event, no plan or proposal, decision support should propose
Scenario 2: No event, incomplete proposal, decision support should not propose
Scenario 3: No event, rejected proposal, decision support should not propose
Scenario 4: Event, no proposal, decision support should not propose
Scenario 5: Event, proposal, decision support should not propose
Scenario 6: Event not done, no proposal, decision support should not propose
Scenario 7: Event not done, proposal, decision support should not propose

*/

define "Inclusion Criteria":
  Patient.active
    and exists ("Medication Proposal")
    and not exists ("Medication Not Proposed")

define "Active or Completed Medication Administration":
  [MedicationAdministration] M
    where M.status in { 'in-progress', 'on-hold', 'completed' }

define "Medication Administration Not Done":
  [MedicationAdministration] M
    where M.status in { 'not-done', 'stopped' } // TODO: Is 'stopped' appropriate here?

define "Medication Proposal":
  [MedicationRequest] M
    where M.status in { 'draft', 'active', 'on-hold', 'completed' }

define "Medication Not Proposed":
  [MedicationRequest] M
    where M.status in { 'cancelled', 'stopped' }

define "Administer Proposal":
  [Task] R
    where R.code ~ "Administer medication"
      and R.status in { 'draft', 'requested', 'received', 'accepted', 'ready' }
      and not Coalesce(doNotPerform(R), false)

define "Administer Proposal Rejected":
  [Task] R
    where R.code ~ "Administer medication"
      and R.status in { 'rejected' }
      and not Coalesce(doNotPerform(R), false)

define "Is Recommendation Applicable":
  "Inclusion Criteria"
    and not exists (
      "Active or Completed Medication Administration"
        union "Medication Administration Not Done"
    )
    and not exists (
      "Administer Proposal"
        union "Administer Proposal Rejected"
    )

define function doNotPerform(task Task):
  singleton from (
    task.extension E
      where E.url = 'http://hl7.org/fhir/StructureDefinition/request-doNotPerform'
  ).value as boolean

Content not shown - (application/elm+xml, size = 15Kb)

Content not shown - (application/elm+json, size = 28Kb)


Entry 3 - Full URL = http://example.org/PlanDefinition/activity-example-administermedication

Resource PlanDefinition:

Generated Narrative

Texts

-
*

knowledgeCapability: shareable

knowledgeCapability: computable

knowledgeCapability: publishable

knowledgeRepresentationLevel: structured

url: http://hl7.org/fhir/uv/cpg/PlanDefinition/activity-example-administermedication

version: 1.0.0

name: ActivityExampleAdministerMedication

title: Activity Example Administer Medication

type: ECA Rule

status: DRAFT

experimental: true

publisher: HL7 International - Clinical Decision Support WG

description: Example Plan Definition for a recommendation to administer a medication

library: http://hl7.org/fhir/uv/cpg/Library/AdministerMedication

action

title: Collect date of patient last visit

condition

kind: APPLICABILITY

Expressions

-
*

type: Create

definition: http://hl7.org/fhir/uv/cpg/ActivityDefinition/activity-example-administermedication


Entry 4 - Full URL = http://example.org/Bundle/am-scenario7

Resource Bundle:

Bundle am-scenario7 of type collection


Entry 1 - Full URL = http://example.org/GuidanceResponse/am-scenario7

Resource GuidanceResponse:

Generated Narrative

Texts

-
*

module: http://hl7.org/fhir/uv/cpg/Library/AdministerMedication

status: SUCCESS

subject: Generated Summary: active; Example Patient; gender: female; birthDate: 1990-10-01;

outputParameters:

parameter

name: Inclusion Criteria

value: true

parameter

name: Is Recommendation Applicable

value: false


Entry 2 - Full URL = http://example.org/MedicationAdministration/am-scenario7

Resource MedicationAdministration:

Generated Narrative

Texts

-
*

status: NOTDONE

subject: Generated Summary: active; Example Patient; gender: female; birthDate: 1990-10-01;

request: Generated Summary: status: active; intent: order; priority: routine; Fentanyl 25micrograms/hour patch (product)

Dosages

-TextDose
*apply one patch three times per week1 patch

Entry 3 - Full URL = http://example.org/MedicationRequest/am-scenario7

Resource MedicationRequest:

Generated Narrative

Texts

-
*

status: ACTIVE

intent: ORDER

priority: ROUTINE

subject: Generated Summary: active; Example Patient; gender: female; birthDate: 1990-10-01;

DosageInstructions

-
*

dispenseRequest

validityPeriod: 2015-01-15 --> 2016-01-15

quantity: 6 patch

ExpectedSupplyDurations

-
*

Entry 4 - Full URL = http://example.org/Patient/am-scenario7

Resource Patient:

Example Patient Female 1990-10-01

Entry 5 - Full URL = http://example.org/Task/request-am-scenario7

Resource Task:

Generated Narrative

Texts

-
*

instantiatesCanonical: http://hl7.org/fhir/uv/cpg/ActivityDefinition/activity-example-administermedication

status: INPROGRESS

intent: ORDER

code: Administer a medication

for: Generated Summary: active; Example Patient; gender: female; birthDate: 1990-10-01;

Inputs

-TypeValue[x]
*Administer a medicationGenerated Summary: status: active; intent: order; priority: routine; Fentanyl 25micrograms/hour patch (product)