Index: ccr2ccd-xslt/trunk/templates/cdavocablookup.xsl
===================================================================
--- ccr2ccd-xslt/trunk/templates/cdavocablookup.xsl	(revision 761)
+++ ccr2ccd-xslt/trunk/templates/cdavocablookup.xsl	(revision 765)
@@ -3,7 +3,31 @@
     <xsl:template name="CDAVocabularyLookup">
         <xsl:param name="domain"/>
-        <xsl:param name="ccrDescription"/>
+        <xsl:param name="ccrtext"/>
 
-        <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/item[ccrdescription=$ccrDescription]/cdacode"/>
+        <xsl:variable name="map" select="document('cdavocabmap.xml')"/>
+        <xsl:variable name="ccrtext_uc" select="translate($ccrtext, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
+        <xsl:variable name="cdaCodeMatch" select="$map/domains/domain[@name=$domain]/item[translate(cdacode,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/>
+        <xsl:choose>
+            <xsl:when test="$cdaCodeMatch">
+                <xsl:value-of select="$cdaCodeMatch"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="$map/domains/domain[@name=$domain]/item[translate(ccrtext,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/>    
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template name="CDADisplayNameLookup">
+        <xsl:param name="domain"/>
+        <xsl:param name="cdacode"/>
+        <xsl:variable name="map" select="document('cdavocabmap.xml')"/>
+        <xsl:choose>
+            <xsl:when test="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/cdadisplayname">
+                <xsl:value-of select="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/cdadisplayname"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/ccrtext"/>
+            </xsl:otherwise>
+        </xsl:choose>
     </xsl:template>
 
@@ -19,3 +43,4 @@
         <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystem"/>
     </xsl:template>
+    
 </xsl:stylesheet>
Index: ccr2ccd-xslt/trunk/templates/cdavocabmap.xml
===================================================================
--- ccr2ccd-xslt/trunk/templates/cdavocabmap.xml	(revision 761)
+++ ccr2ccd-xslt/trunk/templates/cdavocabmap.xml	(revision 765)
@@ -3,31 +3,31 @@
     <domain name="telecommunicationsAddressUse">
         <item>
-            <ccrdescription>Home</ccrdescription>
-            <cdadescription>home address</cdadescription>
+            <ccrtext>Home</ccrtext>
+            <cdadisplayname>home address</cdadisplayname>
             <cdacode>H</cdacode>
         </item>
         <item>
-            <ccrdescription>Primary Home</ccrdescription>
-            <cdadescription>primary home</cdadescription>
+            <ccrtext>Primary Home</ccrtext>
+            <cdadisplayname>primary home</cdadisplayname>
             <cdacode>HP</cdacode>
         </item>
         <item>
-            <ccrdescription>Vacation Home</ccrdescription>
-            <cdadescription>primary home</cdadescription>
+            <ccrtext>Vacation Home</ccrtext>
+            <cdadisplayname>primary home</cdadisplayname>
             <cdacode>HV</cdacode>
         </item>
         <item>
-            <ccrdescription>Office</ccrdescription>
-            <cdadescription>office</cdadescription>
+            <ccrtext>Office</ccrtext>
+            <cdadisplayname>office</cdadisplayname>
             <cdacode>WP</cdacode>
         </item>
         <item>
-            <ccrdescription>Mobile</ccrdescription>
-            <cdadescription>mobile contact</cdadescription>
+            <ccrtext>Mobile</ccrtext>
+            <cdadisplayname>mobile contact</cdadisplayname>
             <cdacode>MC</cdacode>
         </item>
         <item>
-            <ccrdescription>Pager</ccrdescription>
-            <cdadescription>pager</cdadescription>
+            <ccrtext>Pager</ccrtext>
+            <cdadisplayname>pager</cdadisplayname>
             <cdacode>PG</cdacode>
         </item>
@@ -35,17 +35,17 @@
     <domain name="HumanLanguage" codeSystemName="IETF RFC 1766">
         <item>
-        <ccrdescription>English</ccrdescription>
-        <cdacode>en-us</cdacode>
+            <ccrtext>English</ccrtext>
+            <cdacode>en-us</cdacode>
         </item>
         <item>
-            <ccrdescription>Spanish</ccrdescription>
+            <ccrtext>Spanish</ccrtext>
             <cdacode>es</cdacode>
         </item>
         <item>
-            <ccrdescription>French</ccrdescription>
+            <ccrtext>French</ccrtext>
             <cdacode>fr</cdacode>
         </item>
         <item>
-            <ccrdescription>German</ccrdescription>
+            <ccrtext>German</ccrtext>
             <cdacode>de</cdacode>
         </item>
@@ -53,37 +53,45 @@
     <domain name="MaritalStatus" codeSystemName="HL7 Marital status" codeSystem="2.16.840.1.113883.5.2">
         <item>
-            <ccrdescription>Annulled</ccrdescription>
+            <ccrtext>Annulled</ccrtext>
+            <cdadisplaytext>Annulled</cdadisplaytext>
             <cdacode>A</cdacode>
         </item>
         <item>
-            <ccrdescription>Divorced</ccrdescription>
+            <ccrtext>Divorced</ccrtext>
+            <cdadisplaytext>Divorced</cdadisplaytext>
             <cdacode>D</cdacode>
         </item>
         <item>
-            <ccrdescription>Interlocutory</ccrdescription>
+            <ccrtext>Interlocutory</ccrtext>
+            <cdadisplaytext>Interlocutory</cdadisplaytext>
             <cdacode>I</cdacode>
         </item>
         <item>
-            <ccrdescription>Separated</ccrdescription>
+            <ccrtext>Separated</ccrtext>
+            <cdadisplaytext>Legally Separated</cdadisplaytext>
             <cdacode>L</cdacode>
         </item>
         <item>
-            <ccrdescription>Married</ccrdescription>
+            <ccrtext>Married</ccrtext>
+            <cdadisplaytext>Married</cdadisplaytext>
             <cdacode>M</cdacode>
         </item>
         <item>
-            <ccrdescription>Polygamous</ccrdescription>
+            <ccrtext>Polygamous</ccrtext>
+            <cdadisplaytext>Polygamous</cdadisplaytext>
             <cdacode>P</cdacode>
         </item>
         <item>
-            <ccrdescription>Single</ccrdescription>
+            <ccrtext>Single</ccrtext>
+            <cdadisplaytext>Single</cdadisplaytext>
             <cdacode>S</cdacode>
         </item>
         <item>
-            <ccrdescription>Domestic Partner</ccrdescription>
+            <ccrtext>Domestic Partner</ccrtext>
+            <cdadisplaytext>Domestic Partner</cdadisplaytext>
             <cdacode>T</cdacode>
         </item>
         <item>
-            <ccrdescription>Widowed</ccrdescription>
+            <ccrtext>Widowed</ccrtext>
             <cdacode>W</cdacode>
         </item>
@@ -91,16 +99,69 @@
     <domain name="AdministrativeGender" codeSystemName="HL7 Administrative Gender" codeSystem="2.16.840.1.113883.5.1">
         <item>
-            <ccrdescription>Female</ccrdescription>
+            <ccrtext>Female</ccrtext>
+            <cdadisplayname>Female</cdadisplayname>
             <cdacode>F</cdacode>
         </item>
         <item>
-            <ccrdescription>Male</ccrdescription>
+            <ccrtext>Male</ccrtext>
+            <cdadisplayname>Male</cdadisplayname>
             <cdacode>M</cdacode>
         </item>
         <item>
-            <ccrdescription>Undifferentiated</ccrdescription>
+            <ccrtext>Undifferentiated</ccrtext>
+            <cdadisplayname>Undifferentiated</cdadisplayname>
             <cdacode>UN</cdacode>
         </item>
     </domain>
+    <domain name="RouteOfAdministration" codeSystemName="HL7 Route of Administration" codeSystem="2.16.840.1.113883.5.112">
+        <item>
+            <ccrtext>swallow, oral</ccrtext>
+            <cdacode>PO</cdacode>
+        </item>
+        <item>
+            <ccrtext>by mouth</ccrtext>
+            <cdacode>PO</cdacode>
+        </item>
+        <item>
+            <ccrtext>oral, mouth</ccrtext>
+            <cdacode>PO</cdacode>
+        </item>
+        <item>
+            <ccrtext>chew, oral</ccrtext>
+            <cdacode>CHEW</cdacode>
+        </item>
+        <item>
+            <ccrtext>injection, intravenous</ccrtext>
+            <cdacode>IVINJ</cdacode>
+        </item>
+        <item>
+            <ccrtext>injection, intramuscular</ccrtext>
+            <cdacode>IM</cdacode>
+        </item>
+        <item>
+            <ccrtext>injection, subcutaneous</ccrtext>
+            <cdacode>SQ</cdacode>
+        </item>
+    </domain>
 
-    </domains>
+    <domain name="ObservationInterpretation" codeSystemName="HL7 Observation Interpretation" codeSystem="2.16.840.1.113883.5.83">
+        <item>
+            <ccrtext>Normal</ccrtext>
+            <cdacode>N</cdacode>
+        </item>
+        <item>
+            <ccrtext>Abnormal</ccrtext>
+            <cdacode>A</cdacode>
+        </item>
+        <item>
+            <ccrtext>Abnormal High</ccrtext>
+            <cdadescription>High</cdadescription>
+            <cdacode>H</cdacode>
+        </item>
+        <item>
+            <ccrtext>Abnormal Low</ccrtext>
+            <cdadescription>High</cdadescription>
+            <cdacode>L</cdacode>
+        </item>
+    </domain>
+</domains>
