Added a provider filter to Procedures / Electronic Reports.
[openemr.git] / ccr / ccd / templates / cdavocablookup.xsl
blob2534866574f63a8a74a6b44e0e6c577b2123664b
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Conversion of CCR to Level 3 CCD
5 Orginal Author: Ken Miller
6 Solventus LLC
7 ken.miller@solventus.coms
9 Contributors:
10 Richard Braman, EHR Doctors, Inc rbraman@ehrdoctors.com
11 George Lilly (WorldVistA glilly@glilly.net)
12 xxxx - Oroville Hospital
14 Date: 2010-05-5
15 Version: 0.1
17 License :
19 This program is free software: you can redistribute it and/or modify
20 it under the terms of the GNU General Public License as published by
21 the Free Software Foundation, either version 3 of the License, or
22 (at your option) any later version.
24 This program is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 GNU General Public License for more details.
29 You should have received a copy of the GNU General Public License
30 along with this program. If not, see http://www.gnu.org/licenses.
32 -->
33 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
34 <xsl:template name="CDAVocabularyLookup">
35 <xsl:param name="domain"/>
36 <xsl:param name="ccrtext"/>
38 <xsl:variable name="map" select="document('cdavocabmap.xml')"/>
39 <xsl:variable name="ccrtext_uc" select="translate($ccrtext, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
40 <xsl:variable name="cdaCodeMatch" select="$map/domains/domain[@name=$domain]/item[translate(cdacode,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/>
41 <xsl:choose>
42 <xsl:when test="$cdaCodeMatch">
43 <xsl:value-of select="$cdaCodeMatch"/>
44 </xsl:when>
45 <xsl:otherwise>
46 <xsl:value-of select="$map/domains/domain[@name=$domain]/item[translate(ccrtext,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/>
47 </xsl:otherwise>
48 </xsl:choose>
49 </xsl:template>
51 <xsl:template name="CDADisplayNameLookup">
52 <xsl:param name="domain"/>
53 <xsl:param name="cdacode"/>
54 <xsl:variable name="map" select="document('cdavocabmap.xml')"/>
55 <xsl:choose>
56 <xsl:when test="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/cdadisplayname">
57 <xsl:value-of select="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/cdadisplayname"/>
58 </xsl:when>
59 <xsl:otherwise>
60 <xsl:value-of select="$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/ccrtext"/>
61 </xsl:otherwise>
62 </xsl:choose>
63 </xsl:template>
65 <xsl:template name="CDAVocabularyCodeSystemNameLookup">
66 <xsl:param name="domain"/>
68 <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystemName"/>
69 </xsl:template>
71 <xsl:template name="CDAVocabularyCodeSystemLookup">
72 <xsl:param name="domain"/>
74 <xsl:value-of select="document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystem"/>
75 </xsl:template>
77 </xsl:stylesheet>