@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/AuditEvent/example-consent-permit-authz> a fhir:AuditEvent ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "example-consent-permit-authz"] ; # 
  fhir:type [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://dicom.nema.org/resources/ontology/DCM"^^xsd:anyURI ;
         fhir:l <http://dicom.nema.org/resources/ontology/DCM>
       ] ;
       fhir:code [ fhir:v "110113" ] ;
       fhir:display [ fhir:v "Security Alert" ]
     ] )
  ] ; # 
  fhir:subtype ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://dicom.nema.org/resources/ontology/DCM"^^xsd:anyURI ;
         fhir:l <http://dicom.nema.org/resources/ontology/DCM>
       ] ;
       fhir:code [ fhir:v "110112" ] ;
       fhir:display [ fhir:v "Query" ]
     ] )
  ] ) ; # 
  fhir:action [ fhir:v "E"] ; # 
  fhir:recorded [ fhir:v "2021-09-08T21:51:59.932Z"^^xsd:dateTime] ; # 
  fhir:outcome [
     fhir:code [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/audit-event-outcome"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/audit-event-outcome>
       ] ;
       fhir:code [ fhir:v "0" ] ;
       fhir:display [ fhir:v "Success" ]
     ] ;
     fhir:detail ( [
       fhir:text [ fhir:v "CONSENT_PERMIT" ]
     ] )
  ] ; # 
  fhir:patient [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:agent ( [
     fhir:type [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://dicom.nema.org/resources/ontology/DCM"^^xsd:anyURI ;
           fhir:l <http://dicom.nema.org/resources/ontology/DCM>
         ] ;
         fhir:code [ fhir:v "110152" ] ;
         fhir:display [ fhir:v "Destination Role ID" ]
       ] )
     ] ;
     fhir:who [
       fhir:identifier [
         fhir:system [
           fhir:v "https://github.com/synthetichealth/synthea"^^xsd:anyURI ;
           fhir:l <https://github.com/synthetichealth/synthea>
         ] ;
         fhir:value [ fhir:v "Org1" ]
       ]
     ] ;
     fhir:requestor [ fhir:v true ] ;
     fhir:authorization ( [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActReason"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/v3-ActReason>
         ] ;
         fhir:code [ fhir:v "TREAT" ]
       ] )
     ] )
  ] ) ; # 
  fhir:source [
     fhir:observer [
       fhir:display [ fhir:v "LEAP Consent Decision Service" ]
     ] ;
     fhir:type ( [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/security-source-type"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/security-source-type>
         ] ;
         fhir:code [ fhir:v "4" ] ;
         fhir:display [ fhir:v "Application Server" ]
       ] )
     ] )
  ] ; # 
  fhir:entity ( [
     fhir:what [
       fhir:l <http://hl7.org/fhir/Consent/consent-example-basic> ;
       fhir:reference [ fhir:v "Consent/consent-example-basic" ]
     ] ;
     fhir:role [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/object-role"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/object-role>
         ] ;
         fhir:code [ fhir:v "4" ] ;
         fhir:display [ fhir:v "Domain Resource" ]
       ] )
     ]
  ] ) . # 

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

<http://hl7.org/fhir/Consent/consent-example-basic> a fhir:Consent .

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

