@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/example2> a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "example2"] ; # 
  fhir:type [ fhir:v "collection"] ; # 
  fhir:timestamp [ fhir:v "2023-09-05T20:18:52.638960-07:00"^^xsd:dateTime] ; # 
  fhir:entry ( [
     fhir:fullUrl [ fhir:v "https://ehr.example.com/Organization/examplehealth"^^xsd:anyURI ] ;
     fhir:resource ( <https://ehr.example.com/Organization/examplehealth> )
  ] [
     fhir:fullUrl [ fhir:v "https://ehr.example.com/Organization/ehchospital"^^xsd:anyURI ] ;
     fhir:resource ( <https://ehr.example.com/Organization/ehchospital> )
  ] [
     fhir:fullUrl [ fhir:v "https://ehr.example.com/Organization/ehpmadison"^^xsd:anyURI ] ;
     fhir:resource ( <https://ehr.example.com/Organization/ehpmadison> )
  ] [
     fhir:fullUrl [ fhir:v "https://ehr.example.com/Endpoint/examplehealth-r2"^^xsd:anyURI ] ;
     fhir:resource ( <https://ehr.example.com/Endpoint/examplehealth-r2> )
  ] [
     fhir:fullUrl [ fhir:v "https://ehr.example.com/Endpoint/examplehealth-r4"^^xsd:anyURI ] ;
     fhir:resource ( <https://ehr.example.com/Endpoint/examplehealth-r4> )
  ] ) . # 

<https://ehr.example.com/Organization/examplehealth> a fhir:Organization ;
  fhir:id [ fhir:v "examplehealth"] ; # 
  fhir:extension ( [
     fhir:extension ( [
       fhir:url [ fhir:v "brandLogo"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "https://example.org/examplehealth/logo/main.1024x1024.png"^^xsd:anyURI ]
     ] ) ;
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/organization-brand"^^xsd:anyURI ]
  ] [
     fhir:extension ( [
       fhir:url [ fhir:v "portalName"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "My ExampleHealth Portal" ]
     ] [
       fhir:url [ fhir:v "portalLogo"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "https://example.org/examplehealth/logo/main.1024x1024.png"^^xsd:anyURI ]
     ] [
       fhir:url [ fhir:v "portalUrl"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "https://example.org/examplehealth/patient-portal-url"^^xsd:anyURI ]
     ] [
       fhir:url [ fhir:v "portalEndpoint"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:Reference ;
         fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/examplehealth-r4> ;
         fhir:reference [ fhir:v "Endpoint/examplehealth-r4" ] ;
         fhir:display [ fhir:v "FHIR R4 Endpoint for ExampleHealth Brand" ]
       ]
     ] [
       fhir:url [ fhir:v "portalEndpoint"^^xsd:anyURI ] ;
       fhir:value [
         a fhir:Reference ;
         fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/examplehealth-r2> ;
         fhir:reference [ fhir:v "Endpoint/examplehealth-r2" ] ;
         fhir:display [ fhir:v "FHIR R2 Endpoint for ExampleHealth Brand" ]
       ]
     ] ) ;
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/organization-portal"^^xsd:anyURI ]
  ] ) ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "https://examplehealth.org" ]
  ] ) ; # 
  fhir:active [ fhir:v "true"^^xsd:boolean] ; # 
  fhir:type ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/organization-type"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "prov" ] ;
       fhir:display [ fhir:v "Healthcare Provider" ]
     ] )
  ] ) ; # 
  fhir:name [ fhir:v "ExampleHealth"] ; # 
  fhir:alias ( [ fhir:v "GoodHealth Hospital"] [ fhir:v "GoodHealth Mental Health"] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "url" ] ;
     fhir:value [ fhir:v "https://health.example.com" ]
  ] ) ; # 
  fhir:address ( [
     fhir:city [ fhir:v "Madison" ] ;
     fhir:state [ fhir:v "WI" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Anamosa" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Cedar Rapids" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Des Moines" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Dubuque" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Fort Dodge" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Grinnell" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Marshalltown" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Peoria" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Pekin" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Muscatine" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] [
     fhir:city [ fhir:v "Sioux City" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] ) ; # 
  fhir:endpoint ( [
     fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/examplehealth-r2> ;
     fhir:reference [ fhir:v "Endpoint/examplehealth-r2" ] ;
     fhir:display [ fhir:v "FHIR R2 Endpoint for ExampleHealth Brand" ]
  ] [
     fhir:link <http://hl7.org/fhir/smart-app-launch/Endpoint/examplehealth-r4> ;
     fhir:reference [ fhir:v "Endpoint/examplehealth-r4" ] ;
     fhir:display [ fhir:v "FHIR R4 Endpoint for ExampleHealth Brand" ]
  ] ) . # 

<http://hl7.org/fhir/smart-app-launch/Endpoint/examplehealth-r4> a fhir:smart-app-launch .

<http://hl7.org/fhir/smart-app-launch/Endpoint/examplehealth-r2> a fhir:smart-app-launch .

<https://ehr.example.com/Organization/ehchospital> a fhir:Organization ;
  fhir:id [ fhir:v "ehchospital"] ; # 
  fhir:extension ( [
     fhir:extension ( [
       fhir:url [ fhir:v "brandLogo"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "data:image/svg+xml;base64,PHN2ZyB0aXRsZT0iU3Rld2FydCBNZW1vcmlhbCBIb3Nw...+IDwvc3ZnPgo="^^xsd:anyURI ]
     ] ) ;
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/organization-brand"^^xsd:anyURI ]
  ] ) ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "https://ehchospital.example.org" ]
  ] ) ; # 
  fhir:active [ fhir:v "true"^^xsd:boolean] ; # 
  fhir:type ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/organization-type"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "prov" ] ;
       fhir:display [ fhir:v "Healthcare Provider" ]
     ] )
  ] ) ; # 
  fhir:name [ fhir:v "ExampleHealth Community Hospital"] ; # 
  fhir:alias ( [ fhir:v "GoodHealth Madison"] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "url" ] ;
     fhir:value [ fhir:v "https://www.ehchospital.example.com" ]
  ] ) ; # 
  fhir:address ( [
     fhir:city [ fhir:v "Lake City" ] ;
     fhir:state [ fhir:v "IA" ] ;
     fhir:country [ fhir:v "US" ]
  ] ) ; # 
  fhir:partOf [
     fhir:link <http://hl7.org/fhir/smart-app-launch/Organization/examplehealth> ;
     fhir:reference [ fhir:v "Organization/examplehealth" ]
  ] . # 

<http://hl7.org/fhir/smart-app-launch/Organization/examplehealth> a fhir:smart-app-launch .

<https://ehr.example.com/Organization/ehpmadison> a fhir:Organization ;
  fhir:id [ fhir:v "ehpmadison"] ; # 
  fhir:extension ( [
     fhir:extension ( [
       fhir:url [ fhir:v "brandLogo"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "https://ehpmadison.example.com/logo.png"^^xsd:anyURI ]
     ] ) ;
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/organization-brand"^^xsd:anyURI ]
  ] ) ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "https://ehpmadison.example.com" ]
  ] ) ; # 
  fhir:active [ fhir:v "true"^^xsd:boolean] ; # 
  fhir:type ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/organization-type"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "prov" ] ;
       fhir:display [ fhir:v "Healthcare Provider" ]
     ] )
  ] ) ; # 
  fhir:name [ fhir:v "ExampleHealth Physicians of Madison"] ; # 
  fhir:alias ( [ fhir:v "GoodHealth Madison"] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "url" ] ;
     fhir:value [ fhir:v "https://www.ehpmadison.example.com" ]
  ] ) ; # 
  fhir:address ( [
     fhir:city [ fhir:v "Madison" ] ;
     fhir:state [ fhir:v "WI" ] ;
     fhir:country [ fhir:v "US" ]
  ] ) ; # 
  fhir:partOf [
     fhir:link <http://hl7.org/fhir/smart-app-launch/Organization/examplehealth> ;
     fhir:reference [ fhir:v "Organization/examplehealth" ]
  ] . # 

<https://ehr.example.com/Endpoint/examplehealth-r2> a fhir:Endpoint ;
  fhir:id [ fhir:v "examplehealth-r2"] ; # 
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/endpoint-fhir-version"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "1.0.2" ]
  ] ) ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:connectionType [
     fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/endpoint-connection-type"^^xsd:anyURI ] ;
     fhir:code [ fhir:v "hl7-fhir-rest" ]
  ] ; # 
  fhir:name [ fhir:v "FHIR DSTU2 Endpoint for ExampleHealth"] ; # 
  fhir:contact ( [
     fhir:system [ fhir:v "url" ] ;
     fhir:value [ fhir:v "https://open.ehr.example.com" ]
  ] ) ; # 
  fhir:payloadType ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/endpoint-payload-type"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "none" ]
     ] )
  ] ) ; # 
  fhir:address [ fhir:v "https://ehr.example.com/ProdFHIR/api/FHIR/R2"^^xsd:anyURI] . # 

<https://ehr.example.com/Endpoint/examplehealth-r4> a fhir:Endpoint ;
  fhir:id [ fhir:v "examplehealth-r4"] ; # 
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/endpoint-fhir-version"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "4.0.1" ]
  ] ) ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:connectionType [
     fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/endpoint-connection-type"^^xsd:anyURI ] ;
     fhir:code [ fhir:v "hl7-fhir-rest" ]
  ] ; # 
  fhir:name [ fhir:v "FHIR R4 Endpoint for ExampleHealth"] ; # 
  fhir:contact ( [
     fhir:system [ fhir:v "url" ] ;
     fhir:value [ fhir:v "https://open.ehr.example.com" ]
  ] ) ; # 
  fhir:payloadType ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/endpoint-payload-type"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "none" ]
     ] )
  ] ) ; # 
  fhir:address [ fhir:v "https://ehr.example.com/ProdFHIR/api/FHIR/R4"^^xsd:anyURI] . # 

# -------------------------------------------------------------------------------------

