@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <https://loinc.org/rdf/> .
@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/Contract/pcd-example-notLabs> a fhir:Contract ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "pcd-example-notLabs"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">The following scenario is based on existing\n      jurisdictional policy and are realized in existing systems in Canada. The default policy is\n      one of implied consent for the provision of care, so these scenarios all deal with withdrawal\n      or withholding consent for that purpose. In other jurisdictions, where an express consent\n      model is used (Opt-In), these would examples would contain the phrase \"consent to\" rather than\n      \"withhold\" or \"withdraw\" consent for. <p> specific to use-case 1. Withhold or withdraw consent\n        for disclosure of records related to specific domain (e.g. DI, LAB, etc.) </p><p> Patient\n        \"P. van de Heuvel\" wishes to withhold disclosure of all of her lab orders and results to any\n        provider. </p>\n    </div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:issued [ fhir:v "2014-08-17"^^xsd:date] ; # 
  fhir:subject ( [
     fhir:l <http://hl7.org/fhir/Patient/f001> ;
     fhir:reference [ fhir:v "Patient/f001" ] ;
     fhir:display [ fhir:v "P. van de Heuvel" ]
  ] ) ; #   not bound by a timeframe - Contract.applies  
  fhir:authority ( [
     fhir:l <http://hl7.org/fhir/Organization/3> ;
     fhir:reference [ fhir:v "Organization/3" ] ;
     fhir:display [ fhir:v "Michigan Health" ]
  ] ) ; # 
  fhir:domain ( [
     fhir:l <http://hl7.org/fhir/Location/ukp> ;
     fhir:reference [ fhir:v "Location/ukp" ] ;
     fhir:display [ fhir:v "UK Pharmacies" ]
  ] ) ; #   and/or would this [also] go into Contract.domain as a Jurisdiction?? (see the example on UK Pharamacy Juristiction)  
  fhir:type [
     fhir:coding ( [
       a loinc:57016-8 ;
       fhir:system [
         fhir:v "http://loinc.org"^^xsd:anyURI ;
         fhir:l <http://loinc.org>
       ] ;
       fhir:code [ fhir:v "57016-8" ]
     ] )
  ] ; # 
  fhir:subType ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://www.infoway-inforoute.ca.org/Consent-subtype-codes"^^xsd:anyURI ;
         fhir:l <http://www.infoway-inforoute.ca.org/Consent-subtype-codes>
       ] ;
       fhir:code [ fhir:v "Opt-In" ] ;
       fhir:display [ fhir:v "Default Authorization with exceptions." ]
     ] )
  ] ) ; #   made up code-system to represent the set of privacy consent sub-types known and published by Canada Infoway  
  fhir:term ( [
     fhir:offer [
       fhir:text [ fhir:v "sample" ]
     ] ;
     fhir:group ( [
       fhir:type [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://example.org/fhir/consent-term-type-codes"^^xsd:anyURI ;
             fhir:l <http://example.org/fhir/consent-term-type-codes>
           ] ; #   made up code system  
           fhir:code [ fhir:v "withhold-object-type" ]
         ] )
       ] ;
       fhir:subType [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://hl7.org/fhir/fhir-types"^^xsd:anyURI ;
             fhir:l <http://hl7.org/fhir/fhir-types>
           ] ;
           fhir:code [ fhir:v "ServiceRequest" ]
         ] )
       ] ;
       fhir:offer [
         fhir:text [ fhir:v "Withhold orders from any provider." ]
       ] #   by not specifying term.actor I assume this means everyone?  
     ] [
       fhir:type [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://example.org/fhir/consent-term-type-codes"^^xsd:anyURI ;
             fhir:l <http://example.org/fhir/consent-term-type-codes>
           ] ; #   made up code system  
           fhir:code [ fhir:v "withhold-object-type" ]
         ] )
       ] ;
       fhir:subType [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://hl7.org/fhir/fhir-types"^^xsd:anyURI ;
             fhir:l <http://hl7.org/fhir/fhir-types>
           ] ;
           fhir:code [ fhir:v "DiagnosticReport" ]
         ] )
       ] ;
       fhir:offer [
         fhir:text [ fhir:v "Withhold order results from any provider." ]
       ] #   by not specifying term.actor I assume this means everyone?  
     ] )
  ] ) ; #   I can easily say to exclude a type of FHIR Resource, but lab-orders is not a direct Resource type. Might we put in FHIR based query parameters?  
  fhir:friendly ( [
     fhir:content [
       a fhir:Attachment ;
       fhir:title [ fhir:v "The terms of the consent in friendly consumer speak." ]
     ] #   likely use url pointer to common text  
  ] ) ; #   the terms of the consent in friendly consumer speak  
  fhir:legal ( [
     fhir:content [
       a fhir:Attachment ;
       fhir:title [ fhir:v "The terms of the consent in lawyer speak." ]
     ] #   likely use url pointer to common text  ,   I think some think that this should be the pointer to the law by which this consent is derived under. Such as http:\/\/lois-laws.justice.gc.ca\/eng\/acts\/P-21\/index.html  
  ] ) . #   the legal terms of the consent in lawyer speak  

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

<http://hl7.org/fhir/Organization/3> a fhir:Organization .

<http://hl7.org/fhir/Location/ukp> a fhir:Location .

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

