Scen2ProviderToPersonaltrainerReferral
type: ExampleScenario
node role: treeRoot
id:
  v: Scen2ProviderToPersonaltrainerReferral
text:
  status:
    v: extensions
  div: Generated Narrative: ExampleScenario Resource ExampleScenario "Scen2ProviderToPersonaltrainerReferral" wg: pc url: http://hl7.org/fhir/us/physical-activity/ExampleScenario/Scen2ProviderToPersonaltrainerReferral version: 1.0.1 name: ProviderToPersonalTrainerReferral status: draft date: 2024-03-12 17:26:10+0000 publisher: HL7 International / Patient Care contact: HL7 International / Patient Care: http://www.hl7.org/Special/committees/patientcare jurisdiction: United States of America (ISO 3166-1 Codes for the representation of names of countries and their subdivisions — Part 1: Country code#US) actor actorId: goodCardio type: entity name: Good Health Cardiology description: EHR that records patient's exercise plan actor actorId: getFit type: entity name: Get Fit Training description: 'Light' service provider' actor actorId: Fit4Life type: entity name: Fit 4 Life description: 'Full' service provider' actor actorId: registry type: entity name: Service Registry description: Registry of candidate service providers - outside the scope of this IG instance resourceId: Scen2query1 resourceType: Binary name: Query for personal trainers near Mrs. Johansson description: Search to retrieve list of Service Providers for personal trainers near Mrs. Johansson: `GET https://registry.example.org/fhir/PractitionerRole?role=228239008|http%3A//snomed.info/sct&location.near=37.8393|84.2700|20|[mi_us]&_include=PractitionerRole:practitioner` instance resourceId: Scen2query2 resourceType: Binary name: Query for Get Fit assigned referrals description: Query Task and associated ServiceRequest and Patient: `GET https://goodCardio.example.org/fhir/Task?status=requested&owner=https%3A//registry.example.org/fhir/Organization/Scen2OrgGetFitTraining&_include=Task:patient&_include=Task:focus` instance resourceId: Scen2query3 resourceType: Binary name: Query for Referral & Patient for retrieved Task description: Search to retrieve ServiceRequest and Patient for specified Task: `GET https://goodCardio.…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
  value:
    v: pc
url:
  v: http://hl7.org/fhir/us/physical-activity/ExampleScenario/Scen2ProviderToPersonaltrainerReferral
version:
  v: 1.0.1
name:
  v: ProviderToPersonalTrainerReferral
status:
  v: draft
date:
  v: 2024-03-12T17:26:10+00:00
publisher:
  v: HL7 International / Patient Care
contact:
  name:
    v: HL7 International / Patient Care
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/patientcare
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: US
actor:
  actor id:
    v: goodCardio
  type:
    v: entity
  name:
    v: Good Health Cardiology
  description:
    v: EHR that records patient's exercise plan
actor:
  actor id:
    v: getFit
  type:
    v: entity
  name:
    v: Get Fit Training
  description:
    v: 'Light' service provider'
actor:
  actor id:
    v: Fit4Life
  type:
    v: entity
  name:
    v: Fit 4 Life
  description:
    v: 'Full' service provider'
actor:
  actor id:
    v: registry
  type:
    v: entity
  name:
    v: Service Registry
  description:
    v: Registry of candidate service providers - outside the scope of this IG
instance:
  resource id:
    v: Scen2query1
  resource type:
    v: Binary
  name:
    v: Query for personal trainers near Mrs. Johansson
  description:
    v: Search to retrieve list of Service Providers for personal trainers near Mrs. Johansson: `GET https://registry.example.org/fhir/PractitionerRole?role=228239008|http%3A//snomed.info/sct&location.near=37.8393|84.2700|20|[mi_us]&_include=PractitionerRole:practitioner`
instance:
  resource id:
    v: Scen2query2
  resource type:
    v: Binary
  name:
    v: Query for Get Fit assigned referrals
  description:
    v: Query Task and associated ServiceRequest and Patient: `GET https://goodCardio.example.org/fhir/Task?status=requested&owner=https%3A//registry.example.org/fhir/Organization/Scen2OrgGetFitTraining&_include=Task:patient&_include=Task:focus`
instance:
  resource id:
    v: Scen2query3
  resource type:
    v: Binary
  name:
    v: Query for Referral & Patient for retrieved Task
  description:
    v: Search to retrieve ServiceRequest and Patient for specified Task: `GET https://goodCardio.example.org/fhir/ServiceRequest?_id=Scen2ServiceRequest&_include=ServiceRequest:patient`
instance:
  resource id:
    v: Scen2query4
  resource type:
    v: Binary
  name:
    v: Query for patient physical activity conditions
  description:
    v: Search to retrieve Conditions: `GET https://goodCardio.example.org/fhir/Condition?patient=Scen2PatientJohansson&category=http:%3A//hl7.org/fhir/us/physical-activity/CodeSystem/PATemporaryCodesorary-codes|PhysicalActivity`
instance:
  resource id:
    v: Scen2query5
  resource type:
    v: Binary
  name:
    v: Query for patient physical activity observations
  description:
    v: Search to retrieve Observations: `GET https://goodCardio.example.org/fhir/Observation?patient=Scen2PatientJohansson&category=http:%3A//hl7.org/fhir/us/physical-activity/CodeSystem/PATemporaryCodesorary-codes|PhysicalActivity`
instance:
  resource id:
    v: Scen2query6
  resource type:
    v: Binary
  name:
    v: Query for EHR-issued task based on notification
  description:
    v: Search to retrieve Task: `GET https://fit4life.example.org/fhir/Task?_id=Scen2TaskFit4Life`
instance:
  resource id:
    v: Scen2query7
  resource type:
    v: Binary
  name:
    v: Query for report and referenced observations
  description:
    v: Search on referenced Observations: `GET https://fit4.life.example.org/fhir/DiagnosticReport?id=Scen2DiagnosticReport&_include=DiagnosticReport:result`
instance:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Patient/Scen2PatientJohansson
      reference:
        v: Patient/Scen2PatientJohansson
  resource id:
    v: Scen2PatientJohansson
  resource type:
    v: Patient
  name:
    v: Mrs. Johansson Patient Record
  description:
    v: Demographics and contact information
instance:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Practitioner/Scen2PractitionerMatthews
      reference:
        v: Practitioner/Scen2PractitionerMatthews
  resource id:
    v: Scen2PractitionerMatthews
  resource type:
    v: Practitioner
  name:
    v: Mr. Matthews Registry Entry
  description:
    v: Practitioner details for personal trainer Mr. Matthews
instance:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Practitioner/Scen2PractitionerWang
      reference:
        v: Practitioner/Scen2PractitionerWang
  resource id:
    v: Scen2PractitionerWang
  resource type:
    v: Practitioner
  name:
    v: Ms. Wang Registry Entry
  description:
    v: Practitioner details for personal trainer Ms. Matthews
instance:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/PractitionerRole/Scen2RoleMatthews
      reference:
        v: PractitionerRole/Scen2RoleMatthews
  resource id:
    v: Scen2RoleMatthews
  resource type:
    v: PractitionerRole
  name:
    v: Mr. Matthews Registry Entry
  description:
    v: Practitioner organization details for personal trainer Mr. Matthews

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Practitioner/Scen2PractitionerWang
    reference:
      v: Practitioner/Scen2PractitionerWang
resource id:
  v: Scen2PractitionerWang
resource type:
  v: PractitionerRole
name:
  v: Ms. Wang Registry Entry
description:
  v: Practitioner organization details for personal trainer Ms. Matthews

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Subscription/Scen2SubscriptionEhr
    reference:
      v: Subscription/Scen2SubscriptionEhr
resource id:
  v: Scen2SubscriptionEhr
resource type:
  v: Subscription
name:
  v: Subscription from EHR
description:
  v: Establishes the subscription for the EHR to monitor tasks it's created

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Subscription/Scen2SubscriptionGetFit
    reference:
      v: Subscription/Scen2SubscriptionGetFit
resource id:
  v: Scen2SubscriptionGetFit
resource type:
  v: Subscription
name:
  v: Subscription from Get Fit Training
description:
  v: Establishes the subscription for the service provider to monitor tasks created for it

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2PractitionerTrainerSearchsetBundle
resource id:
  v: Scen2PractitionerTrainerSearchsetBundle
resource type:
  v: Bundle
name:
  v: Searchset Bundle returning list of personal trainers
description:
  v: In practice, the set of candidates would likely be longer. Note that this functionality is outside the scope of this IG.
contained instance:
  resource id:
    v: Scen2PractitionerMatthews

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Condition/Scen2ConditionLackOfExercise
    reference:
      v: Condition/Scen2ConditionLackOfExercise
resource id:
  v: Scen2ConditionLackOfExercise
resource type:
  v: Condition
name:
  v: Low physical activity condition
description:
  v: New condition added to chart

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Condition/Scen2ConditionHypertension
    reference:
      v: Condition/Scen2ConditionHypertension
resource id:
  v: Scen2ConditionHypertension
resource type:
  v: Condition
name:
  v: Hypertension condition
description:
  v: Older condition

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsDaysPerWeek
    reference:
      v: Observation/Scen2ObsDaysPerWeek
resource id:
  v: Scen2ObsDaysPerWeek
resource type:
  v: Observation
name:
  v: Initial days per week of activity
description:
  v: Exercise of once per week

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsDaysPerWeek2
    reference:
      v: Observation/Scen2ObsDaysPerWeek2
resource id:
  v: Scen2ObsDaysPerWeek2
resource type:
  v: Observation
name:
  v: New days per week of activity
description:
  v: Exercising 5 times per week

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsMinutesPerDay
    reference:
      v: Observation/Scen2ObsMinutesPerDay
resource id:
  v: Scen2ObsMinutesPerDay
resource type:
  v: Observation
name:
  v: Initial minutes per day of activity
description:
  v: 15 minutes per day

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsMinutesPerDay2
    reference:
      v: Observation/Scen2ObsMinutesPerDay2
resource id:
  v: Scen2ObsMinutesPerDay2
resource type:
  v: Observation
name:
  v: New minutes per day of activity
description:
  v: 32 minutes per day

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsActivityGroup
    reference:
      v: Observation/Scen2ObsActivityGroup
resource id:
  v: Scen2ObsActivityGroup
resource type:
  v: Observation
name:
  v: Information about a run
description:
  v: Collection of sub-observations about a single run

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsActivityType
    reference:
      v: Observation/Scen2ObsActivityType
resource id:
  v: Scen2ObsActivityType
resource type:
  v: Observation
name:
  v: Type of activity - run
description:
  v: Indicates that the activity performed was a run

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsActivityDuration
    reference:
      v: Observation/Scen2ObsActivityDuration
resource id:
  v: Scen2ObsActivityDuration
resource type:
  v: Observation
name:
  v: Duration of run
description:
  v: Run was 30 minutes

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsActivityMeanHR
    reference:
      v: Observation/Scen2ObsActivityMeanHR
resource id:
  v: Scen2ObsActivityMeanHR
resource type:
  v: Observation
name:
  v: Average heart rate during run
description:
  v: Average heart rate of 132 bpm

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsActivityPeakHR
    reference:
      v: Observation/Scen2ObsActivityPeakHR
resource id:
  v: Scen2ObsActivityPeakHR
resource type:
  v: Observation
name:
  v: Peak heart rate during run
description:
  v: Peak heart rate of 177 bpm

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsActivityExperience
    reference:
      v: Observation/Scen2ObsActivityExperience
resource id:
  v: Scen2ObsActivityExperience
resource type:
  v: Observation
name:
  v: Experience of run by patient
description:
  v: Experience of run was positive

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Observation/Scen2ObsCalories
    reference:
      v: Observation/Scen2ObsCalories
resource id:
  v: Scen2ObsCalories
resource type:
  v: Observation
name:
  v: Calories burned during run
description:
  v: 517 calories burned during run

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/DiagnosticReport/Scen2DiagnosticReport
    reference:
      v: DiagnosticReport/Scen2DiagnosticReport
resource id:
  v: Scen2DiagnosticReport
resource type:
  v: DiagnosticReport
name:
  v: Report from personal trainer
description:
  v: Letter to provider indicating how the consultation went

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/ServiceRequest/Scen2ServiceRequest
    reference:
      v: ServiceRequest/Scen2ServiceRequest
resource id:
  v: Scen2ServiceRequest
resource type:
  v: ServiceRequest
name:
  v: Referral for support
description:
  v: Indicates what is to be done and when - but not by whom

resource id:
  v: Scen2TaskGetFit
resource type:
  v: Task
name:
  v: Task seeking GetFit to fulfill referral
description:
  v: This is the initial Task seeking fulfillment
version:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title
    value:
      v: Initial GetFit Task
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Task/Scen2TaskGetFitV1
      reference:
        v: Task/Scen2TaskGetFitV1
  version id:
    v: 1
  description:
    v: Initial version of the referral fulfillment request for GetFit with a status of 'requested'
version:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title
    value:
      v: Updated GetFit Task
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Task/Scen2TaskGetFitV2
      reference:
        v: Task/Scen2TaskGetFitV2
  version id:
    v: 2
  description:
    v: Version of the referral fulfillment request for GetFit after it has been changed to 'rejected'

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2SubscriptionNotificationNewTaskBundle
resource type:
  v: Bundle
name:
  v: Subscription notification indicating new Task
description:
  v: Points to the initial 'requested' version of the Task

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2TaskGetFitResponseBundle
    reference:
      v: Bundle/Scen2TaskGetFitResponseBundle
resource id:
  v: Scen2TaskGetFitResponseBundle
resource type:
  v: Bundle
name:
  v: Search-set Bundle returning referenced Task
description:
  v: Returns Task referenced in subscription notification. Includes associated ServiceRequest and Patient
contained instance:
  resource id:
    v: Scen2TaskGetFit
  version id:
    v: 1

resource id:
  v: Scen2TaskFit4Life
resource type:
  v: Task
name:
  v: Task seeking FitLife to fulfill referral
description:
  v: This is the second Task seeking fulfillment (after the first was rejected)
version:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title
    value:
      v: Initial Fit4Life Task
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Task/Scen2TaskFit4LifeV1
      reference:
        v: Task/Scen2TaskFit4LifeV1
  version id:
    v: 1
  description:
    v: Initial version of the referral fulfillment request for Fit4Life with a status of 'requested'
version:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title
    value:
      v: Updated Fit4Life Task
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Task/Scen2TaskFit4LifeV2
      reference:
        v: Task/Scen2TaskFit4LifeV2
  version id:
    v: 2
  description:
    v: Version of the referral fulfillment request for Fit4Life after it has been changed to 'accepted'
version:
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.title
    value:
      v: Completed Fit4Life Task
  extension:
    url:
      v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.version.content
    value: Reference
      link: http://hl7.org/fhir/us/physical-activity/Task/Scen2TaskFit4LifeV3
      reference:
        v: Task/Scen2TaskFit4LifeV3
  version id:
    v: 3
  description:
    v: Version of the referral fulfillment request for Fit4Life after it has been changed to 'completed' and a link to the report added

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2ReferralFit4LifeResponseBundle
resource id:
  v: Scen2ReferralFit4LifeResponseBundle
resource type:
  v: Bundle
name:
  v: ServiceRequest search response for Fit4Life
description:
  v: Search-set Bundle returning ServiceRequest and Patient for the Task posted to Fit4Life
contained instance:
  resource id:
    v: Scen2PatientJohansson

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2TaskEHRResponseBundle1
    reference:
      v: Bundle/Scen2TaskEHRResponseBundle1
resource id:
  v: Scen2TaskEHRResponseBundle1
resource type:
  v: Bundle
name:
  v: Accepted Task search response for EHR
description:
  v: Search-set Bundle returning 'accepted' Task with id based on subscription notification
contained instance:
  resource id:
    v: Scen2TaskFit4Life
  version id:
    v: 2

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2TaskEHRResponseBundle2
    reference:
      v: Bundle/Scen2TaskEHRResponseBundle2
resource id:
  v: Scen2TaskEHRResponseBundle2
resource type:
  v: Bundle
name:
  v: Completed Task search response for EHR
description:
  v: Search-set Bundle returning 'completed' Task with id based on subscription notification
contained instance:
  resource id:
    v: Scen2TaskFit4Life
  version id:
    v: 3

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2ConditionResponseBundle
    reference:
      v: Bundle/Scen2ConditionResponseBundle
resource id:
  v: Scen2ConditionResponseBundle
resource type:
  v: Bundle
name:
  v: Condition response for Fit 4 Life
description:
  v: Search-set Bundle containing the patient's Conditions (that Fit 4 Life has access to)
contained instance:
  resource id:
    v: Scen2ConditionHypertension

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2ObservationResponseBundle
    reference:
      v: Bundle/Scen2ObservationResponseBundle
resource id:
  v: Scen2ObservationResponseBundle
resource type:
  v: Bundle
name:
  v: Observation response for Fit 4 Life
description:
  v: Search-set Bundle containing the patient's Observations (that Fit 4 Life has access to)
contained instance:
  resource id:
    v: Scen2ObsMinutesPerDay

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2NotificationUpdatedTaskBundle
resource id:
  v: Scen2NotificationUpdatedTaskBundle
resource type:
  v: Bundle
name:
  v: Subscription Notification that Task has updated
description:
  v: Pointer to the Task that has been updated

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2NotificationCompletedTaskBundle
resource id:
  v: Scen2NotificationCompletedTaskBundle
resource type:
  v: Bundle
name:
  v: Subscription Notification that Task has completed
description:
  v: Pointer to the Task that has been updated

extension:
  url:
    v: http://hl7.org/fhir/5.0/StructureDefinition/extension-ExampleScenario.instance.content
  value: Reference
    link: http://hl7.org/fhir/us/physical-activity/Bundle/Scen2DiagnosticReportObservationsResponseBundle
resource type:
  v: Bundle
name:
  v: DiagnosticReport response for EHR
description:
  v: Search-set Bundle returning DiagnosticReport and the Observations it references
contained instance:
  resource id:
    v: Scen2ObsCalories

title:
  v: Subscription Establishment
pre conditions:
  v: Good Health Cardiology, Fit 4 Life, and Get Fit training have established legal and technical arrangements for interoperability
post conditions:
  v: Subscriptions are successfully created allowing Good Health Cardiology to monitor Fit4Life-assigned Tasks and GetFit to monitor Tasks assigned to it hosted on Good Health Cardiology
step:
  operation:
    number:
      v: 1
    type:
      v: create
    name:
      v: Create service provider-monitoring Subscription
    initiator:
      v: goodCardio
    receiver:
      v: Fit4Life
    description:
      v: EHR posts Subscription to Fit 4 Life to monitor Tasks. Request: `POST https://fit4life.example.org/fhir/Subscription` Response: `201 Created`
    request:
      resource id:
        v: Scen2SubscriptionEhr
step:
  operation:
    number:
      v: 2
    type:
      v: create
    name:
      v: Create EHR-monitoring Subscription
    initiator:
      v: getFit
    receiver:
      v: goodCardio
    description:
      v: Get Fit Training posts Subscription to EHR to monitor Tasks. Request: `POST https://goodCardio.example.org/fhir/Subscription` Response: `201 Created`
    request:
      resource id:
        v: Scen2SubscriptionGetFit

title:
  v: 1 Hour after appointment
pre conditions:
  v: EHR has completed the appointment with the patient
post conditions:
  v: EHR has retrieved list of personal trainers and notified GetFit of new Task
step:
  operation:
    number:
      v: 3
    type:
      v: search-type
    name:
      v: Retrieve service provider list
    initiator:
      v: goodCardio
    receiver:
      v: registry
    description:
      v: Search to retrieve list of Service Providers for personal trainers near Mrs. Johansson.
    request:
      resource id:
        v: Scen2query1
    response:
      resource id:
        v: Scen2PractitionerTrainerSearchsetBundle
step:
  operation:
    number:
      v: 4
    type:
      v: create
    name:
      v: Subscription notification of new Task
    initiator:
      v: goodCardio
    receiver:
      v: getFit
    description:
      v: Service provider is notified of new Task via subscription. Request: `POST https://fit4life.example.org/fhir/Subscription` Response: `201 Created`

title:
  v: 1 Day after appointment
pre conditions:
  v: GetFit has received the notification of new Task
post conditions:
  v: GetFit has queried Task, associated ServiceRequest and Patient; and updated Task to refused
step:
  operation:
    number:
      v: 5
    type:
      v: search-type
    name:
      v: Getfit retrieves referral
    initiator:
      v: getFit
    receiver:
      v: goodCardio
    description:
      v: GetFit retrieves the referenced Task and its associated ServiceRequest and Patient.
    request:
      resource id:
        v: Scen2query2
    response:
      resource id:
        v: Scen2TaskGetFitResponseBundle
step:
  operation:
    number:
      v: 6
    type:
      v: update
    name:
      v: GetFit refuses task
    initiator:
      v: getFit
    receiver:
      v: goodCardio
    description:
      v: GetFit updates the Task status to 'refused' with a reason. Request: `PUT https://goodCardio.example.org/fhir/Task/Scen2TaskGetFitV1` Response: `200 Ok`
    request:
      resource id:
        v: Scen2TaskGetFit
      version id:
        v: 2

title:
  v: An Hour later
pre conditions:
  v: EHR has a Task seeking fulfillment of ServiceRequest for Fit4Life
post conditions:
  v: Fit4Life has retrieved ServiceRequest, Patient, Conditions, Observations, and updated Task
step:
  operation:
    number:
      v: 7
    type:
      v: create
    name:
      v: Create Task on Fit4Life
    initiator:
      v: goodCardio
    receiver:
      v: Fit4Life
    description:
      v: New Task is created directly on Fit4Life's server. Request: `POST https://fit4life.example.org/fhir/Task` Response: `201 Created`
    request:
      resource id:
        v: Scen2TaskFit4Life
      version id:
        v: 1
step:
  operation:
    number:
      v: 8
    type:
      v: search-type
    name:
      v: Fit4Life retrieves referral
    initiator:
      v: Fit4Life
    receiver:
      v: goodCardio
    description:
      v: Fit4Life retrieves the ServiceRequest and Patient referenced by the Task.
    request:
      resource id:
        v: Scen2query3
    response:
      resource id:
        v: Scen2ReferralFit4LifeResponseBundle
step:
  operation:
    number:
      v: 9
    type:
      v: search-type
    name:
      v: Fit4Life retrieves conditions
    initiator:
      v: Fit4Life
    receiver:
      v: goodCardio
    description:
      v: Fit4Life retrieves the physical-activity related Conditions associated with the patient.
    request:
      resource id:
        v: Scen2query4
    response:
      resource id:
        v: Scen2ConditionResponseBundle
step:
  operation:
    number:
      v: 10
    type:
      v: search-type
    name:
      v: Fit4Life retrieves referral
    initiator:
      v: Fit4Life
    receiver:
      v: goodCardio
    description:
      v: Fit4Life retrieves the physical-activity related Observations associated with the patient. (In practice there would typically be more than are shown here, and some might not be for profiles defined in this IG.)
    request:
      resource id:
        v: Scen2query5
    response:
      resource id:
        v: Scen2ObservationResponseBundle
step:
  operation:
    number:
      v: 11
    type:
      v: create
    name:
      v: EHR gets referral acceptance
    initiator:
      v: Fit4Life
    receiver:
      v: goodCardio
    description:
      v: A subscription notification to the EHR is triggered when Fit4Life changes the prescription status to 'accepted'. Request: `POST https://goodCardio.example.org/mySubscriptions` Response: `200 Ok`
    request:
      resource id:
        v: Scen2NotificationUpdatedTaskBundle
step:
  operation:
    number:
      v: 12
    type:
      v: search-type
    name:
      v: EHR retrieves accepted Task
    initiator:
      v: goodCardio
    receiver:
      v: Fit4Life
    description:
      v: EHR retrieves the Task referenced by the subscription notification
    request:
      resource id:
        v: Scen2query6
    response:
      resource id:
        v: Scen2TaskEHRResponseBundle1

title:
  v: 2 Months Later
pre conditions:
  v: Fit4Life has updated the Task
post conditions:
  v: EHR has retrieved the completed Task, DiagnosticReport, and associated Observations
step:
  operation:
    number:
      v: 13
    type:
      v: create
    name:
      v: EHR gets referral acceptance
    initiator:
      v: Fit4Life
    receiver:
      v: goodCardio
    description:
      v: A subscription notification to the EHR is triggered when Fit4Life changes the Task status to 'completed'. Request: `POST https://goodCardio.example.org/mySubscriptions` Response: `200 Ok`
    request:
      resource id:
        v: Scen2NotificationCompletedTaskBundle
step:
  operation:
    number:
      v: 14
    type:
      v: search-type
    name:
      v: EHR retrieves completed Task
    initiator:
      v: goodCardio
    receiver:
      v: Fit4Life
    description:
      v: EHR retrieves the Task referenced by the subscription notification
    request:
      resource id:
        v: Scen2query6
    response:
      resource id:
        v: Scen2TaskEHRResponseBundle2
step:
  operation:
    number:
      v: 15
    type:
      v: search-type
    name:
      v: EHR retrieves report
    initiator:
      v: goodCardio
    receiver:
      v: Fit4Life
    description:
      v: EHR retrieves the Fit4Life DiagnosticReport using the id provided in the Task. It also uses _include to retrieve referenced observations
    request:
      resource id:
        v: Scen2query7