@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 -------------------------------------------------------------------

[a fhir:ClinicalDocument ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:realmCode ( [
     fhir:code [ fhir:v "US" ]
  ] ) ; # 
  fhir:typeId [
     fhir:extension [ fhir:v "POCD_HD000040" ] ;
     fhir:root [ fhir:v "2.16.840.1.113883.1.3" ]
  ] ; # 
  fhir:templateId ( [
     fhir:extension [ fhir:v "2024-05-01" ] ;
     fhir:root [ fhir:v "2.16.840.1.113883.10.20.22.1.1" ]
  ] [
     fhir:extension [ fhir:v "2024-05-01" ] ;
     fhir:root [ fhir:v "2.16.840.1.113883.10.20.29.1" ]
  ] ) ; # 
  fhir:id [
     fhir:root [ fhir:v "2c1e0e12-b0ae-4456-a526-c11d5e69e77c" ]
  ] ; # 
  fhir:code [
     fhir:code [ fhir:v "68831-7" ] ;
     fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
     fhir:codeSystemName [ fhir:v "LOINC" ] ;
     fhir:displayName [ fhir:v "Discharge summary note" ]
  ] ; # 
  fhir:title [
     fhir:xmlText [ fhir:v "Patient Discharge Summary" ]
  ] ; # 
  fhir:effectiveTime [
     fhir:value [ fhir:v "2013-08-15T10:30:00-08:00"^^xsd:dateTime ]
  ] ; # 
  fhir:confidentialityCode [
     fhir:code [ fhir:v "N" ] ;
     fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.25" ] ;
     fhir:codeSystemName [ fhir:v "Confidentiality" ] ;
     fhir:displayName [ fhir:v "normal" ]
  ] ; # 
  fhir:languageCode [
     fhir:code [ fhir:v "en-US" ]
  ] ; # 
  fhir:recordTarget ( [
     fhir:patientRole [
       fhir:id ( [
         fhir:extension [ fhir:v "444222222" ] ;
         fhir:root [ fhir:v "2.16.840.1.113883.4.1" ]
       ] ) ;
       fhir:addr ( [
         fhir:use ( [ fhir:v "HP" ] ) ;
         fhir:item ( [
           fhir:streetAddressLine [
             fhir:xmlText [ fhir:v "2222 Home Street" ]
           ] #  HP is \"primary home\" from codeSystem 2.16.840.1.113883.5.1119 
         ] [
           fhir:city [
             fhir:xmlText [ fhir:v "Beaverton" ]
           ]
         ] [
           fhir:state [
             fhir:xmlText [ fhir:v "OR" ]
           ]
         ] [
           fhir:postalCode [
             fhir:xmlText [ fhir:v "97867" ]
           ]
         ] [
           fhir:country [
             fhir:xmlText [ fhir:v "US" ]
           ]
         ] )
       ] ) ; #  Example Social Security Number using the actual SSN OID. ,  US is \"United States\" from ISO 3166-1 Country Codes: 1.0.3166.1 
       fhir:telecom ( [
         fhir:use ( [ fhir:v "HP" ] ) ;
         fhir:value [
           fhir:v "tel:+1(555)555-2003"^^xsd:anyURI ;
           fhir:l fhir:tel:+1(555)555-2003
         ]
       ] ) ;
       fhir:patient [
         fhir:name ( [
           fhir:use ( [ fhir:v "L" ] ) ;
           fhir:item ( [
             fhir:given ( [
               fhir:xmlText [ fhir:v "Adam" ]
             ] )
           ] [
             fhir:family ( [
               fhir:xmlText [ fhir:v "Everyman" ]
             ] )
           ] )
         ] ) ;
         fhir:administrativeGenderCode [
           fhir:code [ fhir:v "M" ] ;
           fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.1" ] ;
           fhir:codeSystemName [ fhir:v "AdministrativeGender" ] ;
           fhir:displayName [ fhir:v "Male" ]
         ] ;
         fhir:birthTime [
           fhir:value [ fhir:v "1975-05-01"^^xsd:date ]
         ] ;
         fhir:religiousAffiliationCode [
           fhir:code [ fhir:v "1013" ] ;
           fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.1076" ] ;
           fhir:codeSystemName [ fhir:v "HL7 Religious Affiliation" ] ;
           fhir:displayName [ fhir:v "Christian (non-Catholic, non-specific)" ]
         ] ;
         fhir:raceCode [
           fhir:code [ fhir:v "2106-3" ] ;
           fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.238" ] ;
           fhir:codeSystemName [ fhir:v "Race & Ethnicity - CDC" ] ;
           fhir:displayName [ fhir:v "White" ]
         ] ;
         fhir:ethnicGroupCode [
           fhir:code [ fhir:v "2186-5" ] ;
           fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.238" ] ;
           fhir:codeSystemName [ fhir:v "Race & Ethnicity - CDC" ] ;
           fhir:displayName [ fhir:v "Not Hispanic or Latino" ]
         ] ;
         fhir:birthplace [
           fhir:place [
             fhir:addr [
               fhir:use ( [ fhir:v "H" ] ) ;
               fhir:item ( [
                 fhir:streetAddressLine [
                   fhir:xmlText [ fhir:v "4444 Home Street" ]
                 ]
               ] [
                 fhir:city [
                   fhir:xmlText [ fhir:v "Beaverton" ]
                 ]
               ] [
                 fhir:state [
                   fhir:xmlText [ fhir:v "OR" ]
                 ]
               ] [
                 fhir:postalCode [
                   fhir:xmlText [ fhir:v "97867" ]
                 ]
               ] [
                 fhir:country [
                   fhir:xmlText [ fhir:v "US" ]
                 ]
               ] )
             ]
           ]
         ] ;
         fhir:languageCommunication ( [
           fhir:languageCode [
             fhir:code [ fhir:v "en" ]
           ] ;
           fhir:modeCode [
             fhir:code [ fhir:v "ESP" ] ;
             fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.60" ] ;
             fhir:codeSystemName [ fhir:v "LanguageAbilityMode" ] ;
             fhir:displayName [ fhir:v "Expressed spoken" ]
           ] ; #  \"en\" is ISO 639-1 alpha-2 code for \"English\" 
           fhir:proficiencyLevelCode [
             fhir:code [ fhir:v "G" ] ;
             fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.61" ] ;
             fhir:codeSystemName [ fhir:v "LanguageAbilityProficiency" ] ;
             fhir:displayName [ fhir:v "Good" ]
           ] ;
           fhir:preferenceInd [
             fhir:value [ fhir:v true ]
           ] #  Patient's preferred language 
         ] )
       ] #  HP is \"primary home\" from HL7 AddressUse 2.16.840.1.113883.5.1119 
     ]
  ] ) ; # 
  fhir:author ( [
     fhir:time [
       fhir:value [ fhir:v "2013-08-15T10:30:00-08:00"^^xsd:dateTime ]
     ] ;
     fhir:assignedAuthor [
       fhir:id ( [
         fhir:extension [ fhir:v "5555555555" ] ;
         fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]
       ] ) ;
       fhir:code [
         fhir:code [ fhir:v "ONESELF" ] ;
         fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.111" ] ;
         fhir:codeSystemName [ fhir:v "HL7 Role code" ] ;
         fhir:displayName [ fhir:v "Self" ]
       ] ;
       fhir:addr ( [
         fhir:use ( [ fhir:v "HP" ] ) ;
         fhir:item ( [
           fhir:streetAddressLine [
             fhir:xmlText [ fhir:v "2222 Home Street" ]
           ]
         ] [
           fhir:city [
             fhir:xmlText [ fhir:v "Boston" ]
           ]
         ] [
           fhir:state [
             fhir:xmlText [ fhir:v "MA" ]
           ]
         ] [
           fhir:postalCode [
             fhir:xmlText [ fhir:v "02368" ]
           ]
         ] [
           fhir:country [
             fhir:xmlText [ fhir:v "US" ]
           ]
         ] )
       ] ) ;
       fhir:telecom ( [
         fhir:use ( [ fhir:v "WP" ] ) ;
         fhir:value [
           fhir:v "tel:+1(555)555-1004"^^xsd:anyURI ;
           fhir:l fhir:tel:+1(555)555-1004
         ]
       ] ) ;
       fhir:assignedPerson [
         fhir:name ( [
           fhir:item ( [
             fhir:given ( [
               fhir:xmlText [ fhir:v "Patient" ]
             ] )
           ] [
             fhir:family ( [
               fhir:xmlText [ fhir:v "Author" ]
             ] )
           ] )
         ] )
       ]
     ]
  ] ) ; # 
  fhir:custodian [
     fhir:assignedCustodian [
       fhir:representedCustodianOrganization [
         fhir:id ( [
           fhir:extension [ fhir:v "321CX" ] ;
           fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]
         ] ) ;
         fhir:name [
           fhir:item ( [
             fhir:xmlText [ fhir:v "Good Health HIE" ]
           ] )
         ] ;
         fhir:telecom [
           fhir:use ( [ fhir:v "WP" ] ) ;
           fhir:value [
             fhir:v "tel:+1(555)555-1009"^^xsd:anyURI ;
             fhir:l fhir:tel:+1(555)555-1009
           ]
         ] ;
         fhir:addr [
           fhir:use ( [ fhir:v "WP" ] ) ;
           fhir:item ( [
             fhir:streetAddressLine [
               fhir:xmlText [ fhir:v "1009 Healthcare Drive" ]
             ]
           ] [
             fhir:city [
               fhir:xmlText [ fhir:v "Portland" ]
             ]
           ] [
             fhir:state [
               fhir:xmlText [ fhir:v "OR" ]
             ]
           ] [
             fhir:postalCode [
               fhir:xmlText [ fhir:v "99123" ]
             ]
           ] [
             fhir:country [
               fhir:xmlText [ fhir:v "US" ]
             ]
           ] )
         ]
       ]
     ]
  ] ; # 
  fhir:informationRecipient ( [
     fhir:intendedRecipient [
       fhir:id ( [
         fhir:extension [ fhir:v "adameveryman@direct.sampleHISP.com" ] ;
         fhir:root [ fhir:v "2.16.123.123.12345.1234" ]
       ] ) ; #  Identifier based on the person's Direct Address which is a secure and trusted mechanism for identifying \n          a person discretely. The root of the id is the OID of the HISP Assigning Authority for the Direct Address
       fhir:informationRecipient [
         fhir:name ( [
           fhir:item ( [
             fhir:given ( [
               fhir:xmlText [ fhir:v "Adam" ]
             ] )
           ] [
             fhir:family ( [
               fhir:xmlText [ fhir:v "Everyman" ]
             ] )
           ] )
         ] )
       ] ;
       fhir:receivedOrganization [
         fhir:id ( [
           fhir:extension [ fhir:v "999.3" ] ;
           fhir:root [ fhir:v "2.16.840.1.113883.19" ]
         ] ) ; #  id using HL7 example OID. 
         fhir:name ( [
           fhir:item ( [
             fhir:xmlText [ fhir:v "MyPersonalHealthRecord.Com" ]
           ] )
         ] )
       ]
     ]
  ] [
     fhir:intendedRecipient [
       fhir:id ( [
         fhir:extension [ fhir:v "999.4" ] ;
         fhir:root [ fhir:v "2.16.840.1.113883.19" ]
       ] [
         fhir:extension [ fhir:v "1122334455" ] ;
         fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]
       ] [
         fhir:extension [ fhir:v "DrP@direct.sampleHISP2.com" ] ;
         fhir:root [ fhir:v "2.16.123.123.12345.4321" ]
       ] ) ; #  Unique\/Trusted id using HL7 example OID. 
       fhir:telecom ( [
         fhir:use ( [ fhir:v "WP" ] ) ;
         fhir:value [
           fhir:v "tel:(781)555-1212"^^xsd:anyURI ;
           fhir:l fhir:tel:(781)555-1212
         ]
       ] [
         fhir:use ( [ fhir:v "WP" ] ) ;
         fhir:value [
           fhir:v "mailto:DrP@direct.sampleHISP2.com"^^xsd:anyURI ;
           fhir:l fhir:mailto:DrP@direct.sampleHISP2.com
         ]
       ] ) ;
       fhir:informationRecipient [
         fhir:name ( [
           fhir:item ( [
             fhir:prefix ( [
               fhir:xmlText [ fhir:v "Dr." ]
             ] )
           ] [
             fhir:given ( [
               fhir:xmlText [ fhir:v "Patricia" ]
             ] )
           ] [
             fhir:family ( [
               fhir:xmlText [ fhir:v "Primary" ]
             ] )
           ] )
         ] )
       ] ;
       fhir:receivedOrganization [
         fhir:id ( [
           fhir:extension [ fhir:v "999.2" ] ;
           fhir:root [ fhir:v "2.16.840.1.113883.19" ]
         ] [
           fhir:extension [ fhir:v "1234567890" ] ;
           fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]
         ] ) ; #  Unique\/Trusted id using HL7 example OID. 
         fhir:name ( [
           fhir:item ( [
             fhir:xmlText [ fhir:v "Good Health Internal Medicine" ]
           ] )
         ] ) ;
         fhir:telecom ( [
           fhir:use ( [ fhir:v "WP" ] ) ;
           fhir:value [
             fhir:v "tel:(781)555-1212"^^xsd:anyURI ;
             fhir:l fhir:tel:(781)555-1212
           ]
         ] ) ;
         fhir:addr ( [
           fhir:item ( [
             fhir:streetAddressLine [
               fhir:xmlText [ fhir:v "100 Health Drive" ]
             ]
           ] [
             fhir:city [
               fhir:xmlText [ fhir:v "Boston" ]
             ]
           ] [
             fhir:state [
               fhir:xmlText [ fhir:v "MA" ]
             ]
           ] [
             fhir:postalCode [
               fhir:xmlText [ fhir:v "02368" ]
             ]
           ] [
             fhir:country [
               fhir:xmlText [ fhir:v "USA" ]
             ]
           ] )
         ] )
       ]
     ]
  ] ) ; #  The document is intended for multiple recipients, Adam himself and his PCP physician. 
  fhir:legalAuthenticator [
     fhir:time [
       fhir:value [ fhir:v "2013-08-01T22:36:15-08:00"^^xsd:dateTime ]
     ] ;
     fhir:signatureCode [
       fhir:code [ fhir:v "S" ]
     ] ;
     fhir:assignedEntity [
       fhir:id ( [
         fhir:extension [ fhir:v "555555555" ] ;
         fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]
       ] ) ;
       fhir:code [
         fhir:code [ fhir:v "207QA0505X" ] ;
         fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.101" ] ;
         fhir:codeSystemName [ fhir:v "Healthcare Provider Taxonomy (HIPAA)" ] ;
         fhir:displayName [ fhir:v "Adult Medicine Physician" ]
       ] ;
       fhir:addr ( [
         fhir:item ( [
           fhir:streetAddressLine [
             fhir:xmlText [ fhir:v "1004 Healthcare Drive" ]
           ]
         ] [
           fhir:city [
             fhir:xmlText [ fhir:v "Portland" ]
           ]
         ] [
           fhir:state [
             fhir:xmlText [ fhir:v "OR" ]
           ]
         ] [
           fhir:postalCode [
             fhir:xmlText [ fhir:v "99123" ]
           ]
         ] [
           fhir:country [
             fhir:xmlText [ fhir:v "US" ]
           ]
         ] )
       ] ) ;
       fhir:telecom ( [
         fhir:use ( [ fhir:v "WP" ] ) ;
         fhir:value [
           fhir:v "tel:+1(555)-1004"^^xsd:anyURI ;
           fhir:l fhir:tel:+1(555)-1004
         ]
       ] ) ;
       fhir:assignedPerson [
         fhir:name ( [
           fhir:item ( [
             fhir:given ( [
               fhir:xmlText [ fhir:v "Patricia" ]
             ] )
           ] [
             fhir:given ( [
               fhir:xmlText [ fhir:v "Patty" ] ;
               fhir:qualifier ( [ fhir:v "CL" ] )
             ] )
           ] [
             fhir:family ( [
               fhir:xmlText [ fhir:v "Primary" ]
             ] )
           ] [
             fhir:suffix ( [
               fhir:xmlText [ fhir:v "M.D." ] ;
               fhir:qualifier ( [ fhir:v "AC" ] )
             ] )
           ] )
         ] )
       ]
     ]
  ] ; # 
  fhir:component [
     fhir:structuredBody [
       fhir:component ( [
         fhir:section [ ]
       ] )
     ]
  ]] . # 

# -------------------------------------------------------------------------------------

