@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/smart-app-launch/Bundle/example4> a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "example4"] ;
  fhir:Resource.language [ fhir:value "en"] ;
  fhir:Bundle.type [ fhir:value "collection"] ;
  fhir:Bundle.timestamp [ fhir:value "2023-09-05T20:36:42.268403-07:00"^^xsd:dateTime] ;
  fhir:Bundle.entry [
     fhir:index -1 ;
     fhir:Bundle.entry.fullUrl [ fhir:value "https://ehr.example.org/Organization/brand1" ] ;
     fhir:Bundle.entry.resource <https://ehr.example.org/Organization/brand1>
  ], [
     fhir:index -1 ;
     fhir:Bundle.entry.fullUrl [ fhir:value "https://ehr.example.org/Organization/brand2" ] ;
     fhir:Bundle.entry.resource <https://ehr.example.org/Organization/brand2>
  ], [
     fhir:index -1 ;
     fhir:Bundle.entry.fullUrl [ fhir:value "https://ehr.example.org/Endpoint/coequal-example" ] ;
     fhir:Bundle.entry.resource <https://ehr.example.org/Endpoint/coequal-example>
  ] .

<https://ehr.example.org/Organization/brand1> a fhir:Organization ;
  fhir:Resource.id [ fhir:value "brand1"] ;
  fhir:Resource.language [ fhir:value "en"] ;
  fhir:DomainResource.extension [
     fhir:index -1 ;
     fhir:Element.extension [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "brandLogo" ] ;
       fhir:Extension.valueUrl [ fhir:value "https://example.org/brand1/logo/main.svg" ]
     ] ;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/organization-brand" ]
  ], [
     fhir:index -1 ;
     fhir:Element.extension [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "portalName" ] ;
       fhir:Extension.valueString [ fhir:value "Brand1 Portal" ]
     ], [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "portalUrl" ] ;
       fhir:Extension.valueUrl [ fhir:value "https://example.org/chart.brand1.org" ]
     ], [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "portalEndpoint" ] ;
       fhir:Extension.valueReference [
         fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/coequal-example> ;
         fhir:Reference.reference [ fhir:value "Endpoint/coequal-example" ] ;
         fhir:Reference.display [ fhir:value "FHIR R4 Endpoint for Brand1/Brand2" ]
       ]
     ] ;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/organization-portal" ]
  ] ;
  fhir:Organization.identifier [
     fhir:index -1 ;
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ;
     fhir:Identifier.value [ fhir:value "https://brand1.example.com" ]
  ] ;
  fhir:Organization.active [ fhir:value "true"^^xsd:boolean] ;
  fhir:Organization.type [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/organization-type" ] ;
       fhir:Coding.code [ fhir:value "ins" ] ;
       fhir:Coding.display [ fhir:value "Insurance Company" ]
     ]
  ] ;
  fhir:Organization.name [ fhir:value "Brand1"] ;
  fhir:Organization.alias [
     fhir:value "Umbrella Insurance" ;
     fhir:index -1
  ] ;
  fhir:Organization.telecom [
     fhir:index -1 ;
     fhir:ContactPoint.system [ fhir:value "url" ] ;
     fhir:ContactPoint.value [ fhir:value "https://www.brand1.example.com" ]
  ] ;
  fhir:Organization.address [
     fhir:index -1 ;
     fhir:Address.city [ fhir:value "Napa" ] ;
     fhir:Address.state [ fhir:value "CA" ] ;
     fhir:Address.country [ fhir:value "US" ]
  ], [
     fhir:index -1 ;
     fhir:Address.city [ fhir:value "Sonoma" ] ;
     fhir:Address.state [ fhir:value "CA" ] ;
     fhir:Address.country [ fhir:value "US" ]
  ], [
     fhir:index -1 ;
     fhir:Address.city [ fhir:value "St Helena" ] ;
     fhir:Address.state [ fhir:value "CA" ] ;
     fhir:Address.country [ fhir:value "US" ]
  ] ;
  fhir:Organization.endpoint [
     fhir:index -1 ;
     fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/coequal-example> ;
     fhir:Reference.reference [ fhir:value "Endpoint/coequal-example" ] ;
     fhir:Reference.display [ fhir:value "FHIR R4 Endpoint for Brand1/Brand2" ]
  ] .

<http://hl7.org/fhir/smart-app-launch/Endpoint/coequal-example> a fhir:smart-app-launch .

<https://ehr.example.org/Organization/brand2> a fhir:Organization ;
  fhir:Resource.id [ fhir:value "brand2"] ;
  fhir:Resource.language [ fhir:value "en"] ;
  fhir:DomainResource.extension [
     fhir:index -1 ;
     fhir:Element.extension [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "brandLogo" ] ;
       fhir:Extension.valueUrl [ fhir:value "https://example.org/brand2/logo/main.svg" ]
     ] ;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/organization-brand" ]
  ], [
     fhir:index -1 ;
     fhir:Element.extension [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "portalName" ] ;
       fhir:Extension.valueString [ fhir:value "Brand2 Portal" ]
     ], [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "portalUrl" ] ;
       fhir:Extension.valueUrl [ fhir:value "https://example.org/chart.brand2.org" ]
     ], [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "portalEndpoint" ] ;
       fhir:Extension.valueReference [
         fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/coequal-example> ;
         fhir:Reference.reference [ fhir:value "Endpoint/coequal-example" ] ;
         fhir:Reference.display [ fhir:value "FHIR R4 Endpoint for Brand1/Brand2" ]
       ]
     ] ;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/organization-portal" ]
  ] ;
  fhir:Organization.identifier [
     fhir:index -1 ;
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ;
     fhir:Identifier.value [ fhir:value "https://brand2.example.com" ]
  ] ;
  fhir:Organization.active [ fhir:value "true"^^xsd:boolean] ;
  fhir:Organization.type [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/organization-type" ] ;
       fhir:Coding.code [ fhir:value "ins" ] ;
       fhir:Coding.display [ fhir:value "Insurance Company" ]
     ]
  ] ;
  fhir:Organization.name [ fhir:value "Brand2"] ;
  fhir:Organization.alias [
     fhir:value "Shield Insurance" ;
     fhir:index -1
  ] ;
  fhir:Organization.telecom [
     fhir:index -1 ;
     fhir:ContactPoint.system [ fhir:value "url" ] ;
     fhir:ContactPoint.value [ fhir:value "https://www.brand1.example.com" ]
  ] ;
  fhir:Organization.address [
     fhir:index -1 ;
     fhir:Address.city [ fhir:value "Sonoma" ] ;
     fhir:Address.state [ fhir:value "CA" ] ;
     fhir:Address.country [ fhir:value "US" ]
  ], [
     fhir:index -1 ;
     fhir:Address.city [ fhir:value "San Rafael" ] ;
     fhir:Address.state [ fhir:value "CA" ] ;
     fhir:Address.country [ fhir:value "US" ]
  ], [
     fhir:index -1 ;
     fhir:Address.city [ fhir:value "Santa Rosa" ] ;
     fhir:Address.state [ fhir:value "CA" ] ;
     fhir:Address.country [ fhir:value "US" ]
  ] ;
  fhir:Organization.endpoint [
     fhir:index -1 ;
     fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/coequal-example> ;
     fhir:Reference.reference [ fhir:value "Endpoint/coequal-example" ] ;
     fhir:Reference.display [ fhir:value "FHIR R4 Endpoint for Brand1/Brand2" ]
  ] .

<https://ehr.example.org/Endpoint/coequal-example> a fhir:Endpoint ;
  fhir:Resource.id [ fhir:value "coequal-example"] ;
  fhir:Resource.language [ fhir:value "en"] ;
  fhir:DomainResource.extension [
     fhir:index -1 ;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/endpoint-fhir-version" ] ;
     fhir:Extension.valueCode [ fhir:value "4.0.1" ]
  ] ;
  fhir:Endpoint.status [ fhir:value "active"] ;
  fhir:Endpoint.connectionType [
     fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/endpoint-connection-type" ] ;
     fhir:Coding.code [ fhir:value "hl7-fhir-rest" ]
  ] ;
  fhir:Endpoint.name [ fhir:value "FHIR R4 Endpoint for Brand1/Brand2"] ;
  fhir:Endpoint.contact [
     fhir:index -1 ;
     fhir:ContactPoint.system [ fhir:value "url" ] ;
     fhir:ContactPoint.value [ fhir:value "https://open.ehr.com" ]
  ] ;
  fhir:Endpoint.payloadType [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/endpoint-payload-type" ] ;
       fhir:Coding.code [ fhir:value "none" ]
     ]
  ] ;
  fhir:Endpoint.address [ fhir:value "https://example.org/brand1.org/ProdFHIR/api/FHIR/R4"] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/smart-app-launch/Bundle/example4.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/smart-app-launch/Bundle/example4.ttl> .

# -------------------------------------------------------------------------------------

