@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://hl7.org/fhir/us/davinci-pdex/Group/example-provider-consent-constrained-group> a fhir:Group ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "example-provider-consent-constrained-group"] ;
  fhir:Resource.meta [
     fhir:Meta.lastUpdated [ fhir:value "2024-12-16T10:00:00Z"^^xsd:dateTime ]
  ] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>Provider Consent Constrained Group</h2><p>Members matched but opted out of Provider Access API data sharing.</p></div>"
  ] ;
  fhir:DomainResource.contained [
     a fhir:Patient ;
     fhir:index 0 ;
     fhir:Resource.id [ fhir:value "prov-patient-3" ] ;
     fhir:Patient.name [
       fhir:index 0 ;
       fhir:HumanName.use [ fhir:value "official" ] ;
       fhir:HumanName.family [ fhir:value "Williams" ] ;
       fhir:HumanName.given [
         fhir:value "Sarah" ;
         fhir:index 0
       ]
     ] ;
     fhir:Patient.gender [ fhir:value "female" ] ;
     fhir:Patient.birthDate [ fhir:value "1982-11-05"^^xsd:date ]
  ] ;
  fhir:Group.identifier [
     fhir:index 0 ;
     fhir:Identifier.system [ fhir:value "http://example.org/payer/match-groups" ] ;
     fhir:Identifier.value [ fhir:value "CCG-2024-12-16-001" ] ;
     fhir:Identifier.assigner [
       fhir:Reference.display [ fhir:value "Example Payer" ]
     ]
  ] ;
  fhir:Group.active [ fhir:value "true"^^xsd:boolean] ;
  fhir:Group.type [ fhir:value "person"] ;
  fhir:Group.actual [ fhir:value "true"^^xsd:boolean] ;
  fhir:Group.code [
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://hl7.org/fhir/us/davinci-pdex/CodeSystem/PdexMultiMemberMatchResultCS" ] ;
       fhir:Coding.code [ fhir:value "consentconstraint" ] ;
       fhir:Coding.display [ fhir:value "Consent Constraint" ]
     ]
  ] ;
  fhir:Group.managingEntity [
     fhir:link <http://hl7.org/fhir/us/davinci-pdex/Organization/Payer1> ;
     fhir:Reference.reference [ fhir:value "Organization/Payer1" ] ;
     fhir:Reference.identifier [
       fhir:Identifier.type [
         fhir:CodeableConcept.coding [
           fhir:index 0 ;
           fhir:Coding.system [ fhir:value "http://hl7.org/fhir/us/davinci-pdex/CodeSystem/PDexIdentifierType" ] ;
           fhir:Coding.code [ fhir:value "naiccode" ] ;
           fhir:Coding.display [ fhir:value "NAIC Code" ]
         ]
       ] ;
       fhir:Identifier.system [ fhir:value "urn:oid:2.16.840.1.113883.6.300" ] ;
       fhir:Identifier.value [ fhir:value "12345" ]
     ] ;
     fhir:Reference.display [ fhir:value "Example Payer Organization" ]
  ] ;
  fhir:Group.member [
     fhir:index 0 ;
     fhir:Group.member.entity [
       fhir:Element.extension [
         fhir:index 0 ;
         fhir:Extension.url [ fhir:value "http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/base-ext-match-parameters" ] ;
         fhir:Extension.valueReference [
           fhir:Reference.reference [ fhir:value "#prov-patient-3" ]
         ]
       ] ;
       fhir:Reference.reference [ fhir:value "#prov-patient-3" ]
     ]
  ] .

<http://hl7.org/fhir/us/davinci-pdex/Organization/Payer1> a fhir:us .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/us/davinci-pdex/Group/example-provider-consent-constrained-group.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/us/davinci-pdex/Group/example-provider-consent-constrained-group.ttl> .

# -------------------------------------------------------------------------------------

