Physical Activity Implementation Guide
1.0.0 - STU Release 1 United States of America flag

This page is part of the U.S. Physical Activity IG (v1.0.0: STU 1.0) based on FHIR R4. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

: Scenario 1 - Exercise Prescription - TTL Representation

Page standards status: Informative

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:ExampleScenario ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "Scen1ExercisePrescriptionScenario"] ; # 
  fhir:text [
fhir:status [ fhir:v "extensions" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: ExampleScenario</b><a name=\"Scen1ExercisePrescriptionScenario\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource ExampleScenario &quot;Scen1ExercisePrescriptionScenario&quot; </p></div><p><b>url</b>: <code>http://hl7.org/fhir/us/physical-activity/ExampleScenario/Scen1ExercisePrescriptionScenario</code></p><p><b>version</b>: 1.0.0</p><p><b>name</b>: ExercisePrescription</p><p><b>status</b>: draft</p><p><b>date</b>: 2023-08-25 15:35:25+0000</p><p><b>publisher</b>: HL7 International - Patient Care WG</p><p><b>contact</b>: HL7 International - Patient Care WG: <a href=\"http://www.hl7.org/Special/committees/patientcare\">http://www.hl7.org/Special/committees/patientcare</a></p><p><b>jurisdiction</b>: United States of America <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.0.0/CodeSystem-ISO3166Part1.html\">ISO 3166-1 Codes for the representation of names of countries and their subdivisions — Part 1: Country code</a>#US)</span></p><blockquote><p><b>actor</b></p><p><b>actorId</b>: patientApp</p><p><b>type</b>: entity</p><p><b>name</b>: Patient App</p><p><b>description</b>: A patient app used to query resources related to the exercise plan</p></blockquote><blockquote><p><b>actor</b></p><p><b>actorId</b>: goodHealth</p><p><b>type</b>: entity</p><p><b>name</b>: EHR</p><p><b>description</b>: EHR that records patient's exercise plan</p></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Scen1query1</p><p><b>resourceType</b>: Binary</p><p><b>name</b>: Query for patient physical activity care plans</p><p><b>description</b>: Query for CarePlans for a patient: `GET https://goodhealth.example.org/fhir/CarePlan?patient=Patient/Scen1PatientKhatun&amp;status=active,on-hold&amp;category=http%3A//hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes|PhysicalActivity`</p></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Scen1query2</p><p><b>resourceType</b>: Binary</p><p><b>name</b>: Query for patient physical activity goals</p><p><b>description</b>: Query for Goals for a patient: `GET https://goodhealth.example.org/fhir/Goal?patient=Patient/Scen1PatientKhatun&amp;status=active,on-hold,completed&amp;category=http%3A//hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes|PhysicalActivity`</p></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Scen1query3</p><p><b>resourceType</b>: Binary</p><p><b>name</b>: Query for patient exercise prescriptions and referrals</p><p><b>description</b>: Query for ServiceRequests for a patient: `GET https://goodhealth.example.org/fhir/ServiceRequest?patient=Patient/Scen1PatientKhatun&amp;status=active,on-hold&amp;category=http%3A//hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes|PhysicalActivity`</p></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Scen1CarePlan</p><p><b>resourceType</b>: CarePlan</p><p><b>name</b>: Patient physical activity care plan</p><p><b>description</b>: CarePlan describing proposed exercise regime</p><blockquote><p><b>version</b></p><p><b>Extension Definition for ExampleScenario.instance.version.title for Version 5.0</b>: Initial CarePlan</p><p><b>Extension Definition for ExampleScenario.instance.version.content for Version 5.0</b>: <a href=\"CarePlan-Scen1CarePlanV1.html\">CarePlan/Scen1CarePlanV1</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: Planning for jogging and stationary bike</p></blockquote><blockquote><p><b>version</b></p><p><b>Extension Definition for ExampleScenario.instance.version.title for Version 5.0</b>: Updated CarePlan</p><p><b>Extension Definition for ExampleScenario.instance.version.content for Version 5.0</b>: <a href=\"CarePlan-Scen1CarePlanV2.html\">CarePlan/Scen1CarePlanV2</a></p><p><b>versionId</b>: 2</p><p><b>description</b>: Planning for increased stationary bike</p></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>resourceId</b>: Scen1Goal</p><p><b>resourceType</b>: Goal</p><p><b>name</b>: Physical Activity weekly target</p><p><b>description</b>: Goal indicating target number of minutes/week of moderate-vigorous physical activity</p><blockquote><p><b>version</b></p><p><b>Extension Definition for ExampleScenario.instance.version.title for Version 5.0</b>: Initial goal</p><p><b>Extension Definition for ExampleScenario.instance.version.content for Version 5.0</b>: <a href=\"Goal-Scen1GoalV1.html\">Goal/Scen1GoalV1</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: Initial value of 100 mins/week</p></blockquote><blockquote><p><b>version</b></p><p><b>Extension Definition for ExampleScenario.instance.version.title for Version 5.0</b>: Initial goal</p><p><b>Extension Definition for ExampleScenario.instance.version.content for Version 5.0</b>: <a href=\"Goal-Scen1GoalV2.html\">Goal/Scen1GoalV2</a></p><p><b>versionId</b>: 1</p><p><b>description</b>: Initial value of 100 mins/week-completed</p></blockquote></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Goal-Scen1Goal2.html\">Goal/Scen1Goal2</a></p><p><b>resourceId</b>: Scen1Goal2</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Updated goal</p><p><b>description</b>: Updated value of 150 mins/week</p></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Bundle-Scen1CarePlanBundle1.html\">Bundle/Scen1CarePlanBundle1</a></p><p><b>resourceId</b>: Scen1CarePlanBundle1</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Initial care plan search response bundle</p><p><b>description</b>: Only contains 1 plan, though in practice, more than one is possible</p><h3>ContainedInstances</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1CarePlan</td><td>1</td></tr></table></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Bundle-Scen1CarePlanBundle2.html\">Bundle/Scen1CarePlanBundle2</a></p><p><b>resourceId</b>: Scen1CarePlanBundle2</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Second care plan search response bundle</p><p><b>description</b>: In a real system, the id would be the same as the original</p><h3>ContainedInstances</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1CarePlan</td><td>2</td></tr></table></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Bundle-Scen1GoalBundle1.html\">Bundle/Scen1GoalBundle1</a></p><p><b>resourceId</b>: Scen1GoalBundle1</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Initial goal search response bundle</p><p><b>description</b>: There could be multiple goals, but in the scenario there's only one.</p><h3>ContainedInstances</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td><td><b>VersionId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1Goal</td><td>1</td></tr></table></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Bundle-Scen1GoalBundle2.html\">Bundle/Scen1GoalBundle2</a></p><p><b>resourceId</b>: Scen1GoalBundle2</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Second goal search response bundle</p><p><b>description</b>: In a real system, the id would be the same as the original</p><h3>ContainedInstances</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1Goal2</td></tr></table></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"ServiceRequest-Scen1ExerciseRx.html\">ServiceRequest/Scen1ExerciseRx</a></p><p><b>resourceId</b>: Scen1ExerciseRx</p><p><b>resourceType</b>: ServiceRequest</p><p><b>name</b>: Prescription for exercise</p><p><b>description</b>: Expressed as a ServiceRequest with performer of the patient</p></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Bundle-Scen1ExerciseRxBundle.html\">Bundle/Scen1ExerciseRxBundle</a></p><p><b>resourceId</b>: Scen1ExerciseRxBundle</p><p><b>resourceType</b>: Bundle</p><p><b>name</b>: Search result of exercise prescriptions and referrals</p><p><b>description</b>: There could be a mix of an exercise prescription plus referrals, but in this case there's only the prescription.</p><h3>ContainedInstances</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ExerciseRx</td></tr></table></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Observation-Scen1ObservationDaysPerWeek.html\">Observation/Scen1ObservationDaysPerWeek</a></p><p><b>resourceId</b>: Scen1ObservationDaysPerWeek</p><p><b>resourceType</b>: Observation</p><p><b>name</b>: Example physical activity days per week record</p><p><b>description</b>: Average days per week of moderate-to-vigorous physical activity.</p></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Observation-Scen1ObservationMinsPerDay.html\">Observation/Scen1ObservationMinsPerDay</a></p><p><b>resourceId</b>: Scen1ObservationMinsPerDay</p><p><b>resourceType</b>: Observation</p><p><b>name</b>: Example physical activity minutes per day record</p><p><b>description</b>: Average minutes per day of moderate-to-vigorous physical activity.</p></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Observation-Scen1ObservationMinsPerWeek.html\">Observation/Scen1ObservationMinsPerWeek</a></p><p><b>resourceId</b>: Scen1ObservationMinsPerWeek</p><p><b>resourceType</b>: Observation</p><p><b>name</b>: Example physical activity minutes per week record</p><p><b>description</b>: Average minutes per week of moderate-to-vigorous physical activity.</p></blockquote><blockquote><p><b>instance</b></p><p><b>Extension Definition for ExampleScenario.instance.content for Version 5.0</b>: <a href=\"Observation-Scen1ObservationStrengthDaysPerWeek.html\">Observation/Scen1ObservationStrengthDaysPerWeek</a></p><p><b>resourceId</b>: Scen1ObservationStrengthDaysPerWeek</p><p><b>resourceType</b>: Observation</p><p><b>name</b>: Example strength days per week record</p><p><b>description</b>: Average days per week of muscle-strengthening physical activity.</p></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: Day after appointment</p><p><b>description</b>: The patient accesses the care plan, goals and exercise prescription made available on the EHR</p><p><b>preConditions</b>: Encounter (and other supporting) resources created</p><p><b>postConditions</b>: Patient app has retrieved exercise plan related resources</p><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 1</p><p><b>type</b>: search-type</p><p><b>name</b>: Query CarePlan</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app queries exercise CarePlan describing proposed exercise regime.</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1query1</td></tr></table><h3>Responses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1CarePlanBundle1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 2</p><p><b>type</b>: search-type</p><p><b>name</b>: Query Goal</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app queries Goals (100 minutes/week).</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1query2</td></tr></table><h3>Responses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1GoalBundle1</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 3</p><p><b>type</b>: search-type</p><p><b>name</b>: Query ServiceRequest</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app queries ServiceRequest (order for ‘exercise’).</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1query3</td></tr></table><h3>Responses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ExerciseRxBundle</td></tr></table></blockquote></blockquote></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: A couple of weeks later</p><p><b>description</b>: The exchange noted here would actually occur many times (though not necessarily regularly).  Only a single set of data is shown for simplicity.</p><p><b>preConditions</b>: Patient app is able to write records to EHR</p><p><b>postConditions</b>: EHR has weekly activity level observations</p><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 5</p><p><b>type</b>: create</p><p><b>name</b>: Post days/week</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app posts average days per week of moderate-to-vigorous physical activity. `POST https://goodhealth.example.org/fhir/Observation`</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ObservationDaysPerWeek</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 6</p><p><b>type</b>: create</p><p><b>name</b>: Post minutes/day</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app posts average minutes per day of moderate-to-vigorous physical activity. `POST https://goodhealth.example.org/fhir/Observation`</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ObservationMinsPerDay</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 7</p><p><b>type</b>: create</p><p><b>name</b>: Post minutes/week</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app posts average minutes per week of moderate-to-vigorous physical activity. `POST https://goodhealth.example.org/fhir/Observation`</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ObservationMinsPerWeek</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 8</p><p><b>type</b>: create</p><p><b>name</b>: Post stength days/week</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app posts average days per week of muscle-strengthening physical activity. `POST https://goodhealth.example.org/fhir/Observation`</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ObservationStrengthDaysPerWeek</td></tr></table></blockquote></blockquote></blockquote><blockquote><p><b>process</b></p><p><b>title</b>: A little more than 6 months after first appointment</p><p><b>description</b>: In practice, the patient app would likely check for new CarePlans and Goals each time it launches.  However, this is the first time there'd be something new to retrieve.</p><p><b>preConditions</b>: CarePlan and Goal have been updated in EHR</p><p><b>postConditions</b>: Patient app retrieves updated CarePlan and Goal</p><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 9</p><p><b>type</b>: search-type</p><p><b>name</b>: Query revised CarePlan</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app queries revised CarePlan with providers notes.</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1query1</td></tr></table><h3>Responses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1CarePlanBundle2</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 10</p><p><b>type</b>: search-type</p><p><b>name</b>: Query revised Goal</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: Patient app queries new Goals.</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1query2</td></tr></table><h3>Responses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1GoalBundle2</td></tr></table></blockquote></blockquote><blockquote><p><b>step</b></p><blockquote><p><b>operation</b></p><p><b>number</b>: 11</p><p><b>type</b>: search-type</p><p><b>name</b>: Query ServiceRequest</p><p><b>initiator</b>: patientApp</p><p><b>receiver</b>: goodHealth</p><p><b>description</b>: The results of this search are the same as the initial call because the exercise 'prescription' has not changed.</p><h3>Requests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1query3</td></tr></table><h3>Responses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ResourceId</b></td></tr><tr><td style=\"display: none\">*</td><td>Scen1ExerciseRxBundle</td></tr></table></blockquote></blockquote></blockquote></div>"
  ] ; # 
  fhir:url [ fhir:v "http://hl7.org/fhir/us/physical-activity/ExampleScenario/Scen1ExercisePrescriptionScenario"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "1.0.0"] ; # 
  fhir:name [ fhir:v "ExercisePrescription"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:date [ fhir:v "2023-08-25T15:35:25+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 International - Patient Care WG"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "HL7 International - Patient Care WG" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "http://www.hl7.org/Special/committees/patientcare" ]     ] )
  ] ) ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "US" ]     ] )
  ] ) ; # 
  fhir:actor ( [
fhir:actorId [ fhir:v "patientApp" ] ;
fhir:type [ fhir:v "entity" ] ;
fhir:name [ fhir:v "Patient App" ] ;
fhir:description [ fhir:v "A patient app used to query resources related to the exercise plan" ]
  ] [
fhir:actorId [ fhir:v "goodHealth" ] ;
fhir:type [ fhir:v "entity" ] ;
fhir:name [ fhir:v "EHR" ] ;
fhir:description [ fhir:v "EHR that records patient's exercise plan" ]
  ] ) ; # 
  fhir:instance ( [
fhir:resourceId [ fhir:v "Scen1query1" ] ;
fhir:resourceType [ fhir:v "Binary" ] ;
fhir:name [ fhir:v "Query for patient physical activity care plans" ] ;
fhir:description [ fhir:v "Query for CarePlans for a patient: `GET https://goodhealth.example.org/fhir/CarePlan?patient=Patient/Scen1PatientKhatun&status=active,on-hold&category=http%3A//hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes|PhysicalActivity`" ]
  ] [
fhir:resourceId [ fhir:v "Scen1query2" ] ;
fhir:resourceType [ fhir:v "Binary" ] ;
fhir:name [ fhir:v "Query for patient physical activity goals" ] ;
fhir:description [ fhir:v "Query for Goals for a patient: `GET https://goodhealth.example.org/fhir/Goal?patient=Patient/Scen1PatientKhatun&status=active,on-hold,completed&category=http%3A//hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes|PhysicalActivity`" ]
  ] [
fhir:resourceId [ fhir:v "Scen1query3" ] ;
fhir:resourceType [ fhir:v "Binary" ] ;
fhir:name [ fhir:v "Query for patient exercise prescriptions and referrals" ] ;
fhir:description [ fhir:v "Query for ServiceRequests for a patient: `GET https://goodhealth.example.org/fhir/ServiceRequest?patient=Patient/Scen1PatientKhatun&status=active,on-hold&category=http%3A//hl7.org/fhir/us/physical-activity/CodeSystem/pa-temporary-codes|PhysicalActivity`" ]
  ] [
fhir:resourceId [ fhir:v "Scen1CarePlan" ] ;
fhir:resourceType [ fhir:v "CarePlan" ] ;
fhir:name [ fhir:v "Patient physical activity care plan" ] ;
fhir:description [ fhir:v "CarePlan describing proposed exercise regime" ] ;
    ( fhir:version [
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Initial CarePlan" ]       ] [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "CarePlan/Scen1CarePlanV1" ]         ]       ] ) ;
fhir:versionId [ fhir:v "1" ] ;
fhir:description [ fhir:v "Planning for jogging and stationary bike" ]     ] [
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Updated CarePlan" ]       ] [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "CarePlan/Scen1CarePlanV2" ]         ]       ] ) ;
fhir:versionId [ fhir:v "2" ] ;
fhir:description [ fhir:v "Planning for increased stationary bike" ]     ] )
  ] [
fhir:resourceId [ fhir:v "Scen1Goal" ] ;
fhir:resourceType [ fhir:v "Goal" ] ;
fhir:name [ fhir:v "Physical Activity weekly target" ] ;
fhir:description [ fhir:v "Goal indicating target number of minutes/week of moderate-vigorous physical activity" ] ;
    ( fhir:version [
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Initial goal" ]       ] [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Goal/Scen1GoalV1" ]         ]       ] ) ;
fhir:versionId [ fhir:v "1" ] ;
fhir:description [ fhir:v "Initial value of 100 mins/week" ]     ] [
      ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Initial goal" ]       ] [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Goal/Scen1GoalV2" ]         ]       ] ) ;
fhir:versionId [ fhir:v "1" ] ;
fhir:description [ fhir:v "Initial value of 100 mins/week-completed" ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Goal/Scen1Goal2" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1Goal2" ] ;
fhir:resourceType [ fhir:v "Bundle" ] ;
fhir:name [ fhir:v "Updated goal" ] ;
fhir:description [ fhir:v "Updated value of 150 mins/week" ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Bundle/Scen1CarePlanBundle1" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1CarePlanBundle1" ] ;
fhir:resourceType [ fhir:v "Bundle" ] ;
fhir:name [ fhir:v "Initial care plan search response bundle" ] ;
fhir:description [ fhir:v "Only contains 1 plan, though in practice, more than one is possible" ] ;
    ( fhir:containedInstance [
fhir:resourceId [ fhir:v "Scen1CarePlan" ] ;
fhir:versionId [ fhir:v "1" ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Bundle/Scen1CarePlanBundle2" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1CarePlanBundle2" ] ;
fhir:resourceType [ fhir:v "Bundle" ] ;
fhir:name [ fhir:v "Second care plan search response bundle" ] ;
fhir:description [ fhir:v "In a real system, the id would be the same as the original" ] ;
    ( fhir:containedInstance [
fhir:resourceId [ fhir:v "Scen1CarePlan" ] ;
fhir:versionId [ fhir:v "2" ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Bundle/Scen1GoalBundle1" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1GoalBundle1" ] ;
fhir:resourceType [ fhir:v "Bundle" ] ;
fhir:name [ fhir:v "Initial goal search response bundle" ] ;
fhir:description [ fhir:v "There could be multiple goals, but in the scenario there's only one." ] ;
    ( fhir:containedInstance [
fhir:resourceId [ fhir:v "Scen1Goal" ] ;
fhir:versionId [ fhir:v "1" ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Bundle/Scen1GoalBundle2" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1GoalBundle2" ] ;
fhir:resourceType [ fhir:v "Bundle" ] ;
fhir:name [ fhir:v "Second goal search response bundle" ] ;
fhir:description [ fhir:v "In a real system, the id would be the same as the original" ] ;
    ( fhir:containedInstance [
fhir:resourceId [ fhir:v "Scen1Goal2" ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "ServiceRequest/Scen1ExerciseRx" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1ExerciseRx" ] ;
fhir:resourceType [ fhir:v "ServiceRequest" ] ;
fhir:name [ fhir:v "Prescription for exercise" ] ;
fhir:description [ fhir:v "Expressed as a ServiceRequest with performer of the patient" ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Bundle/Scen1ExerciseRxBundle" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1ExerciseRxBundle" ] ;
fhir:resourceType [ fhir:v "Bundle" ] ;
fhir:name [ fhir:v "Search result of exercise prescriptions and referrals" ] ;
fhir:description [ fhir:v "There could be a mix of an exercise prescription plus referrals, but in this case there's only the prescription." ] ;
    ( fhir:containedInstance [
fhir:resourceId [ fhir:v "Scen1ExerciseRx" ]     ] )
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Observation/Scen1ObservationDaysPerWeek" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1ObservationDaysPerWeek" ] ;
fhir:resourceType [ fhir:v "Observation" ] ;
fhir:name [ fhir:v "Example physical activity days per week record" ] ;
fhir:description [ fhir:v "Average days per week of moderate-to-vigorous physical activity." ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Observation/Scen1ObservationMinsPerDay" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1ObservationMinsPerDay" ] ;
fhir:resourceType [ fhir:v "Observation" ] ;
fhir:name [ fhir:v "Example physical activity minutes per day record" ] ;
fhir:description [ fhir:v "Average minutes per day of moderate-to-vigorous physical activity." ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Observation/Scen1ObservationMinsPerWeek" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1ObservationMinsPerWeek" ] ;
fhir:resourceType [ fhir:v "Observation" ] ;
fhir:name [ fhir:v "Example physical activity minutes per week record" ] ;
fhir:description [ fhir:v "Average minutes per week of moderate-to-vigorous physical activity." ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Observation/Scen1ObservationStrengthDaysPerWeek" ]       ]     ] ) ;
fhir:resourceId [ fhir:v "Scen1ObservationStrengthDaysPerWeek" ] ;
fhir:resourceType [ fhir:v "Observation" ] ;
fhir:name [ fhir:v "Example strength days per week record" ] ;
fhir:description [ fhir:v "Average days per week of muscle-strengthening physical activity." ]
  ] ) ; # 
  fhir:process ( [
fhir:title [ fhir:v "Day after appointment" ] ;
fhir:description [ fhir:v "The patient accesses the care plan, goals and exercise prescription made available on the EHR" ] ;
fhir:preConditions [ fhir:v "Encounter (and other supporting) resources created" ] ;
fhir:postConditions [ fhir:v "Patient app has retrieved exercise plan related resources" ] ;
    ( fhir:step [
fhir:operation [
fhir:number [ fhir:v "1" ] ;
fhir:type [ fhir:v "search-type" ] ;
fhir:name [ fhir:v "Query CarePlan" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app queries exercise CarePlan describing proposed exercise regime." ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1query1" ]         ] ;
fhir:response [
fhir:resourceId [ fhir:v "Scen1CarePlanBundle1" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "2" ] ;
fhir:type [ fhir:v "search-type" ] ;
fhir:name [ fhir:v "Query Goal" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app queries Goals (100 minutes/week)." ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1query2" ]         ] ;
fhir:response [
fhir:resourceId [ fhir:v "Scen1GoalBundle1" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "3" ] ;
fhir:type [ fhir:v "search-type" ] ;
fhir:name [ fhir:v "Query ServiceRequest" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app queries ServiceRequest (order for ‘exercise’)." ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1query3" ]         ] ;
fhir:response [
fhir:resourceId [ fhir:v "Scen1ExerciseRxBundle" ]         ]       ]     ] )
  ] [
fhir:title [ fhir:v "A couple of weeks later" ] ;
fhir:description [ fhir:v "The exchange noted here would actually occur many times (though not necessarily regularly).  Only a single set of data is shown for simplicity." ] ;
fhir:preConditions [ fhir:v "Patient app is able to write records to EHR" ] ;
fhir:postConditions [ fhir:v "EHR has weekly activity level observations" ] ;
    ( fhir:step [
fhir:operation [
fhir:number [ fhir:v "5" ] ;
fhir:type [ fhir:v "create" ] ;
fhir:name [ fhir:v "Post days/week" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app posts average days per week of moderate-to-vigorous physical activity. `POST https://goodhealth.example.org/fhir/Observation`" ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1ObservationDaysPerWeek" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "6" ] ;
fhir:type [ fhir:v "create" ] ;
fhir:name [ fhir:v "Post minutes/day" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app posts average minutes per day of moderate-to-vigorous physical activity. `POST https://goodhealth.example.org/fhir/Observation`" ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1ObservationMinsPerDay" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "7" ] ;
fhir:type [ fhir:v "create" ] ;
fhir:name [ fhir:v "Post minutes/week" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app posts average minutes per week of moderate-to-vigorous physical activity. `POST https://goodhealth.example.org/fhir/Observation`" ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1ObservationMinsPerWeek" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "8" ] ;
fhir:type [ fhir:v "create" ] ;
fhir:name [ fhir:v "Post stength days/week" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app posts average days per week of muscle-strengthening physical activity. `POST https://goodhealth.example.org/fhir/Observation`" ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1ObservationStrengthDaysPerWeek" ]         ]       ]     ] )
  ] [
fhir:title [ fhir:v "A little more than 6 months after first appointment" ] ;
fhir:description [ fhir:v "In practice, the patient app would likely check for new CarePlans and Goals each time it launches.  However, this is the first time there'd be something new to retrieve." ] ;
fhir:preConditions [ fhir:v "CarePlan and Goal have been updated in EHR" ] ;
fhir:postConditions [ fhir:v "Patient app retrieves updated CarePlan and Goal" ] ;
    ( fhir:step [
fhir:operation [
fhir:number [ fhir:v "9" ] ;
fhir:type [ fhir:v "search-type" ] ;
fhir:name [ fhir:v "Query revised CarePlan" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app queries revised CarePlan with providers notes." ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1query1" ]         ] ;
fhir:response [
fhir:resourceId [ fhir:v "Scen1CarePlanBundle2" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "10" ] ;
fhir:type [ fhir:v "search-type" ] ;
fhir:name [ fhir:v "Query revised Goal" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "Patient app queries new Goals." ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1query2" ]         ] ;
fhir:response [
fhir:resourceId [ fhir:v "Scen1GoalBundle2" ]         ]       ]     ] [
fhir:operation [
fhir:number [ fhir:v "11" ] ;
fhir:type [ fhir:v "search-type" ] ;
fhir:name [ fhir:v "Query ServiceRequest" ] ;
fhir:initiator [ fhir:v "patientApp" ] ;
fhir:receiver [ fhir:v "goodHealth" ] ;
fhir:description [ fhir:v "The results of this search are the same as the initial call because the exercise 'prescription' has not changed." ] ;
fhir:request [
fhir:resourceId [ fhir:v "Scen1query3" ]         ] ;
fhir:response [
fhir:resourceId [ fhir:v "Scen1ExerciseRxBundle" ]         ]       ]     ] )
  ] ) . #