Specialty Medication Enrollment
0.1.0 - STU1 Ballot

Publication Build: This will be filled in by the publication tooling

## 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: The patient
- Task.requester: The organization submitting the Task
- Task.owner: The prescriber
- Task.reasonReference: The prescription to which the task pertains
- Task.input: The location of the SMART app to be launched
  - Task.input.type: smart-app-launch-url (the SMART app launch URL)
  - Task.input.valueUrl: https://my-pharmacy-smart-app.com. The actual endpoint URL to launch the SMART app

#### 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
meta profile@value: http://hl7.org/fhir/us/specialty-rx/StructureDefinition/specialty-rx-task-smart-launch
identifier type coding system@value: http://hl7.org/fhir/us/specialty-rx/CodeSystem/specialty-rx-task-identifier-type code@value: app-context display@value: SMART App Context ID
system@value: https://my-pharmacy-smart-app.com/app-context-id value@value: launch-context-id-01345005
status@value: requested
intent@value: plan
code coding system@value: http://hl7.org/fhir/us/specialty-rx/CodeSystem/specialty-rx-task-type code@value: complete-app-questionnaire display@value: Complete Questionnaire in SMART App
description@value: Launch the My Pharmacy SMART app and complete the questionnaire.
for reference@value: Patient/specialty-rx-patient-1
authoredOn@value: 2020-03-11
requester reference@value: Organization/specialty-rx-organization-pharmacy-1 display@value: Our Pharmacy
owner reference@value: Practitioner/specialty-rx-practitioner-1 display@value: Jane Smith MD
reasonReference reference@value: MedicationRequest/specialty-rx-medicationrequest-1 display@value: Humira Injector Pen - 2020-03-10
input type coding system@value: http://hl7.org/fhir/us/specialty-rx/CodeSystem/specialty-rx-task-input-type code@value: smart-app-launch-url display@value: SMART Application Launch URL
valueUrl@value: https://my-pharmacy-smart-app.com

Generated Narrative

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

status: requested

intent: plan

code: Complete Questionnaire in SMART App

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

for: Generated Summary: id: 1234; active; Timothy V. Doe ; Phone: 555-555-5555, tim.doe@example.com; gender: male; birthDate: 1987-02-20

authoredOn: 2020-03-11

requester: Our Pharmacy. Generated Summary: id: 1669512345; active; Healthcare Provider; name: Our Pharmacy; Phone: 952-555-5555, contact-our-pharmacy@example.org

owner: Jane Smith MD. Generated Summary: id: 9941339108; Jane Smith ; Phone: 555-555-5555, Fax: 555-555-1234, jane.smith@example.org

reasonReference: Humira Injector Pen - 2020-03-10. Generated Summary: status: active; intent: order; Humira 40 MG in 0.4 ML Auto-Injector; authoredOn: 2020-03-10

### Inputs

- | Type | Value[x]
* | SMART Application Launch URL | https://my-pharmacy-smart-app.com