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

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

<http://hl7.org/fhir/RequestOrchestration/example> a fhir:RequestOrchestration ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "example"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">Example RequestOrchestration illustrating related actions to administer medications in sequence with time delay.</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:contained ( [
     a fhir:MedicationRequest ;
     fhir:id [ fhir:v "medicationrequest-1" ] ;
     fhir:status [ fhir:v "unknown" ] ;
     fhir:intent [ fhir:v "proposal" ] ;
     fhir:medication [
       fhir:concept [
         fhir:text [ fhir:v "Medication 1" ]
       ]
     ] ;
     fhir:subject [
       fhir:l <http://hl7.org/fhir/Patient/example> ;
       fhir:reference [ fhir:v "Patient/example" ]
     ]
  ] [
     a fhir:MedicationRequest ;
     fhir:id [ fhir:v "medicationrequest-2" ] ;
     fhir:status [ fhir:v "unknown" ] ;
     fhir:intent [ fhir:v "proposal" ] ;
     fhir:medication [
       fhir:concept [
         fhir:text [ fhir:v "Medication 2" ]
       ]
     ] ;
     fhir:subject [
       fhir:l <http://hl7.org/fhir/Patient/example> ;
       fhir:reference [ fhir:v "Patient/example" ]
     ]
  ] ) ; # 
  fhir:identifier ( [
     fhir:value [ fhir:v "requestorchestration-1" ]
  ] ) ; # 
  fhir:groupIdentifier [
     fhir:system [
       fhir:v "http://example.org/treatment-group"^^xsd:anyURI ;
       fhir:l <http://example.org/treatment-group>
     ] ;
     fhir:value [ fhir:v "00001" ]
  ] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:intent [ fhir:v "plan"] ; # 
  fhir:priority [ fhir:v "routine"] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:encounter [
     fhir:l <http://hl7.org/fhir/Encounter/example> ;
     fhir:reference [ fhir:v "Encounter/example" ]
  ] ; # 
  fhir:authoredOn [ fhir:v "2017-03-06T17:31:00Z"^^xsd:dateTime] ; # 
  fhir:author [
     fhir:l <http://hl7.org/fhir/Practitioner/1> ;
     fhir:reference [ fhir:v "Practitioner/1" ]
  ] ; # 
  fhir:reason ( [
     fhir:concept [
       fhir:text [ fhir:v "Treatment" ]
     ]
  ] ) ; # 
  fhir:note ( [
     fhir:text [ fhir:v "Additional notes about the request group" ]
  ] ) ; # 
  fhir:action ( [
     fhir:prefix [ fhir:v "1" ] ;
     fhir:title [ fhir:v "Administer Medications" ] ;
     fhir:description [ fhir:v "Administer medications at the appropriate time" ] ;
     fhir:textEquivalent [ fhir:v "Administer medication 1, followed an hour later by medication 2" ] ;
     fhir:timing [
       a fhir:DateTime ;
       fhir:v "2017-03-06T19:00:00Z"^^xsd:dateTime
     ] ;
     fhir:participant ( [
       fhir:actor [
         a fhir:Reference ;
         fhir:l <http://hl7.org/fhir/Practitioner/1> ;
         fhir:reference [ fhir:v "Practitioner/1" ]
       ]
     ] ) ;
     fhir:groupingBehavior [ fhir:v "logical-group" ] ;
     fhir:selectionBehavior [ fhir:v "all" ] ;
     fhir:requiredBehavior [ fhir:v "must" ] ;
     fhir:precheckBehavior [ fhir:v "yes" ] ;
     fhir:cardinalityBehavior [ fhir:v "single" ] ;
     fhir:action ( [
       fhir:id [ fhir:v "medication-action-1" ] ;
       fhir:description [ fhir:v "Administer medication 1" ] ;
       fhir:type [
         fhir:coding ( [
           fhir:code [ fhir:v "create" ]
         ] )
       ] ;
       fhir:resource [
         fhir:l <#medicationrequest-1> ;
         fhir:reference [ fhir:v "#medicationrequest-1" ]
       ]
     ] [
       fhir:id [ fhir:v "medication-action-2" ] ;
       fhir:description [ fhir:v "Administer medication 2" ] ;
       fhir:relatedAction ( [
         fhir:targetId [ fhir:v "medication-action-1" ] ;
         fhir:relationship [ fhir:v "after-end" ] ;
         fhir:offset [
           a fhir:Duration ;
           fhir:value [ fhir:v "1"^^xsd:decimal ] ;
           fhir:unit [ fhir:v "h" ] ;
           fhir:system [
             fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
             fhir:l <http://unitsofmeasure.org>
           ] ;
           fhir:code [ fhir:v "h" ]
         ]
       ] ) ;
       fhir:type [
         fhir:coding ( [
           fhir:code [ fhir:v "create" ]
         ] )
       ] ;
       fhir:resource [
         fhir:l <#medicationrequest-2> ;
         fhir:reference [ fhir:v "#medicationrequest-2" ]
       ]
     ] )
  ] ) . # 

<http://hl7.org/fhir/Patient/example> a fhir:Patient .

<http://hl7.org/fhir/Encounter/example> a fhir:Encounter .

<http://hl7.org/fhir/Practitioner/1> a fhir:Practitioner .

# -------------------------------------------------------------------------------------

