Changeset 765
- Timestamp:
- May 19, 2010, 9:52:22 PM (15 years ago)
- Location:
- ccr2ccd-xslt/trunk/templates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr2ccd-xslt/trunk/templates/cdavocablookup.xsl
r759 r765 3 3 <xsl:template name="CDAVocabularyLookup"> 4 4 <xsl:param name="domain"/> 5 <xsl:param name="ccr Description"/>5 <xsl:param name="ccrtext"/> 6 6 7 <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/item[ccrdescription=$ccrDescription]/cdacode"/> 7 <xsl:variable name="map" select="document('cdavocabmap.xml')"/> 8 <xsl:variable name="ccrtext_uc" select="translate($ccrtext, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> 9 <xsl:variable name="cdaCodeMatch" select="$map/domains/domain[@name=$domain]/item[translate(cdacode,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/> 10 <xsl:choose> 11 <xsl:when test="$cdaCodeMatch"> 12 <xsl:value-of select="$cdaCodeMatch"/> 13 </xsl:when> 14 <xsl:otherwise> 15 <xsl:value-of select="$map/domains/domain[@name=$domain]/item[translate(ccrtext,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/> 16 </xsl:otherwise> 17 </xsl:choose> 18 </xsl:template> 19 20 <xsl:template name="CDADisplayNameLookup"> 21 <xsl:param name="domain"/> 22 <xsl:param name="cdacode"/> 23 <xsl:variable name="map" select="document('cdavocabmap.xml')"/> 24 <xsl:choose> 25 <xsl:when test="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/cdadisplayname"> 26 <xsl:value-of select="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/cdadisplayname"/> 27 </xsl:when> 28 <xsl:otherwise> 29 <xsl:value-of select="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/ccrtext"/> 30 </xsl:otherwise> 31 </xsl:choose> 8 32 </xsl:template> 9 33 … … 19 43 <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystem"/> 20 44 </xsl:template> 45 21 46 </xsl:stylesheet> -
ccr2ccd-xslt/trunk/templates/cdavocabmap.xml
r759 r765 3 3 <domain name="telecommunicationsAddressUse"> 4 4 <item> 5 <ccr description>Home</ccrdescription>6 <cdad escription>home address</cdadescription>5 <ccrtext>Home</ccrtext> 6 <cdadisplayname>home address</cdadisplayname> 7 7 <cdacode>H</cdacode> 8 8 </item> 9 9 <item> 10 <ccr description>Primary Home</ccrdescription>11 <cdad escription>primary home</cdadescription>10 <ccrtext>Primary Home</ccrtext> 11 <cdadisplayname>primary home</cdadisplayname> 12 12 <cdacode>HP</cdacode> 13 13 </item> 14 14 <item> 15 <ccr description>Vacation Home</ccrdescription>16 <cdad escription>primary home</cdadescription>15 <ccrtext>Vacation Home</ccrtext> 16 <cdadisplayname>primary home</cdadisplayname> 17 17 <cdacode>HV</cdacode> 18 18 </item> 19 19 <item> 20 <ccr description>Office</ccrdescription>21 <cdad escription>office</cdadescription>20 <ccrtext>Office</ccrtext> 21 <cdadisplayname>office</cdadisplayname> 22 22 <cdacode>WP</cdacode> 23 23 </item> 24 24 <item> 25 <ccr description>Mobile</ccrdescription>26 <cdad escription>mobile contact</cdadescription>25 <ccrtext>Mobile</ccrtext> 26 <cdadisplayname>mobile contact</cdadisplayname> 27 27 <cdacode>MC</cdacode> 28 28 </item> 29 29 <item> 30 <ccr description>Pager</ccrdescription>31 <cdad escription>pager</cdadescription>30 <ccrtext>Pager</ccrtext> 31 <cdadisplayname>pager</cdadisplayname> 32 32 <cdacode>PG</cdacode> 33 33 </item> … … 35 35 <domain name="HumanLanguage" codeSystemName="IETF RFC 1766"> 36 36 <item> 37 <ccrdescription>English</ccrdescription>38 <cdacode>en-us</cdacode>37 <ccrtext>English</ccrtext> 38 <cdacode>en-us</cdacode> 39 39 </item> 40 40 <item> 41 <ccr description>Spanish</ccrdescription>41 <ccrtext>Spanish</ccrtext> 42 42 <cdacode>es</cdacode> 43 43 </item> 44 44 <item> 45 <ccr description>French</ccrdescription>45 <ccrtext>French</ccrtext> 46 46 <cdacode>fr</cdacode> 47 47 </item> 48 48 <item> 49 <ccr description>German</ccrdescription>49 <ccrtext>German</ccrtext> 50 50 <cdacode>de</cdacode> 51 51 </item> … … 53 53 <domain name="MaritalStatus" codeSystemName="HL7 Marital status" codeSystem="2.16.840.1.113883.5.2"> 54 54 <item> 55 <ccrdescription>Annulled</ccrdescription> 55 <ccrtext>Annulled</ccrtext> 56 <cdadisplaytext>Annulled</cdadisplaytext> 56 57 <cdacode>A</cdacode> 57 58 </item> 58 59 <item> 59 <ccrdescription>Divorced</ccrdescription> 60 <ccrtext>Divorced</ccrtext> 61 <cdadisplaytext>Divorced</cdadisplaytext> 60 62 <cdacode>D</cdacode> 61 63 </item> 62 64 <item> 63 <ccrdescription>Interlocutory</ccrdescription> 65 <ccrtext>Interlocutory</ccrtext> 66 <cdadisplaytext>Interlocutory</cdadisplaytext> 64 67 <cdacode>I</cdacode> 65 68 </item> 66 69 <item> 67 <ccrdescription>Separated</ccrdescription> 70 <ccrtext>Separated</ccrtext> 71 <cdadisplaytext>Legally Separated</cdadisplaytext> 68 72 <cdacode>L</cdacode> 69 73 </item> 70 74 <item> 71 <ccrdescription>Married</ccrdescription> 75 <ccrtext>Married</ccrtext> 76 <cdadisplaytext>Married</cdadisplaytext> 72 77 <cdacode>M</cdacode> 73 78 </item> 74 79 <item> 75 <ccrdescription>Polygamous</ccrdescription> 80 <ccrtext>Polygamous</ccrtext> 81 <cdadisplaytext>Polygamous</cdadisplaytext> 76 82 <cdacode>P</cdacode> 77 83 </item> 78 84 <item> 79 <ccrdescription>Single</ccrdescription> 85 <ccrtext>Single</ccrtext> 86 <cdadisplaytext>Single</cdadisplaytext> 80 87 <cdacode>S</cdacode> 81 88 </item> 82 89 <item> 83 <ccrdescription>Domestic Partner</ccrdescription> 90 <ccrtext>Domestic Partner</ccrtext> 91 <cdadisplaytext>Domestic Partner</cdadisplaytext> 84 92 <cdacode>T</cdacode> 85 93 </item> 86 94 <item> 87 <ccr description>Widowed</ccrdescription>95 <ccrtext>Widowed</ccrtext> 88 96 <cdacode>W</cdacode> 89 97 </item> … … 91 99 <domain name="AdministrativeGender" codeSystemName="HL7 Administrative Gender" codeSystem="2.16.840.1.113883.5.1"> 92 100 <item> 93 <ccrdescription>Female</ccrdescription> 101 <ccrtext>Female</ccrtext> 102 <cdadisplayname>Female</cdadisplayname> 94 103 <cdacode>F</cdacode> 95 104 </item> 96 105 <item> 97 <ccrdescription>Male</ccrdescription> 106 <ccrtext>Male</ccrtext> 107 <cdadisplayname>Male</cdadisplayname> 98 108 <cdacode>M</cdacode> 99 109 </item> 100 110 <item> 101 <ccrdescription>Undifferentiated</ccrdescription> 111 <ccrtext>Undifferentiated</ccrtext> 112 <cdadisplayname>Undifferentiated</cdadisplayname> 102 113 <cdacode>UN</cdacode> 103 114 </item> 104 115 </domain> 116 <domain name="RouteOfAdministration" codeSystemName="HL7 Route of Administration" codeSystem="2.16.840.1.113883.5.112"> 117 <item> 118 <ccrtext>swallow, oral</ccrtext> 119 <cdacode>PO</cdacode> 120 </item> 121 <item> 122 <ccrtext>by mouth</ccrtext> 123 <cdacode>PO</cdacode> 124 </item> 125 <item> 126 <ccrtext>oral, mouth</ccrtext> 127 <cdacode>PO</cdacode> 128 </item> 129 <item> 130 <ccrtext>chew, oral</ccrtext> 131 <cdacode>CHEW</cdacode> 132 </item> 133 <item> 134 <ccrtext>injection, intravenous</ccrtext> 135 <cdacode>IVINJ</cdacode> 136 </item> 137 <item> 138 <ccrtext>injection, intramuscular</ccrtext> 139 <cdacode>IM</cdacode> 140 </item> 141 <item> 142 <ccrtext>injection, subcutaneous</ccrtext> 143 <cdacode>SQ</cdacode> 144 </item> 145 </domain> 105 146 106 </domains> 147 <domain name="ObservationInterpretation" codeSystemName="HL7 Observation Interpretation" codeSystem="2.16.840.1.113883.5.83"> 148 <item> 149 <ccrtext>Normal</ccrtext> 150 <cdacode>N</cdacode> 151 </item> 152 <item> 153 <ccrtext>Abnormal</ccrtext> 154 <cdacode>A</cdacode> 155 </item> 156 <item> 157 <ccrtext>Abnormal High</ccrtext> 158 <cdadescription>High</cdadescription> 159 <cdacode>H</cdacode> 160 </item> 161 <item> 162 <ccrtext>Abnormal Low</ccrtext> 163 <cdadescription>High</cdadescription> 164 <cdacode>L</cdacode> 165 </item> 166 </domain> 167 </domains>
Note:
See TracChangeset
for help on using the changeset viewer.