1
<?xml version=
"1.0" encoding=
"UTF-8"?>
3 Conversion of CCR to Level 3 CCD
5 Orginal Author: Ken Miller
7 ken.miller@solventus.coms
10 Richard Braman, EHR Doctors, Inc rbraman@ehrdoctors.com
11 George Lilly (WorldVistA glilly@glilly.net)
12 xxxx - Oroville Hospital
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.
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"/>
42 <xsl:when test=
"$cdaCodeMatch">
43 <xsl:value-of select=
"$cdaCodeMatch"/>
46 <xsl:value-of select=
"$map/domains/domain[@name=$domain]/item[translate(ccrtext,'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=$ccrtext_uc]/cdacode"/>
51 <xsl:template name=
"CDADisplayNameLookup">
52 <xsl:param name=
"domain"/>
53 <xsl:param name=
"cdacode"/>
54 <xsl:variable name=
"map" select=
"document('cdavocabmap.xml')"/>
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"/>
60 <xsl:value-of select=
"$map/domains/domain[@name=$domain]/item[cdacode=$cdacode]/ccrtext"/>
65 <xsl:template name=
"CDAVocabularyCodeSystemNameLookup">
66 <xsl:param name=
"domain"/>
68 <xsl:value-of select=
"document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystemName"/>
71 <xsl:template name=
"CDAVocabularyCodeSystemLookup">
72 <xsl:param name=
"domain"/>
74 <xsl:value-of select=
"document('cdavocabmap.xml')/domains/domain[@name=$domain]/@codeSystem"/>