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