Specialty Medication Enrollment
2.1.0 - CI Build United States of America flag

Specialty Medication Enrollment, published by HL7 International - Pharmacy. This is not an authorized publication; it is the continuous build for version 2.1.0). This version is based on the current content of https://github.com/HL7/fhir-specialty-rx/ and changes regularly. See the Directory of published versions

Example Task: Specialty Rx Task - SMART Launch 1

Example notes

This example illustrates the Task content that (a) links the request to the patient prescription and (b) provides the information needed to launch the SMART application–where the user will complete the task.

Key elements are…

  • Task.identifier: launch-context-id-01345005
  • Represents the application context that the SMART app should launch into (in this example, the specific set of questions to be answered). It is conveyed during launch of the referenced SMART app in the __appContext parameter
  • Task.code: complete-app-questionnaire
    • Characterizes the requested user action (and directs the EHR to make the specified SMART application available for the user to launch)
  • Task.description: Launch the My Pharmacy SMART app and complete the questionnaire
    • User-directed text describing the task to be performed
  • Task.for: Reference to the patient resource that resides in the Data Source system
  • Task.requester: The organization submitting the Task
  • Task.owner: The prescriber
  • Task.reasonReference: The prescription to which the task pertains
  • Task.input: The client ID of the SMART app to be launched
    • Task.input.type: smart-app-client-id
    • Task.input.valueIdentifier: smart-app-1033450

Using Task elements when launching the SMART application

The Task.identifier value (representing application context associated with the Task) is shared during SMART app launch within the __appContext parameter of the OAuth 2.0 access token response. It is conveyed in the __appContext parameter.

In this example, the __appContext parameter will be populated as…

"__appContext": "launch-context-id-01345005"

Example data content

Task
id@value:  specialty-rx-task-smart-launch-1
metaprofile@value:  http://hl7.org/fhir/us/specialty-rx/StructureDefinition/specialty-rx-task-smart-launch
identifiertypecodingsystem@value:  http://hl7.org/fhir/us/specialty-rx/CodeSystem/specialty-rx-task-characteristiccode@value:  app-contextdisplay@value:  SMART App Context ID
system@value:  https://my-pharmacy-smart-app.com/app-context-idvalue@value:  launch-context-id-01345005
status@value:  requested
intent@value:  plan
codecodingsystem@value:  http://hl7.org/fhir/us/specialty-rx/CodeSystem/specialty-rx-task-characteristiccode@value:  complete-app-questionnairedisplay@value:  Complete Questionnaire in SMART App
description@value:  Launch the My Pharmacy SMART app and complete the questionnaire.
forreference@value:  Patient/specialty-rx-patient-1
authoredOn@value:  2020-03-11
requesterreference@value:  Organization/specialty-rx-organization-pharmacy-1display@value:  Our Pharmacy
ownerreference@value:  Practitioner/specialty-rx-practitioner-1display@value:  Jane Smith MD
reasonReferencereference@value:  MedicationRequest/specialty-rx-medicationrequest-1display@value:  Humira Injector Pen - 2020-03-10
inputtypecodingsystem@value:  http://hl7.org/fhir/us/specialty-rx/CodeSystem/specialty-rx-task-characteristiccode@value:  smart-app-client-iddisplay@value:  SMART Application Client ID
valueIdentifiervalue@value:  smart-app-1033450

Generated Narrative: Task

Resource Task "specialty-rx-task-smart-launch-1"

Profile: Specialty Rx Task - SMART Launch

identifier: SMART App Context ID: launch-context-id-01345005

status: requested

intent: plan

code: Complete Questionnaire in SMART App (Specialty Rx Code System - Task Characteristic#complete-app-questionnaire)

description: Launch the My Pharmacy SMART app and complete the questionnaire.

for: Patient/specialty-rx-patient-1 " DOE"

authoredOn: 2020-03-11

requester: Organization/specialty-rx-organization-pharmacy-1: Our Pharmacy "Our Pharmacy"

owner: Practitioner/specialty-rx-practitioner-1: Jane Smith MD " SMITH"

reasonReference: MedicationRequest/specialty-rx-medicationrequest-1: Humira Injector Pen - 2020-03-10

Inputs

-TypeValue[x]
*SMART Application Client ID (Specialty Rx Code System - Task Characteristic#smart-app-client-id)id: smart-app-1033450