Changeset 814 for ccr2ccd-xslt
- Timestamp:
- Jun 29, 2010, 4:55:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr2ccd-xslt/trunk/ccr_ccd.xsl
r811 r814 303 303 <component> 304 304 <section> 305 <templateId root="2.16.840.1.113883.10.20.1.1"/> 306 <code code="42348-3" codeSystem="2.16.840.1.113883.6.1"/> 305 <templateId root="2.16.840.1.113883.10.20.1.1" assigningAuthorityName="HL7 CCD"/> 306 <templateId root="2.16.840.1.113883.3.88.11.83.116" assigningAuthorityName="HITSP/C83"/> 307 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.35" assigningAuthorityName="IHE PCC"/> 308 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.34" assigningAuthorityName="IHE PCC"/> 309 <!--Advance Directives section template--> 310 <code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance directives"/> 307 311 <title>Advance Directives</title> 308 312 <text> … … 318 322 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:AdvanceDirectives/a:AdvanceDirective"> 319 323 <tr> 324 <xsl:attribute name="id"> 325 <xsl:value-of select="a:CCRDataObjectID"/> 326 </xsl:attribute> 320 327 <td> 321 328 <xsl:value-of select="a:Type/a:Text"/> … … 327 334 </td> 328 335 <td> 336 <xsl:attribute name="id"> 337 <xsl:value-of select="a:CCRDataObjectID"/> 338 <xsl:text>:Narrative</xsl:text> 339 </xsl:attribute> 340 329 341 <xsl:value-of select="a:Description/a:Text"/> 330 342 </td> … … 341 353 </tbody> 342 354 </table> 343 344 355 </text> 356 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:AdvanceDirectives/a:AdvanceDirective"> 357 <entry typeCode="DRIV"> 358 <observation classCode="OBS" moodCode="EVN"> 359 <templateId root="2.16.840.1.113883.3.88.11.83.12" assigningAuthorityName="HITSP C83"/> 360 <templateId root="2.16.840.1.113883.10.20.1.17" assigningAuthorityName="CCD"/> 361 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/> 362 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.7" assigningAuthorityName="IHE PCC"/> 363 <!-- Advance directive observation template --> 364 365 <!-- <id> --> 366 <xsl:call-template name="ccdID"> 367 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 368 </xsl:call-template> 369 370 <text> 371 <reference> 372 <xsl:attribute name="value"> 373 <xsl:text>#</xsl:text> 374 <xsl:value-of select="a:CCRDataObjectID"/> 375 </xsl:attribute> 376 </reference> 377 </text> 378 379 <statusCode code="completed"/> 380 381 <xsl:call-template name="ccdDateTime"> 382 <xsl:with-param name="dt" select="a:DateTime"/> 383 </xsl:call-template> 384 385 <xsl:call-template name="ccdCodedValue"> 386 <xsl:with-param name="ccrCodedDescription" select="a:Description"/> 387 <xsl:with-param name="originalTextReference"> 388 <xsl:text>#</xsl:text> 389 <xsl:value-of select="a:CCRDataObjectID"/> 390 <xsl:text>:Narrative</xsl:text> 391 </xsl:with-param> 392 </xsl:call-template> 393 394 <participant typeCode="VRF"> 395 <templateId root="2.16.840.1.113883.10.20.1.58"/> 396 <!--Verification of an advance directive observation template --> 397 <time nullFlavor="UNK"/> 398 <xsl:call-template name="ccdParticipantRoleActor"> 399 <xsl:with-param name="ccrActorObjectID" select="a:Source[1]/a:ActorID"/> 400 </xsl:call-template> 401 </participant> 402 403 <xsl:if test="a:ReferenceID"> 404 <reference typeCode="REFR"> 405 <externalDocument> 406 <templateId root="2.16.840.1.113883.10.20.1.36"/> 407 <!-- Advance directive reference template --> 408 <xsl:variable name="referenceID" select="a:ReferenceID"/> 409 <!-- <id> --> 410 <xsl:call-template name="ccdID"> 411 <xsl:with-param name="ccrObjectID" select="$referenceID"/> 412 </xsl:call-template> 413 <code code="371538006" codeSystem="2.16.840.1.113883.6.96" displayName="Advance directive"/> 414 <xsl:variable name="reference" select="/a:ContinuityOfCareRecord/a:References/a:Reference[a:ReferenceObjectID=$referenceID]"/> 415 <text> 416 <xsl:attribute name="mediaType"> 417 <xsl:value-of select="$reference/a:Type/a:Text"/> 418 </xsl:attribute> 419 <reference> 420 <xsl:value-of select="$reference/a:Location[1]/a:Description/a:Text"/> 421 </reference> 422 </text> 423 </externalDocument> 424 </reference> 425 </xsl:if> 426 </observation> 427 </entry> 428 429 </xsl:for-each> 345 430 </section> 346 431 </component> … … 832 917 <xsl:with-param name="ccrCodedDescription" select="a:Product/a:ProductName"/> 833 918 <xsl:with-param name="nodeName" select="'code'"/> 834 <xsl:with-param name="domain" select="'RouteOfAdministration'"/>835 919 </xsl:call-template> 836 920 <name> 837 <xsl:value-of select="a:Product/a:BrandName/a:Text" ></xsl:value-of>921 <xsl:value-of select="a:Product/a:BrandName/a:Text"/> 838 922 </name> 839 923 </manufacturedMaterial> … … 865 949 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Immunizations/a:Immunization"> 866 950 <tr> 951 <xsl:attribute name="id"> 952 <xsl:value-of select="a:CCRDataObjectID"/> 953 </xsl:attribute> 867 954 <td> 868 955 <xsl:apply-templates select="a:Product/a:ProductName/a:Code"/> … … 884 971 </td> 885 972 <td> 973 <xsl:attribute name="id"> 974 <xsl:value-of select="a:CCRDataObjectID"/> 975 <xsl:text>:Site</xsl:text> 976 </xsl:attribute> 977 886 978 <xsl:value-of select="a:Directions/a:Direction/a:Site/a:Text"/> 887 979 </td> … … 896 988 </table> 897 989 </text> 990 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Immunizations/a:Immunization"> 991 <entry typeCode="DRIV"> 992 <substanceAdministration classCode="SBADM" moodCode="EVN"> 993 <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/> 994 <templateId root="2.16.840.1.113883.3.88.11.83.13" assigningAuthorityName="HITSP C83"/> 995 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.12" assigningAuthorityName="IHE PCC"/> 996 997 <!-- Medication activity template --> 998 999 <!-- <id> --> 1000 <xsl:call-template name="ccdID"> 1001 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1002 </xsl:call-template> 1003 1004 <code code="IMMUNIZ" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7 ActCode"/> 1005 <text> 1006 <reference> 1007 <xsl:attribute name="value"> 1008 <xsl:text>#</xsl:text> 1009 <xsl:value-of select="a:CCRDataObjectID"/> 1010 </xsl:attribute> 1011 </reference> 1012 </text> 1013 1014 <statusCode code='completed'/> 1015 1016 <xsl:call-template name="ccdDateTime"> 1017 <xsl:with-param name="dt" select="a:DateTime"/> 1018 <xsl:with-param name="type" select="'IVL_TS'"/> 1019 </xsl:call-template> 1020 1021 <xsl:call-template name="ccdCodedValue"> 1022 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Route"/> 1023 <xsl:with-param name="nodeName" select="'routeCode'"/> 1024 <xsl:with-param name="domain" select="'RouteOfAdministration'"/> 1025 </xsl:call-template> 1026 1027 <xsl:if test="a:Directions/a:Direction/a:Site"> 1028 <xsl:call-template name="ccdCodedValue"> 1029 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Site"/> 1030 <xsl:with-param name="nodeName" select="'approachSiteCode'"/> 1031 <xsl:with-param name="originalTextReference"> 1032 <xsl:text>#</xsl:text> 1033 <xsl:value-of select="a:CCRDataObjectID"/> 1034 <xsl:text>:Site</xsl:text> 1035 </xsl:with-param> 1036 </xsl:call-template> 1037 </xsl:if> 1038 1039 <consumable> 1040 <manufacturedProduct> 1041 <templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/> 1042 <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/> 1043 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/> 1044 1045 <!-- Product template --> 1046 1047 <manufacturedMaterial> 1048 <xsl:call-template name="ccdCodedValue"> 1049 <xsl:with-param name="ccrCodedDescription" select="a:Product/a:ProductName"/> 1050 <xsl:with-param name="nodeName" select="'code'"/> 1051 </xsl:call-template> 1052 <name> 1053 <xsl:value-of select="a:Product/a:BrandName/a:Text"/> 1054 </name> 1055 </manufacturedMaterial> 1056 </manufacturedProduct> 1057 </consumable> 1058 1059 </substanceAdministration> 1060 </entry> 1061 </xsl:for-each> 898 1062 </section> 899 1063 </component> … … 916 1080 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:VitalSigns/a:Result"> 917 1081 <tr> 1082 <xsl:attribute name="id"> 1083 <xsl:value-of select="a:CCRDataObjectID"/> 1084 </xsl:attribute> 1085 918 1086 <td> 919 1087 <xsl:value-of select="a:Description/a:Text"/> … … 946 1114 </table> 947 1115 </text> 1116 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:VitalSigns/a:Result"> 1117 <entry typeCode="DRIV"> 1118 <organizer classCode="CLUSTER" moodCode="EVN"> 1119 <templateId root="2.16.840.1.113883.10.20.1.32" assigningAuthorityName="CCD"/> 1120 <templateId root="2.16.840.1.113883.10.20.1.35" assigningAuthorityName="CCD"/> 1121 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.1" assigningAuthorityName="IHE PCC"/> 1122 <!-- Vital signs organizer template --> 1123 1124 <xsl:variable name="testDate" select="a:DateTime"/> 1125 1126 <!-- <id> --> 1127 <xsl:call-template name="ccdID"> 1128 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1129 </xsl:call-template> 1130 1131 <code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs" codeSystemName="SNOMED CT"/> 1132 <statusCode code="completed"/> 1133 <xsl:call-template name="ccdDateTime"> 1134 <xsl:with-param name="dt" select="$testDate"/> 1135 </xsl:call-template> 1136 1137 <xsl:call-template name="ccdObservation"> 1138 <xsl:with-param name="ccrTestNode" select="a:Test[1]"/> 1139 <xsl:with-param name="testDate" select="$testDate"/> 1140 </xsl:call-template> 1141 1142 </organizer> 1143 </entry> 1144 </xsl:for-each> 948 1145 </section> 949 1146 </component> … … 1039 1236 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1040 1237 </xsl:call-template> 1041 1042 1238 1043 1239 <xsl:call-template name="ccdCodedValue"> … … 1135 1331 </table> 1136 1332 </text> 1333 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement"> 1334 <entry typeCode="DRIV"> 1335 <observation classCode="OBS" moodCode="EVN"> 1336 <templateId root="2.16.840.1.113883.3.88.11.83.19" assigningAuthorityName="HITSP C83"/> 1337 <templateId root="2.16.840.1.113883.10.20.1.33" assigningAuthorityName="CCD"/> 1338 <!-- Social history observation template --> 1339 <!-- <id> --> 1340 <xsl:call-template name="ccdID"> 1341 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1342 </xsl:call-template> 1343 <statusCode code="completed"/> 1344 <xsl:call-template name="ccdDateTime"> 1345 <xsl:with-param name="dt" select="a:DateTime"/> 1346 </xsl:call-template> 1347 <entryRelationship typeCode="SUBJ" inversionInd="true"> 1348 <observation classCode="OBS" moodCode="EVN"> 1349 <templateId root="2.16.840.1.113883.10.20.1.41"/> 1350 <!-- Episode observation template --> 1351 <statusCode code="completed"/> 1352 <entryRelationship typeCode="SAS"> 1353 <observation classCode="OBS" moodCode="EVN"> 1354 <xsl:call-template name="ccdCodedValue"> 1355 <xsl:with-param name="ccrCodedDescription" select="a:Description"/> 1356 <xsl:with-param name="nodeName" select="'code'"/> 1357 </xsl:call-template> 1358 </observation> 1359 </entryRelationship> 1360 </observation> 1361 </entryRelationship> 1362 </observation> 1363 </entry> 1364 </xsl:for-each> 1137 1365 </section> 1138 1366 </component> … … 1297 1525 1298 1526 <xsl:for-each select="a:Test"> 1299 <xsl:call-template name=" labObservation">1527 <xsl:call-template name="ccdObservation"> 1300 1528 <xsl:with-param name="ccrTestNode" select="."/> 1301 1529 <xsl:with-param name="testDate" select="$testDate"/> … … 1307 1535 </xsl:when> 1308 1536 <xsl:otherwise> 1309 <xsl:call-template name=" labObservation">1537 <xsl:call-template name="ccdObservation"> 1310 1538 <xsl:with-param name="ccrTestNode" select="a:Test[1]"/> 1311 1539 <xsl:with-param name="testDate" select="$testDate"/> 1312 1540 </xsl:call-template> 1313 1314 1541 </xsl:otherwise> 1315 1542 </xsl:choose> … … 1371 1598 </table> 1372 1599 </text> 1600 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Payers/a:Payer"> 1601 <entry typeCode="DRIV"> 1602 <act classCode="ACT" moodCode="DEF"> 1603 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.17" assigningAuthorityName="IHE PCC"/> 1604 <templateId root="2.16.840.1.113883.10.20.1.20" assigningAuthorityName="CCD"/> 1605 <!-- Coverage entry template --> 1606 <!-- <id> --> 1607 <xsl:call-template name="ccdID"> 1608 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1609 </xsl:call-template> 1610 <code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment sources"/> 1611 <statusCode code="completed"/> 1612 <entryRelationship typeCode="COMP"> 1613 <act classCode="ACT" moodCode="EVN"> 1614 <templateId root="2.16.840.1.113883.3.88.11.83.5" assigningAuthorityName="HITSP C83"/> 1615 <templateId root="2.16.840.1.113883.10.20.1.26" assigningAuthorityName="CCD"/> 1616 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.18" assigningAuthorityName="IHE PCC"/> 1617 <!--Insurance provider template --> 1618 <id> 1619 <xsl:attribute name="root"> 1620 <xsl:value-of select="a:IDs[1]/a:ID"/> 1621 </xsl:attribute> 1622 <xsl:attribute name="extension"> 1623 <xsl:value-of select="a:IDs[1]/a:Type/a:Text"/> 1624 </xsl:attribute> 1625 </id> 1626 1627 <!-- <code> --> 1628 <xsl:call-template name="ccdCodedValue"> 1629 <xsl:with-param name="ccrCodedDescription" select="a:Description"/> 1630 <xsl:with-param name="nodeName" select="'code'"/> 1631 </xsl:call-template> 1632 1633 <statusCode code="completed"/> 1634 1635 <xsl:call-template name="ccdPerformer"> 1636 <xsl:with-param name="ccrActorReference" select="a:PaymentProvider"/> 1637 </xsl:call-template> 1638 1639 <participant typeCode="HLD"> 1640 <xsl:call-template name="ccdParticipantRoleActor"> 1641 <xsl:with-param name="ccrActorReference" select="a:Subscriber"/> 1642 </xsl:call-template> 1643 </participant> 1644 </act> 1645 </entryRelationship> 1646 </act> 1647 </entry> 1648 </xsl:for-each> 1373 1649 </section> 1374 1650 </component> … … 1498 1774 </xsl:if> 1499 1775 </text> 1776 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:PlanOfCare/a:Plan/a:OrderRequest/a:Procedures/a:Procedure"> 1777 <entry typeCode="DRIV"> 1778 <observation classCode="OBS" moodCode="RQO"> 1779 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.20.3.1"/> 1780 1781 <!-- <id> --> 1782 <xsl:call-template name="ccdID"> 1783 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1784 </xsl:call-template> 1785 1786 <!-- <code> --> 1787 <xsl:call-template name="ccdCodedValue"> 1788 <xsl:with-param name="ccrCodedDescription" select="a:Description"/> 1789 <xsl:with-param name="nodeName" select="'code'"/> 1790 </xsl:call-template> 1791 1792 <statusCode code="new"/> 1793 1794 <effectiveTime> 1795 <xsl:choose> 1796 <xsl:when test="a:DateTime"> 1797 <xsl:call-template name="ccdDateTime"> 1798 <xsl:with-param name="dt" select="a:DateTime"/> 1799 </xsl:call-template> 1800 </xsl:when> 1801 <xsl:when test="a:Interval"> 1802 <xsl:attribute name="xsi:type">PIVL_TS</xsl:attribute> 1803 <xsl:attribute name="operator">A</xsl:attribute> 1804 <xsl:attribute name="institutionSpecified">true</xsl:attribute> 1805 <period> 1806 <xsl:attribute name="value"> 1807 <xsl:value-of select="a:Interval/a:Value"/> 1808 </xsl:attribute> 1809 <xsl:attribute name="unit"> 1810 <xsl:value-of select="a:Interval/a:Units/a:Unit"/> 1811 </xsl:attribute> 1812 </period> 1813 </xsl:when> 1814 </xsl:choose> 1815 </effectiveTime> 1816 </observation> 1817 </entry> 1818 </xsl:for-each> 1819 1820 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:PlanOfCare/a:Plan/a:OrderRequest/a:Medications/a:Medication"> 1821 <entry typeCode="DRIV"> 1822 <substanceAdministration classCode="SBADM" moodCode="INT"> 1823 <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/> 1824 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1" assigningAuthorityName="IHE PCC"/> 1825 1826 <!--Medication activity template --> 1827 1828 <!-- <id> --> 1829 <xsl:call-template name="ccdID"> 1830 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1831 </xsl:call-template> 1832 1833 <statusCode code='completed'/> 1834 1835 <xsl:call-template name="ccdDateTime"> 1836 <xsl:with-param name="dt" select="a:DateTime"/> 1837 <xsl:with-param name="type" select="'IVL_TS'"/> 1838 </xsl:call-template> 1839 1840 <xsl:call-template name="ccdMedicationFrequency"> 1841 <xsl:with-param name="frequency" select="a:Directions/a:Direction/a:Frequency"/> 1842 </xsl:call-template> 1843 1844 <xsl:call-template name="ccdCodedValue"> 1845 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Route"/> 1846 <xsl:with-param name="nodeName" select="'routeCode'"/> 1847 <xsl:with-param name="domain" select="'RouteOfAdministration'"/> 1848 </xsl:call-template> 1849 1850 <xsl:if test="a:Directions/a:Direction/a:Dose"> 1851 <doseQuantity> 1852 <low> 1853 <xsl:attribute name="value"> 1854 <xsl:value-of select="a:Directions/a:Direction/a:Dose/a:Value"></xsl:value-of> 1855 </xsl:attribute> 1856 <xsl:attribute name="unit"> 1857 <xsl:value-of select="a:Directions/a:Direction/a:Dose/a:Unit"></xsl:value-of> 1858 </xsl:attribute> 1859 </low> 1860 <high> 1861 <xsl:attribute name="value"> 1862 <xsl:value-of select="a:Directions/a:Direction/a:Dose/a:Value"></xsl:value-of> 1863 </xsl:attribute> 1864 <xsl:attribute name="unit"> 1865 <xsl:value-of select="a:Directions/a:Direction/a:Dose/a:Unit"></xsl:value-of> 1866 </xsl:attribute> 1867 </high> 1868 </doseQuantity> 1869 </xsl:if> 1870 <consumable> 1871 <manufacturedProduct> 1872 <templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/> 1873 <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/> 1874 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/> 1875 1876 <!-- Product template --> 1877 1878 <manufacturedMaterial> 1879 <xsl:call-template name="ccdCodedValue"> 1880 <xsl:with-param name="ccrCodedDescription" select="a:Product/a:ProductName"/> 1881 <xsl:with-param name="nodeName" select="'code'"/> 1882 </xsl:call-template> 1883 <name> 1884 <xsl:value-of select="a:Product/a:BrandName/a:Text"/> 1885 </name> 1886 </manufacturedMaterial> 1887 </manufacturedProduct> 1888 </consumable> 1889 </substanceAdministration> 1890 </entry> 1891 </xsl:for-each> 1892 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:PlanOfCare/a:Plan/a:OrderRequest/a:Immunizations/a:Immunization"> 1893 1894 <entry typeCode="DRIV"> 1895 <substanceAdministration classCode="SBADM" moodCode="EVN"> 1896 <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/> 1897 <templateId root="2.16.840.1.113883.3.88.11.83.13" assigningAuthorityName="HITSP C83"/> 1898 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.12" assigningAuthorityName="IHE PCC"/> 1899 1900 <!-- Medication activity template --> 1901 1902 <!-- <id> --> 1903 <xsl:call-template name="ccdID"> 1904 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1905 </xsl:call-template> 1906 1907 <code code="IMMUNIZ" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7 ActCode"/> 1908 <text> 1909 <reference> 1910 <xsl:attribute name="value"> 1911 <xsl:text>#</xsl:text> 1912 <xsl:value-of select="a:CCRDataObjectID"/> 1913 </xsl:attribute> 1914 </reference> 1915 </text> 1916 1917 <statusCode code='completed'/> 1918 1919 <xsl:call-template name="ccdDateTime"> 1920 <xsl:with-param name="dt" select="a:DateTime"/> 1921 <xsl:with-param name="type" select="'IVL_TS'"/> 1922 </xsl:call-template> 1923 1924 <xsl:call-template name="ccdCodedValue"> 1925 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Route"/> 1926 <xsl:with-param name="nodeName" select="'routeCode'"/> 1927 <xsl:with-param name="domain" select="'RouteOfAdministration'"/> 1928 </xsl:call-template> 1929 1930 <xsl:if test="a:Directions/a:Direction/a:Site"> 1931 <xsl:call-template name="ccdCodedValue"> 1932 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Site"/> 1933 <xsl:with-param name="nodeName" select="'approachSiteCode'"/> 1934 <xsl:with-param name="originalTextReference"> 1935 <xsl:text>#</xsl:text> 1936 <xsl:value-of select="a:CCRDataObjectID"/> 1937 <xsl:text>:Site</xsl:text> 1938 </xsl:with-param> 1939 </xsl:call-template> 1940 </xsl:if> 1941 1942 <consumable> 1943 <manufacturedProduct> 1944 <templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/> 1945 <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/> 1946 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/> 1947 1948 <!-- Product template --> 1949 1950 <manufacturedMaterial> 1951 <xsl:call-template name="ccdCodedValue"> 1952 <xsl:with-param name="ccrCodedDescription" select="a:Product/a:ProductName"/> 1953 <xsl:with-param name="nodeName" select="'code'"/> 1954 </xsl:call-template> 1955 <name> 1956 <xsl:value-of select="a:Product/a:BrandName/a:Text"/> 1957 </name> 1958 </manufacturedMaterial> 1959 </manufacturedProduct> 1960 </consumable> 1961 1962 </substanceAdministration> 1963 </entry> 1964 </xsl:for-each> 1965 1966 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:PlanOfCare/a:Plan/a:OrderRequest/a:Encounters/a:Encounter"> 1967 <entry typeCode="DRIV"> 1968 <encounter classCode="ENC" moodCode="INT"> 1969 <templateId root="2.16.840.1.113883.3.88.11.83.16" assigningAuthorityName="HITSP C83"/> 1970 <templateId root="2.16.840.1.113883.10.20.1.21" assigningAuthorityName="CCD"/> 1971 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.14" assigningAuthorityName="IHE PCC"/> 1972 1973 <!-- Encounter activity template --> 1974 1975 <!-- <id> --> 1976 <xsl:call-template name="ccdID"> 1977 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 1978 </xsl:call-template> 1979 1980 <xsl:call-template name="ccdCodedValue"> 1981 <xsl:with-param name="ccrCodedDescription" select="a:Description"/> 1982 <xsl:with-param name="nodeName" select="'code'"/> 1983 </xsl:call-template> 1984 1985 <text> 1986 <reference> 1987 <xsl:attribute name="value"> 1988 <xsl:text>#</xsl:text> 1989 <xsl:value-of select="a:CCRDataObjectID"/> 1990 </xsl:attribute> 1991 </reference> 1992 </text> 1993 1994 <xsl:call-template name="ccdDateTime"> 1995 <xsl:with-param name="dt" select="a:DateTime"/> 1996 </xsl:call-template> 1997 1998 <xsl:if test="a:Practitioners[1]/a:Practitioner"> 1999 <xsl:call-template name="ccdPerformer"> 2000 <xsl:with-param name="ccrActorReference" select="a:Practitioners/a:Practitioner[1]"/> 2001 </xsl:call-template> 2002 </xsl:if> 2003 2004 <xsl:if test="a:Locations[1]/a:Location"> 2005 <participant typeCode="LOC"> 2006 <templateId root="2.16.840.1.113883.10.20.1.45"/> 2007 <!-- Location participation template --> 2008 <xsl:choose> 2009 <xsl:when test="a:Locations[1]/a:Location/a:ActorID"> 2010 <xsl:call-template name="ccdParticipantRoleActor"> 2011 <xsl:with-param name="ccrActorObjectID" select="a:Locations[1]/a:Location/a:ActorID"/> 2012 </xsl:call-template> 2013 </xsl:when> 2014 <xsl:otherwise> 2015 <xsl:call-template name="ccdParticipantRoleCodedDescription"> 2016 <xsl:with-param name="ccrCodedDescription" select="a:Locations[1]/a:Location/a:Description"/> 2017 </xsl:call-template> 2018 </xsl:otherwise> 2019 </xsl:choose> 2020 </participant> 2021 </xsl:if> 2022 </encounter> 2023 </entry> 2024 </xsl:for-each> 1500 2025 </section> 1501 2026 </component> … … 2184 2709 </xsl:when> 2185 2710 <xsl:otherwise> 2186 <xsl:attribute name="value">Unknown</xsl:attribute> 2711 <xsl:attribute name="value"> 2712 <xsl:text>Unknown</xsl:text> 2713 </xsl:attribute> 2187 2714 </xsl:otherwise> 2188 2715 </xsl:choose> … … 2207 2734 <xsl:param name="domain"/> 2208 2735 <xsl:param name="nodeName">value</xsl:param> 2736 <xsl:param name="originalTextReference"/> 2209 2737 2210 2738 <xsl:element name="{$nodeName}"> … … 2259 2787 </xsl:when> 2260 2788 <xsl:otherwise> 2261 < xsl:attribute name="displayName">2789 <originalText> 2262 2790 <xsl:value-of select="$ccrCodedDescription/a:Text"/> 2263 </xsl:attribute> 2791 <xsl:if test="$originalTextReference"> 2792 <reference> 2793 <xsl:attribute name="value"> 2794 <xsl:value-of select="$originalTextReference"/> 2795 </xsl:attribute> 2796 </reference> 2797 </xsl:if> 2798 </originalText> 2264 2799 </xsl:otherwise> 2265 2800 </xsl:choose> … … 2448 2983 </xsl:template> 2449 2984 2450 <xsl:template name=" labObservation">2985 <xsl:template name="ccdObservation"> 2451 2986 <xsl:param name="ccrTestNode"/> 2452 2987 <xsl:param name="testDate"/> … … 2457 2992 <templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/> 2458 2993 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/> 2994 2459 2995 <!-- Result observation template --> 2460 2996
Note:
See TracChangeset
for help on using the changeset viewer.