Changeset 765 for ccr2ccd-xslt


Ignore:
Timestamp:
May 19, 2010, 9:52:22 PM (14 years ago)
Author:
Richard Braman
Message:

newest versions

Location:
ccr2ccd-xslt/trunk/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ccr2ccd-xslt/trunk/templates/cdavocablookup.xsl

    r759 r765  
    33    <xsl:template name="CDAVocabularyLookup">
    44        <xsl:param name="domain"/>
    5         <xsl:param name="ccrDescription"/>
     5        <xsl:param name="ccrtext"/>
    66
    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>
    832    </xsl:template>
    933
     
    1943        <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystem"/>
    2044    </xsl:template>
     45   
    2146</xsl:stylesheet>
  • ccr2ccd-xslt/trunk/templates/cdavocabmap.xml

    r759 r765  
    33    <domain name="telecommunicationsAddressUse">
    44        <item>
    5             <ccrdescription>Home</ccrdescription>
    6             <cdadescription>home address</cdadescription>
     5            <ccrtext>Home</ccrtext>
     6            <cdadisplayname>home address</cdadisplayname>
    77            <cdacode>H</cdacode>
    88        </item>
    99        <item>
    10             <ccrdescription>Primary Home</ccrdescription>
    11             <cdadescription>primary home</cdadescription>
     10            <ccrtext>Primary Home</ccrtext>
     11            <cdadisplayname>primary home</cdadisplayname>
    1212            <cdacode>HP</cdacode>
    1313        </item>
    1414        <item>
    15             <ccrdescription>Vacation Home</ccrdescription>
    16             <cdadescription>primary home</cdadescription>
     15            <ccrtext>Vacation Home</ccrtext>
     16            <cdadisplayname>primary home</cdadisplayname>
    1717            <cdacode>HV</cdacode>
    1818        </item>
    1919        <item>
    20             <ccrdescription>Office</ccrdescription>
    21             <cdadescription>office</cdadescription>
     20            <ccrtext>Office</ccrtext>
     21            <cdadisplayname>office</cdadisplayname>
    2222            <cdacode>WP</cdacode>
    2323        </item>
    2424        <item>
    25             <ccrdescription>Mobile</ccrdescription>
    26             <cdadescription>mobile contact</cdadescription>
     25            <ccrtext>Mobile</ccrtext>
     26            <cdadisplayname>mobile contact</cdadisplayname>
    2727            <cdacode>MC</cdacode>
    2828        </item>
    2929        <item>
    30             <ccrdescription>Pager</ccrdescription>
    31             <cdadescription>pager</cdadescription>
     30            <ccrtext>Pager</ccrtext>
     31            <cdadisplayname>pager</cdadisplayname>
    3232            <cdacode>PG</cdacode>
    3333        </item>
     
    3535    <domain name="HumanLanguage" codeSystemName="IETF RFC 1766">
    3636        <item>
    37         <ccrdescription>English</ccrdescription>
    38         <cdacode>en-us</cdacode>
     37            <ccrtext>English</ccrtext>
     38            <cdacode>en-us</cdacode>
    3939        </item>
    4040        <item>
    41             <ccrdescription>Spanish</ccrdescription>
     41            <ccrtext>Spanish</ccrtext>
    4242            <cdacode>es</cdacode>
    4343        </item>
    4444        <item>
    45             <ccrdescription>French</ccrdescription>
     45            <ccrtext>French</ccrtext>
    4646            <cdacode>fr</cdacode>
    4747        </item>
    4848        <item>
    49             <ccrdescription>German</ccrdescription>
     49            <ccrtext>German</ccrtext>
    5050            <cdacode>de</cdacode>
    5151        </item>
     
    5353    <domain name="MaritalStatus" codeSystemName="HL7 Marital status" codeSystem="2.16.840.1.113883.5.2">
    5454        <item>
    55             <ccrdescription>Annulled</ccrdescription>
     55            <ccrtext>Annulled</ccrtext>
     56            <cdadisplaytext>Annulled</cdadisplaytext>
    5657            <cdacode>A</cdacode>
    5758        </item>
    5859        <item>
    59             <ccrdescription>Divorced</ccrdescription>
     60            <ccrtext>Divorced</ccrtext>
     61            <cdadisplaytext>Divorced</cdadisplaytext>
    6062            <cdacode>D</cdacode>
    6163        </item>
    6264        <item>
    63             <ccrdescription>Interlocutory</ccrdescription>
     65            <ccrtext>Interlocutory</ccrtext>
     66            <cdadisplaytext>Interlocutory</cdadisplaytext>
    6467            <cdacode>I</cdacode>
    6568        </item>
    6669        <item>
    67             <ccrdescription>Separated</ccrdescription>
     70            <ccrtext>Separated</ccrtext>
     71            <cdadisplaytext>Legally Separated</cdadisplaytext>
    6872            <cdacode>L</cdacode>
    6973        </item>
    7074        <item>
    71             <ccrdescription>Married</ccrdescription>
     75            <ccrtext>Married</ccrtext>
     76            <cdadisplaytext>Married</cdadisplaytext>
    7277            <cdacode>M</cdacode>
    7378        </item>
    7479        <item>
    75             <ccrdescription>Polygamous</ccrdescription>
     80            <ccrtext>Polygamous</ccrtext>
     81            <cdadisplaytext>Polygamous</cdadisplaytext>
    7682            <cdacode>P</cdacode>
    7783        </item>
    7884        <item>
    79             <ccrdescription>Single</ccrdescription>
     85            <ccrtext>Single</ccrtext>
     86            <cdadisplaytext>Single</cdadisplaytext>
    8087            <cdacode>S</cdacode>
    8188        </item>
    8289        <item>
    83             <ccrdescription>Domestic Partner</ccrdescription>
     90            <ccrtext>Domestic Partner</ccrtext>
     91            <cdadisplaytext>Domestic Partner</cdadisplaytext>
    8492            <cdacode>T</cdacode>
    8593        </item>
    8694        <item>
    87             <ccrdescription>Widowed</ccrdescription>
     95            <ccrtext>Widowed</ccrtext>
    8896            <cdacode>W</cdacode>
    8997        </item>
     
    9199    <domain name="AdministrativeGender" codeSystemName="HL7 Administrative Gender" codeSystem="2.16.840.1.113883.5.1">
    92100        <item>
    93             <ccrdescription>Female</ccrdescription>
     101            <ccrtext>Female</ccrtext>
     102            <cdadisplayname>Female</cdadisplayname>
    94103            <cdacode>F</cdacode>
    95104        </item>
    96105        <item>
    97             <ccrdescription>Male</ccrdescription>
     106            <ccrtext>Male</ccrtext>
     107            <cdadisplayname>Male</cdadisplayname>
    98108            <cdacode>M</cdacode>
    99109        </item>
    100110        <item>
    101             <ccrdescription>Undifferentiated</ccrdescription>
     111            <ccrtext>Undifferentiated</ccrtext>
     112            <cdadisplayname>Undifferentiated</cdadisplayname>
    102113            <cdacode>UN</cdacode>
    103114        </item>
    104115    </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>
    105146
    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.