@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 -------------------------------------------------------------------

<https://fhir.apps.health/Consent/polaris-core-app-consent-scribe-ai-example> a fhir:Consent ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "polaris-core-app-consent-scribe-ai-example"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "https://fhir.apps.health/StructureDefinition/polaris-core-app-consent"^^xsd:anyURI ;
       fhir:link <https://fhir.apps.health/StructureDefinition/polaris-core-app-consent>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>App Consent - GRANTED</b></p><p>Patient: <strong>Avery Linwood</strong> has <strong>CONSENTED</strong> to sign up with and share clinical data with <strong>SmartDocs AI Scribe</strong> application.</p><p>Date: April 8, 2025 at 10:30 AM</p><p>Status: Active consent using FHIR R4 grant pattern (no provision type in root).</p></div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "https://fhir.apps.health/NamingSystem/cedarbrook-clinic-app-consent-identifier"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "app-consent-scribe-ai-avery-20250408" ]
  ] ) ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:scope [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/consentscope"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "patient-privacy" ] ;
       fhir:display [ fhir:v "Privacy Consent" ]
     ] )
  ] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/consentcategorycodes"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "infa" ] ;
       fhir:display [ fhir:v "Information Access" ]
     ] )
  ] ) ; # 
  fhir:patient [
     fhir:identifier [
       fhir:system [ fhir:v "https://fhir.apps.health/NamingSystem/cedarbrook-clinic-patient-identifier"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "patient-avery-linwood" ]
     ] ;
     fhir:display [ fhir:v "Avery Linwood" ]
  ] ; # 
  fhir:dateTime [ fhir:v "2025-04-08T10:30:00-06:00"^^xsd:dateTime] ; # 
  fhir:source [
     a fhir:Attachment ;
     fhir:contentType [ fhir:v "application/pdf" ] ;
     fhir:data [ fhir:v "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFszIDAgUl0KL0NvdW50IDEKPD4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQovUmVzb3VyY2VzIDw8L0ZvbnQgPDwvRjEgNCAwIFI+Pj4+Ci9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoK"^^xsd:base64Binary ] ;
     fhir:size [ fhir:v "12345"^^xsd:nonNegativeInteger ] ;
     fhir:hash [ fhir:v "ZGEwNTQwYTM5YTMwMGM5ZjYzZGI4YzJjYTI2ZWFmYzE="^^xsd:base64Binary ] ;
     fhir:title [ fhir:v "SmartDocs AI Scribe Consent Form - Signed" ] ;
     fhir:creation [ fhir:v "2025-04-08T10:30:00-06:00"^^xsd:dateTime ]
  ] ; # 
  fhir:policyRule [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/consentpolicycodes"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "cric" ] ;
       fhir:display [ fhir:v "Common Rule Informed Consent" ]
     ] )
  ] ; # 
  fhir:provision [
     fhir:actor ( [
       fhir:role [
         fhir:coding ( [
           fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"^^xsd:anyURI ] ;
           fhir:code [ fhir:v "IRCP" ] ;
           fhir:display [ fhir:v "information recipient" ]
         ] )
       ] ;
       fhir:reference [
         fhir:identifier [
           fhir:system [ fhir:v "https://fhir.apps.health/NamingSystem/polaris-app-identifier"^^xsd:anyURI ] ;
           fhir:value [ fhir:v "smartdocs-ai-scribe" ]
         ] ;
         fhir:display [ fhir:v "SmartDocs AI Scribe" ]
       ]
     ] )
  ] . # 

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

