source: ccr2ccd-xslt/trunk/make/M1-ccr_qrda.xsl@ 1531

Last change on this file since 1531 was 999, checked in by George Lilly, 14 years ago

latest

File size: 81.8 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet type="text/xsl" href="cda.xsl"?>
3
4<!--
5Conversion of CCR to Level 3 CCD
6
7Orginal Author: Ken Miller
8Solventus LLC
9ken.miller@solventus.coms
10
11Contributors:
12Richard Braman, EHR Doctors, Inc rbraman@ehrdoctors.com
13George Lilly (WorldVistA glilly@glilly.net)
14Nancy Antracite, WorldVistA
15xxxx - Oroville Hospital
16
17Date: 2010-05-5
18Version: 0.1
19
20License :
21
22 This program is free software: you can redistribute it and/or modify
23 it under the terms of the GNU General Public License as published by
24 the Free Software Foundation, either version 3 of the License, or
25 (at your option) any later version.
26
27 This program is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 GNU General Public License for more details.
31
32 You should have received a copy of the GNU General Public License
33 along with this program. If not, see http://www.gnu.org/licenses.
34
35-->
36<xsl:stylesheet version="1.0" xmlns="urn:hl7-org:v3" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="urn:astm-org:CCR" xmlns:date="http://exslt.org/dates-and-times"
37xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="a date">
38 <xsl:import href="./templates/cdavocablookup.xsl"/>
39 <xsl:import href="./templates/hl7oidlookup.xsl"/>
40 <xsl:import href="./templates/code.xsl"/>
41 <xsl:import href="./templates/actor.xsl"/>
42 <xsl:import href="./templates/datetime.xsl"/>
43 <xsl:import href="./templates/problemDescription.xsl"/>
44
45 <xsl:output method="xml" encoding="utf-8" version="1.0" indent="yes"/>
46 <xsl:template match="/">
47<!--WV Added new munltiple documentation of added have to do with encounter times, etc.-->
48
49<!--
50********************************************************
51CDA Header
52********************************************************
53-->
54
55<!--
56******************
57Document Information
58**********************
59-->
60<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
61 <!-- Created with XML Copy Editor Open Source Sourceforge project. -->
62<!--WVP This is the clinical document type ID-->
63 <realmCode code="US"/>
64 <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
65 <!-- QRDA Category I generic template ID. -->
66 <!--WVP these next two lines are fixed-->
67 <templateId root="2.16.840.1.113883.10.20.12" />
68 <!--only in the july spec so not sure if it should be here-->
69 <templateId root="2.16.840.1.113883.3.249.11.100.1"/>
70 <!--WVV 2.16.840.1.113883.3.543 is fixed and is the beginninng of WorldVistAs OID, change the extension for a new document and the version for changes to this one-->
71
72
73 <!--Script replaces UUID each time if the version number is 1-->
74 <id root="2.16.840.1.113883.3.543" extension="@@@UUID-DOC@@@"/>
75
76 <!-- <xsl:attribute name="root">
77 <xsl:value-of select="/a:ContinuityOfCareRecord/a:CCRDocumentObjectID"></xsl:value-of>
78 </xsl:attribute>
79 </id>-->
80 <!--WVP next two lines fixed-->
81 <code code="55182-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Quality Measure Report"/>
82 <title>QRDA Incidence Report</title>
83 <!--WVV time-->
84 <effectiveTime value="20100703"/>
85 <!--WVP for next two lines-->
86 <confidentialityCode codeSystem="2.16.840.1.113883.5.25" code="N"/>
87 <languageCode code="en-US"/>
88 <!--WV? Don't change this in the document set we are working on-->
89 <setId root="2.16.840.1.113883.3.543" extension="@@@UUID-SET@@@"/>
90 <versionNumber value="1"/>
91 <!--WVP I made one up but we will have to have an OID for the Clincal Document SET which we will make up for ourselves eventually-->
92
93 <!--
94 *******************
95 Patient Information
96 ****************
97 -->
98 <!-- This is the patient for which the report is describing. -->
99 <recordTarget>
100<patientRole>
101 <xsl:call-template name="ccdPatientRole">
102 <xsl:with-param name="ccrActorObjectID" select="/a:ContinuityOfCareRecord/a:Patient[1]/a:ActorID"/>
103 </xsl:call-template>
104 </patientRole>
105 </recordTarget>
106
107<!--
108*****************************
109Author
110**************
111-->
112 <!-- This example assumes the doctor is creating the report and it is Required. -->
113 <author>
114 <!--WVV Edit time has to be precise at least to the day-->
115 <time value="20100703" />
116 <assignedAuthor>
117 <!--WVP eventually id this is required, the root is fixed -->
118 <!--andn the extension is the SOFTWARE version number assigned by CMS to WV EHR-->
119 <id root="2.16.840.1.113883.3.249.6" extension="100001" />
120 <!--WVVassignedPerson not required-->
121 <assignedPerson>
122 <name>
123 <!--WV Edit-->
124 <given>Nancy</given>
125 <family>Anthracite</family>
126 <suffix>MD</suffix>
127 </name>
128 </assignedPerson>
129 <representedOrganization>
130 <!--WV? id root is OID for the organization so I made one up for this document set-->
131 <id root="2.16.840.1.113883.3.543" extension="1558574526" />
132 <name>WorldVistA Test Clinic</name>
133 </representedOrganization>
134 </assignedAuthor>
135 </author>
136 <!-- The reporting healthcare facility is represented using the CCD "Source of Information" construct, via the Informant participant. -->
137 <informant>
138 <assignedEntity>
139 <!--WV this null flavor is required as is-->
140 <id nullFlavor="NA"/>
141 <representedOrganization>
142 <!--WV root is the OID of the organization. ID is required but name is not and id is OID stated earlier-->
143 <id root="2.16.840.1.113883.3.543" extension="1558574526" />
144 <name>World VistA Test Clinic</name>
145 </representedOrganization>
146 </assignedEntity>
147 </informant>
148
149 <!-- This example assumes that the institution responsible for the data is serving as custodian. -->
150 <!--WV This element is required as is the sSD which is not stated if it is an OID but assumed it is-->
151 <!--WV Name is not required, only ID is required.-->
152 <custodian>
153 <assignedCustodian>
154 <representedCustodianOrganization>
155 <id root="2.16.840.1.113883.3.543" extension="1558574526" />
156 <name>WorldVistA Test Clinic</name>
157 </representedCustodianOrganization>
158 </assignedCustodian>
159 </custodian>
160
161 <!-- In this example, the author is also serving as legal authenticator. -->
162 <!--WV section is this is not required-->
163<legalAuthenticator>
164 <time value="20100703" />
165 <!--WV the signature code of S is required-->
166 <signatureCode code="S" />
167 <assignedEntity>
168 <!--WV document does not specify the requirements of the id but it is required-->
169 <!--WVP and the sample suggests it is the number below and extension is ???-->
170 <id root="2.16.840.1.113883.3.543" extension="111111" />
171 <assignedPerson>
172 <name>
173 <given>Nancy</given>
174 <family>Anthracite</family>
175 <suffix>MD</suffix>
176 </name>
177 </assignedPerson>
178 <representedOrganization>
179 <!--WV? and is fixed for the WorldVistA Test Clinic in this submitted document series-->
180 <id root="2.16.840.1.113883.3.543" extension="1558574526" />
181 <name>WorldVistA Test Clinic</name>
182 </representedOrganization>
183 </assignedEntity>
184 </legalAuthenticator>
185
186
187
188 <!--Added to sample as it is new since 2008-->
189 <!--WVP permanent for participant in the primary care provider participant-->
190<!--WVP performer type codes are numerous but PRF is performer or the person who did it-->
191 <participant typeCode="PRF">
192 <!--WVP required as is for function-->
193 <!-- WVP I believe PCP is primary care provider but not sure-->
194 <functionCode code="PCP" codeSystem="2.16.840.1.113883.5.88"/>
195 <!--WVP Associated Entity is required ti be there with this PROV-->
196 <associatedEntity classCode="PROV">
197 <!--WV? OID of the provider fixed for this series of documents-->
198 <id root="2.16.840.1.113883.3.249.6" extension="111111" />
199 <!--WV associated person is not required so presumabley the code will suffice not sure??-->
200 <associatedPerson>
201 <name>
202 <prefix>Dr.</prefix>
203 <given>Nancy</given>
204 <family>Anthracite</family>
205 </name>
206 </associatedPerson>
207 </associatedEntity>
208 </participant>
209
210 <!--The service event is the encounter that describes tehe encunter as well as the provider, location and time-->
211 <!--!There can be one or more documentation elements depending on the number of encounters during the reporting period-->
212 <!--WVV IMPORTANT!! The encounter codeds are recorded here-->
213 <!-- They are in appendix B of the downloadable resource document-->
214 <!-- Each documentation of is a single service event-->
215
216<!--Occurence of Measures episode documention-->
217<!--Like an encounter section only for QRDA-->
218<!--Same doctor, same clinic, different date and different enconter code-->
219
220
221 <!--First Visit documentationOf section-->
222<!--DOCUMENTATIONOFSECTION-->
223
224 <!--
225********************************************************
226CDA Body
227********************************************************
228-->
229 <component>
230 <structuredBody>
231 <!--
232 ********************************************************
233 Measure Set Section
234 ********************************************************
235 -->
236 <component>
237 <section>
238 <!-- WVP QRDA Category I measure-specific template ID for 2010 #1. -->
239 <!--WP Next 3 lines do not change during the reporting period, for the measures section-->
240 <templateId root="2.16.840.1.113883.3.249.11.50" />
241 <code code="55185-3" codeSystem="2.16.840.1.113883.6.1" />
242 <title>Measure set: CMS EHR Measure Set</title>
243 <text>2010 Measures Set Measures</text>
244 <!--
245 ***************************************************
246 Measure Section
247 ***************************************************
248 -->
249 <component>
250 <section>
251 <!--template ID for each measure being reported-->
252 <templateId root="2.16.840.1.113883.3.249.11.2" />
253 <!-- <templateId root="2.16.840.1.113883.3.249.11.3" />
254 <templateId root="2.16.840.1.113883.3.249.11.4" />
255 <templateId root="2.16.840.1.113883.3.249.11.5" />
256 <templateId root="2.16.840.1.113883.3.249.11.6" />
257 <templateId root="2.16.840.1.113883.3.249.11.7"/>
258 <templateId root="2.16.840.1.113883.3.249.11.8" />
259 <templateId root="2.16.840.1.113883.3.249.11.9" />
260 <templateId root="2.16.840.1.113883.3.249.11.10" />
261 <templateId root="2.16.840.1.113883.3.249.11.11" />
262 <templateId root="eRx/2.16.840.1.113883.3.249.11.15" />-->
263 <!--New for 2011-->
264 <!-- <templateId root="2.16.840.1.113883.3.249.11.51" />
265 <templateId root="2.16.840.1.113883.3.249.11.52" />
266 <templateId root="2.16.840.1.113883.3.249.11.53" />
267 <templateId root="2.16.840.1.113883.3.249.11.54" />
268 <templateId root="2.16.840.1.113883.3.249.11.55" />
269 <templateId root="2.16.840.1.113883.3.249.11.56" />
270 <templateId root="2.16.840.1.113883.3.249.11.57" />
271 <templateId root="2.16.840.1.113883.3.249.11.58" />
272 <templateId root="2.16.840.1.113883.3.249.11.59" />
273 <templateId root="2.16.840.1.113883.3.249.11.60" />-->
274 <code code="55186-1" codeSystem="2.16.840.1.113883.6.1" />
275
276 <title>Measure Section</title>
277 <!--Here is where the HTML begins for the above and it is optional-->
278 <text>
279 <list>
280 <item>CMS Measure #1: Diabetes Mellitus: Hemoglobin A1c Poor Control in Diabetes Mellitus</item>
281 <!-- <item>CMS Measure #2: Diabetes Mellitus: Low Density Lipoprotein (LDL-C) Control in Diabetes Mellitus</item>
282 <item>CMS Measure #3: Diabetes Mellitus: High Blood Pressure Control in Diabetes Mellitus</item>
283 <item>CMS Measure #5: Heart Failure: Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD)</item>
284 <item>CMS Measure #7: Coronary Artery Disease (CAD): Beta-Blocker Therapy for CAD Patients with Prior Myocardial Infarction (MI)</item>
285 <item>CMS Measure #110: Preventive Care and Screening: Influenza Immunization for Patients >= 50 Years</item>
286 <item>CMS Measure #111: Preventive Care and Screening: Pneumonia Vaccination for Patients 65 Years and Older</item>
287 <item>CMS Measure #112: Preventive Care and Screening: Screening Mammography</item>
288 <item>CMS Measure #113: Preventive Care and Screening: Colorectal Cancer Screening</item>
289 <item>CMS Measure #124: Health Information Technology (HIT): Adoption/Use of Electronic Health Records (EHR)</item>
290 <item>CMS Measure eRx:Adoption/Use of Medication Electronic Prescribing Measure</item>-->
291 <!--added 2011 measures-->
292 <!--<item>CMS Measure #39: Screening or Therapy for Osteoporosis for Women Aged 65 Years and Older</item>
293 <item>CMS Measure #47: Advance Care Plan </item>
294 <item>CMS Measure #48: Urinary Incontinence: Assessment of Presence or Absence of Urinary Incontinence in Women Aged 65 Years and Older</item>
295 <item>CMS Measure #128: Preventive Care and Screening: Body Mass Index (BMI) Screening and Follow-Up </item>
296 <item>CMS Measure #173: Preventive Care and Screening: Unhealthy Alcohol Use - Screening</item>
297 <item>CMS Measure #0013: Hypertension (HTN): Blood Pressure Measurement - QRDA Cat I template </item>
298 <item>CMS Measure #0022: Drugs to be avoided in the Elderly </item>
299 <item>CMS Measure #0024: Body Mass Index (BMI) 2 through 18 years of age </item>
300 <item>CMS Measure #0028: Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention</item>
301 <item>CMS Measure #0038: Childhood Immunization Status - QRDA Cat I template</item>-->
302 </list>
303 </text>
304 <!--Begin listing of acts-->
305 <entry typeCode="DRIV">
306 <act classCode="ACT" moodCode="DEF">
307 <id root="2.16.840.1.113883.3.249.11.2" />
308 <code code="PQRI-1" codeSystem="2.16.840.1.113883.3.249.12" displayName="Hemoglobin A1c Poor Control in Diabetes Mellitus"/>
309 <text>Percentage of patients 18 through 75 years with diabetes mellitus who had most recent hemoglobin A1C greater than 9.0%</text>
310 <statusCode code="completed"/>
311 </act>
312 </entry>
313 <!--<entry typeCode="DRIV">
314 <act classCode="ACT" moodCode="DEF">
315 <id root="2.16.840.1.113883.3.249.11.3" />
316 <code code="PQRI-2" codeSystem="2.16.840.1.113883.3.249.12" displayName="Low Density Lipoprotein (LDL-C) Control in Diabetes Mellitus"/>
317 <text>Percentage of patients 18 through 75 years with diabetes mellitus who had most recent LDL-C level in control (less than 100 mg./dL)</text>
318 <statusCode code="completed"/>
319 </act>
320 </entry>
321 <entry typeCode="DRIV">
322 <act classCode="ACT" moodCode="DEF">
323 <id root="2.16.840.1.113883.3.249.11.4" />
324 <code code="PQRI-3" codeSystem="2.16.840.1.113883.3.249.12" displayName="Hemoglobin A1c Poor Control in Diabetes Mellitus"/>
325 <text>Percentage of patients 18 through 75 years with diabetes mellitus who had most recent blood pressure in control (less than 140/80 mmHg)</text>
326 <statusCode code="completed"/>
327 </act>
328 </entry>
329 <entry typeCode="DRIV">
330 <act classCode="ACT" moodCode="DEF">
331 <id root="2.16.840.1.113883.3.249.11.5" />
332 <code code="PQRI-5" codeSystem="2.16.840.1.113883.3.249.12" displayName="Heart Failure: Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD)"/>
333 <text>Percentage of patients 18 years and older with a diagnosis of heart frilure and LVSD who were prescribed ACE inhibitor or ARB therapy</text>
334 <statusCode code="completed"/>
335 </act>
336 </entry>
337 <entry typeCode="DRIV">
338 <act classCode="ACT" moodCode="DEF">
339 <id root="2.16.840.1.113883.3.249.11.6" />
340 <code code="PQRI-7" codeSystem="2.16.840.1.113883.3.249.12" displayName="Beta-Blocker Therapy for CAD Patients with Prior Myocardial Infarction"/>
341 <text>Percentage of patients 18 aged 18 years and older wit a diagnosis of CAD and prior MI who were prescribed beta-blocker therapy</text>
342 <statusCode code="completed"/>
343 </act>
344 </entry>
345 <entry typeCode="DRIV">
346 <act classCode="ACT" moodCode="DEF">
347 <id root="2.16.840.1.113883.3.249.11.7"/>
348 <code code="PQRI-110" codeSystem="2.16.840.1.113883.3.249.12" displayName="Influenza Immunization for Patients >= 50 Years"/>
349 <text>Percentage of patients aged 50 years and older who received an influenza immunization during the flu season (September through February)</text>
350 <statusCode code="completed"/>
351 </act>
352 </entry>
353 <entry typeCode="DRIV">
354 <act classCode="ACT" moodCode="DEF">
355 <id root="2.16.840.1.113883.3.249.11.8" />
356 <code code="PQRI-111" codeSystem="2.16.840.1.113883.3.249.12" displayName="Pneumonia Vaccination for Patients 65 Years and Older"/>
357 <text>Percentage of patients afed 65 years and older who have ever received a pneumoccal vaccine</text>
358 <statusCode code="completed"/>
359 </act>
360 </entry>
361 <entry typeCode="DRIV">
362 <act classCode="ACT" moodCode="DEF">
363 <id root="2.16.840.1.113883.3.249.11.9" />
364 <code code="PQRI-112" codeSystem="2.16.840.1.113883.3.249.12" displayName="Screening Mammography"/>
365 <text>Percentage of womaen aged 40 through 69 years who had a mammogram to screen for breast cancer within 24 months</text>
366 <statusCode code="completed"/>
367 </act>
368 </entry>
369 <entry typeCode="DRIV">
370 <act classCode="ACT" moodCode="DEF">
371 <id root="2.16.840.1.113883.3.249.11.10" />
372 <code code="PQRI-113" codeSystem="2.16.840.1.113883.3.249.12" displayName="Colorectal Cancer Screening"/>
373 <text>Percentage of patients aged 50 through 80 who received the appropriate colorectal cancer screening</text>
374 <statusCode code="completed"/>
375 </act>
376 </entry>
377 <entry typeCode="DRIV">
378 <act classCode="ACT" moodCode="DEF">
379 <id root="2.16.840.1.113883.3.249.11.14" />
380 <code code="PQRI-124" codeSystem="2.16.840.1.113883.3.249.12" displayName="Adoption/Use of Electronic Health Records (EHR)"/>
381 <text>Documents whether provider has adopted and is using health information technology. To qualify, the provider must havea adopted and be using a certified/qualified electronic health record (EHR)</text>
382 <statusCode code="completed"/>
383 </act>
384 </entry>
385 <entry typeCode="DRIV">
386 <act classCode="ACT" moodCode="DEF">
387 <id root="2.16.840.1.113883.3.249.11.14" />
388 <code code="eRx" codeSystem="2.16.840.1.113883.3.249.12" displayName="Adoption/Use of Medication Electronic Prescribing Measure"/>
389 <text>Documents whether provider has adopted and is using ePrescribing</text>
390 <statusCode code="completed"/>
391 </act>
392 </entry>-->
393
394 <!--******************************************
395 Begin 2011 measures
396 ********************************************-->
397 <!--<entry typeCode="DRIV">
398 <act classCode="ACT" moodCode="DEF">
399 <id root="2.16.840.1.113883.3.249.11.51" />
400 <code code="PQRI-39" codeSystem="2.16.840.1.113883.3.249.12" displayName="Screening or Therapy for Osteoporosis for Women Aged 65 Years and Older"/>
401 <text>Percentage of patients who had a DXA measurement ordered or performed at least once since age 60 or pharmacologic therapy prescribed within 12 months before the end of the measurement period</text>
402 <statusCode code="completed"/>
403 </act>
404 </entry>
405 <entry typeCode="DRIV">
406 <act classCode="ACT" moodCode="DEF">
407 <id root="2.16.840.1.113883.3.249.11.52" />
408 <code code="PQRI-47" codeSystem="2.16.840.1.113883.3.249.12" displayName="Advance Care Plan"/>
409 <text>Percentage of patients age 65 and older who have an advanced care plan or surrogate decision maker documented in the medical record or documented in the medical record that an advance care plan was discussed but the patient did not wish or was not able to name a surrogate decision maker or provide an advance care plan.</text>
410 <statusCode code="completed"/>
411 </act>
412 </entry>
413 <entry typeCode="DRIV">
414 <act classCode="ACT" moodCode="DEF">
415 <id root="2.16.840.1.113883.3.249.11.53" />
416 <code code="PQRI-48" codeSystem="2.16.840.1.113883.3.249.12" displayName="Urinary Incontinence: Assessment of Presence or Absence of Urinary Incontinence in Women Aged 65 Years and Older"/>
417 <text>Percentage of patients equal to or older than 65 years of age at the beginning of the measurement perion who were assesed for the presence or absence of urinary incontinence within 12 months.</text>
418 <statusCode code="completed"/>
419 </act>
420 </entry>
421 <entry typeCode="DRIV">
422 <act classCode="ACT" moodCode="DEF">
423 <id root="2.16.840.1.113883.3.249.11.54" />
424 <code code="PQRI-128" codeSystem="2.16.840.1.113883.3.249.12" displayName="Preventive Care and Screening: Body Mass Index (BMI) Screening and Follow-Up"/>
425 <text>Percentage of patients aged 18 yesrs and older with a calculate BMI in the past 6 months or during the current visit documented in the medical record and if the most recent BMI is ourtide parameters, a follow-up plan is documented. Ages 65 and older BMI equal to or greater than 30 or less than 22 and ages 18-64, BMI greater than or equal to 25 or less than 18.5</text>
426 <statusCode code="completed"/>
427 </act>
428 </entry>
429 <entry typeCode="DRIV">
430 <act classCode="ACT" moodCode="DEF">
431 <id root="2.16.840.1.113883.3.249.11.55" />
432 <id root="2.16.840.1.113883.3.249.11.56" />
433 <code code="PQRI-173" codeSystem="2.16.840.1.113883.3.249.12" displayName="Preventive Care and Screening: Unhealthy Alcohol Use - Screening"/>
434 <text>Percentage of patients aged 18 years and older who were screened for unhealthy alcohol use using a systematic method within 24 months</text>
435 <statusCode code="completed"/>
436 </act>
437 </entry>
438 <entry typeCode="DRIV">
439 <act classCode="ACT" moodCode="DEF">
440 <id root="2.16.840.1.113883.3.249.11.56" />
441 <id root="2.16.840.1.113883.3.249.11.57" />
442
443 <code code="PQRI-13" codeSystem="2.16.840.1.113883.3.249.12" displayName="Hypertension (HTN): Blood Pressure Measurement"/>
444 <text>Percentage of patients aged 18 years and older with a diagnosis of hypertension in the beginning of the measurement period with a blood pressure recoreded.</text>
445 <statusCode code="completed"/>
446 </act>
447 </entry>
448 <entry typeCode="DRIV">
449 <act classCode="ACT" moodCode="DEF">
450 <id root="2.16.840.1.113883.3.249.11.57" />
451 <code code="PQRI-22" codeSystem="2.16.840.1.113883.3.249.12" displayName="Drugs to be avoided in the elderly"/>
452 <text>Percentage of patients aged 65 years and older who received at least one drug to be acoided in the elderly and/or two different drugs to be avoided in the elderly in the measurement period</text>
453 <statusCode code="completed"/>
454 </act>
455 </entry>
456 <entry typeCode="DRIV">
457 <act classCode="ACT" moodCode="DEF">
458 <id root="2.16.840.1.113883.3.249.11.58" />
459 <code code="PQRI-24" codeSystem="2.16.840.1.113883.3.249.12" displayName="BMI age 2-18 years of age"/>
460 <text>Percentage of children 2-18 years of age at the beginning of the measurement period whose weight is classified based on BMI percentile for age and gender.</text>
461 <statusCode code="completed"/>
462 </act>
463 </entry>
464 <entry typeCode="DRIV">
465 <act classCode="ACT" moodCode="DEF">
466 <id root="2.16.840.1.113883.3.249.11.59"/>
467 <code code="PQRI-28" codeSystem="2.16.840.1.113883.3.249.12" displayName="Preventive care and Screening: Tobacco Use: Screening and Cessation Intervention"/>
468 <text>Percentage of patients aged 18 years of older who were screened about tobacco use at least once during the two year measurement preoid AND who received cessation counseling if identified as a tobacco user.</text>
469 <statusCode code="completed"/>
470 </act>
471 </entry>
472 <entry typeCode="DRIV">
473 <act classCode="ACT" moodCode="DEF">
474 <id root="2.16.840.1.113883.3.249.11.60" />
475 <code code="PQRI-38" codeSystem="2.16.840.1.113883.3.249.12" displayName="Childhood immumnization status"/>
476 <text>Percentage of children who turn two years of age during the measurement period who have had four DTaP/DT, three IPV, one MMR and three H influenza type B, three hepatitis B, one chicken pox vaccine (VZV) and four pneumococcal conjugate vaccines by their second birthday</text>
477 <statusCode code="completed"/>
478 </act>
479 </entry>
480 <entry typeCode="DRIV">
481 <act classCode="ACT" moodCode="DEF">
482
483 <code code="" codeSystem="2.16.840.1.113883.3.249.12" displayName=""/>
484 <text>Documents whether provider has adopted and is using ePrescribing</text>
485 <statusCode code="completed"/>
486 </act>
487 </entry>-->
488 <!--
489 *******************************
490 Reporting Parameters Section
491 *****************************
492 -->
493 <component>
494 <section>
495 <code code="55187-9" codeSystem="2.16.840.1.113883.6.1"/>
496 <title>Reporting Parameters</title>
497 <text>
498 <list>
499 <item>Reporting Period Jan 1, 2010 to Dec 31, 2010</item>
500 </list>
501 </text>
502 <entry>
503 <act classCode="ACT" moodCode="EVN">
504 <code code="252116004" codeSystem="2.16.840.1.113883.6.96" displayName="Observation Parameters"/>
505 <effectiveTime>
506 <low value="20100101"/>
507 <high value="20101231"/>
508 </effectiveTime>
509 </act>
510 </entry>
511 </section>
512 </component>
513
514
515 <!--
516 ********************************************************
517 Patient Data
518 ********************************************************
519 -->
520 <component>
521 <section>
522 <code code="55188-7" codeSystem="2.16.840.1.113883.6.1"/>
523 <title>Patient Data</title>
524 </section>
525 </component>
526 <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:Problems">
527 <component>
528 <section>
529 <templateId root="2.16.840.1.113883.3.88.11.83.103" assigningAuthorityName="HITSP/C83"/>
530 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.6" assigningAuthorityName="IHE PCC"/>
531 <templateId root="2.16.840.1.113883.10.20.1.11" assigningAuthorityName="HL7 CCD"/>
532 <code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem list"/>
533 <title>Problems</title>
534 <text>
535 <table>
536 <tbody>
537 <tr>
538 <th>Type</th>
539 <th>Date</th>
540 <th>Code</th>
541 <th>Description</th>
542 <th>Status</th>
543 <th>Source</th>
544 </tr>
545 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Problems/a:Problem">
546 <tr>
547 <td>
548 <xsl:value-of select="a:Type/a:Text"/>
549 </td>
550 <td>
551 <table>
552 <tbody>
553 <xsl:apply-templates select="a:DateTime"/>
554 </tbody>
555 </table>
556 </td>
557 <td>
558 <xsl:apply-templates select="a:Description/a:Code"/>
559 </td>
560 <td>
561 <xsl:attribute name="ID">
562 <xsl:value-of select="a:CCRDataObjectID"></xsl:value-of>
563 </xsl:attribute>
564 <xsl:value-of select="a:Description/a:Text"/>
565 </td>
566 <td>
567 <xsl:value-of select="a:Status/a:Text"/>
568 </td>
569 <td>
570 <xsl:call-template name="actorName">
571 <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
572 </xsl:call-template>
573 </td>
574 </tr>
575 </xsl:for-each>
576 </tbody>
577 </table>
578 </text>
579 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Problems/a:Problem">
580 <entry typeCode="DRIV">
581 <act classCode="ACT" moodCode="EVN">
582 <templateId root="2.16.840.1.113883.10.20.1.27"/>
583 <!-- Problem act template -->
584
585 <!-- <id> -->
586 <xsl:call-template name="ccdID">
587 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
588 </xsl:call-template>
589
590 <code nullFlavor="NA"/>
591
592 <xsl:call-template name="ccdPerformer">
593 <xsl:with-param name="ccrActorReference" select="a:Source/a:Actor"/>
594 </xsl:call-template>
595
596 <entryRelationship typeCode="SUBJ">
597 <observation classCode="OBS" moodCode="EVN">
598 <templateId root="2.16.840.1.113883.10.20.1.28" assigningAuthorityName="CCD"/>
599 <!--Problem observation template-->
600 <templateId root="2.16.840.1.113883.3.249.11.100.8"/>
601
602 <!-- <id> -->
603 <xsl:call-template name="ccdID">
604 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
605 <xsl:with-param name="suffix"></xsl:with-param>
606 </xsl:call-template>
607
608 <code code="55607006" displayName="Problem" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT"/>
609 <statusCode code="completed"/>
610 <text>
611 <reference>
612 <xsl:attribute name="value">
613 <xsl:text>#</xsl:text>
614 <xsl:value-of select="a:CCRDataObjectID"/>
615 </xsl:attribute>
616 </reference>
617 </text>
618
619 <xsl:call-template name="ccdDateTime">
620 <xsl:with-param name="dt" select="a:DateTime"/>
621 </xsl:call-template>
622
623 <xsl:call-template name="ccdCodedValue">
624 <xsl:with-param name="ccrCodedDescription" select="a:Description"/>
625 </xsl:call-template>
626
627 <xsl:call-template name="ccdStatus">
628 <xsl:with-param name="ccrStatus" select="a:Status"/>
629 </xsl:call-template>
630 </observation>
631 </entryRelationship>
632
633 </act>
634 </entry>
635 </xsl:for-each>
636 </section>
637 </component>
638 </xsl:if>
639 <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:Procedures">
640 <component>
641 <section>
642 <templateId root="2.16.840.1.113883.10.20.1.12"/>
643 <code code="47519-4" codeSystem="2.16.840.1.113883.6.1"/>
644 <title>Procedures</title>
645 <text>
646 <table>
647 <tbody>
648 <tr>
649 <th>Type</th>
650 <th>Date</th>
651 <th>Code</th>
652 <th>Description</th>
653 <th>Location</th>
654 <th>Substance</th>
655 <th>Method</th>
656 <th>Position</th>
657 <th>Site</th>
658 <th>Status</th>
659 <th>Source</th>
660 </tr>
661 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
662 <tr>
663 <xsl:attribute name="id">
664 <xsl:value-of select="a:CCRDataObjectID"/>
665 </xsl:attribute>
666
667 <td>
668 <xsl:value-of select="a:Type/a:Text"/>
669 </td>
670 <table>
671 <tbody>
672 <xsl:apply-templates select="a:DateTime"/>
673 </tbody>
674 </table>
675 <td>
676 <xsl:apply-templates select="a:Description/a:Code"/>
677 </td>
678 <td>
679 <xsl:value-of select="a:Description/a:Text"/>
680 </td>
681 <td>
682 <xsl:for-each select="a:Locations/a:Location">
683 <xsl:value-of select="a:Description/a:Text"/>
684 <xsl:if test="a:Actor">
685 (<xsl:call-template name="actorName">
686 <xsl:with-param name="objID" select="a:Actor/a:ActorID"/>
687 </xsl:call-template>
688 <xsl:if test="a:Actor/a:ActorRole/a:Text">
689 <xsl:text xml:space="preserve"> - </xsl:text><xsl:value-of select="a:ActorRole/a:Text"/>)
690 </xsl:if>
691 </xsl:if>)
692 <xsl:if test="position() != last()">
693 <br/>
694 </xsl:if>
695 </xsl:for-each>
696 </td>
697 <td>
698 <xsl:for-each select="a:Substance">
699 <xsl:value-of select="a:Text"/>
700 </xsl:for-each>
701 </td>
702 <td>
703 <xsl:value-of select="a:Method/a:Text"/>
704 </td>
705 <td>
706 <xsl:value-of select="a:Position/a:Text"/>
707 </td>
708 <td>
709 <xsl:value-of select="a:Site/a:Text"/>
710 </td>
711 <td>
712 <xsl:value-of select="a:Status/a:Text"/>
713 </td>
714 <td>
715 <xsl:call-template name="actorName">
716 <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
717 </xsl:call-template>
718 </td>
719 </tr>
720 </xsl:for-each>
721 </tbody>
722 </table>
723 </text>
724
725 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
726 <entry typeCode="DRIV">
727 <procedure classCode="PROC" moodCode="EVN">
728 <templateId root="2.16.840.1.113883.3.88.11.83.17" assigningAuthorityName="HITSP C83"/>
729 <templateId root="2.16.840.1.113883.10.20.1.29" assigningAuthorityName="CCD"/>
730 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19" assigningAuthorityName="IHE PCC"/>
731
732 <!-- <id> -->
733 <xsl:call-template name="ccdID">
734 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
735 </xsl:call-template>
736
737 <!-- <code> -->
738 <xsl:call-template name="ccdCodedValue">
739 <xsl:with-param name="ccrCodedDescription" select="a:Description"/>
740 <xsl:with-param name="nodeName" select="'code'"/>
741 </xsl:call-template>
742
743 <text>
744 <reference>
745 <xsl:attribute name="value">
746 <xsl:text>#</xsl:text>
747 <xsl:value-of select="a:CCRDataObjectID"/>
748 </xsl:attribute>
749 </reference>
750 </text>
751
752 <xsl:call-template name="ccdStatusProcedure">
753 <xsl:with-param name="status" select="a:Status"/>
754 </xsl:call-template>
755
756 <xsl:call-template name="ccdDateTime">
757 <xsl:with-param name="dt" select="a:DateTime"/>
758 </xsl:call-template>
759
760 <xsl:if test="a:Method">
761 <xsl:call-template name="ccdCodedValue">
762 <xsl:with-param name="ccrCodedDescription" select="a:Method"/>
763 <xsl:with-param name="nodeName" select="'approachSiteCode'"/>
764 </xsl:call-template>
765 </xsl:if>
766
767 <xsl:if test="a:Site">
768 <xsl:call-template name="ccdCodedValue">
769 <xsl:with-param name="ccrCodedDescription" select="a:Site"/>
770 <xsl:with-param name="nodeName" select="'targetSiteCode'"/>
771 </xsl:call-template>
772 </xsl:if>
773
774 <xsl:if test="a:Practitioners/a:Practitioner">
775 <xsl:call-template name="ccdPerformer">
776 <xsl:with-param name="ccrActorReference" select="a:Practitioners/a:Practitioner[1]"/>
777 </xsl:call-template>
778 </xsl:if>
779 </procedure>
780 </entry>
781 </xsl:for-each>
782 </section>
783 </component>
784 </xsl:if>
785<component>
786<section>
787<!--We are including only a coverage activity for Medicare here. There is also policy activity and and authorization activity that I don't think we need to report for QRDA, at least not for most reports-->
788<templateId root="2.16.840.1.113883.10.20.1.9"/>
789<!-- 48768-6 is payment sources and is fixed CQ-188,189,190-->
790<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment Sources"/>
791<!--CQ-191,192-->
792<title>Payers</title>
793<text>
794</text>
795<!--medicare-->
796<entry typeCode="DRIV">
797<!--WVP moodCode is DEF is definition to describe the characteristics of who must be involved in an act CQ-194,195-->
798<act classCode="ACT" moodCode="DEF">
799<!--WVP coverage activity template is the 10.20.1.20 CQ-193-->
800<templateId root="2.16.840.1.113883.10.20.1.20"/>
801<!--Coverage Shall Include and Act ID CQ-196-->
802<!--looks like a UUID to me-->
803<id root="2.16.840.1.113883.3.543" extension="@@@UUID-PAYER@@@"/><!--FIX!!!???-->
804<!--CQ-197-198 It appears that statusCode="completed" need to follow the code code ... here and below-->
805
806<!--CQ199,200-->
807<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" displayName="Payment sources"/>
808<statusCode code="completed"/>
809
810<!--A coverage activity shall contain on or more act/entryRelationship. The value for act/entryRelationship/@typeCode shall be COMP which SHALL be the CMS QRDA Policy Activity CQ-201, 203-->
811<!--It MAY contain an entryRelationship/sequenceNumber CQ-202-->
812<entryRelationship typeCode="COMP">
813<!-- for the act is event with moodCode EVN CQ-205,206,207-->
814<act classCode="ACT" moodCode="EVN">
815<!--Policy activity is the 10.20.1.26 template CQ-205-->
816<templateId root="2.16.840.1.113883.10.20.1.26"/>
817<templateId root="2.16.840.1.113883.3.249.11.100.7"/>
818
819<!-- act/id which is the group or contract number related to the insurance policy or program CQ-208-->
820<id root="dbbb6311-8a4d-11df-a4ee-0800200c9c66"/><!--!!!FIX-->
821<!--Act statusCode must be completed CQ-210-->
822<!--This SHOULD be present and comes from the downloadable resource S display name is in quotes AUTOPOL - "automobile" policy;EHCPOL additional insurance in addition to Medicare in this case
823HSAPOL "Health Spending Account";PUBLICPOL "public healthcare" which is NOT Medicare - maybe a state program for example
824WBCPOL is "workers compensation" CQ-211,212-->
825<!--<code code="PUBLICPOL" codeSystem="2.16.840.1.113883.5.4" displayName="Public Healthcare"/>-->
826<code code="PUBLICPOL" codeSystem="2.16.840.1.113883.5.4" displayName="Public Healthcare"/>
827<!--WVP performer type codes are numerous but PRF is performer representing the Payer CQ-213-->
828<statusCode code="completed"/>
829<performer typeCode="PRF">
830
831<!--performer/assignedEntity id is the payer identification and the extension comes from the downloadable resource section I insurance plan TYPE CQ-214-->
832<assignedEntity>
833<id root="2.16.840.1.113883.12.86" extension="MC"/>
834<!--<representedOrganization>
835<name>CMS</name>
836</representedOrganization>-->
837</assignedEntity>
838</performer>
839<!-- Act/participant @typeCode this represents the covered party CQ-215-->
840<participant typeCode="COV">
841<participantRole>
842<!--A covered party in a policy activity SHOULD contain one or more participant/participantRole/id to represent the patien's member of subscriber identifier with respect to the payer
843For participant/paricipantRole/id either the Social Security Number or HIC Number SHALL be submitted for Medicare patients. for SSN the ID @root SHALL be 2.16.840.1.113883.4.1 where
844the HIC id/@root shall be 2.16.840.1.113883.3.249.13 CQ-216"RoleCode" in the downloadable resource-->
845<!-- in this case theextension is the patients SSN for a medicare patient so it is the same each time for one patient-->
846<id root="2.16.840.1.113883.4.1" extension="@@SSN@@"/>
847<!--The covered party in tha policy activity SHOULD contain exactly one particpant/participantRole/code for self, family etc from the valuse set PolicyOrPrograCoverageRoleType 2.16.840.1.113883.1.11.19809 CQ-217,218-->
848<code code="SELF" codeSystem="2.16.840.1.113883.5.111" displayName="Self"/>
849</participantRole>
850</participant>
851</act>
852</entryRelationship>
853</act>
854</entry>
855</section>
856</component>
857</section>
858</component>
859</section>
860</component>
861</structuredBody>
862</component>
863</ClinicalDocument>
864 </xsl:template>
865 <xsl:template name="ccdAssignedEntity">
866 <xsl:param name="ccrActorObjectID"/>
867
868 <xsl:variable name="CCRActor" select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$ccrActorObjectID]"/>
869
870 <assignedEntity>
871 <xsl:call-template name="ccdEntityID">
872 <xsl:with-param name="CCRActor" select="$CCRActor"/>
873 </xsl:call-template>
874
875 <xsl:call-template name="ccdAddress">
876 <xsl:with-param name="CCRActorAddress" select="$CCRActor/a:Address"/>
877 </xsl:call-template>
878
879 <xsl:call-template name="ccdTelecom">
880 <xsl:with-param name="CCRActor" select="$CCRActor"/>
881 </xsl:call-template>
882
883 <xsl:if test="$CCRActor/a:Person">
884 <xsl:call-template name="ccdPerson">
885 <xsl:with-param name="CCRActorPerson" select="$CCRActor/a:Person"/>
886 <xsl:with-param name="personNodeName" select="'assignedPerson'"/>
887 </xsl:call-template>
888 </xsl:if>
889
890 <xsl:if test="$CCRActor/a:InternalCCRLink[a:LinkRelationship='Organization']">
891 <xsl:call-template name="ccdOrganization">
892 <xsl:with-param name="ccrActorObjectID" select="$CCRActor/a:InternalCCRLink[a:LinkRelationship='Organization']/a:LinkID"/>
893 <xsl:with-param name="organizationNodeName" select="'representedOrganization'"/>
894 </xsl:call-template>
895 </xsl:if>
896
897 </assignedEntity>
898 </xsl:template>
899
900 <xsl:template name="ccdPatient">
901 <xsl:param name="CCRActorPerson"/>
902 <patient>
903 <xsl:call-template name="ccdPersonName">
904 <xsl:with-param name="CCRActorName" select="$CCRActorPerson/a:Name"/>
905 </xsl:call-template>
906
907 <xsl:if test="$CCRActorPerson/a:Gender">
908 <xsl:call-template name="ccdCodedValue">
909 <xsl:with-param name="ccrCodedDescription" select="$CCRActorPerson/a:Gender"/>
910 <xsl:with-param name="domain" select="'AdministrativeGender'"/>
911 <xsl:with-param name="nodeName" select="'administrativeGenderCode'"/>
912 </xsl:call-template>
913 </xsl:if>
914
915 <xsl:if test="$CCRActorPerson/a:DateOfBirth">
916 <birthTime>
917 <xsl:attribute name="value">
918 <xsl:call-template name="date:format-date">
919 <xsl:with-param name="date-time" select="$CCRActorPerson/a:DateOfBirth/a:ExactDateTime"/>
920 <xsl:with-param name="pattern">yyyyMMddhhmmss</xsl:with-param>
921 </xsl:call-template>
922 </xsl:attribute>
923 </birthTime>
924 </xsl:if>
925
926 <xsl:if test="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement[a:Type/a:Text='Marital Status']">
927 <xsl:call-template name="ccdCodedValue">
928 <xsl:with-param name="ccrCodedDescription" select="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement[a:Type/a:Text='Marital Status']/a:Description"/>
929 <xsl:with-param name="domain" select="'MaritalStatus'"/>
930 <xsl:with-param name="nodeName" select="'maritalStatusCode'"/>
931 </xsl:call-template>
932 </xsl:if>
933
934 <xsl:if test="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement[a:Type/a:Text='Language']">
935 <languageCommunication>
936 <templateId root="2.16.840.1.113883.3.88.11.83.2" assigningAuthorityName="HITSP/C83"/>
937 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.2.1" assigningAuthorityName="IHE/PCC"/>
938 <xsl:call-template name="ccdCodedValue">
939 <xsl:with-param name="ccrCodedDescription" select="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement[a:Type/a:Text='Language']/a:Description"></xsl:with-param>
940 <xsl:with-param name="domain" select="'HumanLanguage'"/>
941 <xsl:with-param name="nodeName" select="'languageCode'"/>
942 </xsl:call-template>
943 </languageCommunication>
944 </xsl:if>
945 </patient>
946 </xsl:template>
947
948 <xsl:template name="ccdPerformer">
949 <xsl:param name="ccrActorReference"/>
950 <performer typeCode="PRF">
951 <xsl:if test="$ccrActorReference/a:ActorRole">
952 <xsl:call-template name="ccdCodedValue">
953 <xsl:with-param name="ccrCodedDescription" select="$ccrActorReference/a:ActorRole"/>
954 <xsl:with-param name="nodeName" select="'functionCode'"/>
955 </xsl:call-template>
956 </xsl:if>
957 <xsl:call-template name="ccdAssignedEntity">
958 <xsl:with-param name="ccrActorObjectID" select="$ccrActorReference/a:ActorID"/>
959 </xsl:call-template>
960 </performer>
961 </xsl:template>
962
963 <xsl:template name="ccdPerson">
964 <xsl:param name="CCRActorPerson"/>
965 <xsl:param name="personNodeName">assignedPerson</xsl:param>
966 <xsl:element name="{$personNodeName}">
967 <xsl:call-template name="ccdPersonName">
968 <xsl:with-param name="CCRActorName" select="$CCRActorPerson/a:Name"/>
969 </xsl:call-template>
970 </xsl:element>
971 </xsl:template>
972
973 <xsl:template name="ccdPersonName">
974 <xsl:param name="CCRActorName"/>
975 <name>
976 <xsl:if test="$CCRActorName/a:CurrentName/a:Title">
977 <prefix>
978 <xsl:value-of select="$CCRActorName/a:CurrentName/a:Title"/>
979 </prefix>
980 </xsl:if>
981 <xsl:if test="$CCRActorName/a:CurrentName/a:Given">
982 <given>
983 <xsl:value-of select="$CCRActorName/a:CurrentName/a:Given"/>
984 </given>
985 </xsl:if>
986 <xsl:if test="$CCRActorName/a:CurrentName/a:Middle">
987 <given>
988 <xsl:value-of select="$CCRActorName/a:CurrentName/a:Middle"/>
989 </given>
990 </xsl:if>
991 <xsl:if test="$CCRActorName/a:CurrentName/a:Family">
992 <family>
993 <xsl:value-of select="$CCRActorName/a:CurrentName/a:Family"/>
994 </family>
995 </xsl:if>
996 <xsl:if test="$CCRActorName/a:CurrentName/a:Suffix">
997 <suffix>
998 <xsl:value-of select="$CCRActorName/a:CurrentName/a:Suffix"/>
999 </suffix>
1000 </xsl:if>
1001 </name>
1002 </xsl:template>
1003
1004 <xsl:template name="ccdOrganization">
1005 <xsl:param name="ccrActorObjectID"/>
1006 <xsl:param name="organizationNodeName"/>
1007
1008 <xsl:variable name="CCRActor" select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$ccrActorObjectID]"/>
1009
1010 <xsl:element name="{$organizationNodeName}">
1011 <xsl:call-template name="ccdEntityID">
1012 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1013 </xsl:call-template>
1014 <xsl:call-template name="ccdTelecom">
1015 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1016 </xsl:call-template>
1017
1018 <xsl:call-template name="ccdAddress">
1019 <xsl:with-param name="CCRActorAddress" select="$CCRActor/a:Address[1]"/>
1020 </xsl:call-template>
1021 </xsl:element>
1022 </xsl:template>
1023
1024 <xsl:template name="ccdPatientRole">
1025 <xsl:param name="ccrActorObjectID"/>
1026
1027 <xsl:variable name="CCRActor" select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$ccrActorObjectID]"/>
1028
1029 <xsl:call-template name="ccdEntityID">
1030 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1031 </xsl:call-template>
1032
1033 <xsl:call-template name="ccdAddress">
1034 <xsl:with-param name="CCRActorAddress" select="$CCRActor/a:Address[1]"/>
1035 </xsl:call-template>
1036
1037 <xsl:call-template name="ccdTelecom">
1038 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1039 </xsl:call-template>
1040
1041 <xsl:call-template name="ccdPatient">
1042 <xsl:with-param name="CCRActorPerson" select="$CCRActor/a:Person"/>
1043 </xsl:call-template>
1044 </xsl:template>
1045
1046 <xsl:template name="ccdAssignedAuthor">
1047 <xsl:param name="ccrActorObjectID"/>
1048 <assignedAuthor>
1049 <xsl:variable name="CCRActor" select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$ccrActorObjectID]"/>
1050
1051 <xsl:call-template name="ccdEntityID">
1052 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1053 </xsl:call-template>
1054
1055 <xsl:call-template name="ccdAddress">
1056 <xsl:with-param name="CCRActorAddress" select="$CCRActor/a:Address[1]"/>
1057 </xsl:call-template>
1058
1059 <xsl:call-template name="ccdTelecom">
1060 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1061 </xsl:call-template>
1062
1063 <xsl:call-template name="ccdPerson">
1064 <xsl:with-param name="CCRActorPerson" select="$CCRActor/a:Person"/>
1065 </xsl:call-template>
1066
1067 <xsl:if test="$CCRActor/a:InternalCCRLink[a:LinkRelationship='Organization']">
1068 <representedOrganization>
1069 <xsl:call-template name="ccdOrganization">
1070 <xsl:with-param name="ccrActorObjectID" select="$CCRActor/a:InternalCCRLink[a:LinkRelationship='Organization']/a:LinkID"/>
1071 </xsl:call-template>
1072 </representedOrganization>
1073 </xsl:if>
1074 </assignedAuthor>
1075 </xsl:template>
1076
1077 <xsl:template name="ccdParticipantRoleActor">
1078 <xsl:param name="ccrActorObjectID"/>
1079
1080 <xsl:variable name="CCRActor" select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$ccrActorObjectID]"/>
1081
1082 <xsl:call-template name="ccdEntityID">
1083 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1084 </xsl:call-template>
1085
1086 <xsl:call-template name="ccdAddress">
1087 <xsl:with-param name="CCRActorAddress" select="$CCRActor/a:Address[1]"/>
1088 </xsl:call-template>
1089
1090 <xsl:call-template name="ccdTelecom">
1091 <xsl:with-param name="CCRActor" select="$CCRActor"/>
1092 </xsl:call-template>
1093
1094 <xsl:if test="$CCRActor/a:Organization/a:Name">
1095 <playingEntity classCode="PLC">
1096 <name>
1097 <xsl:value-of select="$CCRActor/a:Organization/a:Name"/>
1098 </name>
1099 </playingEntity>
1100 </xsl:if>
1101 </xsl:template>
1102
1103 <xsl:template name="ccdParticipantRoleCodedDescription">
1104 <xsl:param name="ccrCodedDescription"/>
1105 <participantRole classCode="MANU">
1106 <!--Product Detail-->
1107 <playingEntity classCode="MMAT">
1108 <xsl:if test="$ccrCodedDescription/a:Code">
1109 <xsl:call-template name="ccdCodedValue">
1110 <xsl:with-param name="ccrCodedDescription" select="$ccrCodedDescription"/>
1111 <xsl:with-param name="nodeName" select="'code'"/>
1112 </xsl:call-template>
1113 </xsl:if>
1114 <name>
1115 <xsl:value-of select="$ccrCodedDescription/a:Text"/>
1116 </name>
1117 </playingEntity>
1118 </participantRole>
1119 </xsl:template>
1120
1121 <xsl:template name="ccdEntityID">
1122 <xsl:param name="CCRActor"/>
1123 <id>
1124 <xsl:choose>
1125 <xsl:when test="$CCRActor/a:IDs">
1126 <xsl:attribute name="extension">
1127 <xsl:value-of select="$CCRActor/a:IDs[1]/a:ID"/>
1128 </xsl:attribute>
1129 <xsl:attribute name="root">
1130 <xsl:value-of select="$CCRActor/a:IDs[1]/a:Type/a:Text"/>
1131 </xsl:attribute>
1132 </xsl:when>
1133 <xsl:otherwise>
1134 <xsl:attribute name="extension">
1135 <xsl:value-of select="$CCRActor/a:ActorObjectID"/>
1136 </xsl:attribute>
1137 <xsl:attribute name="root">
1138 <xsl:text>CCRActorID</xsl:text>
1139 </xsl:attribute>
1140 </xsl:otherwise>
1141 </xsl:choose>
1142 </id>
1143 <xsl:if test="$CCRActor/a:Organization">
1144 <name><xsl:value-of select="$CCRActor/a:Organization/a:Name"></xsl:value-of></name>
1145 </xsl:if>
1146 </xsl:template>
1147 <xsl:template name="ccdAddress">
1148 <xsl:param name="CCRActorAddress"/>
1149 <addr>
1150 <xsl:choose>
1151 <xsl:when test="$CCRActorAddress">
1152 <xsl:attribute name="use">
1153 <xsl:call-template name="CDAVocabularyLookup">
1154 <xsl:with-param name="domain" select="'telecommunicationsAddressUse'"/>
1155 <xsl:with-param name="ccrtext" select="$CCRActorAddress/a:Type/a:Text"/>
1156 </xsl:call-template>
1157 </xsl:attribute>
1158 <streetAddressLine>
1159 <xsl:value-of select="$CCRActorAddress/a:Line1"/>
1160 </streetAddressLine>
1161 <city>
1162 <xsl:value-of select="$CCRActorAddress/a:City"/>
1163 </city>
1164 <state>
1165 <xsl:value-of select="$CCRActorAddress/a:State"/>
1166 </state>
1167 <postalCode>
1168 <xsl:value-of select="$CCRActorAddress/a:PostalCode"/>
1169 </postalCode>
1170 </xsl:when>
1171 <xsl:otherwise>
1172 <streetAddressLine/>
1173 </xsl:otherwise>
1174 </xsl:choose>
1175 </addr>
1176 </xsl:template>
1177
1178 <xsl:template name="ccdTelecom">
1179 <xsl:param name="CCRActor"/>
1180 <telecom>
1181 <xsl:if test="$CCRActor/a:Telephone">
1182 <xsl:attribute name="use">
1183 <xsl:call-template name="CDAVocabularyLookup">
1184 <xsl:with-param name="domain" select="'telecommunicationsAddressUse'"/>
1185 <xsl:with-param name="ccrtext" select="$CCRActor/a:Telephone/a:Type/a:Text"/>
1186 </xsl:call-template>
1187 </xsl:attribute>
1188 <xsl:attribute name="value">
1189 <xsl:text>tel:+1-</xsl:text>
1190 <xsl:value-of select="$CCRActor/a:Telephone[1]/a:Value"/>
1191 </xsl:attribute>
1192 </xsl:if>
1193 </telecom>
1194
1195 <xsl:if test="$CCRActor/a:Email">
1196 <telecom>
1197 <xsl:choose>
1198 <xsl:when test="$CCRActor/a:Telephone">
1199 <xsl:attribute name="use">
1200 <xsl:call-template name="CDAVocabularyLookup">
1201 <xsl:with-param name="domain" select="'telecommunicationsAddressUse'"/>
1202 <xsl:with-param name="ccrtext" select="$CCRActor/a:Telephone/a:Type/a:Text"/>
1203 </xsl:call-template>
1204 </xsl:attribute>
1205 <xsl:attribute name="value">
1206 <xsl:text>mailto:</xsl:text>
1207 <xsl:value-of select="$CCRActor/a:Email[1]/a:Value"/>
1208 </xsl:attribute>
1209 </xsl:when>
1210 <xsl:otherwise>
1211 <xsl:attribute name="value">
1212 <xsl:text>Unknown</xsl:text>
1213 </xsl:attribute>
1214 </xsl:otherwise>
1215 </xsl:choose>
1216 </telecom>
1217 </xsl:if>
1218 </xsl:template>
1219
1220 <xsl:template name="ccdID">
1221 <xsl:param name="ccrObjectID"/>
1222 <xsl:param name="suffix"/>
1223 <id>
1224 <xsl:attribute name="root">
1225 <xsl:value-of select="$ccrObjectID"></xsl:value-of>
1226 </xsl:attribute>
1227 <xsl:attribute name="extension">CCRObjectID</xsl:attribute>
1228 </id>
1229 </xsl:template>
1230
1231 <xsl:template name="ccdCodedValue">
1232 <xsl:param name="ccrCodedDescription"/>
1233 <xsl:param name="type"/>
1234 <xsl:param name="domain"/>
1235 <xsl:param name="nodeName">value</xsl:param>
1236 <xsl:param name="originalTextReference"/>
1237
1238 <xsl:element name="{$nodeName}">
1239 <xsl:if test="$type">
1240 <xsl:attribute name="xsi:type">
1241 <xsl:value-of select="$type"/>
1242 </xsl:attribute>
1243 </xsl:if>
1244 <xsl:choose>
1245 <xsl:when test="$ccrCodedDescription/a:Code">
1246 <xsl:attribute name="displayName">
1247 <xsl:value-of select="$ccrCodedDescription/a:Text"/>
1248 </xsl:attribute>
1249 <xsl:attribute name="code">
1250 <xsl:value-of select="$ccrCodedDescription/a:Code/a:Value"/>
1251 </xsl:attribute>
1252 <xsl:attribute name="codeSystemName">
1253 <xsl:value-of select="$ccrCodedDescription/a:Code/a:CodingSystem"/>
1254 </xsl:attribute>
1255 <xsl:attribute name="codeSystem">
1256 <xsl:call-template name="HL7OIDLookup">
1257 <xsl:with-param name="name" select="$ccrCodedDescription/a:Code/a:CodingSystem"/>
1258 </xsl:call-template>
1259 </xsl:attribute>
1260 </xsl:when>
1261 <xsl:when test="$domain">
1262 <xsl:variable name="cdaCode">
1263 <xsl:call-template name="CDAVocabularyLookup">
1264 <xsl:with-param name="domain" select="$domain"/>
1265 <xsl:with-param name="ccrtext" select="$ccrCodedDescription/a:Text"/>
1266 </xsl:call-template>
1267 </xsl:variable>
1268 <xsl:attribute name="displayName">
1269 <xsl:call-template name="CDADisplayNameLookup">
1270 <xsl:with-param name="domain" select="$domain"/>
1271 <xsl:with-param name="cdacode" select="$cdaCode"/>
1272 </xsl:call-template>
1273 </xsl:attribute>
1274 <xsl:attribute name="code">
1275 <xsl:value-of select="$cdaCode"></xsl:value-of>
1276 </xsl:attribute>
1277 <xsl:attribute name="codeSystemName">
1278 <xsl:call-template name="CDAVocabularyCodeSystemNameLookup">
1279 <xsl:with-param name="domain" select="$domain"/>
1280 </xsl:call-template>
1281 </xsl:attribute>
1282 <xsl:attribute name="codeSystemName">
1283 <xsl:call-template name="CDAVocabularyCodeSystemLookup">
1284 <xsl:with-param name="domain" select="$domain"/>
1285 </xsl:call-template>
1286 </xsl:attribute>
1287 </xsl:when>
1288 <xsl:otherwise>
1289 <originalText>
1290 <xsl:value-of select="$ccrCodedDescription/a:Text"/>
1291 <xsl:if test="$originalTextReference">
1292 <reference>
1293 <xsl:attribute name="value">
1294 <xsl:value-of select="$originalTextReference"/>
1295 </xsl:attribute>
1296 </reference>
1297 </xsl:if>
1298 </originalText>
1299 </xsl:otherwise>
1300 </xsl:choose>
1301 </xsl:element>
1302 </xsl:template>
1303
1304 <xsl:template name="ccdDateTime">
1305 <xsl:param name="dt"/>
1306 <xsl:param name="type"/>
1307 <xsl:if test="$dt">
1308 <xsl:if test="$dt[1]/a:ExactDateTime">
1309 <effectiveTime>
1310 <xsl:if test="$type">
1311 <xsl:attribute name="xsi:type">
1312 <xsl:value-of select="$type"></xsl:value-of>
1313 </xsl:attribute>
1314 </xsl:if>
1315 <low>
1316 <xsl:attribute name="value">
1317 <xsl:call-template name="date:format-date">
1318 <xsl:with-param name="date-time" select="$dt[1]/a:ExactDateTime"/>
1319 <xsl:with-param name="pattern">yyyyMMdd</xsl:with-param>
1320 </xsl:call-template>
1321 </xsl:attribute>
1322 </low>
1323 <high nullFlavor="UNK"/>
1324 </effectiveTime>
1325 </xsl:if>
1326 <xsl:if test="$dt[1]/a:DateTimeRange">
1327 <effectiveTime>
1328 <low>
1329 <xsl:attribute name="value">
1330 <xsl:call-template name="date:format-date">
1331 <xsl:with-param name="date-time" select="$dt[1]/a:DateTimeRange/a:BeginRange/a:ExactDateTime"/>
1332 <xsl:with-param name="pattern">yyyyMMdd</xsl:with-param>
1333 </xsl:call-template>
1334 </xsl:attribute>
1335 </low>
1336 <high>
1337 <xsl:attribute name="value">
1338 <xsl:call-template name="date:format-date">
1339 <xsl:with-param name="date-time" select="$dt[1]/a:DateTimeRange/a:EndRange/a:ExactDateTime"/>
1340 <xsl:with-param name="pattern">yyyyMMdd</xsl:with-param>
1341 </xsl:call-template>
1342 </xsl:attribute>
1343 </high>
1344 </effectiveTime>
1345 </xsl:if>
1346 </xsl:if>
1347 </xsl:template>
1348
1349 <xsl:template name="ccdMedicationFrequency">
1350 <xsl:param name="frequency"/>
1351 <xsl:if test="$frequency">
1352 <xsl:choose>
1353 <xsl:when test="$frequency/a:Value='qd'">
1354 <effectiveTime xsi:type="PIVL_TS" operator="A">
1355 <xsl:attribute name="institutionSpecified">true</xsl:attribute>
1356 <period>
1357 <xsl:attribute name="value">24</xsl:attribute>
1358 <xsl:attribute name="unit">h</xsl:attribute>
1359 </period>
1360 </effectiveTime>
1361 </xsl:when>
1362 <xsl:when test="$frequency/a:Value='bid'">
1363 <effectiveTime xsi:type="PIVL_TS" operator="A">
1364 <xsl:attribute name="institutionSpecified">true</xsl:attribute>
1365 <period>
1366 <xsl:attribute name="value">12</xsl:attribute>
1367 <xsl:attribute name="unit">h</xsl:attribute>
1368 </period>
1369 </effectiveTime>
1370 </xsl:when>
1371 <xsl:when test="$frequency/a:Value='tid'">
1372 <effectiveTime xsi:type="PIVL_TS" operator="A">
1373 <xsl:attribute name="institutionSpecified">true</xsl:attribute>
1374 <period>
1375 <xsl:attribute name="value">8</xsl:attribute>
1376 <xsl:attribute name="unit">h</xsl:attribute>
1377 </period>
1378 </effectiveTime>
1379 </xsl:when>
1380 <xsl:when test="$frequency/a:Value='qid'">
1381 <effectiveTime xsi:type="PIVL_TS" operator="A">
1382 <xsl:attribute name="institutionSpecified">true</xsl:attribute>
1383 <period>
1384 <xsl:attribute name="value">6</xsl:attribute>
1385 <xsl:attribute name="unit">h</xsl:attribute>
1386 </period>
1387 </effectiveTime>
1388 </xsl:when>
1389 <xsl:when test="$frequency/a:Value='qam'">
1390 <effectiveTime xsi:type='EIVL' operator='A'>
1391 <event code='ACM'/>
1392 </effectiveTime>
1393 </xsl:when>
1394 <xsl:when test="$frequency/a:Value='qpm'">
1395 <effectiveTime xsi:type='EIVL' operator='A'>
1396 <event code='PCV'/>
1397 </effectiveTime>
1398 </xsl:when>
1399 </xsl:choose>
1400 </xsl:if>
1401 </xsl:template>
1402
1403 <xsl:template name="ccdStatus">
1404 <xsl:param name="ccrStatus"/>
1405
1406 <entryRelationship typeCode="REFR">
1407 <observation classCode="OBS" moodCode="EVN">
1408 <templateId root="2.16.840.1.113883.10.20.1.50"/>
1409 <!-- Problem status observation template -->
1410 <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
1411 <statusCode code="completed"/>
1412 <xsl:call-template name="ccdCodedValue">
1413 <xsl:with-param name="ccrCodedDescription" select="$ccrStatus"/>
1414 </xsl:call-template>
1415 </observation>
1416 </entryRelationship>
1417 </xsl:template>
1418
1419 <xsl:template name="ccdStatusObservation">
1420 <xsl:param name="status"/>
1421 <xsl:variable name="statusText" select="$status/a:Text"></xsl:variable>
1422 <xsl:choose>
1423 <xsl:when test="$statusText='Active'">
1424 <xsl:call-template name="ccdStatusElement">
1425 <xsl:with-param name="statusCode" select="'55561003'"/>
1426 <xsl:with-param name="statusDisplayName" select="$statusText"/>
1427 </xsl:call-template>
1428 </xsl:when>
1429 <xsl:when test="$statusText='Inactive'">
1430 <xsl:call-template name="ccdStatusElement">
1431 <xsl:with-param name="statusCode" select="'73425007'"/>
1432 <xsl:with-param name="statusDisplayName" select="$statusText"/>
1433 </xsl:call-template>
1434 </xsl:when>
1435 <xsl:when test="$statusText='Chronic'">
1436 <xsl:call-template name="ccdStatusElement">
1437 <xsl:with-param name="statusCode" select="'90734009'"/>
1438 <xsl:with-param name="statusDisplayName" select="$statusText"/>
1439 </xsl:call-template>
1440 </xsl:when>
1441 </xsl:choose>
1442 </xsl:template>
1443
1444 <xsl:template name="ccdStatusProcedure">
1445 <xsl:param name="status"/>
1446 <xsl:variable name="statusText" select="$status/a:Text"></xsl:variable>
1447 <xsl:choose>
1448 <xsl:when test="$statusText='Completed'">
1449 <statusCode code="completed"/>
1450 </xsl:when>
1451 <xsl:when test="$statusText='Active'">
1452 <statusCode code="active"/>
1453 </xsl:when>
1454 <xsl:when test="$statusText='Aborted'">
1455 <statusCode code="aborted"/>
1456 </xsl:when>
1457 <xsl:when test="$statusText='Cancelled' or $statusText='Canceled'">
1458 <statusCode code="cancelled"/>
1459 </xsl:when>
1460 <xsl:otherwise>
1461 <statusCode>
1462 <xsl:attribute name="code">
1463 <xsl:value-of select="$statusText"></xsl:value-of>
1464 </xsl:attribute>
1465 </statusCode>
1466 </xsl:otherwise>
1467 </xsl:choose>
1468 </xsl:template>
1469
1470 <xsl:template name="ccdStatusElement">
1471 <xsl:param name="statusCode"/>
1472 <xsl:param name="statusDisplayName"/>
1473 <value>
1474 <xsl:attribute name="xsi:type">CE</xsl:attribute>
1475 <xsl:attribute name="code">
1476 <xsl:value-of select="$statusCode"></xsl:value-of>
1477 </xsl:attribute>
1478 <xsl:attribute name="codeSystem">2.16.840.1.113883.6.96</xsl:attribute>
1479 <xsl:attribute name="displayName">
1480 <xsl:value-of select="$statusDisplayName"></xsl:value-of>
1481 </xsl:attribute>
1482 </value>
1483 </xsl:template>
1484
1485 <xsl:template name="ccdObservation">
1486 <xsl:param name="ccrTestNode"/>
1487 <xsl:param name="testDate"/>
1488
1489 <component>
1490 <observation classCode="OBS" moodCode="EVN">
1491 <templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
1492 <templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
1493 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
1494
1495 <!-- Result observation template -->
1496
1497 <xsl:call-template name="ccdID">
1498 <xsl:with-param name="ccrObjectID" select="$ccrTestNode/a:CCRDataObjectID"/>
1499 </xsl:call-template>
1500
1501 <!-- <code> -->
1502 <xsl:call-template name="ccdCodedValue">
1503 <xsl:with-param name="ccrCodedDescription" select="$ccrTestNode/a:Description"/>
1504 <xsl:with-param name="nodeName" select="'code'"/>
1505 </xsl:call-template>
1506
1507 <text>
1508 <reference>
1509 <xsl:attribute name="value">
1510 <xsl:text>#</xsl:text>
1511 <xsl:value-of select="$ccrTestNode/a:CCRDataObjectID"/>
1512 </xsl:attribute>
1513 </reference>
1514 </text>
1515
1516 <statusCode code="completed"/>
1517
1518 <!-- <effectiveTime> -->
1519 <xsl:choose>
1520 <xsl:when test="$ccrTestNode/a:DateTime">
1521 <xsl:call-template name="ccdDateTime">
1522 <xsl:with-param name="dt" select="$ccrTestNode/a:DateTime"/>
1523 </xsl:call-template>
1524 </xsl:when>
1525 <xsl:otherwise>
1526 <xsl:call-template name="ccdDateTime">
1527 <xsl:with-param name="dt" select="$testDate"/>
1528 </xsl:call-template>
1529 </xsl:otherwise>
1530 </xsl:choose>
1531
1532 <xsl:choose>
1533 <xsl:when test="$ccrTestNode/a:TestResult[a:Value!='']">
1534 <value xsi:type="PQ">
1535 <xsl:attribute name="value">
1536 <xsl:value-of select="$ccrTestNode/a:TestResult/a:Value"/>
1537 </xsl:attribute>
1538 <xsl:attribute name="unit">
1539 <xsl:value-of select="$ccrTestNode/a:TestResult/a:Units/a:Unit"/>
1540 </xsl:attribute>
1541 </value>
1542 </xsl:when>
1543 <xsl:when test="$ccrTestNode/a:TestResult[a:Description/a:Text!='']">
1544 <value xsi:type="TX">
1545 <xsl:attribute name="value">
1546 <xsl:value-of select="$ccrTestNode/a:TestResult/a:Description/a:Text"/>
1547 </xsl:attribute>
1548 </value>
1549 </xsl:when>
1550 </xsl:choose>
1551
1552 <xsl:if test="$ccrTestNode/a:Flag">
1553 <xsl:call-template name="ccdCodedValue">
1554 <xsl:with-param name="ccrCodedDescription" select="$ccrTestNode/a:Flag"/>
1555 <xsl:with-param name="nodeName" select="'interpretationCode'"/>
1556 <xsl:with-param name="domain" select="'ObservationInterpretation'"/>
1557 </xsl:call-template>
1558 </xsl:if>
1559
1560 <xsl:if test="$ccrTestNode/a:NormalResult">
1561 <referenceRange>
1562 <xsl:if test="$ccrTestNode/a:NormalResult/a:Normal/a:Description/a:Text">
1563 <observationRange>
1564 <text>
1565 <xsl:value-of select="$ccrTestNode/a:NormalResult/a:Normal/a:Description/a:Text"/>
1566 </text>
1567 </observationRange>
1568 </xsl:if>
1569 </referenceRange>
1570 </xsl:if>
1571
1572 </observation>
1573 </component>
1574
1575 </xsl:template>
1576</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.