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" xmlns:
a=
"urn:astm-org:CCR" xmlns:
fo=
"http://www.w3.org/1999/XSL/Format">
34 <!-- Returns the name of the actor, if there is no name it returns the ActorObjectID that was passed in -->
35 <xsl:template name=
"actorName">
36 <xsl:param name=
"objID"/>
37 <xsl:variable name=
"actor" select=
"//a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$objID]"/>
39 <xsl:when test=
"$actor/a:Person">
41 <xsl:when test=
"$actor/a:Person/a:Name/a:DisplayName">
42 <xsl:value-of select=
"$actor/a:Person/a:Name/a:DisplayName"/>
44 <xsl:when test=
"$actor/a:Person/a:Name/a:CurrentName">
45 <xsl:value-of select=
"$actor/a:Person/a:Name/a:CurrentName/a:Given"/>
46 <xsl:text xml:
space=
"preserve"> </xsl:text>
47 <xsl:value-of select=
"$actor/a:Person/a:Name/a:CurrentName/a:Middle"/>
48 <xsl:text xml:
space=
"preserve"> </xsl:text>
49 <xsl:value-of select=
"$actor/a:Person/a:Name/a:CurrentName/a:Family"/>
50 <xsl:text xml:
space=
"preserve"> </xsl:text>
51 <xsl:value-of select=
"$actor/a:Person/a:Name/a:CurrentName/a:Suffix"/>
52 <xsl:text xml:
space=
"preserve"> </xsl:text>
53 <xsl:value-of select=
"$actor/a:Person/a:Name/a:CurrentName/a:Title"/>
54 <xsl:text xml:
space=
"preserve"> </xsl:text>
56 <xsl:when test=
"$actor/a:Person/a:Name/a:BirthName">
57 <xsl:value-of select=
"$actor/a:Person/a:Name/a:BirthName/a:Given"/>
58 <xsl:text xml:
space=
"preserve"> </xsl:text>
59 <xsl:value-of select=
"$actor/a:Person/a:Name/a:BirthName/a:Middle"/>
60 <xsl:text xml:
space=
"preserve"> </xsl:text>
61 <xsl:value-of select=
"$actor/a:Person/a:Name/a:BirthName/a:Family"/>
62 <xsl:text xml:
space=
"preserve"> </xsl:text>
63 <xsl:value-of select=
"$actor/a:Person/a:Name/a:BirthName/a:Suffix"/>
64 <xsl:text xml:
space=
"preserve"> </xsl:text>
65 <xsl:value-of select=
"$actor/a:Person/a:Name/a:BirthName/a:Title"/>
66 <xsl:text xml:
space=
"preserve"> </xsl:text>
68 <xsl:when test=
"$actor/a:Person/a:Name/a:AdditionalName">
69 <xsl:for-each select=
"$actor/a:Person/a:Name/a:AdditionalName">
70 <xsl:value-of select=
"a:Given"/>
71 <xsl:text xml:
space=
"preserve"> </xsl:text>
72 <xsl:value-of select=
"a:Middle"/>
73 <xsl:text xml:
space=
"preserve"> </xsl:text>
74 <xsl:value-of select=
"a:Family"/>
75 <xsl:text xml:
space=
"preserve"> </xsl:text>
76 <xsl:value-of select=
"a:Suffix"/>
77 <xsl:text xml:
space=
"preserve"> </xsl:text>
78 <xsl:value-of select=
"a:Title"/>
79 <xsl:text xml:
space=
"preserve"> </xsl:text>
80 <xsl:if test=
"position() != last()">
87 <xsl:when test=
"$actor/a:Organization">
88 <xsl:value-of select=
"$actor/a:Organization/a:Name"/>
90 <xsl:when test=
"$actor/a:InformationSystem">
91 <xsl:value-of select=
"$actor/a:InformationSystem/a:Name"/>
92 <xsl:text xml:
space=
"preserve"> </xsl:text>
93 <xsl:if test=
"$actor/a:InformationSystem/a:Version">
94 <xsl:value-of select=
"$actor/a:InformationSystem/a:Version"/>
95 <xsl:text xml:
space=
"preserve"> </xsl:text>
97 <xsl:if test=
"$actor/a:InformationSystem/a:Type">
98 (
<xsl:value-of select=
"$actor/a:InformationSystem/a:Type"/>)
102 <xsl:value-of select=
"$objID"/>
106 <!-- End actorname template -->