Consolidated CDA (C-CDA)
4.0.0-ballot - STU4 United States of America flag

Consolidated CDA (C-CDA), published by Health Level Seven. This guide is not an authorized publication; it is the continuous build for version 4.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/CDA-ccda/ and changes regularly. See the Directory of published versions

: Care Plan Complete Header Example - TTL Representation

Raw ttl | Download

@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 -------------------------------------------------------------------

# 
 Title:        Care Plan

 Based on:     C-CDA_R2_Care_Plan.xml
 Created by:   Lantana Consulting Group, LLC
 
 Updated for C-CDA R3.0 with a focus on header elements
  
 ********************************************************
 Disclaimer: This sample file contains representative data elements to represent a Care Plan. 
 The file depicts a fictional character's health data. Any resemblance to a real person is coincidental. 
 To illustrate as many data elements as possible, the clinical scenario may not be plausible. 
 The data in this sample file is not intended to represent real patients, people or clinical events. 
 This sample is designed to be used in conjunction with the C-CDA Clinical Notes Implementation Guide.
 ********************************************************
  

 a fhir:ClinicalDocument ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:realmCode ( [
fhir:code [ fhir:v "US" ]
  ] ) ; #  ** CDA Header ** 
  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.22.1.15" ]
  ] ) ; #  US Realm Header 
  fhir:id [
fhir:root [ fhir:v "db734647-fc99-424c-a864-7e3cda82e703" ]
  ] ; # 
  fhir:sdtcCategory ( [
fhir:code [ fhir:v "18776-5" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
fhir:displayName [ fhir:v "Plan of care note" ]
  ] ) ; # 
  fhir:code [
fhir:code [ fhir:v "93902-5" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
fhir:codeSystemName [ fhir:v "LOINC" ] ;
fhir:displayName [ fhir:v "Healthcare navigator Plan of care note" ]
  ] ; # 
  fhir:title [
fhir:xmlText [ fhir:v "Good Health Hospital Care Plan" ]
  ] ; # 
  fhir:effectiveTime [
fhir:value [ fhir:v "2013-08-20T11:20:00-08:00"^^xsd:dateTime ]
  ] ; # 
  fhir:confidentialityCode [
fhir:code [ fhir:v "N" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.25" ]
  ] ; # 
  fhir:languageCode [
fhir:code [ fhir:v "en-US" ]
  ] ; # 
  fhir:setId [
fhir:root [ fhir:v "004bb033-b948-4f4c-b5bf-a8dbd7d8dd40" ]
  ] ; #  This document is the second document in the set (see setId for id for the set 
  fhir:versionNumber [
fhir:value [ fhir:v "2"^^xsd:integer ]
  ] ; #  See relatedDocument for the previous version in the set 
  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:patient [
        ( fhir:name [
          ( fhir:use [ fhir:v "L" ] ) ;
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Eve" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Betterhalf" ] ;
              ( fhir:qualifier [ fhir:v "SP" ] )             ] ) #  The \"SP\" is \"Spouse\" from HL7 Code System EntityNamePartQualifier 2.16.840.1.113883.5.43            ] )         ] [
          ( fhir:use [ fhir:v "SRCH" ] ) ;
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Eve" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Everywoman" ] ;
              ( fhir:qualifier [ fhir:v "BR" ] )             ] ) #  The \"BR\" is \"Birth\" from HL7 Code System EntityNamePartQualifier 2.16.840.1.113883.5.43            ] )         ] ) ; #  The first name element represents what the patient is known as 
fhir:administrativeGenderCode [
fhir:code [ fhir:v "F" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.1" ] ;
fhir:codeSystemName [ fhir:v "AdministrativeGender" ] ;
fhir:displayName [ fhir:v "Female" ]         ] ;
fhir:birthTime [
fhir:value [ fhir:v "1975-05-01"^^xsd:date ]         ] ; #  Date of birth need only be precise to the day 
fhir:maritalStatusCode [
fhir:code [ fhir:v "M" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.2" ] ;
fhir:codeSystemName [ fhir:v "MaritalStatusCode" ] ;
fhir:displayName [ fhir:v "Married" ]         ] ;
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" ]         ] ; #  CDC Race and Ethnicity code set contains the five minimum race and ethnicity categories defined by OMB Standards 
        ( fhir:sdtcRaceCode [
fhir:code [ fhir:v "2076-8" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.238" ] ;
fhir:codeSystemName [ fhir:v "Race & Ethnicity - CDC" ] ;
fhir:displayName [ fhir:v "Native Hawaiian or Other Pacific Islander" ]         ] ) ; #  The raceCode extension is only used if raceCode is valued 
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:guardian [
fhir:code [
fhir:code [ fhir:v "POWATT" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.111" ] ;
fhir:codeSystemName [ fhir:v "RoleCode" ] ;
fhir:displayName [ fhir:v "Power of Attorney" ]           ] ;
          ( fhir:addr [
            ( fhir:use [ fhir:v "HP" ] ) ;
            ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "2222 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:telecom [
            ( fhir:use [ fhir:v "MC" ] ) ;
fhir:value [ fhir:v "tel:+1(555)555-2008"^^xsd:anyURI ]           ] ) ;
fhir:guardianPerson [
            ( fhir:name [
              ( fhir:item [
                ( fhir:given [
fhir:xmlText [ fhir:v "Boris" ]                 ] )               ] [
                ( fhir:given [
fhir:xmlText [ fhir:v "Bo" ] ;
                  ( fhir:qualifier [ fhir:v "CL" ] )                 ] )               ] [
                ( fhir:family [
fhir:xmlText [ fhir:v "Betterhalf" ]                 ] )               ] )             ] )           ]         ] ) ;
fhir:birthplace [
fhir:place [
fhir:addr [
              ( 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" ]           ] ;
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"^^xsd:boolean ]           ] #  Patient's preferred language          ] )       ] ; #  HP is \"primary home\" from HL7 AddressUse 2.16.840.1.113883.5.1119 
fhir:providerOrganization [
        ( fhir:id [
fhir:extension [ fhir:v "219BX" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]         ] ) ;
        ( fhir:name [
          ( fhir:item [
fhir:xmlText [ fhir:v "The DoctorsTogether Physician Group" ]           ] )         ] ) ;
        ( fhir:telecom [
          ( fhir:use [ fhir:v "WP" ] ) ;
fhir:value [ fhir:v "tel:+1(555)555-5000"^^xsd:anyURI ]         ] ) ;
        ( fhir:addr [
          ( fhir:use [ fhir:v "WP" ] ) ;
          ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "1007 Health 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" ]             ]           ] )         ] )       ]     ]
  ] ) ; #  Patient (recordTarget) 
  fhir:author ( [
fhir:time [
fhir:value [ fhir:v "2013-07-30T12:35:00-08:00"^^xsd:dateTime ]     ] ;
fhir:assignedAuthor [
      ( fhir:id [
fhir:extension [ fhir:v "77777777777" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "163W00000X" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.101" ] ;
fhir:codeSystemName [ fhir:v "Healthcare Provider Taxonomy (HIPAA)" ] ;
fhir:displayName [ fhir:v "Registered nurse" ]       ] ;
      ( fhir:addr [
        ( fhir:use [ fhir:v "WP" ] ) ;
        ( 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)555-1004"^^xsd:anyURI ]       ] ) ;
fhir:assignedPerson [
        ( fhir:name [
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Nurse" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Nightingale" ]             ] )           ] [
            ( fhir:suffix [
fhir:xmlText [ fhir:v "RN" ]             ] )           ] )         ] )       ] ;
fhir:representedOrganization [
        ( fhir:id [
fhir:root [ fhir:v "2.16.840.1.113883.19.5" ]         ] ) ;
        ( fhir:name [
          ( fhir:item [
fhir:xmlText [ fhir:v "Good Health Hospital" ]           ] )         ] )       ]     ]
  ] ) ; #  Author 
  fhir:dataEnterer [
fhir:assignedEntity [
      ( fhir:id [
fhir:extension [ fhir:v "333777777" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.4.6" ]       ] ) ;
      ( fhir:addr [
        ( fhir:use [ fhir:v "WP" ] ) ;
        ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "1007 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)-1050"^^xsd:anyURI ]       ] ) ;
fhir:assignedPerson [
        ( fhir:name [
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Ellen" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Enter" ]             ] )           ] )         ] )       ]     ]
  ] ; #  Data Enterer 
  fhir:informant ( [
fhir:assignedEntity [
      ( fhir:id [
fhir:extension [ fhir:v "888888888" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.19.5" ]       ] ) ;
      ( fhir:addr [
        ( fhir:use [ fhir:v "WP" ] ) ;
        ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "1007 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)-1003"^^xsd:anyURI ]       ] ) ;
fhir:assignedPerson [
        ( fhir:name [
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Harold" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Hippocrates" ]             ] )           ] [
            ( fhir:suffix [
fhir:xmlText [ fhir:v "D.O." ] ;
              ( fhir:qualifier [ fhir:v "AC" ] )             ] )           ] )         ] )       ]     ]
  ] ) ; #  Informant 
  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: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" ]             ]           ] )         ]       ]     ]
  ] ; #  Custodian 
  fhir:informationRecipient ( [
fhir:intendedRecipient [
      ( fhir:id [
fhir:root [ fhir:v "a1cd2b74-c6de-44ee-b552-3adacb7983cc" ]       ] [
fhir:root [ fhir:v "c72f64c2-b1db-444b-bbff-4d2e1d6bd659" ]       ] [
fhir:root [ fhir:v "fa883fee-b255-4465-8fb5-1d8135e39896" ]       ] ) ; #  Receiving Person Provider Id 
      ( fhir:addr [
        ( fhir:use [ fhir:v "WP" ] ) ;
        ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "100 Better Health Rd." ]           ]         ] [
fhir:city [
fhir:xmlText [ fhir:v "Ann Arbor" ]           ]         ] [
fhir:state [
fhir:xmlText [ fhir:v "MI" ]           ]         ] [
fhir:postalCode [
fhir:xmlText [ fhir:v "97857" ]           ]         ] [
fhir:country [
fhir:xmlText [ fhir:v "US" ]           ]         ] )       ] ) ; #  Receiving Person Address
      ( fhir:telecom [
        ( fhir:use [ fhir:v "WP" ] ) ;
fhir:value [ fhir:v "tel+1(555)555-1010"^^xsd:anyURI ]       ] ) ;
fhir:informationRecipient [
        ( fhir:name [
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Nurse" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Caresalot" ]             ] )           ] [
            ( fhir:suffix [
fhir:xmlText [ fhir:v "RN" ]             ] )           ] )         ] ) #  Receiving Person Name       ] ;
fhir:receivedOrganization [
        ( fhir:id [
fhir:root [ fhir:v "c4c416a7-aeeb-4dcc-9662-ab836ff4d265" ]         ] [
fhir:root [ fhir:v "ab47f3c4-1267-4b9e-9a29-e966b5a861c8" ]         ] ) ; #  Receiving Organization Id
        ( fhir:name [
          ( fhir:item [
fhir:xmlText [ fhir:v "Better Health Hospital" ]           ] )         ] ) ; #  Receiving Organization Name 
        ( fhir:addr [
          ( fhir:use [ fhir:v "WP" ] ) ;
          ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "100 Better Health Rd." ]             ]           ] [
fhir:city [
fhir:xmlText [ fhir:v "Ann Arbor" ]             ]           ] [
fhir:state [
fhir:xmlText [ fhir:v "MI" ]             ]           ] [
fhir:postalCode [
fhir:xmlText [ fhir:v "97857" ]             ]           ] [
fhir:country [
fhir:xmlText [ fhir:v "US" ]             ]           ] )         ] ) ; #  Receiving Organization Address 
fhir:standardIndustryClassCode [
fhir:code [ fhir:v "282E00000X" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.101" ] ;
fhir:codeSystemName [ fhir:v "Healthcare Provider Taxonomy (HIPAA)" ] ;
fhir:displayName [ fhir:v "Long Term Care Hospital" ]         ] #  Receiving Care Setting Type Description: displayName.  Receiving Care Setting Type Code: code        ]     ]
  ] ) ; # 
  fhir:legalAuthenticator [
fhir:time [
fhir:value [ fhir:v "2013-07-30T12:35:00-08:00"^^xsd:dateTime ]     ] ;
fhir:signatureCode [
fhir:code [ fhir:v "S" ]     ] ;
fhir:sdtcSignatureText [
fhir:xmlText [ fhir:v "U2lnbmVkIGJ5IE51cnNlIE5pZ2h0aW5nYWxl" ] ;
fhir:mediaType [ fhir:v "text/xml" ] ;
fhir:representation [ fhir:v "B64" ]     ] ;
fhir:assignedEntity [
      ( fhir:id [
fhir:root [ fhir:v "20cf14fb-b65c-4c8c-a54d-b0cca834c18c" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "163W00000X" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.101" ] ;
fhir:displayName [ fhir:v "Registered nurse" ]       ] ;
      ( fhir:addr [
        ( fhir:use [ fhir:v "WP" ] ) ;
        ( 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)555-1004"^^xsd:anyURI ]       ] ) ;
fhir:assignedPerson [
        ( fhir:name [
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Nurse" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Nightingale" ]             ] )           ] [
            ( fhir:suffix [
fhir:xmlText [ fhir:v "RN" ]             ] )           ] )         ] )       ] ;
fhir:representedOrganization [
        ( fhir:id [
fhir:root [ fhir:v "2.16.840.1.113883.19.5" ]         ] ) ;
        ( fhir:name [
          ( fhir:item [
fhir:xmlText [ fhir:v "Good Health Hospital" ]           ] )         ] )       ] #  the orgnaization id and name      ]
  ] ; #  Legal Authenticator 
  fhir:authenticator ( [
fhir:time [
fhir:value [ fhir:v "2013-07-30T12:35:00-08:00"^^xsd:dateTime ]     ] ;
fhir:signatureCode [
fhir:code [ fhir:v "S" ]     ] ;
fhir:sdtcSignatureText [
fhir:xmlText [ fhir:v "U2lnbmVkIGJ5IEV2ZSBFdmVyeXdvbWFu" ] ;
fhir:mediaType [ fhir:v "text/xml" ] ;
fhir:representation [ fhir:v "B64" ]     ] ;
fhir:assignedEntity [
      ( fhir:id [
fhir:extension [ fhir:v "444222222" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.4.1" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "ONESELF" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.111" ] ;
fhir:codeSystemName [ fhir:v "RoleCode" ] ;
fhir:displayName [ fhir:v "Self" ]       ] ;
      ( 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" ]           ]         ] )       ] ) ; #  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:assignedPerson [
        ( fhir:name [
          ( fhir:use [ fhir:v "L" ] ) ;
          ( fhir:item [
            ( fhir:given [
fhir:xmlText [ fhir:v "Eve" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Everywoman" ] ;
              ( fhir:qualifier [ fhir:v "SP" ] )             ] )           ] )         ] )       ]     ]
  ] ) ; #  This authenticator represents patient agreement or sign-off of the Care Plan
  fhir:participant ( [
fhir:typeCode [ fhir:v "VRF" ] ;
fhir:functionCode [
fhir:code [ fhir:v "425268008" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.96" ] ;
fhir:codeSystemName [ fhir:v "SNOMED CT" ] ;
fhir:displayName [ fhir:v "Review of Care Plan" ]     ] ;
fhir:time [
fhir:value [ fhir:v "2013-08-01T10:24:00-08:00"^^xsd:dateTime ]     ] ;
fhir:associatedEntity [
fhir:classCode [ fhir:v "ASSIGNED" ] ;
      ( fhir:id [
fhir:root [ fhir:v "20cf14fb-b65c-4c8c-a54d-b0cca834c18c" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "163W00000X" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.101" ] ;
fhir:displayName [ fhir:v "Registered nurse" ]       ] ;
fhir:associatedPerson [
fhir:nullFlavor [ fhir:v "NA" ]       ]     ]
  ] [
fhir:typeCode [ fhir:v "VRF" ] ;
fhir:functionCode [
fhir:code [ fhir:v "425268008" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.96" ] ;
fhir:codeSystemName [ fhir:v "SNOMED CT" ] ;
fhir:displayName [ fhir:v "Review of Care Plan" ]     ] ;
fhir:time [
fhir:value [ fhir:v "2013-10-01T12:30:00-08:00"^^xsd:dateTime ]     ] ;
fhir:associatedEntity [
fhir:classCode [ fhir:v "ASSIGNED" ] ;
      ( fhir:id [
fhir:root [ fhir:v "20cf14fb-b65c-4c8c-a54d-b0cca834c18c" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "SELF" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.111" ] ;
fhir:displayName [ fhir:v "self" ]       ] ;
fhir:associatedPerson [
fhir:nullFlavor [ fhir:v "NA" ]       ]     ]
  ] [
fhir:typeCode [ fhir:v "IND" ] ;
fhir:associatedEntity [
fhir:classCode [ fhir:v "ECON" ] ;
      ( fhir:addr [
        ( fhir:use [ fhir:v "HP" ] ) ;
        ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "17 Daws Rd." ]           ]         ] [
fhir:city [
fhir:xmlText [ fhir:v "Ann Arbor" ]           ]         ] [
fhir:state [
fhir:xmlText [ fhir:v "MI" ]           ]         ] [
fhir:postalCode [
fhir:xmlText [ fhir:v "97857" ]           ]         ] [
fhir:country [
fhir:xmlText [ fhir:v "US" ]           ]         ] )       ] ) ;
      ( fhir:telecom [
        ( fhir:use [ fhir:v "WP" ] ) ;
fhir:value [ fhir:v "tel:(999)555-1212"^^xsd:anyURI ]       ] ) ;
fhir:associatedPerson [
        ( fhir:name [
          ( fhir:item [
            ( fhir:prefix [
fhir:xmlText [ fhir:v "Mrs." ]             ] )           ] [
            ( fhir:given [
fhir:xmlText [ fhir:v "Martha" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Jones" ]             ] )           ] )         ] )       ]     ] #  Emergency Contact  
  ] [
fhir:typeCode [ fhir:v "IND" ] ;
fhir:associatedEntity [
fhir:classCode [ fhir:v "CAREGIVER" ] ;
      ( fhir:addr [
        ( fhir:use [ fhir:v "HP" ] ) ;
        ( fhir:item [
fhir:streetAddressLine [
fhir:xmlText [ fhir:v "17 Daws Rd." ]           ]         ] [
fhir:city [
fhir:xmlText [ fhir:v "Ann Arbor" ]           ]         ] [
fhir:state [
fhir:xmlText [ fhir:v "MI" ]           ]         ] [
fhir:postalCode [
fhir:xmlText [ fhir:v "97857" ]           ]         ] [
fhir:country [
fhir:xmlText [ fhir:v "US" ]           ]         ] )       ] ) ;
      ( fhir:telecom [
        ( fhir:use [ fhir:v "WP" ] ) ;
fhir:value [ fhir:v "tel:(999)555-1212"^^xsd:anyURI ]       ] ) ;
fhir:associatedPerson [
        ( fhir:name [
          ( fhir:item [
            ( fhir:prefix [
fhir:xmlText [ fhir:v "Mrs." ]             ] )           ] [
            ( fhir:given [
fhir:xmlText [ fhir:v "Martha" ]             ] )           ] [
            ( fhir:family [
fhir:xmlText [ fhir:v "Jones" ]             ] )           ] )         ] )       ]     ] #  Caregiver 
  ] ) ; #  This participant represents the person who reviewed the Care Plan. If the date in the time element is in the past, then this review has already taken place. 
#         If the date in the time element is in the future, then this is the date of the next scheduled review. ,  This example shows a Care Plan Review that has already taken place 
  fhir:documentationOf ( [
fhir:serviceEvent [
fhir:classCode [ fhir:v "PCPR" ] ;
fhir:effectiveTime [
fhir:low [
fhir:value [ fhir:v "2013-07-20T10:30:00-08:00"^^xsd:dateTime ]         ] ;
fhir:high [
fhir:value [ fhir:v "2013-08-15T13:00:00-08:00"^^xsd:dateTime ]         ]       ] ;
      ( fhir:performer [
fhir:typeCode [ fhir:v "PRF" ] ;
fhir:time [
fhir:value [ fhir:v "2013-07-15T22:36:15-08:00"^^xsd:dateTime ]         ] ;
fhir:assignedEntity [
          ( fhir:id [
fhir:extension [ fhir:v "5555555555" ] ;
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:use [ fhir:v "WP" ] ) ;
            ( 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: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" ] )                 ] )               ] )             ] )           ]         ]       ] ) #  The performer(s) represents the healthcare providers involved in the current or historical care of the patient.\n                The patient’s key healthcare providers would be listed here which would include the primary physician and any \n                active consulting physicians, therapists, counselors, and care team members.       ]
  ] ) ; # 
  fhir:relatedDocument ( [
fhir:typeCode [ fhir:v "RPLC" ] ;
fhir:parentDocument [
      ( fhir:id [
fhir:root [ fhir:v "223769be-f6ee-4b04-a0ce-b56ae998c880" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "CarePlan-x" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
fhir:codeSystemName [ fhir:v "LOINC" ] ;
fhir:displayName [ fhir:v "Care Plan" ]       ] ;
fhir:setId [
fhir:root [ fhir:v "004bb033-b948-4f4c-b5bf-a8dbd7d8dd40" ]       ] ;
fhir:versionNumber [
fhir:value [ fhir:v "1"^^xsd:integer ]       ]     ]
  ] ) ; #  The Care Plan is continually evolving and dynamic. The Care Plan CDA instance 
#     is NOT dynamic. Each time a Care Plan CDA is generated it represents a snapshot 
#     in time of the Care Plan at that moment. Whenever a care provider or patient 
#     generates a Care Plan, it should be noted through relatedDocument 
#     whether the current Care Plan replaces or appends another Care Plan. 
#     The relatedDocumentTypeCode indicates whether the current document is 
#     an addendum to the ParentDocument (APND (append)) or the current document 
#     is a replacement of the ParentDocument (RPLC (replace)). ,  This document is the second in a set - relatedDocument
#      describes the parent document
  fhir:componentOf [
fhir:encompassingEncounter [
      ( fhir:id [
fhir:extension [ fhir:v "9937012" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.19" ]       ] ) ;
fhir:code [
fhir:code [ fhir:v "IMP" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.5.4" ] ;
fhir:displayName [ fhir:v "Inpatient encounter" ]       ] ;
fhir:effectiveTime [
fhir:low [
fhir:value [ fhir:v "2013-06-15T09:30:00-08:00"^^xsd:dateTime ]         ]       ] #  captures that this is an inpatient encounter ,  No high value - this patient is still in hospital      ]
  ] ; # 
  fhir:component [
fhir:structuredBody [
      ( fhir:component [
fhir:section [
fhir:nullFlavor [ fhir:v "NI" ] ;
          ( fhir:templateId [
fhir:extension [ fhir:v "2015-08-01" ] ;
fhir:root [ fhir:v "2.16.840.1.113883.10.20.22.2.58" ]           ] ) ;
fhir:code [
fhir:code [ fhir:v "75310-3" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
fhir:codeSystemName [ fhir:v "LOINC" ] ;
fhir:displayName [ fhir:v "Health Concerns Document" ]           ] ;
fhir:title [
fhir:xmlText [ fhir:v "Health Concerns Section" ]           ] ;
fhir:text "<div xmlns=\"http://www.w3.org/1999/xhtml\">...</div>"         ]       ] [
fhir:section [
fhir:nullFlavor [ fhir:v "NI" ] ;
          ( fhir:templateId [
fhir:root [ fhir:v "2.16.840.1.113883.10.20.22.2.60" ]           ] ) ;
fhir:code [
fhir:code [ fhir:v "61146-7" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
fhir:codeSystemName [ fhir:v "LOINC" ] ;
fhir:displayName [ fhir:v "Goals" ]           ] ;
fhir:title [
fhir:xmlText [ fhir:v "Goals Section" ]           ] ;
fhir:text "<div xmlns=\"http://www.w3.org/1999/xhtml\">...</div>"         ]       ] [
fhir:section [
fhir:nullFlavor [ fhir:v "NI" ] ;
          ( fhir:templateId [
fhir:root [ fhir:v "2.16.840.1.113883.10.20.22.2.61" ]           ] ) ;
fhir:code [
fhir:code [ fhir:v "11383-7" ] ;
fhir:codeSystem [ fhir:v "2.16.840.1.113883.6.1" ] ;
fhir:codeSystemName [ fhir:v "LOINC" ] ;
fhir:displayName [ fhir:v "Patient Problem Outcome" ]           ] ;
fhir:title [
fhir:xmlText [ fhir:v "Health Status Evaluations/Outcomes Section" ]           ] ;
fhir:text "<div xmlns=\"http://www.w3.org/1999/xhtml\">...</div>"         ]       ] )     ]
  ] . #  
#********************************************************
#CDA Body
#********************************************************
#