@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <http://loinc.org/rdf#> .
@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://johnmoehrke.github.io/RelatedPersonConsent/Consent/ex-poa> a fhir:Consent ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "ex-poa"] ;
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://johnmoehrke.github.io/RelatedPersonConsent/StructureDefinition/RelatedPersonConsent" ;
       fhir:index 0 ;
       fhir:link <http://johnmoehrke.github.io/RelatedPersonConsent/StructureDefinition/RelatedPersonConsent>
     ] ;
     fhir:Meta.security [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActReason" ] ;
       fhir:Coding.code [ fhir:value "HTEST" ]
     ]
  ] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Consent ex-poa</b></p><a name=\"ex-poa\"> </a><a name=\"hcex-poa\"> </a><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\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-RelatedPersonConsent.html\">Consent profile for a RelatedPerson relationship</a></p><p style=\"margin-bottom: 0px\">Security Label: <a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-v3-ActReason.html\">test health data (Details: ActReason code HTEST = 'test health data')</a></p></div><h2>Participants</h2><table class=\"grid\"><tr><td><b>Role</b></td><td><b>Details</b></td></tr><tr><td title=\"Who the consent applies to\">Patient</td><td><a href=\"Patient-ex-elderly.html\">John Schmidt  Other, DoB: 1923-07-25</a></td></tr><tr><td title=\"Who is agreeing to the policy and rules\">Party</td><td><a href=\"Patient-ex-elderly.html\">John Schmidt  Other, DoB: 1923-07-25</a></td></tr><tr><td title=\"Who manages the consent through its lifecycle.\">Manager</td><td><a href=\"Organization-ex-organization.html\">Organization somewhere org</a></td></tr></table><p>This consent is made under the policy <a href=\"http://example.org/policies/representative.xacml\">http://example.org/policies/representative.xacml</a> .</p><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;\"><tr style=\"border: 2px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top\"><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://hl7.org/fhir/R4/formats.html#table\" title=\"Applicable Rule\">Rule</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://hl7.org/fhir/R4/formats.html#table\" title=\"Applicable Parties\">Who</a></th><th style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px\" class=\"hierarchy\"><a href=\"https://hl7.org/fhir/R4/formats.html#table\" title=\"Applicable Data\">What</a><span style=\"float: right\"><a href=\"https://hl7.org/fhir/R4/formats.html#table\" title=\"Legend for this format\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC\" alt=\"doco\" style=\"background-color: inherit\"/></a></span></th></tr><tr style=\"border: 1px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_extension.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Consent Provision\" class=\"hierarchy\"/> permit</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"></td></tr>#xD;\n<tr style=\"border: 1px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck01.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_extension.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Consent Provision\" class=\"hierarchy\"/> permit</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><ul><li><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-RoleCode DELEGATEE}\">delegatee</span>: <a href=\"RelatedPerson-ex-attorney.html\">RelatedPerson Ralph Luz (official)</a></li></ul></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><ul><li>Purpose: <a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-v3-ActReason.html#v3-ActReason-PWATRNY\">ActReason: PWATRNY</a> (power of attorney)</li></ul></td></tr>#xD;\n<tr style=\"border: 1px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck010.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_blank.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon-qi-hidden.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Consent Provision\" class=\"hierarchy\"/> deny</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><ul><li>Labled as: <a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-v3-Confidentiality.html#v3-Confidentiality-R\">Confidentiality: R</a> (restricted)</li></ul></td></tr>#xD;\n<tr style=\"border: 1px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck000.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_blank.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon-qi-hidden.png\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Consent Provision\" class=\"hierarchy\"/> deny</td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"></td><td style=\"vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 1px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><ul><li>Labled as: <a href=\"http://terminology.hl7.org/7.3.0/CodeSystem-v3-Confidentiality.html#v3-Confidentiality-V\">Confidentiality: V</a> (very restricted)</li></ul></td></tr>#xD;\n<tr><td colspan=\"3\" class=\"hierarchy\"><br/><a href=\"https://hl7.org/fhir/R4/formats.html#table\" title=\"Legend for this format\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC\" alt=\"doco\" style=\"background-color: inherit\"/> Documentation for this format</a></td></tr></table></div>"
  ] ;
  fhir:Consent.status [ fhir:value "active"] ;
  fhir:Consent.scope [
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/consentscope" ] ;
       fhir:Coding.code [ fhir:value "patient-privacy" ]
     ]
  ] ;
  fhir:Consent.category [
     fhir:index 0 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://johnmoehrke.github.io/RelatedPersonConsent/CodeSystem/AuthorizedCodes" ] ;
       fhir:Coding.code [ fhir:value "RelatedPersonAuthorizing" ]
     ]
  ], [
     fhir:index 1 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       a loinc:64292-6 ;
       fhir:Coding.system [ fhir:value "http://loinc.org" ] ;
       fhir:Coding.code [ fhir:value "64292-6" ] ;
       fhir:Coding.display [ fhir:value "Release of information consent" ]
     ]
  ], [
     fhir:index 2 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActCode" ] ;
       fhir:Coding.code [ fhir:value "IDSCL" ] ;
       fhir:Coding.display [ fhir:value "information disclosure" ]
     ]
  ], [
     fhir:index 3 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       a loinc:64298-3 ;
       fhir:Coding.system [ fhir:value "http://loinc.org" ] ;
       fhir:Coding.code [ fhir:value "64298-3" ] ;
       fhir:Coding.display [ fhir:value "Power of attorney" ]
     ]
  ] ;
  fhir:Consent.patient [
     fhir:link <http://johnmoehrke.github.io/RelatedPersonConsent/Patient/ex-elderly> ;
     fhir:Reference.reference [ fhir:value "Patient/ex-elderly" ]
  ] ;
  fhir:Consent.dateTime [ fhir:value "2022-06-13"^^xsd:date] ;
  fhir:Consent.performer [
     fhir:index 0 ;
     fhir:link <http://johnmoehrke.github.io/RelatedPersonConsent/Patient/ex-elderly> ;
     fhir:Reference.reference [ fhir:value "Patient/ex-elderly" ]
  ] ;
  fhir:Consent.organization [
     fhir:index 0 ;
     fhir:link <http://johnmoehrke.github.io/RelatedPersonConsent/Organization/ex-organization> ;
     fhir:Reference.reference [ fhir:value "Organization/ex-organization" ]
  ] ;
  fhir:Consent.sourceReference [
     fhir:link <http://johnmoehrke.github.io/RelatedPersonConsent/DocumentReference/ex-powerOfAttorney> ;
     fhir:Reference.reference [ fhir:value "DocumentReference/ex-powerOfAttorney" ]
  ] ;
  fhir:Consent.policy [
     fhir:index 0 ;
     fhir:Consent.policy.uri [ fhir:value "http://example.org/policies/representative.xacml" ]
  ] ;
  fhir:Consent.provision [
     fhir:Consent.provision.type [ fhir:value "permit" ] ;
     fhir:Consent.provision.actor [
       fhir:index 0 ;
       fhir:Consent.provision.actor.role [
         fhir:CodeableConcept.coding [
           fhir:index 0 ;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-RoleCode" ] ;
           fhir:Coding.code [ fhir:value "DELEGATEE" ]
         ]
       ] ;
       fhir:Consent.provision.actor.reference [
         fhir:link <http://johnmoehrke.github.io/RelatedPersonConsent/RelatedPerson/ex-attorney> ;
         fhir:Reference.reference [ fhir:value "RelatedPerson/ex-attorney" ]
       ]
     ] ;
     fhir:Consent.provision.purpose [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActReason" ] ;
       fhir:Coding.code [ fhir:value "PWATRNY" ]
     ] ;
     fhir:Consent.provision.provision [
       fhir:index 0 ;
       fhir:Consent.provision.type [ fhir:value "deny" ] ;
       fhir:Consent.provision.securityLabel [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-Confidentiality" ] ;
         fhir:Coding.code [ fhir:value "R" ] ;
         fhir:Coding.display [ fhir:value "restricted" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:Consent.provision.type [ fhir:value "deny" ] ;
       fhir:Consent.provision.securityLabel [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-Confidentiality" ] ;
         fhir:Coding.code [ fhir:value "V" ] ;
         fhir:Coding.display [ fhir:value "very restricted" ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://johnmoehrke.github.io/RelatedPersonConsent/Consent/ex-poa.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

