@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 -------------------------------------------------------------------

<http://resmed.com/fhir/core/Provenance/profileChanged> a fhir:Provenance ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "profileChanged"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://resmed.com/fhir/core/StructureDefinition/patient-rule-changed"^^xsd:anyURI ;
       fhir:link <http://resmed.com/fhir/core/StructureDefinition/patient-rule-changed>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Provenance</b><a name=\"profileChanged\"> </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 Provenance &quot;profileChanged&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-patient-rule-changed.html\">Patient Rule Changed Provenance</a></p></div><p><b>target</b>: <a href=\"Patient-patient-ECN1234.html\">Patient/patient-ECN1234</a></p><p><b>recorded</b>: Jan 1, 2021, 9:34:00 AM</p><p><b>location</b>: <a href=\"Location-airview-location-example.html\">Location/airview-location-example</a> &quot;Sleepy Location&quot;</p><p><b>reason</b>: coordination of care <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.0.0/CodeSystem-v3-ActReason.html\">ActReason</a>#COC)</span></p><p><b>activity</b>: Profile changed <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"CodeSystem-resmed-provenance-activity-type-code-system.html\">ResMed Provenance activity type CodeSystem</a>#PROFILECHANGED)</span></p><h3>Agents</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Type</b></td><td><b>Role</b></td><td><b>Who</b></td></tr><tr><td style=\"display: none\">*</td><td>performer <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.0.0/CodeSystem-v3-ParticipationType.html\">ParticipationType</a>#PRF)</span></td><td>healthcare provider <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.0.0/CodeSystem-v3-RoleClass.html\">RoleClass</a>#PROV)</span></td><td><a href=\"Practitioner-practitioner-airview-user.html\">Practitioner/practitioner-airview-user</a></td></tr></table><h3>Entities</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Role</b></td><td><b>What</b></td></tr><tr><td style=\"display: none\">*</td><td>source</td><td><a name=\"containedProfileChanged\"> </a><blockquote><p/><p><a name=\"containedProfileChanged\"> </a></p><p><b>identifier</b>: id: EventDefinition/ECN1234</p><p><b>version</b>: 1</p><p><b>name</b>: RuleProfileChanged</p><p><b>type</b>: Rule Instance <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"CodeSystem-resmed-plandefinition-type-identifier-code-system.html\">ResMed Plan Definition Type Identifier CodeSystem</a>#rule)</span></p><p><b>status</b>: active</p><h3>UseContexts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Code</b></td><td><b>Value[x]</b></td></tr><tr><td style=\"display: none\">*</td><td>Program (Details: http://terminology.hl7.org/CodeSystem/usage-context-type code program = 'Program', stated as 'null')</td><td>airview-compliance-engine <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"CodeSystem-resmed-rule-implementer-identifier-code-system.html\">ResMed Rule Implementer Identifier CodeSystem</a>#ACE)</span></td></tr></table><blockquote><p><b>action</b></p><blockquote><p><b>trigger</b></p><p><b>type</b>: data-changed</p><blockquote><p><b>data</b></p><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a></td></tr></table></blockquote><blockquote><p><b>condition</b></p><p><span title=\"application/x.rmd-ace+json\"><code>{&quot;conditions&quot;: &quot;nmd&quot;}</code></span></p></blockquote></blockquote></blockquote></blockquote></td></tr></table><hr/><blockquote><p><b>Generated Narrative: PlanDefinition #containedProfileChanged</b><a name=\"containedProfileChanged\"> </a></p><p><b>identifier</b>: id: EventDefinition/ECN1234</p><p><b>version</b>: 1</p><p><b>name</b>: RuleProfileChanged</p><p><b>type</b>: Rule Instance <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"CodeSystem-resmed-plandefinition-type-identifier-code-system.html\">ResMed Plan Definition Type Identifier CodeSystem</a>#rule)</span></p><p><b>status</b>: active</p><h3>UseContexts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Code</b></td><td><b>Value[x]</b></td></tr><tr><td style=\"display: none\">*</td><td>Program (Details: http://terminology.hl7.org/CodeSystem/usage-context-type code program = 'Program', stated as 'null')</td><td>airview-compliance-engine <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"CodeSystem-resmed-rule-implementer-identifier-code-system.html\">ResMed Rule Implementer Identifier CodeSystem</a>#ACE)</span></td></tr></table><blockquote><p><b>action</b></p><blockquote><p><b>trigger</b></p><p><b>type</b>: data-changed</p><blockquote><p><b>data</b></p><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a></td></tr></table></blockquote><blockquote><p><b>condition</b></p><p><span title=\"application/x.rmd-ace+json\"><code>{&quot;conditions&quot;: &quot;nmd&quot;}</code></span></p></blockquote></blockquote></blockquote></blockquote></div>"
  ] ; # 
  fhir:contained ( [
     a fhir:PlanDefinition ;
     fhir:id [ fhir:v "containedProfileChanged" ] ;
     fhir:meta [
       fhir:profile ( [
         fhir:v "http://resmed.com/fhir/core/StructureDefinition/rmd-rule-plandefinition"^^xsd:anyURI ;
         fhir:link <http://resmed.com/fhir/core/StructureDefinition/rmd-rule-plandefinition>
       ] )
     ] ;
     fhir:identifier ( [
       fhir:value [ fhir:v "EventDefinition/ECN1234" ]
     ] ) ;
     fhir:version [ fhir:v "1" ] ;
     fhir:name [ fhir:v "RuleProfileChanged" ] ;
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.resmed.com/CodeSystem/resmed-plandefinition-type-identifier"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "rule" ]
       ] )
     ] ;
     fhir:status [ fhir:v "active" ] ;
     fhir:useContext ( [
       fhir:code [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/usage-context-type"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "program" ]
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [ fhir:v "http://terminology.resmed.com/CodeSystem/resmed-rule-implementer-identifier"^^xsd:anyURI ] ;
           fhir:code [ fhir:v "ACE" ]
         ] )
       ]
     ] ) ;
     fhir:action ( [
       fhir:trigger ( [
         fhir:type [ fhir:v "data-changed" ] ;
         fhir:data ( [
           fhir:type [ fhir:v "Observation" ]
         ] ) ;
         fhir:condition [
           fhir:language [ fhir:v "application/x.rmd-ace+json" ] ;
           fhir:expression [ fhir:v "{\"conditions\": \"nmd\"}" ]
         ]
       ] )
     ] )
  ] ) ; # 
  fhir:target ( [
     fhir:link <http://resmed.com/fhir/core/Patient/patient-ECN1234> ;
     fhir:reference [ fhir:v "Patient/patient-ECN1234" ]
  ] ) ; # 
  fhir:recorded [ fhir:v "2021-01-01T09:34:00Z"^^xsd:dateTime] ; # 
  fhir:location [
     fhir:link <http://resmed.com/fhir/core/Location/airview-location-example> ;
     fhir:reference [ fhir:v "Location/airview-location-example" ]
  ] ; # 
  fhir:reason ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActReason"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "COC" ]
     ] )
  ] ) ; # 
  fhir:activity [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.resmed.com/CodeSystem/provenance-activity-type"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "PROFILECHANGED" ] ;
       fhir:display [ fhir:v "Profile changed" ]
     ] )
  ] ; # 
  fhir:agent ( [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PRF" ]
       ] )
     ] ;
     fhir:role ( [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-RoleClass"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PROV" ]
       ] )
     ] ) ;
     fhir:who [
       fhir:link <http://resmed.com/fhir/core/Practitioner/practitioner-airview-user> ;
       fhir:reference [ fhir:v "Practitioner/practitioner-airview-user" ]
     ]
  ] ) ; # 
  fhir:entity ( [
     fhir:role [ fhir:v "source" ] ;
     fhir:what [
       fhir:reference [ fhir:v "#containedProfileChanged" ]
     ]
  ] ) . # 

# -------------------------------------------------------------------------------------

