Skip to content

Instantly share code, notes, and snippets.

@mmsmits
Last active August 31, 2016 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mmsmits/57e027d5435d678b95ad to your computer and use it in GitHub Desktop.
Save mmsmits/57e027d5435d678b95ad to your computer and use it in GitHub Desktop.
Appendixes for A comparison of two Detailed Clinical Model representations: FHIR and CDA
<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hl7-org:v3 ../CDA/CCD/CDASchemas/cda/Schemas/CDA.xsd"
xmlns="urn:hl7-org:v3" classCode="DOCCLIN" moodCode="EVN">
<realmCode code="NL"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.2.4.3.11.41" /> <!-- Generieke Overdrachtsgegevens -->
<templateId root="2.16.840.1.113883.2.4.6.10.100001"/>
<templateId root="2.16.840.1.113883.10.20.22.1.2" />
<id root="2.16.840.1.113883.10.20.22.1.2" extension="a621"/>
<code code="34133-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<title>Overdrachtsgegevens Marten Smits 20 december 2013</title>
<effectiveTime value="20131220103900"/>
<confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
<languageCode code="nl-NL"/>
<setId extension="12" root="2.16.840.1.113883.555"/>
<versionNumber value="1"/>
<recordTarget>
<patientRole classCode="PAT">
<templateId root="2.16.840.1.113883.2.4.6.10.21.1"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.9"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.7"/>
<id extension="950034253" root="2.16.840.1.113883.2.4.6.3"/>
<addr use="HP">
<streetName>Heereweg</streetName>
<houseNumber>13a</houseNumber>
<postalCode>1000 AA</postalCode>
<county>Den Haag</county> <!-- code="0518"> ?? -->
<city>Den Haag</city>
<country>Nederland</country>
</addr>
<telecom use="HP" value="tel:023-5244444"/>
<telecom use="HP" value="mailto:m.smits@provider.nl"/>
<patient>
<name>
<given>Marten</given>
<family>Smits</family>
</name>
<administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>
<birthTime value="19900531"/>
<maritalStatusCode code="D" codeSystem="2.16.840.1.113883.5.2" displayName="Gescheiden"/>
<guardian classCode="GUARD">
<code code="14" codeSystem="2.16.840.1.113883.2.4.3.11.22.472" displayName="Bewindvoerder"/>
<telecom use="WP" value="tel:010-1234567"/>
<telecom use="HP" value="mailto:e.kramer@provider.nl"/>
<guardianPerson>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.13"/>
<name>
<given qualifier="IN">J.</given>
<family>Jansen</family>
</name>
</guardianPerson>
</guardian>
</patient>
</patientRole>
</recordTarget>
<author typeCode="AUT" contextControlCode="OP">
<time value="20131220103900"/>
<assignedAuthor classCode="ASSIGNED">
<id root="2.16.528.1.1007.3.1"/>
<code code="01.010" codeSystem="2.16.840.1.113883.2.4.15.111" displayName="Cardioloog"/>
<assignedPerson> <!-- assigned person = practitioner -->
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.13"/>
<name>
<given qualifier="IN">J.</given>
<family>Janssen</family>
</name>
</assignedPerson>
<representedOrganization>
<id root="2.16.528.1.1007.3.3" extension="4687892"/>
<name>Erasmus MC</name>
<telecom use="WP" value="tel:010-1234567"/>
<telecom use="HP" value="mailto:info@erasmusmc.nl"/>
<addr>
<streetName>Dr.Molewaterplein</streetName>
<houseNumber>50</houseNumber>
<postalCode>3015 GE</postalCode>
<city>Rotterdam</city>
</addr>
<standardIndustryClassCode code="V4" codeSystem="2.16.840.1.113883.2.4.15.1060" displayName="Ziekenhuis"/>
</representedOrganization>
</assignedAuthor>
</author>
<custodian typeCode="CST">
<assignedCustodian>
<representedCustodianOrganization>
<id root="2.16.528.1.1007.3.3" extension="4687892"/>
<name>Erasmus MC, afdeling psychogeriatrie</name>
<telecom use="WP" value="tel:010-1234567"/>
<addr>
<streetName>Dr.Molewaterplein</streetName>
<houseNumber>50</houseNumber>
<postalCode>3015 GE</postalCode>
<city>Rotterdam</city>
</addr>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
<informationRecipient typeCode="PRCP">
<intendedRecipient classCode="ASSIGNED">
<informationRecipient classCode="PSN" determinerCode="INSTANCE">
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.13"/>
<name>
<given>Peter</given>
<family>Keizer</family>
</name>
</informationRecipient>
<receivedOrganization>
<name>Academisch Medisch Centrum, Amsterdam</name>
<!-- <element name="hl7:standardIndustryClassCode">
<desc language="nl-NL">Code voor soort organisatie</desc>
<example>
<standardIndustryClassCode code="V4" codeSystem="2.16.840.1.113883.2.4.15.1060" displayName="Ziekenhuis"/>
</example>
<vocabulary codeSystem="2.16.840.1.113883.2.4.15.1060"/>
</element> -->
<standardIndustryClassCode code="V4" codeSystem="2.16.840.1.113883.2.4.15.1060" displayName="Ziekenhuis"/>
</receivedOrganization>
</intendedRecipient>
</informationRecipient>
<participant typeCode="IND" contextControlCode="OP">
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.3"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.4"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.9"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.10"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.20"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.24"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.25"/>
<time>
<low value="20130110"/>
<high value="20130131"/>
</time>
<associatedEntity classCode="POLHOLD">
<id nullFlavor="UNK" extension="1234567"/>
<code code="FAMDEP" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP">
<streetName>Heereweg</streetName>
<houseNumber>13a</houseNumber>
<additionalLocator>Bij de bushalte</additionalLocator>
<postalCode>1000 AA</postalCode>
<county>Den Haag</county>
<city>Amsterdam</city>
<country>Nederland</country>
</addr>
<telecom use="HP" value="tel:02305233333"/>
<telecom use="HP" value="mailto:m.bakker@provider.nl"></telecom>
<associatedPerson>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.13"/>
<templateId root="2.16.840.1.113883.2.4.6.10.21.1.19"/>
<name>
<given qualifier="BR">Maria</given>
<given qualifier="CL">Ria</given>
<given qualifier="IN">M.</given>
<prefix qualifier="TITLE">Mevrouw</prefix>
<family qualifier="SP">van Putten</family>
<family qualifier="BR">Visser</family>
</name>
<!--
<nfu:bankgegevens>
<nfu:bank xmlns:nfu="urn:urn:nictiz-nl:v3/nfu">ABN AMRO</nfu:bank>
<nfu:bankCode xmlns:nfu="urn:urn:nictiz-nl:v3/nfu">ABNANL2A</nfu:bankCode>
<nfu:rekeningnummer xmlns:nfu="urn:urn:nictiz-nl:v3/nfu">987654321</nfu:rekeningnummer>
</nfu:bankgegevens>
-->
</associatedPerson>
</associatedEntity>
</participant>
<documentationOf typeCode="DOC">
<serviceEvent classCode="PCPR">
<effectiveTime>
<low value="20111101"/>
<high value="20111113"/>
</effectiveTime>
<performer typeCode="PRF">
<assignedEntity>
<id root="2.16.528.1.1007.3.1"/>
<code code="01.010" codeSystem="2.16.840.1.113883.2.4.15.111" displayName="Cardioloog"/>
<assignedPerson>
<name>
<given>Jan</given>
<given qualifier="IN">J.</given>
<family>Jassen</family>
</name>
</assignedPerson>
<representedOrganization>
<id root="2.16.528.1.1007.3.3" extension="4687892"/>
<name>Erasmus MC, afdeling psychogeriatrie</name>
<telecom use="WP" value="tel:010-1234567"/>
<telecom use="HP" value="mailto:info@erasmusmc.nl"/>
<addr>
<streetName>Dr.Molewaterplein</streetName>
<houseNumber>50</houseNumber>
<postalCode>3015 GE</postalCode>
<city>Rotterdam</city>
</addr>
</representedOrganization>
</assignedEntity>
</performer>
</serviceEvent>
</documentationOf>
<component typeCode="COMP" contextConductionInd="true">
<structuredBody>
<!-- LAB RESULTS -->
<component>
<section>
<entry>
<organizer classCode="BATTERY" moodCode="EVN">
<!-- Result organizer template -->
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
<id root="7d5a02b0-67a4-11db-bd13-0800200c9a66"/>
<code code="57021-8" displayName="CBC W Auto Differential panel" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<statusCode code="completed"/>
<component>
<observation classCode="OBS" moodCode="EVN">
<!-- Result observation template -->
<templateId root="2.16.840.1.113883.10.20.22.4.2"/>
<id root="107c2dc0-67a5-11db-bd13-0800200c9a66"/>
<code code="28540-3" displayName="Erythrocyte mean corpuscular hemoglobin concentration [Mass/volume]" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<statusCode code="completed"/>
<effectiveTime value="200003231430"/>
<value xsi:type="PQ" value="34" unit="g/dl"/>
<interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
<author>
<time/>
<assignedAuthor>
<id root="2.16.528.1.1007.3.1"/>
</assignedAuthor>
</author>
<referenceRange>
<observationRange>
<text>M 13.8-18.0 g/dL ; F 12.1-15.1 g/dL</text>
</observationRange>
</referenceRange>
</observation>
<!-- other observations van be added -->
</component>
</organizer>
</entry>
</section>
</component>
<!-- ALLERGIES, ADVERSE REACTIONS AND ALERTS -->
<component>
<section>
<entry typeCode="DRIV">
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.30"/>
<id root="36e3e930-7b14-11db-9fe1-0800200c9a66"/>
<code code="48765-2"
codeSystem="2.16.840.1.113883.6.1"
codeSystemName="LOINC"
displayName="Allergies, adverse reactions, alerts"/>
<statusCode code="active"/>
<effectiveTime>
<low value="20090902"/>
</effectiveTime>
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS" moodCode="EVN">
<!-- allergy - intolerance observation template -->
<templateId root="2.16.840.1.113883.10.20.22.4.7"/>
<id root="4adc1020-7b14-11db-9fe1-0800200c9a66"/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="20110215"/>
</effectiveTime>
<value xsi:type="CD" code="419199007"
displayName="Allergy to substance (disorder)"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT">
</value>
<!-- ADVERSE REACTION Reaction observation template -->
<participant typeCode="CSM">
<participantRole classCode="MANU">
<playingEntity classCode="MMAT">
<code code="QE1QX6B99R" displayName="PEANUT"
codeSystem="2.16.840.1.113883.4.9" codeSystemName=" UNII">
<originalText>
<reference value="Allergic to peanuts"/>
</originalText>
</code>
<name>Peanut</name>
</playingEntity>
</participantRole>
</participant>
<entryRelationship typeCode="MFST">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.9"/>
<!-- Reaction observation template -->
<id root="350a25a1-5e69-11e1-b86c-0800200c9a66"/>
<code code="ASSERTION"
codeSystem="2.16.840.1.113883.5.4"/>
<statusCode code="completed"/>
<value xsi:type="CD"
code="417516000"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
displayName="Anaphylaxis due to substance (disorder)"/>
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS" moodCode="EVN">
<!-- Severity observation template -->
<templateId root="2.16.840.1.113883.10.20.22.4.8"/>
<code code="SEV"
displayName="Severity Observation"
codeSystem="2.16.840.1.113883.5.4"
codeSystemName="HL7ActCode"/>
<text>
<reference value="#severity"/>
</text>
<statusCode code="completed"/>
<value xsi:type="CD" code="24484000" displayName="Severe"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"/>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
</observation>
</entryRelationship>
<entryRelationship typeCode="SUBJ">
<observation classCode="OBS" moodCode="EVN">
<!-- ALERTS, MRSA CARRIER -->
<templateId root="2.16.840.1.113883.10.20.1.2"/>
<id/>
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="20130101"/>
</effectiveTime>
<value xsi:type = "CD"
code="409793007"
displayName="Antimicrobial resistant bacteria"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT">
</value>
<value xsi:type = "CD"
code="115329001"
displayName="Methicillin resistant Staphylococcus aureus (organism)"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT">
</value>
</observation>
</entryRelationship>
</act>
</entry>
</section>
</component>
<!-- FAMILY HISTORY -->
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.15"/>
<!-- ******** Family history section template ******** -->
<code code="10157-6" codeSystem="2.16.840.1.113883.6.1"/>
<title>FAMILY HISTORY</title>
<text>
<paragraph>Father (deceased)</paragraph>
<table border="1" width="100%">
<thead>
<tr>
<th>Diagnosis</th>
<th>Age At Onset</th>
</tr>
</thead>
<tbody>
<tr>
<td>Myocardial Infarction (cause of death)</td>
<td>57</td>
</tr>
<tr>
<td>Diabetes</td>
<td>40</td>
</tr>
</tbody>
</table>
</text>
<entry typeCode="DRIV">
<organizer moodCode="EVN" classCode="CLUSTER">
<templateId root="2.16.840.1.113883.10.20.22.4.45"/>
<!-- ******** Family history organizer template ******** -->
<statusCode code="completed"/>
<effectiveTime>
<high value="20142603"/>
</effectiveTime>
<subject>
<relatedSubject classCode="PRS">
<code code="FTH" displayName="Father"
codeSystemName="HL7 FamilyMember"
codeSystem="2.16.840.1.113883.5.111">
<translation code="9947008"
displayName="Biological father"
codeSystemName="SNOMED"
codeSystem="2.16.840.1.113883.6.96"/>
</code>
<subject>
<administrativeGenderCode code="M"
codeSystem="2.16.840.1.113883.5.1"
displayName="Male"/>
<birthTime value="1910"/>
<!--<sdtc:deceasedInd value="true"/>
<sdtc:deceasedTime value="1967"/> -->
</subject>
</relatedSubject>
</subject>
<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.46"/>
<!-- Family History Observation template -->
<id root="d42ebf70-5c89-11db-b0de-0800200c9a66"/>
<code code="55561003" displayName="Active"
codeSystemName="SNOMED CT"
codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
<effectiveTime value="1967"/>
<value xsi:type="CD" code="22298006"
codeSystem="2.16.840.1.113883.6.96"
displayName="Myocardial infarction"/>
<entryRelationship typeCode="CAUS">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.47"/>
<!-- ******** Family history death observation template ******** -->
<id root="6898fae0-5c8a-11db-b0de-0800200c9a66"/>
<code code="ASSERTION"
codeSystem="2.16.840.1.113883.5.4"/>
<statusCode code="completed"/>
<value xsi:type="CD" code="419099009"
codeSystem="2.16.840.1.113883.6.96"
displayName="Dead"/>
</observation>
</entryRelationship>
<entryRelationship typeCode="SUBJ" inversionInd="true">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.31"/>
<!-- ******** Age observation template ******** --> <!-- On set age -->
<code code="397659008" codeSystem="2.16.840.1.113883.6.96"
displayName="Age"/>
<statusCode code="completed"/>
<value xsi:type="PQ" value="57" unit="a"/>
</observation>
</entryRelationship>
</observation>
</component>
<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.46"/>
<!-- ******** Family history observation template ******** -->
<id root="5bfe3ec0-5c8b-11db-b0de-0800200c9a66"/>
<code code="7087005" displayName="Intermittent"
codeSystemName="SNOMED CT"
codeSystem="2.16.840.1.113883.6.96"/>
<statusCode code="completed"/>
<effectiveTime value="1950"/>
<value xsi:type="CD" code="44054006"
codeSystem="2.16.840.1.113883.6.96"
displayName="Diabetes mellitus type 2"/>
<entryRelationship typeCode="SUBJ" inversionInd="true">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.31"/>
<!-- ******** Age observation template ******** -->
<code code="397659008" codeSystem="2.16.840.1.113883.6.96"
displayName="Age"/>
<statusCode code="completed"/>
<value xsi:type="PQ" value="40" unit="a"/>
</observation>
</entryRelationship>
</observation>
</component>
</organizer>
</entry>
</section>
</component>
<!-- MEDICATION -->
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.1"/>
<code code="10160-0"
codeSystem="2.16.840.1.113883.6.1"
codeSystemName="LOINC"
displayName="HISTORY OF MEDICATION USE"/>
<title>MEDICATIONS</title>
<text>
...
</text>
<entry typeCode="DRIV">
<substanceAdministration classCode="SBADM" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.16"/>
<!-- Medication Activity template -->
<id root="cdbd33f0-6cde-11db-9fe1-0800200c9a66"/>
<text>
<reference value ="#med1"/>
Proventil 0.09 MG/ACTUAT inhalant solution, 2 puffs QID PRN wheezing
</text>
<statusCode code="completed"/>
<effectiveTime xsi:type="IVL_TS">
<low value="20110301"/>
<high value="20120301"/>
</effectiveTime>
<effectiveTime xsi:type="PIVL_TS" institutionSpecified="true" operator="A">
<period value="6" unit="h"/>
</effectiveTime>
<routeCode code="C38216" codeSystem="2.16.840.1.113883.3.26.1.1"
codeSystemName="NCI Thesaurus"
displayName="RESPIRATORY (INHALATION)"/>
<doseQuantity value="1"/>
<rateQuantity value="90" unit="ml/min"/>
<maxDoseQuantity nullFlavor="UNK">
<numerator nullFlavor="UNK"/>
<denominator nullFlavor="UNK"/>
</maxDoseQuantity>
<administrationUnitCode code="C42944"
displayName="INHALANT"
codeSystem="2.16.840.1.113883.3.26.1.1"
codeSystemName="NCI Thesaurus"/>
<consumable>
<manufacturedProduct>
<templateId root="2.16.840.1.113883.10.20.22.4.23"/>
<!-- Medication Information template -->
<id/>
<manufacturedMaterial>
<code code="329498"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm"
displayName="Albuterol 0.09 MG/ACTUAT inhalant solution">
<originalText><reference value="#manmat1"/></originalText>
<translation code="573621"
codeSystem="2.16.840.1.113883.6.88" codeSystemName="RxNorm"
displayName="Proventil 0.09 MG/ACTUAT inhalant solution" />
<!--sdtc:valueSet="{$QDMElementValueSetOID}-->
<!-- Would be actual valueSetOID -->
</code>
</manufacturedMaterial>
<!--<manufacturerOrganization>...</manufacturerOrganization> -->
</manufacturedProduct>
</consumable>
<participant typeCode="CSM">
<participantRole classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.22.4.24"/>
<!-- Drug Vehicle template -->
<code code="412307009"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
displayName="drug vehicle" />
<playingEntity classCode="MMAT">
<code code="125464" displayName="Normal Saline"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm"/>
<name>Normal Saline</name>
</playingEntity>
</participantRole>
</participant>
<entryRelationship typeCode="RSON">
<observation classCode="COND" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.19"/>
<!-- Indication template -->
<id extension="123456789" root="2.16.840.1.113883.19"/>
<code code="409586006"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
displayName="Complaint"/>
<statusCode code="completed"/>
<value xsi:type="CD"
code="195967001"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
displayName="Asthma"/>
</observation>
</entryRelationship>
<entryRelationship typeCode="REFR">
<supply classCode="SPLY" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.22.4.17"/>
<!-- Medication Supply Order template -->
<id root="1.2.3.4.5.6.7" extension="1234567"/>
<statusCode code="completed"/>
<effectiveTime xsi:type="IVL_TS">
<width value="10" unit="d"/>
<high value="20121012" />
</effectiveTime>
<repeatNumber value="1"/>
<quantity value="75"/>
<product>
<manufacturedProduct>
<templateId root="2.16.840.1.113883.10.20.22.4.23"/>
<!-- Medication Information template -->
<id/>
<manufacturedMaterial>
<code code="329498"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm"
displayName="Albuterol 0.09 MG/ACTUAT inhalant solution">
<originalText><reference value="#manmat1"/></originalText>
<translation code="573621"
codeSystem="2.16.840.1.113883.6.88" codeSystemName="RxNorm"
displayName="Proventil 0.09 MG/ACTUAT inhalant solution" />
<!-- sdtc:valueSet="{$QDMElementValueSetOID}/> -->
<!-- Would be actual valueSetOID -->
</code>
</manufacturedMaterial>
<manufacturerOrganization>
<!-- Organization goes here -->
</manufacturerOrganization>
</manufacturedProduct>
</product>
<!--
<author>
</author>
-->
<entryRelationship typeCode="SUBJ" inversionInd="true">
<act classCode="ACT" moodCode="INT">
<templateId root="2.16.840.1.113883.10.20.22.4.20"/>
<!-- Instructions template -->
<code code="171044003"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
displayName="Immunization Education"/>
<text>
<reference value="#sect1"/>
Patient may have low grade fever, mild joint pain and injection
area tenderness .
</text>
<statusCode code="completed"/>
</act>
</entryRelationship>
</supply>
</entryRelationship>
<entryRelationship typeCode="REFR">
<supply classCode="SPLY" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.18"/>
<!-- Medication Dispense template -->
<id root="1.2.3.4.56789.1" extension="cb734647-fc99-424c-a864-7e3cda82e704"/>
<statusCode code="completed"/>
<effectiveTime value="20020101"/>
<repeatNumber value="1"/>
<quantity value="75"/>
<performer>
<time nullFlavor="UNK"/>
<assignedEntity>
<id/>
<addr>
<streetAddressLine>17 Daws Rd.</streetAddressLine>
<city>Blue Bell</city>
<state>MA</state>
<postalCode>02368</postalCode>
<country>US</country>
</addr>
<telecom nullFlavor="UNK"/>
<assignedPerson>
<name>
<prefix>Dr.</prefix>
<given>Robert</given>
<family>Michaels</family>
</name>
</assignedPerson>
<representedOrganization>
<id root="2.16.840.1.113883.19.5"/>
<name>Good Health Clinic</name>
<telecom nullFlavor="UNK"/>
<addr nullFlavor="UNK"/>
</representedOrganization>
</assignedEntity>
</performer>
</supply>
</entryRelationship>
<precondition typeCode="PRCN">
<templateId root="2.16.840.1.113883.10.20.22.4.25"/>
<!-- Precondition for Substance Administration template -->
<criterion>
<code code="ASSERTION"
codeSystem="2.16.840.1.113883.5.4"
codeSystemName="HL7ActCode"/>
<text>...</text>
<value xsi:type="CD" code="56018004"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"
displayName="Wheezing"/>
</criterion>
</precondition>
</substanceAdministration>
</entry>
</section>
</component>
<!-- BARTHEL INDEX assessment scale -->
<component>
<section>
<entry typeCode="DRIV">
<observation classCode="OBS" moodCode="EVN">
<!--Assessment Scale Observation -->
<templateId root="2.16.840.1.113883.10.20.22.4.69"/>
<code code="273302005" displayName="Barthel index"
codeSystem="2.16.840.1.113883.6.96"
codeSystemName="SNOMED CT"/>
<statusCode code="completed"/>
<effectiveTime value="20140101"/>
<!-- Summed score of the component values -->
<value xsi:type="INT" value="20"/>
<!-- Individual answers -->
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlB525" displayName="Darm"
codeSystem="2.16.78383" codeSystemName="CVA-KIS"> <!-- code system not specified -->
<translation code="4.2.4" displayName="FECAL"
codeSystem="2.16.1337" codeSystemName="NL-CM"/> <!-- code system not specified -->
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="2" displayName="continent" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.1" code="FECAL3" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlB6202" displayName="Blaas"
codeSystem="2.16.1337" codeSystemName="CVA-KIS">
<translation code="4.2.3" displayName="URIN"
codeSystem="2.16.1337" codeSystemName="NL-CM"/>
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="2" displayName="continent" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.2" code="URIN3" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD520" displayName="UiterlijkeVerzorging"
codeSystem="2.16.1337" codeSystemName="CVA-KIS">
<translation code="4.2.5" displayName="GROOM"
codeSystem="2.16.1337" codeSystemName="NL-CM"/>
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="1" displayName="onafhankelijk(gezicht, haren, tanden, scheren)" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.3" code="GROOM2" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD530" displayName="Toiletgebruik"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.6" displayName="TOIL"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="2" displayName="onafhankelijk(op en af, uit en aankleden, afvegen)" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.4" code="TOIL3" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD550" displayName="Eten"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.7" displayName="FEED"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="2" displayName= "onafhankelijk" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.5" code="FEED3" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD420" displayName="Tranfer"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.8" displayName="TRANS"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="3" displayName="onafhankelijk" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.6" code="TRANS4" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD450" displayName="Mobiliteit"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.9" displayName="MOB"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="3" displayName="onafhankelijk" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.7" code="MOBIL4" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD540" displayName="AanUitkleden"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.10" displayName="DRESS"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="2" displayName="onafhankelijk" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.8" code="DRESS3" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD460" displayName="TrappenLopen"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.11" displayName="CLIMB3"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="2" displayName="onafhankelijk" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.9" code="CLIMB3" />
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.86"/>
<id root="f4dce790-8328-11db-9fe1-0800200c9a44"/>
<code code="BrtlD510" displayName="BadenDouchen"
codeSystem="CVA-KIS" codeSystemName="CVA-KIS">
<translation code="4.2.12" displayName="BATH"
codeSystem="2.16.1337" codeSystemName="NL-CM" />
</code>
<statusCode code="completed"/>
<value xsi:type="CO" code="1" displayName="onafhankelijk" />
<interpretationCode codeSystem="2.16.840.1.113883.2.4.3.11.60.40.2.4.2.10" code="BATH2" />
</observation>
</entryRelationship>
<referenceRange>
<observationRange>
<text>
"De score van de Barthel index is de som van de scores op de afzonderlijke 
variabelen. De interpretatie van deze totaalscore is 0‐9 voor ernstig beperkt, 10‐19 
voor matig beperkt en 20 voor zelfstandig. 20 Is ook de maximale score. "
</text>
</observationRange>
</referenceRange>
</observation>
</entry>
</section>
</component>
<!--Plan of Care-->
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.10" />
<!-- **** Plan of Care section template **** -->
<code code="18776-5" codeSystem="2.16.840.1.113883.6.1"
codeSystemName="LOINC" displayName="Treatment plan"/>
<title>Plan of Care</title>
<text>
...
</text>
<entry typeCode="DRIV">
<observation classCode="OBS" moodCode="RQO">
<templateId root="2.16.840.1.113883.10.20.22.4.44"/>
<!-- Plan of Care Activity Observation template -->
<id root="9a6d1bac-17d3-4195-89a4-1121bc809b4a"/>
<code code="23426006" codeSystem="2.16.840.1.113883.6.96"
displayName="Pulmonary function test"/>
<statusCode code="new"/>
<effectiveTime>
<low value="20140101"/>
<high value="20140102"/>
</effectiveTime>
</observation>
</entry>
<entry>
<act classCode="ACT" moodCode="RQO">
<templateId root="2.16.840.1.113883.10.20.22.4.39"/>
<!-- Plan of Care Activity Act -->
<id root="9a6d1bac-17d3-4195-89a4-1121bc809a5c"/>
<code code="310634005" codeSystem="2.16.840.1.113883.6.96"
displayName="Colonoscopy"/>
<statusCode code="new"/>
<effectiveTime>
<low value="20140103"/>
<high value="20140104"/>
</effectiveTime>
</act>
</entry>
<entry>
<encounter moodCode="INT" classCode="ENC">
<templateId root="2.16.840.1.113883.10.20.22.4.40"/>
<!-- **** Plan of Care Activity Encounter template **** -->
<id root="9a6d1bac-17d3-4195-89a4-1121bc809b4d"/>
</encounter>
</entry>
<entry>
<procedure moodCode="RQO" classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.41"/>
<!-- ** Plan of Care Activity Procedure template ** -->
<id root="9a6d1bac-17d3-4195-89c4-1121bc809b5a"/>
<code code="23426006" codeSystem="2.16.840.1.113883.6.96"
displayName="Pulmonary function test"/>
<statusCode code="new"/>
<effectiveTime>
<low value="20140105"/>
<high value="20140106"/>
</effectiveTime>
</procedure>
</entry>
<entry>
<substanceAdministration moodCode="RQO" classCode="SBADM">
<templateId root="2.16.840.1.113883.10.20.22.4.42"/>
<!-- ** Plan of Care Activity Substance Administration template **-->
<id root="9a6d1bac-17d3-4195-89c4-1121bc809b5b"/>
<consumable>
<manufacturedProduct>
<templateId root="2.16.840.1.113883.10.20.22.4.23"/>
<!-- Medication Information template -->
<id/>
<manufacturedMaterial>
<code code="329498"
codeSystem="2.16.840.1.113883.6.88"
codeSystemName="RxNorm"
displayName="Albuterol 0.09 MG/ACTUAT inhalant solution">
<originalText><reference value="#manmat1"/></originalText>
<translation code="573621"
codeSystem="2.16.840.1.113883.6.88" codeSystemName="RxNorm"
displayName="Proventil 0.09 MG/ACTUAT inhalant solution" />
</code>
</manufacturedMaterial>
</manufacturedProduct>
</consumable>
</substanceAdministration>
</entry>
<entry>
<supply moodCode="INT" classCode="SPLY">
<templateId root="2.16.840.1.113883.10.20.22.4.43"/>
<!-- ** Plan of Care Activity Supply ** -->
<id root="9a6d1bac-17d3-4195-89c4-1121bc809b5d"/>
<code code="387458008" codeSystem="2.16.840.1.113883.6.96"
displayName="aspirin" />
</supply>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/Atom schema/fhir-atom.xsd"
xmlns="http://www.w3.org/2005/Atom">
<title>Example Patient</title>
<id>urn:uuid:500bee81-d973-4afe-b592-d39fe71e38</id>
<updated>2013-05-28T22:12:21Z</updated>
<author>
<name>Marten Smits</name>
</author>
<category term="http://hl7.org/fhir/tag/document" scheme="http://hl7.org/fhir/tag" />
<!-- The composition -->
<entry>
<title>Overdrachtsdossier</title>
<id>cid:1046bb61-c258-44e5-96a5-a5bae6b180fe@orionhealth.com</id>
<updated>2013-05-28T22:12:21Z</updated>
<content type="text/xml">
<Composition xmlns="http://hl7.org/fhir">
<instant value='2013-06-06T12:30:00'/> <!-- the time this document was created -->
<!-- What type of document is this - eg Discharge Summary, referral, Consultation note -->
<type>
<coding>
<system value='http://loinc.org'/>
<code value='57133-1'/>
<display value="Referral note"/>
</coding>
</type>
<status value="final"/>
<confidentiality>
<system value='http://fhir.org.nz/xds#confidentiality'/>
<code value='n'/>
<display value="Normal"/>
</confidentiality>
<subject>
<reference value='http://hl7.nl/GenoGeg/Patient/1'/>
<display value="Patient"/>
</subject>
<author>
<reference value='http://hl7.nl/GenoGeg/Performer/1'/>
<display value="Author"/>
</author>
</Composition>
</content>
</entry>
<!-- Subject (Patient) -->
<entry>
<title>The subject of the document</title>
<id>http://hl7.nl/GenoGeg/Patient/1</id>
<updated>2013-05-28T22:12:21Z</updated>
<content type="text/xml">
<!-- Sample content only -->
<Patient xmlns="http://hl7.org/fhir">
<!-- VIP indicator is not in FHIR, hence the extensie -->
<extension url="http://nfu.nl/fhir/Profiles/GoGProfile#VIPindicator">
<valueCoding>
<system value="http://nfu.nl/fhir/Profiles/GoGProfile#VIPindicator"/>
<code value="SFM"/>
<display value="Staff member family"/>
</valueCoding>
</extension>
<!-- Social security number is not in FHIR, hence the extension -->
<extension url="http://nfu.nl/fhir/Profiles/GoGProfile#BSN">
<valueString value="123456789"/>
</extension>
<!-- Naamgegevens -->
<name>
<use value="official"/>
<family value="Doe"/>
<given value="Johanna"/>
<prefix value="Mevr."/>
</name>
<name>
<use value="maiden"/>
<family value = "Slow"/>
</name>
<name>
<use value="usual"/>
<given value="Jane"/>
</name>
<telecom>
<system value="phone"/>
<value value="123-34567890"/>
<use value = "home"/>
</telecom>
<telecom>
<system value="phone"/>
<value value = "06-12345678"/>
<use value="mobile"/> <!-- "pager" is not in FHIR, this hould be done with an extension -->
</telecom>
<telecom>
<system value = "email"/>
<value value="j.doe@provider.com"/>
<use value="home"/>
</telecom>
<telecom>
<system value = "email"/>
<value value="j.doe@work.com"/>
<use value="work"/>
</telecom>
<gender>
<coding>
<system value = "http://hl7.org/fhir/v3/AdministrativeGender"/>
<code value="F"/>
</coding>
</gender>
<birthDate value="1980-01-01"/>
<deceasedBoolean value="false" />
<address>
<use value="home"/>
<line value="Hoofdstraat 1"/>
<city value="Amsterdam"/>
<state value="Noord-Holland"/>
<zip value="1234 AA"/>
<country value="The Netherlands"/>
</address>
<multipleBirthBoolean value="true"/>
</Patient>
</content>
</entry>
<!-- Author (Practitioner)-->
<entry>
<title>The document author</title>
<id>http://hl7.nl/GenoGeg/Author/1</id>
<updated>2013-05-28T22:12:21Z</updated>
<content type="text/xml">
<Practitioner xmlns="http://hl7.org/fhir">
<name>
<family value="Janssen"/>
<given value="J."/> <!-- Given name is also for initial, in CDA a separate tag -->
</name>
</Practitioner>
</content>
</entry>
<!-- Family History -->
<entry>
<title>Family History</title>
<id>http://hl7.nl/GenoGeg/FamHistory/1</id>
<content type="text/xml">
<FamilyHistory xmlns="http://hl7.org/fhir">
<subject>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<relation>
<relationship>
<coding>
<system value="http://hl7.org/fhir/v3/RoleCode"/>
<code value="FTH"/>
<display value="Father"/>
</coding>
</relationship>
<deceasedBoolean value="true"/>
<condition>
<type>
<coding>
<system value="http://snomed.info/sct"/>
<code value="315619001"/>
<display value="Myocardial Infarction"/>
</coding>
</type>
<outcome>
<coding>
<system value="http://snomed.info/sct"/>
<code value="419099009"/>
<display value="died"/>
</coding>
</outcome>
</condition>
<condition>
<type>
<coding>
<system value="http://snomed.info/sct"/>
<code value="44054006"/>
<display value="Diabetes mellitus type 2"/>
</coding>
</type>
</condition>
</relation>
<relation>
<relationship>
<coding>
<system value="http://hl7.org/fhir/v3/RoleCode"/>
<code value="MTH"/>
<display value="Mother"/>
</coding>
</relationship>
<deceasedBoolean value="false"/>
<condition>
<type>
<coding>
<system value="http://snomed.info/sct"/>
<code value="371041009"/>
<display value="Embolic Stroke"/>
</coding>
<text value="Stroke"/>
</type>
<outcome>
<coding>
<system value="http://snomed.info/sct"/>
<code value="409624004"/>
<display value="Incomplete paralysis"></display>
</coding>
</outcome>
<onsetAge>
<value value="56"/>
<units value="a"/>
<system value="http://unitsofmeasure.org"/>
</onsetAge>
</condition>
</relation>
</FamilyHistory>
</content>
</entry>
<!-- lab results -->
<entry>
<title>Lab results</title>
<id>http://hl7.nl/GenoGeg/Labresults/1</id>
<content type="text/xml">
<!-- thee whole test is 1 entry, and every labvalue is a separte entry. -->
<DiagnosticReport xmlns="http://hl7.org/fhir">
<status value="final"/>
<issued value="2014-01-22"/>
<subject>
<reference value="http://hl7.nl/GenoGeg/Performer/1"/>
</subject>
<performer>
<reference value="http://hl7.nl/GenoGeg/Performer/1"/>
</performer>
<serviceCategory>
<coding>
<system value="http://hl7.org/fhir/v2/0074"/>
<code value="HM"/>
<display value="Hematology"/>
</coding>
</serviceCategory>
<diagnosticDateTime value="2014-01-22"/>
<results>
<name>
<coding>
<system value="http://loinc.org"/>
<code value="11502-2"/>
<display value="Laboratory report"/>
</coding>
</name>
<specimen>
<reference value = "http://hl7.nl/GenoGeg/Monster/1"/>
<display value="Blood"/>
</specimen>
<group>
<name>
<coding>
<system value="http://snomed.info/sct"/>
<code value="Hematology"/>
<display value="Hematology"/>
</coding>
</name>
<!-- verwijst naar de hemoglobine entry -->
<result>
<reference value="http://hl7.nl/GenoGeg/Observation/1"/>
<display value="Hemaglobin" />
</result>
<!--
<result>
<reference value="Hct"/>
</result>
<result>
<reference value="Wbc"/>
</result>
<result>
<reference value="PT"/>
</result>
<result>
<reference value="INR"/>
</result> -->
</group>
<group>
<name>
</name>
</group>
</results>
<conclusion value="Normal values, no further comments"/> <!-- text!!-->
<codedDiagnosis>
<coding>
<system value="http://hl7.org/fhir/vs/clinical-findings"/>
<code value="170968001"/>
<display value="Good prognosis"/>
</coding>
</codedDiagnosis>
</DiagnosticReport>
</content>
</entry>
<!-- monster -->
<entry>
<title>Bloodwork</title>
<id>http://hl7.nl/GenoGeg/Monster/1</id>
<content type="text/xml">
<Specimen xmlns="http://hl7.org/fhir">
<type>
<coding>
<system value="http://hl7.org/fhir/v2/vs/0487"/>
<code value="BPU"/>
<display value="Blood product unit"/>
</coding>
</type>
<subject>
<reference value="ttp://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<accessionIdentifier id="12345689vu"/>
<collection>
<collector>
<reference value="http://hl7.nl/GenoGeg/Performer/1"/>
</collector>
<comment value="Bij het afnemen van het bloed is er twee keer misgeprikt"/>
<collectedTime value="2014-01-28T07:03:00"/>
<method>
<coding>
<system value="http://hl7.org/fhir/v2/0488"/>
<code value="LNA"/>
<display value="Line, Arterial"/>
</coding>
</method>
</collection>
</Specimen>
</content>
</entry>
<!-- Hb -->
<entry>
<title>Hemaglobine</title>
<id>http://hl7.nl/GenoGeg/Observation/1</id>
<content type="text/xml">
<Observation xmlns="http://hl7.org/fhir">
<name>
<coding>
<system value="http://loinc.org"/>
<code value="28540-3"/>
<display value="Erythrocyte mean corpuscular hemoglobin concentration [Mass/volume]"/>
</coding>
</name>
<valueQuantity>
<value value="34"/>
<units value="g/dl"/>
<system value="http://unitsofmeasure.org"/>
<code value="g/dl"/>
</valueQuantity>
<interpretation>
<coding>
<system value="http://hl7.org/fhir/v2/0078"/>
<code value="N"/>
<display value="normal"/>
</coding>
</interpretation>
<status value="final"/>
<reliability value="ok"/>
<referenceRange>
<low>
<value value="13.8"/>
<units value="g/dl"/>
<system value="http://unitsofmeasure.org"/>
<code value="g/dl"/>
</low>
<high>
<value value="18.0"/>
<units value="g/dl"/>
<system value="http://unitsofmeasure.org"/>
<code value="g/dl"/>
</high>
<meaning>
<coding>
<system value="http://snomed.info/sct"/>
<code value="248153007"/>
<display value="Male"/>
</coding>
</meaning>
</referenceRange>
<referenceRange>
<low>
<value value="12.1"/>
<units value="g/dl"/>
<system value="http://unitsofmeasure.org"/>
<code value="g/dl"/>
</low>
<high>
<value value="15.1"/>
<units value="g/dl"/>
<system value="http://unitsofmeasure.org"/>
<code value="g/dl"/>
</high>
<meaning>
<coding>
<system value="http://snomed.info/sct"/>
<code value="248152002"/>
<display value="Female"/>
</coding>
</meaning>
</referenceRange>
</Observation>
</content>
</entry>
<!-- Alert, Latex Allergy-->
<entry>
<title>Alert Latex Allergy</title>
<id>http://hl7.nl/GenoGeg/Alert/1</id>
<content type="text/xml">
<Alert xmlns="http://hl7.org/fhir">
<extension url="http://nfu.nl/fhir/profiles/GoGProfile#AlertAllergy">
<valueResource>
<reference value="http://hl7.nl/GenoGeg/Allergy/1"/>
</valueResource>
</extension>
<category>
<coding>
<system value="local"/>
<code value="clinical"/>
<display value="clinical"/>
</coding>
</category>
<status value="active"/>
<subject >
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<note value="Patient is extremely allergic to Latex, do not wear latex gloves!"/>
</Alert>
</content>
</entry>
<!-- Allergy/Intolerance -->
<entry>
<title>Allergic to Latex</title>
<id>http://hl7.nl/GenoGeg/Allergy/1</id>
<content type="text/xml">
<AllergyIntolerance xmlns="http://hl7.org/fhir">
<criticality value="high"/>
<sensitivityType value="allergy"/>
<recordedDate value="1990-01-01"/>
<status value="confirmed"/>
<subject>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<substance>
<reference value="http://hl7.nl/GenoGeg/substance/latex"/>
</substance>
<reaction >
<reference value="http://hl7.nl/GenoGeg/reaction/anaphylaxis"/>
</reaction>
</AllergyIntolerance>
</content>
</entry>
<!-- Substance: Latex -->
<entry>
<title>Latex</title>
<id>http://hl7.nl/GenoGeg/substance/latex</id>
<content type="text/xml">
<Substance xmlns="http://hl7.org/fhir">
<type>
<coding>
<system value="http://snomed.info/sct"/>
<code value="111088007"/>
<display value="Latex"/>
</coding>
</type>
</Substance>
</content>
</entry>
<!-- Adverse Reaction: Anaphylaxis -->
<entry>
<title>Rash</title>
<id>http://hl7.nl/GenoGeg/reaction/anaphylaxis</id>
<content type="text/xml">
<AdverseReaction xmlns="http://hl7.org/fhir">
<subject>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<didNotOccurFlag value="true"/>
<symptom>
<code>
<coding>
<system value="http://snomed.info/sct"/>
<code value="441593005"/>
<display value="Anaphylaxis due to latex (disorder)"/>
</coding>
</code>
<severity value="severe"/>
</symptom>
</AdverseReaction>
</content>
</entry>
<!-- Alert: MRSA carrier -->
<entry>
<title>Alert MRSA carrier</title>
<id>http://hl7.nl/GenoGeg/Alert/2</id>
<content type="text/xml">
<Alert xmlns="http://hl7.org/fhir">
<extension url="http://nfu.nl/fhir/profiles/GoGProfile#AlertCondition">
<valueResource>
<reference value="http://hl7.nl/GenoGeg/Condition/1"/>
</valueResource>
</extension>
<category>
<coding>
<system value="local"/>
<code value="clinical"/>
<display value="clinical"/>
</coding>
</category>
<status value="active"/>
<subject >
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<note value="Methicillin resitant staphylococcus aureus carrier"/>
</Alert>
</content>
</entry>
<!-- Condition: MRSA infection -->
<entry>
<title>Methicillin resitant staphylococcus aureus carrier</title>
<id>http://hl7.nl/GenoGeg/Condition/1</id>
<content type="text/xml">
<Condition xmlns="http://hl7.org/fhir">
<subject>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<dateAsserted value="2014-01-01"/>
<code>
<coding>
<system value="http://snomed.info/sct"/>
<code value="266096002"/>
<display value="Methicillin resistant Staphylococcus aureus infection (disorder)"/>
</coding>
</code>
<status value="confirmed"/>
</Condition>
</content>
</entry>
<!-- Alert: Contraindication -->
<entry>
<title>Alert Contra Indication</title>
<id>http://hl7.nl/GenoGeg/Alert/3</id>
<content type="text/xml">
<Alert xmlns="http://hl7.org/fhir">
<extension url="http://nfu.nl/fhir/profiles/GoGProfile#AlertCondition">
<valueResource>
<reference value="http://hl7.nl/GenoGeg/Medication/1"/>
<display value="Aspirin"/>
</valueResource>
</extension>
<extension url="http://nfu.nl/fhir/profiles/GoGProfile#AlertCondition">
<valueResource>
<reference value="http://hl7.nl/GenoGeg/Medication/2"/>
<display value="Warfarin"/>
</valueResource>
</extension>
<category>
<coding>
<system value="local"/>
<code value="clinical"/>
<display value="clinical"/>
</coding>
</category>
<status value="active"/>
<subject >
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<note value="Do not give the patient Aspirin, because of Warfarin subscribtion "/>
</Alert>
</content>
</entry>
<!-- Plan of care -->
<entry>
<title>Plan of Care</title>
<id>http://hl7.nl/GenoGeg/CarePlan/1</id>
<content type="text/xml">
<CarePlan xmlns="http://hl7.org/fhir">
<patient>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</patient>
<status value="planned"/>
<activity>
<prohibited value="true"/>
<detail>
<reference value="http://hl7.nl/GenoGeg/Encounter/1"/>
</detail>
</activity>
<activity>
<prohibited value="true"/>
<simple>
<category value="observation"/>
<code>
<coding>
<system value="http://snomed.info/sct"/>
<code value="23426006"/>
<display value="Pulmonary function test"/>
</coding>
</code>
<timingPeriod>
<start value="2014-01-01"/>
<end value="2014-01-02"/>
</timingPeriod>
</simple>
</activity>
<activity>
<prohibited value="true"/>
<simple>
<category value="procedure"/>
<code>
<coding>
<system value="http://snomed.info/sct"/>
<code value="310634005"/>
<display value="Colonoscopy"/>
</coding>
</code>
<timingPeriod>
<start value="2014-01-03"/>
<end value="2014-01-04"/>
</timingPeriod>
</simple>
</activity>
<activity>
<prohibited value="true"/>
<simple>
<category value="procedure"/>
<code>
<coding>
<system value="http://snomed.info/sct"/>
<code value="23426006"/>
<display value="Pulmonary function test"/>
</coding>
</code>
<timingPeriod>
<start value="2014-01-05"/>
<end value="2014-01-06"/>
</timingPeriod>
</simple>
</activity>
<activity>
<prohibited value="true"/>
<simple>
<category value="drug"/>
<code>
<coding>
<system value="RxNorm"/>
<code value="329498"/>
<display value="Albuterol 0.09 MG/ACTUAT inhalant solution"/>
</coding>
</code>
</simple>
</activity>
<activity>
<prohibited value="true"/>
<simple>
<category value="supply"/>
<code>
<coding>
<system value="http://snomed.info/sct"/>
<code value="387458008"/>
<display value="aspirin"/>
</coding>
</code>
</simple>
</activity>
</CarePlan>
</content>
</entry>
<!-- Medication -->
<entry>
<title>Medication - Aspirin</title>
<id>http://hl7.nl/GenoGeg/Medication/1</id>
<content type="text/xml">
<Medication xmlns="http://hl7.org/fhir">
<code>
<!-- Could be of the G-standard, else, fill out other field like below -->
<coding>
<system value="http://snomed.info/sct"/>
<code value="26643006"/>
<display value="Oral route (qualifier value)"/>
</coding>
</code>
<kind value="product"/>
<product>
<form>
<coding>
<system value="http://snomed.info/sct"/>
<code value="421026006"/>
<display value="Oral tablet (qualifier value)"/>
</coding>
</form>
<ingredient>
<item>
<reference value="http://hl7.nl/GenoGeg/Ingredient/1"/>
</item>
<amount>
<numerator>
<value value="250"/>
</numerator>
<denominator>
<value value="1"/>
</denominator>
</amount>
</ingredient>
</product>
</Medication>
</content>
</entry>
<!-- Substance aspirin -->
<entry>
<title>Substance Aspirin</title>
<id>http://hl7.nl/GenoGeg/Substance/2</id>
<content type="text/xml">
<Substance xmlns="http://hl7.org/fhir">
<type>
<coding>
<system value="http://snomed.info/sct"/>
<code value="387458008"/>
<display value="Aspirin (substance)"/>
</coding>
</type>
</Substance>
</content>
</entry>
<!-- Medication Statement -->
<entry>
<title>Taken medication</title>
<id>http://hl7.nl/GenoGeg/MedicationStatement/1</id>
<content type="text/xml">
<MedicationStatement xmlns="http://hl7.org/fhir">
<patient>
<reference value="http://hl7.nl/GenoGeg/Patient/1" />
</patient>
<whenGiven>
<start value="2014-01-01"/>
</whenGiven>
<medication>
<reference value="http://hl7.nl/GenoGeg/Medication/1"/>
</medication>
<dosage>
<timing>
<!-- 1/2 an hour before breakfast from 1 jan -->
<event>
<start value="2014-01-01" />
</event>
<repeat>
<when value="ACM" />
<duration value="30" />
<units value="min" />
</repeat>
</timing>
<route>
<coding>
<system value="http://snomed.info/sct"/>
<code value="394899003"/>
<display value="oral administration of treatment"/>
</coding>
</route>
<quantity>
<value value="2"/>
<units value="tablets"/>
<system value="http://unitsofmeasure.org/"/>
</quantity>
</dosage>
</MedicationStatement>
</content>
</entry>
<!-- Medication Administration -->
<entry>
<title>Medication administration</title>
<id>http://hl7.nl/GenoGeg/MedicationAdministration/1</id>
<content type="text/xml">
<MedicationAdministration xmlns="http://hl7.org/fhir">
<status value="completed"/>
<patient>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</patient>
<practitioner>
<reference value="http://hl7.nl/GenoGeg/Performer/1"/>
</practitioner>
<prescription>
<reference value="http://hl7.nl/GenoGeg/MedicationPrescription/1"/>
</prescription>
<whenGiven>
<start value="2014-01-01"/>
</whenGiven>
<medication>
<reference value="http://hl7.nl/GenoGeg/Medication/1"/>
</medication>
<dosage>
<timing>
<!-- 1/2 an hour before breakfast from 1 jan -->
<event>
<start value="2014-01-01" />
</event>
<repeat>
<when value="ACM" />
<duration value="30" />
<units value="min" />
</repeat>
</timing>
<route>
<coding>
<system value="http://snomed.info/sct"/>
<code value="394899003"/>
<display value="oral administration of treatment"/>
</coding>
</route>
<quantity>
<value value="2"/>
<units value="tablets"/>
<system value="http://unitsofmeasure.org/"/>
</quantity>
</dosage>
</MedicationAdministration>
</content>
</entry>
<!-- Barthel index - questionnaire -->
<entry>
<title>Barthel index</title>
<id>http://hl7.nl/GenoGeg/Questionnaire/1</id>
<content type="text/xml">
<Questionnaire xmlns="http://hl7.org/fhir">
<status value="completed"/>
<authored value="2014-01-01"/>
<subject>
<reference value="http://hl7.nl/GenoGeg/Patient/1"/>
</subject>
<group>
<name>
<coding>
<system value="http://snomed.info/sct"/>
<code value="273302005"/>
<display value="Barthel index (assessment scale)"/>
</coding>
</name>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlB525"/>
<display value="Darm"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.4"/>
<display value="Darm"/>
</coding>
</name>
<text value="Darmfunctie. Voorgaande week: Indien klysma noodzakelijk is dan wordt 
dit aangemerkt als 'incontinent'. Af en toe = 1 keer per week."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="2"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.1"/>
<code value="FECAL3"/>
<display value="continent"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlB6202"/>
<display value="Blaas"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.3"/>
<display value="Blaas"/>
</coding>
</name>
<text value="Blaasfunctie. Voorgaande week: Af en toe = 1 keer per dag. Een patiënt die 
zijn catheter zelf kan verzorgen wordt aangemerkt als 'continent'. "/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="2"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.2"/>
<code value="URIN3"/>
<display value="continent"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD520"/>
<display value="UiterlijkeVerzorging"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.5"/>
<display value="UiterlijkeVerzorging"/>
</coding>
</name>
<text value="Voorgaande 24‐48 uur: Verwijst naar persoonlijke verzorging zoals 
tandenpoetsen, scheren en wassen. Hierbij benodigde attributen mogen 
worden aangereikt."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="1"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.3"/>
<code value="GROOM2"/>
<display value="onafhankelijk(gezicht, haar, tanden, scheren)"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD530"/>
<display value="Toiletgebruik"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.6"/>
<display value="Toiletgebruik"/>
</coding>
</name>
<text value="Zelfstandigheid bij toiletgebruik. Met hulp = kan zich afvegen en enige van 
bovenstaande handelingen uitvoeren. Onafhankelijk = in staat om naar 
toilet te gaan, zich voldoende uit te kleden, schoon te maken, aan te kleden 
en weg te gaan."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="2"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.4"/>
<code value="TOIL3"/>
<display value="onafhankelijk(op en af, uit en aankleden, afvegen)"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD550"/>
<display value="Eten"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.7"/>
<display value="Eten"/>
</coding>
</name>
<text value="Zelfstandigheid bij eten. Hulp = voedsel wordt fijngemaakt; patiënt eet zelf. 
In staat om normaal voedsel (ook hard voedsel) te eten. (Het eten mag 
gekookt en geserveerd worden door anderen maar mag niet worden 
fijngemaakt)."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="2"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.5"/>
<code value="FEED3"/>
<display value="onafhankelijk"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD420"/>
<display value="Transfers"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.8"/>
<display value="Transfers"/>
</coding>
</name>
<text value="Transfer van bed naar stoel en terug. Afhankelijk = niet in staat om te 
zitten; er wordt gebruik gemaakt van tillift. Veel hulp = een sterk, getraind 
persoon of 2 gewone personen; patiënt kan rechtop zitten. Weinig hulp = 
een persoon voor toezicht of enige hulp."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="3"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.6"/>
<code value="TRANS4"/>
<display value="onafhankelijk"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD450"/>
<display value="Mobiliteit"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.9"/>
<display value="Mobiliteit"/>
</coding>
</name>
<text value="Zelfstandigheid bij zich verplaatsen. Hulp = een ongetraind persoon, incl. 
toezicht en morele steun. Onafhankelijk = kan zich verplaatsen in huis of op 
afdeling; hulpmiddel mag worden gebruikt. Een patiënt in rolstoel moet 
zonder hulp met hoeken en deuren kunnen omgaan."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="3"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.7"/>
<code value="MOBIL4"/>
<display value="onafhankelijk"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD540"/>
<display value="AanUitkleden"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.10"/>
<display value="AanUitkleden"/>
</coding>
</name>
<text value="Hulp bij aan‐ en uitkleden. De helft = alleen hulp bij knopen, ritssluitingen 
enz.; kan enkele kledingstukken zelf aandoen. Onafhankelijk = in staat 
kleren te kiezen en aan te doen."/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="2"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.8"/>
<code value="DRESS3"/>
<display value="onafhankelijk"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD460"/>
<display value="TrappenLopen"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.11"/>
<display value="Trappenlopen"/>
</coding>
</name>
<text value="Hulp bij traplopen. Onafhankelijk = kan eventueel hulpmiddel zelf dragen"/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="2"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.9"/>
<code value="CLIMB3"/>
<display value="onafhankelijk"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="CVA-KIS"/>
<code value="BrtlD510"/>
<display value="BadenDouchen"/>
</coding>
<coding>
<system value="NL‐CM"/>
<code value="4.2.12"/>
<display value="BadenDouchen"/>
</coding>
</name>
<text value="Hulp bij baden/douchen. Onafhankelijk = zonder toezicht of hulp in en uit
bad stappen en zichzelf wassen"/>
<choice>
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="1"/>
</extension>
<system value="urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2.4.2.10"/>
<code value="BATH2"/>
<display value="onafhankelijk"/>
</choice>
</question>
<question>
<name>
<coding>
<system value="NL:CM"/>
<code value="4.2.2"/>
<display value="Totaal Score"/>
</coding>
</name>
<text value="De score van de Barthel index is de som van de scores op de afzonderlijke 
variabelen. De interpretatie van deze totaalscore is 0‐9 voor ernstig beperkt, 10‐19 
voor matig beperkt en 20 voor zelfstandig. 20 Is ook de maximale score. "/>
<answerInteger value="20"/>
</question>
</group>
</Questionnaire>
</content>
</entry>
</feed>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns="http://www.w3.org/2005/Atom"
exclude-result-prefixes="xs xd"
xpath-default-namespace="urn:hl7-org:v3"
version="2.0">
<!-- Pretty print -->
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="yes" />
<!-- Remove text between nodes -->
<xsl:template match="text()" />
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p><xd:b>Created on:</xd:b> April 1, 2014</xd:p>
<xd:p><xd:b>Author:</xd:b> Marten Smits</xd:p>
<xd:p>Generates an FHIR barthel index message from a CDA message.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="act">
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/Atom schema/fhir-atom.xsd"
xmlns="http://www.w3.org/2005/Atom">
<entry>
<title>Alert AllergyIntolerance</title>
<id>http://hl7.nl/GenoGeg/Alert/1</id>
<content type="text/xml">
<Alert xmlns="http://hl7.org/fhir">
<extension url="http://nfu.nl/fhir/profiles/GoGProfile#AlertAllergy">
<valueResource>
<reference value="http://hl7.nl/GenoGeg/Allergy/1"/>
</valueResource>
</extension>
<category>
<coding>
<system value="local"/>
<code value="clinical"/>
<display value="clinical"/>
</coding>
</category>
<status value="active"/>
<subject >
<reference value="patient"/>
</subject>
<note value="Alert!"/>
</Alert>
</content>
</entry>
<!-- Allergy/Intolerance -->
<entry>
<title>AllergyIntolerance</title>
<id>http://hl7.nl/GenoGeg/Allergy/1</id>
<content type="text/xml">
<AllergyIntolerance xmlns="http://hl7.org/fhir">
<criticality value="high"/>
<xsl:apply-templates select="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/value"/>
<xsl:apply-templates select="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/effectiveTime/low"/>
<status value="confirmed"/>
<subject>
<reference value="patient"/>
</subject>
<substance>
<reference value="http://hl7.nl/GenoGeg/substance/1"/>
</substance>
<reaction >
<reference value="http://hl7.nl/GenoGeg/reaction/1"/>
</reaction>
</AllergyIntolerance>
</content>
</entry>
<!-- Substance-->
<xsl:apply-templates select="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/participant/participantRole/playingEntity"/>
<!-- Adverse Reaction: Anaphylaxis -->
<xsl:apply-templates select="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/entryRelationship/observation"/>
</feed>
</xsl:template>
<xsl:template match="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/effectiveTime/low">
<xsl:variable name="value" select="@value"/>
<recordedDate xmlns="http://hl7.org/fhir">
<xsl:attribute name="value">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="$value"/>
</xsl:call-template>
</xsl:attribute>
</recordedDate>
</xsl:template>
<xsl:template name="formatdate">
<xsl:param name="datestr" />
<!-- input format yyyymmdd -->
<!-- output format yyyy-mm-dd -->
<xsl:variable name="dd">
<xsl:value-of select="substring($datestr,7,2)" />
</xsl:variable>
<xsl:variable name="mm">
<xsl:value-of select="substring($datestr,5,2)" />
</xsl:variable>
<xsl:variable name="yyyy">
<xsl:value-of select="substring($datestr,1,4)" />
</xsl:variable>
<xsl:value-of select="$yyyy" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$dd" />
</xsl:template>
<xsl:template match="playingEntity">
<entry>
<title>Substance</title>
<id>http://hl7.nl/GenoGeg/substance/1</id>
<content type="text/xml">
<Substance xmlns="http://hl7.org/fhir">
<type>
<xsl:apply-templates select="code"/>
</type>
</Substance>
</content>
</entry>
</xsl:template>
<xsl:template match="playingEntity/code">
<xsl:choose>
<xsl:when test="@codeSystem='2.16.840.1.113883.6.96'">
<coding xmlns="http://hl7.org/fhir">
<system value="http://snomed.info/sct"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:when test="@codeSystem='2.16.840.1.113883.4.9'">
<coding xmlns="http://hl7.org/fhir">
<system value="UNII"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:otherwise>
<coding xmlns="http://hl7.org/fhir">
<system value="{@codeSystemName}"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="act/entryRelationship/observation/entryRelationship/observation">
<entry>
<title>Observation</title>
<id>http://hl7.nl/GenoGeg/reaction/1</id>
<content type="text/xml">
<AdverseReaction xmlns="http://hl7.org/fhir">
<xsl:apply-templates select="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/entryRelationship/observation/effectiveTime/low"/>
<subject>
<reference value="patient"/>
</subject>
<xsl:choose>
<xsl:when test="@negationInd='true'">
<didNotOccurFlag value="true"/>
</xsl:when>
<xsl:otherwise>
<didNotOccurFlag value="false"/>
</xsl:otherwise>
</xsl:choose>
<symptom>
<code>
<xsl:apply-templates select="value"/>
</code>
<xsl:apply-templates select="ancestor::entryRelationship/observation/entryRelationship/observation/code"/>
</symptom>
</AdverseReaction>
</content>
</entry>
</xsl:template>
<xsl:template match="act/entryRelationship/observation/entryRelationship/observation/value">
<xsl:choose>
<xsl:when test="@codeSystem='2.16.840.1.113883.6.96'">
<coding xmlns="http://hl7.org/fhir">
<system value="http://snomed.info/sct"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:when test="@codeSystem='2.16.840.1.113883.4.9'">
<coding xmlns="http://hl7.org/fhir">
<system value="UNII"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:otherwise>
<coding xmlns="http://hl7.org/fhir">
<system value="{@codeSystemName}"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/value">
<xsl:if test="@code='419199007' or @code='416098002' or @code='414285001' ">
<sensitivityType xmlns="http://hl7.org/fhir" value="allergy"/>
</xsl:if>
<xsl:if test="@code='59037007' or @code='235719002'">
<sensitivityType xmlns="http://hl7.org/fhir" value="intolerance"/>
</xsl:if>
<xsl:if test="@code='418471000' or @code='419511003' or @code='418038007' or @code='420134006'">
<sensitivityType xmlns="http://hl7.org/fhir" value="unknown"/>
</xsl:if>
</xsl:template>
<xsl:template match="observation/entryRelationship/observation/code">
<xsl:if test="@code = 'SEV'">
<severity xmlns="http://hl7.org/fhir" value="severe"/>
</xsl:if>
</xsl:template>
<xsl:template match="/ClinicalDocument/component/structuredBody/component/section/entry/act/entryRelationship/observation/entryRelationship/observation/effectiveTime/low">
<xsl:variable name="value" select="@value"/>
<reactionDate xmlns="http://hl7.org/fhir">
<xsl:attribute name="value">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="$value"/>
</xsl:call-template>
</xsl:attribute>
</reactionDate>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns="http://hl7.org/fhir"
exclude-result-prefixes="xs xd"
xpath-default-namespace="urn:hl7-org:v3"
version="2.0">
<!-- Pretty print -->
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="yes" />
<!-- Remove text between nodes -->
<xsl:template match="text()" />
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p><xd:b>Created on:</xd:b> April 1, 2014</xd:p>
<xd:p><xd:b>Author:</xd:b> Marten Smits</xd:p>
<xd:p>Generates an FHIR barthel index message from a CDA message.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="observation">
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/Atom schema/fhir-atom.xsd"
xmlns="http://www.w3.org/2005/Atom">
<entry>
<title>Bartel index</title>
<id>http://hl7.nl/GenoGeg/Questionnaire/1</id>
<content type="text/xml">
<Questionnaire xmlns="http://hl7.org/fhir">
<xsl:apply-templates select="statusCode"/>
<xsl:apply-templates select="effectiveTime/low"/>
<subject>
<reference value="patient"/>
</subject>
<group>
<name>
<xsl:apply-templates select="code"/>
</name>
<xsl:apply-templates select="entryRelationship"/>
</group>
</Questionnaire>
</content>
</entry>
</feed>
</xsl:template>
<xsl:template match="statusCode">
<status value="{@code}"/>
</xsl:template>
<xsl:template match="observation/effectiveTime/low">
<authored>
<xsl:attribute name="value">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="@value"/>
</xsl:call-template>
</xsl:attribute>
</authored>
</xsl:template>
<xsl:template name="formatdate">
<xsl:param name="datestr" />
<!-- input format yyyymmdd -->
<!-- output format yyyy-mm-dd -->
<xsl:variable name="dd">
<xsl:value-of select="substring($datestr,7,2)" />
</xsl:variable>
<xsl:variable name="mm">
<xsl:value-of select="substring($datestr,5,2)" />
</xsl:variable>
<xsl:variable name="yyyy">
<xsl:value-of select="substring($datestr,1,4)" />
</xsl:variable>
<xsl:value-of select="$yyyy" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$dd" />
</xsl:template>
<xsl:template match="entryRelationship">
<question>
<name>
<xsl:apply-templates select="observation/code"/>
</name>
<!-- The question is not in the C-CDA messages. -->
<text value="The question"/>
<choice>
<xsl:apply-templates select="observation/value"/>
</choice>
</question>
</xsl:template>
<xsl:template match="observation/code">
<xsl:choose>
<xsl:when test="@codeSystem='2.16.840.1.113883.6.96'">
<coding>
<system value="http://snomed.info/sct"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:otherwise>
<coding>
<system value="{@codeSystemName}"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="translation"/>
</xsl:template>
<xsl:template match="translation">
<coding>
<system value="{@codeSystemName}"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:template>
<xsl:template match="observation/value">
<extension url="http://hl7.org/fhir/Profile/iso-21090#CO.value">
<valueInteger value="{@code}"/>
</extension>
<xsl:apply-templates select="ancestor::observation/interpretationCode"/>
<display value="{@displayName}"/>
</xsl:template>
<xsl:template match="observation/interpretationCode">
<system value="urn:OID:{@codeSystem}"/>
<code value="{@code}"/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns="http://hl7.org/fhir"
exclude-result-prefixes="xs xd"
xpath-default-namespace="urn:hl7-org:v3"
version="2.0">
<!-- Pretty print -->
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="yes" />
<!-- Remove text between nodes -->
<xsl:template match="text()" />
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p><xd:b>Created on:</xd:b> April 1, 2014</xd:p>
<xd:p><xd:b>Author:</xd:b> Marten Smits</xd:p>
<xd:p>Generates a FHIR message from a CDA message.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="/">
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/Atom schema/fhir-atom.xsd"
xmlns="http://www.w3.org/2005/Atom">
<xsl:apply-templates select="ClinicalDocument/title"/>
<id>urn:uuid:500bee81-d973-4afe-b592-d39fe71e38</id>
<author>
<name>Marten Smits</name>
</author>
<category term="http://hl7.org/fhir/tag/document" scheme="http://hl7.org/fhir/tag" />
<!-- The composition -->
<entry>
<!-- the 'cid' protocol means this is a new composition -->
<id>http://hl7.nl/GenoGeg/Composition</id>
<content type="text/xml">
<Composition xmlns="http://hl7.org/fhir">
<instant value='2013-06-06T12:30:00'/> <!-- the time this document was created -->
<!-- What type of document is this - eg Discharge Summary, referral, Consultation note -->
<type>
<xsl:apply-templates select="ClinicalDocument/code"/>
</type>
<status value="final"/> <!-- not specified in C-CDA -->
<confidentiality> <!-- not specified in C-CDA (GenoGeg) -->
<system value='http://hl7.org/fhir/v3/Confidentiality'/>
<code value='N'/>
<display value="normal"/>
</confidentiality>
<subject> <!-- C-CDA is not hierarchic, FHIR is, problem??? -->
<reference value='cid:patient'/>
<display value="Patient"/>
</subject>
<author>
<reference value='cid:author'/>
<display value="Author"/>
</author>
</Composition>
</content>
</entry>
<!-- Subject (Patient) -->
<entry>
<title>The subject of the document</title>
<id>cid:patient</id>
<content type="text/xml">
<!-- Sample content only -->
<Patient xmlns="http://hl7.org/fhir">
<!-- VIP indicator is not in FHIR, hence an extension -->
<extension url="http://nfu.nl/fhir/Profiles/GoGProfile#VIPindicator">
<valueCoding>
<system value="http://nfu.nl/fhir/Profiles/GoGProfile#VIPindicator"/>
<code value="SMF"/>
<display value="Staff member family"/>
</valueCoding>
</extension>
<!-- social securuty number (dutch) is not in FHIR, hence an extension -->
<extension url="http://nfu.nl/fhir/Profiles/GoGProfile#BSN">
<valueString value="123456789"/>
</extension>
<xsl:apply-templates select="ClinicalDocument/recordTarget/patientRole/patient/name"/>
<xsl:apply-templates select="ClinicalDocument/recordTarget/patientRole/telecom"/>
<xsl:apply-templates select="ClinicalDocument/recordTarget/patientRole/patient/administrativeGenderCode"/>
<xsl:apply-templates select="ClinicalDocument/recordTarget/patientRole/patient/birthTime"/>
<!-- deceasedBoolean is an extension in CDA -->
<deceasedBoolean value="false" />
<xsl:apply-templates select="ClinicalDocument/recordTarget/patientRole/addr"/>
<!-- multipleBirthBoolean is an extension in CDA -->
<multipleBirthBoolean value="true"/>
</Patient>
</content>
</entry>
</feed>
</xsl:template>
<xsl:template match="title">
<title xmlns="http://www.w3.org/2005/Atom"><xsl:value-of select="/ClinicalDocument/title"/></title>
</xsl:template>
<xsl:template match="code">
<coding>
<system value="{@codeSystemName}"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:template>
<xsl:template match="name">
<name>
<use value = "official"/>
<family>
<xsl:choose>
<xsl:when test="family[@qualifier='SP']">
<xsl:attribute name="value">
<xsl:value-of select="family[@qualifier='SP']"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="value">
<xsl:value-of select="family[not(@qualifier)]"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</family>
<given>
<xsl:choose>
<xsl:when test="given[@qualifier='BR']">
<xsl:attribute name="value">
<xsl:value-of select="given[@qualifier='BR']"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="given[@qualifier='IN']">
<xsl:attribute name="value">
<xsl:value-of select="given[@qualifier='IN']"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="value">
<xsl:value-of select="given[not(@qualifier)]"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</given>
<xsl:if test="prefix">
<prefix>
<xsl:value-of select="prefix"/>
</prefix>
</xsl:if>
</name>
<xsl:apply-templates select="family"/>
<xsl:apply-templates select="given"/>
</xsl:template>
<xsl:template match="family[@qualifier='BR']">
<name>
<use value="maiden"/>
<family>
<xsl:attribute name="value">
<xsl:value-of select="self::family"/>
</xsl:attribute>
</family>
</name>
</xsl:template>
<xsl:template match="given[@qualifier='CL']">
<name>
<use value="usual"/>
<given>
<xsl:attribute name="value">
<xsl:value-of select="self::given"/>
</xsl:attribute>
</given>
</name>
</xsl:template>
<xsl:template match="telecom">
<xsl:variable name="value" select="@value"/>
<xsl:if test="self::telecom[@use='HP']">
<xsl:if test='matches($value, "tel:.*")'>
<telecom>
<system value="phone"/>
<value value= "{substring($value,5)}"/>
<xsl:choose>
<xsl:when test='matches($value, "tel:06.*")'>
<use value = "mobile"/>
</xsl:when>
<xsl:otherwise>
<use value ="home"/>
</xsl:otherwise>
</xsl:choose>
</telecom>
</xsl:if>
<xsl:if test='matches($value, "mailto:.*")'>
<telecom>
<system value="email"/>
<value value= "{substring($value,8)}"/>
<use value ="home"/>
</telecom>
</xsl:if>
</xsl:if>
<xsl:if test="self::telecom[@use='WP']">
<xsl:if test='matches($value, "tel:.*")'>
<telecom>
<system value="phone"/>
<value value= "{substring($value,5)}"/>
<use value ="work"/>
</telecom>
</xsl:if>
<xsl:if test='matches($value, "mailto:.*")'>
<telecom>
<system value="email"/>
<value value= "{substring($value,8)}"/>
<use value ="work"/>
</telecom>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="administrativeGenderCode">
<gender>
<coding>
<xsl:if test="@codeSystem = '2.16.840.1.113883.5.1'">
<system value = "http://hl7.org/fhir/v3/AdministrativeGender"/>
</xsl:if>
<code value="{@code}"/>
</coding>
</gender>
</xsl:template>
<xsl:template match="birthTime">
<xsl:variable name="value" select="@value"/>
<birthDate>
<xsl:attribute name="value">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="$value"/>
</xsl:call-template>
</xsl:attribute>
</birthDate>
</xsl:template>
<xsl:template name="formatdate">
<xsl:param name="datestr" />
<!-- input format yyyymmdd -->
<!-- output format yyyy-mm-dd -->
<xsl:variable name="dd">
<xsl:value-of select="substring($datestr,7,2)" />
</xsl:variable>
<xsl:variable name="mm">
<xsl:value-of select="substring($datestr,5,2)" />
</xsl:variable>
<xsl:variable name="yyyy">
<xsl:value-of select="substring($datestr,1,4)" />
</xsl:variable>
<xsl:value-of select="$yyyy" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$dd" />
</xsl:template>
<xsl:template match="addr">
<address>
<xsl:if test="@use = 'HP'">
<use value="home"/>
</xsl:if>
<xsl:if test="@use = 'WP'">
<use value="work"/>
</xsl:if>
<line> <!-- No separate field for number -->
<xsl:attribute name="value">
<xsl:value-of select="child::streetName "/>
<xsl:text> </xsl:text> <!-- white space -->
<xsl:value-of select="child::houseNumber"/>
</xsl:attribute>
</line>
<city>
<xsl:attribute name="value">
<xsl:value-of select="child::city"/>
</xsl:attribute>
</city>
<xsl:if test='matches(child::state, ".+")'> <!-- state is optional -->
<state>
<xsl:attribute name="value">
<xsl:value-of select="child::state"/>
</xsl:attribute>
</state>
</xsl:if>
<zip>
<xsl:attribute name="value">
<xsl:value-of select="child::postalCode"/>
</xsl:attribute>
</zip>
<country>
<xsl:attribute name="value">
<xsl:value-of select="child::country"/>
</xsl:attribute>
</country>
</address>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns="http://hl7.org/fhir"
exclude-result-prefixes="xs xd"
xpath-default-namespace="urn:hl7-org:v3"
version="2.0">
<!-- Pretty print -->
<xsl:strip-space elements="*" />
<xsl:output method="xml" indent="yes" />
<!-- Remove text between nodes -->
<xsl:template match="text()" />
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p><xd:b>Created on:</xd:b> April 1, 2014</xd:p>
<xd:p><xd:b>Author:</xd:b> Marten Smits</xd:p>
<xd:p>Generates an FHIR care plan message from a CDA message.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="section">
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2005/Atom schema/fhir-atom.xsd"
xmlns="http://www.w3.org/2005/Atom">
<entry>
<title>Plan of Care</title>
<id>http://hl7.nl/GenoGeg/CarePlan/1</id>
<content type="text/xml">
<CarePlan xmlns="http://hl7.org/fhir">
<patient>
<reference value="patient"/>
</patient>
<status value="planned"/>
<xsl:apply-templates select="entry/encounter"/>
<xsl:apply-templates select="entry/observation"/>
<xsl:apply-templates select="entry/act"/>
<xsl:apply-templates select="entry/procedure"/>
<xsl:apply-templates select="entry/substanceAdministration"/>
<xsl:apply-templates select="entry/supply"/>
<!--More activities can be added-->
</CarePlan>
</content>
</entry>
</feed>
</xsl:template>
<xsl:template match="entry/substanceAdministration">
<activity>
<prohibited value="true"/>
<simple>
<category value="drug"/>
<code>
<xsl:apply-templates select="consumable/manufacturedProduct/manufacturedMaterial/code"/>
</code>
</simple>
</activity>
</xsl:template>
<xsl:template match="entry/encounter">
<activity>
<prohibited value="true"/>
<detail>
<reference value="http://hl7.nl/GenoGeg/Encounter/1"/>
</detail>
</activity>
</xsl:template>
<xsl:template match="entry/observation">
<activity>
<prohibited value="true"/>
<simple>
<category value="observation"/>
<code>
<xsl:apply-templates select="code"/>
</code>
<timingPeriod>
<xsl:apply-templates select="effectiveTime/low"/>
<xsl:apply-templates select="effectiveTime/high"/>
</timingPeriod>
</simple>
</activity>
</xsl:template>
<xsl:template match="entry/procedure | entry/act">
<activity>
<prohibited value="true"/>
<simple>
<category value="procedure"/>
<code>
<xsl:apply-templates select="code"/>
</code>
<timingPeriod>
<xsl:apply-templates select="effectiveTime/low"/>
<xsl:apply-templates select="effectiveTime/high"/>
</timingPeriod>
</simple>
</activity>
</xsl:template>
<xsl:template match="entry/supply">
<activity>
<prohibited value="true"/>
<simple>
<category value="supply"/>
<code>
<xsl:apply-templates select="code"/>
</code>
</simple>
</activity>
</xsl:template>
<xsl:template match="entry/child::*/code | manufacturedMaterial/code">
<xsl:choose>
<xsl:when test="@codeSystem='2.16.840.1.113883.6.96'">
<coding xmlns="http://hl7.org/fhir">
<system value="http://snomed.info/sct"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:when test="@codeSystem='2.16.840.1.113883.4.9'">
<coding xmlns="http://hl7.org/fhir">
<system value="UNII"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:when>
<xsl:otherwise>
<coding xmlns="http://hl7.org/fhir">
<system value="{@codeSystemName}"/>
<code value="{@code}"/>
<display value="{@displayName}"/>
</coding>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="entry/child::*/effectiveTime/low">
<xsl:variable name="value" select="@value"/>
<start xmlns="http://hl7.org/fhir">
<xsl:attribute name="value">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="$value"/>
</xsl:call-template>
</xsl:attribute>
</start>
</xsl:template>
<xsl:template match="entry/child::*/effectiveTime/high">
<xsl:variable name="value" select="@value"/>
<end xmlns="http://hl7.org/fhir">
<xsl:attribute name="value">
<xsl:call-template name="formatdate">
<xsl:with-param name="datestr" select="$value"/>
</xsl:call-template>
</xsl:attribute>
</end>
</xsl:template>
<xsl:template name="formatdate">
<xsl:param name="datestr" />
<!-- input format yyyymmdd -->
<!-- output format yyyy-mm-dd -->
<xsl:variable name="dd">
<xsl:value-of select="substring($datestr,7,2)" />
</xsl:variable>
<xsl:variable name="mm">
<xsl:value-of select="substring($datestr,5,2)" />
</xsl:variable>
<xsl:variable name="yyyy">
<xsl:value-of select="substring($datestr,1,4)" />
</xsl:variable>
<xsl:value-of select="$yyyy" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$mm" />
<xsl:value-of select="'-'" />
<xsl:value-of select="$dd" />
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment