﻿<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="cda.xsl"?>
<!--WV Added new munltiple documentation of added have to do with encounter times, etc.-->

<!--
********************************************************
CDA Header
********************************************************
-->

<!--
******************
Document Information
**********************
-->
<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">
	<!-- Created with XML Copy Editor  Open Source Sourceforge project. -->
<!--WVP This is the clinical document type ID-->
  <realmCode code="US"/>
	<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
	<!-- QRDA Category I generic template ID. -->
	<!--WVP these next two lines are fixed-->
	<templateId root="2.16.840.1.113883.10.20.12" />
	<!--only in the july spec so not sure if it should be here-->
	<templateId root="2.16.840.1.113883.3.249.11.100.1"/>
	<!--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-->
	<!-- WV? for this group of 10 documents we are submitting-->
	<id root="2.16.840.1.113883.3.543" extension="01.01.01.100000001.1"/>
		 <!--WVP next two lines fixed-->
	<code code="55182-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Quality Measure Report"/>
	<title>QRDA Incidence Report</title>
		<!--WVV time-->
	<effectiveTime value="20100703"/>
		<!--WVP for next two lines-->
  <confidentialityCode codeSystem="2.16.840.1.113883.5.25" code="N"/>
  <languageCode code="en-US"/>
  <!--WV? Don't change this in the document set we are working on-->
  <setId root="2.16.840.1.113883.3.543" extension="01.01.01.100000001"/>
	 <versionNumber value="1"/>
  <!--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-->
  
 <!--
 *******************
 Patient Information
 ****************
 -->
	<!-- This is the patient for which the report is describing. -->
	<recordTarget>
		<patientRole>
		  <!--WVV Id coding system is in the downloadable resoure and SSN is the extension. Edit the extension here-->
		  <!--Can't change during the reporting period-->
			<id root="2.16.840.1.113883.4.1" extension="002386407"/>
      <!--WVV address is not required-->
			<addr>
			  <streetAddressLine>1200 Sanders Lane</streetAddressLine>
			  <city>Rockville</city>
			  <state>MD</state>
			  <postalCode>20850</postalCode>
			</addr>
			<patient>
<!-- WVV  something called use="L" found in some samples - not sure what it is or need for it -->
				<name>
				  <!-- WV Edit -->
					<given>Jody</given>
					<family>Jones</family>
				</name >

				<!--VV Gender code can be M, F  or UN for undifferentiated-->
				<administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1"/>
      <!--WVV  Birth Time at least to the day-->
        <birthTime value="19450101"/>
        <!--WVV Edit-->
				<!--WVV race is in there too, tab L in downloadable resources 2054-5 is Back or African American -->
				<!--WVV 2106-3 is white and there are no hispanic and a huge number of indian tribes-->
				<raceCode code="2106.3" codeSystem="2.16.840.1.113883.5.104"/>
        <!--WVVEdit  from downloadable resource tab M for Ethnicity -->
				<!--WV 2186-5 is Not Hispanic or Latino -->
				<ethnicGroupCode code="2186-5" codeSystem="2.16.840.1.113883.5.50"/>
      </patient>
      <!--WV Added to sample document and required NPI as extension and root is permanent-->
      <providerOrganization>
      <id root="2.16.840.1.113883.4.6" extension="6558574524" />
        <name>WorldVistA Test Clinic</name>
        <!--WVV address of organization which must have NPI is optional-->
        <addr>
          <streetAddressLine>123 Maple Ave</streetAddressLine>
          <city>Gaithersburg</city>
          <state>MD</state>
          <postalCode>20877</postalCode>
        </addr>
      <!--WVP required asOrganizationPartOf added to sample-->
        <asOrganizationPartOf>
          <wholeOrganization>
            <!--WVV tax ID (SS# or EIN)for the organizaton is the extension and the root is required  and WVP2.16.840.1.113883.4.2-->
            <id root="2.16.840.1.113883.4.2" extension="002345678"/>
          </wholeOrganization> 
        </asOrganizationPartOf>
      </providerOrganization>
		</patientRole>
	</recordTarget>

<!--
*****************************
Author
**************
-->
	<!-- This example assumes the doctor is creating the report and it is Required.  -->
	<author>
	  <!--WVV Edit time has to be precise at least to the day-->
		<time value="20100703" />
		<assignedAuthor>
		  <!--WVP eventually id this is required, the root is fixed -->
		  <!--andn the extension is the SOFTWARE version number assigned by CMS to WV EHR-->
			<id root="2.16.840.1.113883.3.249.6" extension="100001" />
			<!--WVVassignedPerson not required-->
			<assignedPerson>
				<name>
				  <!--WV Edit-->
					<given>Nancy</given>
					<family>Anthracite</family>
					<suffix>MD</suffix>
				</name>
			</assignedPerson>
			<representedOrganization>
			  <!--WV? id root is OID for the organization so I made one up for this document set-->
				<id root="2.16.840.1.113883.3.543" extension="1558574526" />
				<name>WorldVistA Test Clinic</name>
			</representedOrganization>
		</assignedAuthor>
	</author>
		<!-- The reporting healthcare facility is represented using the CCD "Source of Information" construct, via the Informant participant. -->
	<informant>
	   <assignedEntity>
      <!--WV this null flavor is required as is-->
			<id nullFlavor="NA"/>
			<representedOrganization>
				<!--WV root is the OID of the organization.  ID is required but name is not and id is OID stated earlier-->
        <id root="2.16.840.1.113883.3.543" extension="1558574526" />
				<name>World VistA Test Clinic</name>
			</representedOrganization>
		</assignedEntity>
	</informant>

	<!-- This example assumes that the institution responsible for the data is serving as custodian. -->
	<!--WV This element is required as is the sSD which is not stated if it is an OID but assumed it is-->
	<!--WV Name is not required, only ID is required.-->
	<custodian>
		<assignedCustodian>
			<representedCustodianOrganization>
				<id root="2.16.840.1.113883.3.543" extension="1558574526" />
				<name>WorldVistA Test Clinic</name>
			</representedCustodianOrganization>
		</assignedCustodian>
	</custodian>

	<!-- In this example, the author is also serving as legal authenticator. -->
	<!--WV section is this is not required-->
<legalAuthenticator>
		<time value="20100703" />
		<!--WV the signature code of S is required-->
		<signatureCode code="S" />
		<assignedEntity>
      <!--WV document does not specify the requirements of the id but it is required-->
      <!--WVP and the sample suggests it is the number below and extension is ???-->
			<id root="2.16.840.1.113883.3.543" extension="111111" />
			<assignedPerson>
				<name>
					<given>Nancy</given>
					<family>Anthracite</family>
					<suffix>MD</suffix>
				</name>
			</assignedPerson>
			<representedOrganization>
			  <!--WV? and is fixed for the WorldVistA Test Clinic in this submitted document series-->
				<id root="2.16.840.1.113883.3.543" extension="1558574526" />
				<name>WorldVistA Test Clinic</name>
			</representedOrganization>
		</assignedEntity>
	</legalAuthenticator>
	
	
	
	<!--Added to sample as it is new since 2008-->
	<!--WVP permanent for participant in the primary care provider participant-->
<!--WVP performer type codes are numerous but PRF is performer or the person who did it-->
	<participant typeCode="PRF">
	  <!--WVP required as is for function-->
	  <!-- WVP I believe PCP is primary care provider but not sure-->
	  <functionCode code="PCP" codeSystem="2.16.840.1.113883.5.88"/>
	  <!--WVP Associated Entity is required ti be there with this PROV-->
	  <associatedEntity classCode="PROV">
	    <!--WV? OID of the provider fixed for this series of documents-->
	    <id root="2.16.840.1.113883.3.249.6" extension="111111" />
	    <!--WV associated person is not required so presumabley the code will suffice not sure??-->
	    <associatedPerson>
	      <name>
	        <prefix>Dr.</prefix>
	        <given>Nancy</given>
	        <family>Anthracite</family>
        </name>
	    </associatedPerson>
    </associatedEntity>
	</participant>
	
	<!--The service event is the encounter that describes tehe encunter as well as the provider, location and time-->
	<!--!There can be one or more documentation elements depending on the number of encounters during the reporting period-->
	<!--WVV IMPORTANT!! The encounter codeds are recorded here-->
	<!-- They are in appendix B of the downloadable resource document-->
	<!-- Each documentation of is a single service event-->
	
<!--Occurence of Measures episode documention-->
<!--Like an encounter section only for QRDA-->
<!--Same doctor, same clinic, different date and different enconter code-->
	
	
	<!--First Visit documentationOf section-->
	
	<documentationOf>
	  <serviceEvent>
	    <!--WV serviceEvent codes from Tab B from the downloadabe resource coding system is -->
	    <!--WVF  codeSystem is 2.16.840.1.113883 -->
      <!--WV code root shall be WVP 2.16.840.1.113883.6.12 and the extension shall be the encounter code -->
      <!-- WV? like the length of visit and complexity codes for example-->
      
      <code code="99202" codeSystem="2.16.840.1.113883.6.12" codeSystemName="C4"/>
      <effectiveTime>
        <!--WV Edit-->
        <!-- This has to be precise at least to the day. Something with time would be better.  Not sure of the necessary format so did not add time-->
        <low value="20100205"/>
        <high value="20100205"/>
      </effectiveTime>
      <performer typeCode="PRF">
        <assignedEntity>
        <!-- WV? Provider NPI  Required root 2.16.840.1.113883.9.96 is ?? and the NPI is an extension for the provider-->
        <!--This is variable but may remain unchanged for this document set-->
        <id root="2.16.840.1.113883.3.543" extension="6558574524"/>
          <!--<id root="2.16.840.1.113883.3.543" extension="1457402711"/>-->
          <!--WV this element should be present and the code is probably for a General Physician for!-->
          <!--It may be the type of provider as the example as I think  2.16.840.1.113883.6.69is the NDC-->
          <!-- codeSystemName is SNOMED CT and code is an 8 digit num and display name is for a physician-->
          <!--O6120 is SPECIALIZED PHYSICIAN when I looked it up so I don't know where to look for this 8 digit number-->
         <!-- http://terminology.vetmed.vt.edu/SCT/menu.cfm to look up codes-->
         <!--59058001 is general physician ;Family Medicine specialist is 62247001-->
          <code code="62247001" codeSystem="2.16.840.1.113883.6.69" codeSystemName="SNOMED CT" displayName="Internal Medician Specialist"/>
          <addr>
            <streetAddressLine>123 Maple Ave</streetAddressLine>
            <city>Gaithersburg</city>
            <state>MD</state>
            <postalCode>20877</postalCode>
          </addr>
          <assignedPerson>
            <name>
              <given>Nancy</given>
              <family>Anthracite</family>
              <suffix>MD</suffix>
            </name>
          </assignedPerson>
        </assignedEntity>
      </performer>
    </serviceEvent>
  </documentationOf>
	
	
	<!--Second Visit documentationOf section-->
	
	<documentationOf>
	  <serviceEvent>
	    <!--WV serviceEvent codes from Tab B from the downloadabe resource coding system is -->
	    <!--WVF  codeSystem is 2.16.840.1.113883 -->
      <!--WV code root shall be WVP 2.16.840.1.113883.6.12 and the extension shall be the encounter code -->
      <!-- WV? like the length of visit and complexity codes for example-->
      
      <code code="99204" codeSystem="2.16.840.1.113883.6.12" codeSystemName="C4"/>
      <effectiveTime>
        <!--WV Edit-->
        <!-- This has to be precise at least to the day. Something with time would be better.  Not sure of the necessary format so did not add time-->
        <low value="20100703"/>
        <high value="20100703"/>
      </effectiveTime>
      <performer typeCode="PRF">
        <assignedEntity>
        <!-- WV? Provider NPI  Required root 2.16.840.1.113883.9.96 is ?? and the NPI is an extension for the provider-->
        <!--This is variable but may remain unchanged for this document set-->
        <id root="2.16.840.1.113883.3.543" extension="6558574524"/>
          <!--<id root="2.16.840.1.113883.3.543" extension="1457402711"/>-->
          <!--WV this element should be present and the code is probably for a General Physician for!-->
          <!--It may be the type of provider as the example as I think  2.16.840.1.113883.6.69is the NDC-->
          <!-- codeSystemName is SNOMED CT and code is an 8 digit num and display name is for a physician-->
          <!--O6120 is SPECIALIZED PHYSICIAN when I looked it up so I don't know where to look for this 8 digit number-->
         <!-- http://terminology.vetmed.vt.edu/SCT/menu.cfm to look up codes-->
         <!--59058001 is general physician ;Family Medicine specialist is 62247001-->
          <code code="62247001" codeSystem="2.16.840.1.113883.6.69" codeSystemName="SNOMED CT" displayName="Internal Medician Specialist"/>
          <addr>
            <streetAddressLine>123 Maple Ave</streetAddressLine>
            <city>Gaithersburg</city>
            <state>MD</state>
            <postalCode>20877</postalCode>
          </addr>
          <assignedPerson>
            <name>
              <given>Nancy</given>
              <family>Anthracite</family>
              <suffix>MD</suffix>
            </name>
          </assignedPerson>
        </assignedEntity>
      </performer>
    </serviceEvent>
  </documentationOf>
	<!-- 
********************************************************
CDA Body
********************************************************
-->
 <component>
 	<structuredBody>
  	<!-- 
	  ********************************************************
     Measure Set Section
	  ********************************************************
     -->
 	    <component>
        <section>
        <!-- WVP QRDA Category I measure-specific template ID for 2010 #1. -->
        <!--WP Next 3 lines do not change during the reporting period, for the measures section-->
          <templateId root="2.16.840.1.113883.3.249.11.12" />
          <code code="55185-3" codeSystem="2.16.840.1.113883.6.1" />
          <title>Measure set: CMS EHR Measure Set</title>
          <text>2010 Measures Set Measures</text>
          <!--
                ***************************************************
                Measure Section
                ***************************************************
                -->
           <component>
            <section>
              <!--template ID for each measure being reported-->
              <templateId root="2.16.840.1.113883.3.249.11.2" />
              <templateId root="2.16.840.1.113883.3.249.11.3" />
              <templateId root="2.16.840.1.113883.3.249.11.4" />
              <templateId root="2.16.840.1.113883.3.249.11.5" />
              <templateId root="2.16.840.1.113883.3.249.11.6" />
              <templateId root="2.16.840.1.113883.3.249.11.7" />
              <templateId root="2.16.840.1.113883.3.249.11.8" />
              <templateId root="2.16.840.1.113883.3.249.11.9" />
              <templateId root="2.16.840.1.113883.3.249.11.10" />
              <templateId root="2.16.840.1.113883.3.249.11.11" />
              <templateId root="2.16.840.1.113883.3.249.11.15" />
              <code code="55186-1" codeSystem="2.16.840.1.113883.6.1" />
              <title>Measure Section</title>
              <!--Here is where the HTML begins for the above and it is optional-->
              <text>
                <list>
                  <item>CMS Measure #1: Diabetes Mellitus: Hemoglobin A1c Poor Control in Diabetes Mellitus</item>
                  <item>CMS Measure #2: Diabetes Mellitus: Low Density Lipoprotein (LDL-C) Control in Diabetes Mellitus</item>
                  <item>CMS Measure #3: Diabetes Mellitus: High Blood Pressure Control in Diabetes Mellitus</item>
                  <item>CMS Measure #5: Heart Failure: Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) Therapy for Left Ventricular Systolic Dysfunction (LVSD)</item>
                  <item>CMS Measure #7: Coronary Artery Disease (CAD): Beta-Blocker Therapy for CAD Patients with Prior Myocardial Infarction (MI)</item>
                  <item>CMS Measure #110: Preventive Care and Screening: Influenza Immunization for Patients >= 50 Years</item>
                  <item>CMS Measure #111: Preventive Care and Screening: Pneumonia Vaccination for Patients 65 Years and Older</item>
                  <item>CMS Measure #112: Preventive Care and Screening: Screening Mammography</item>
                  <item>CMS Measure #113: Preventive Care and Screening: Colorectal Cancer Screening</item>
                  <item>CMS Measure #124: Health Information Technology (HIT): Adoption/Use of Electronic Health Records (EHR)</item>
                  <item>CMS Measure eRx:Adoption/Use of Medication Electronic Prescribing Measure</item>
                </list>
              </text>
              <!--Begin listing of acts-->
             <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd20-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-1" codeSystem="2.16.840.1.113883.3.249.12" displayName="Hemoglobin A1c Poor Control in Diabetes Mellitus"/>
                  <text>Percentage of patients 18 through 75 years with diabetes mellitus who had most recent hemoglobin A1C greater than 9.0%</text>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd21-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-2" codeSystem="2.16.840.1.113883.3.249.12" displayName="Low Density Lipoprotein (LDL-C) Control in Diabetes Mellitus"/>
                  <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>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd22-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-3" codeSystem="2.16.840.1.113883.3.249.12" displayName="Hemoglobin A1c Poor Control in Diabetes Mellitus"/>
                  <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>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd23-865c-11df-a4ee-0800200c9a66"/>
                  <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)"/>
                  <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>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd24-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-7" codeSystem="2.16.840.1.113883.3.249.12" displayName="Beta-Blocker Therapy for CAD Patients with Prior Myocardial Infarction"/>
                  <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>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd25-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-110" codeSystem="2.16.840.1.113883.3.249.12" displayName="Influenza Immunization for Patients >= 50 Years"/>
                  <text>Percentage of patients aged 50 years and older who received an influenza immunization during the flu season (September through February)</text>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd26-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-111" codeSystem="2.16.840.1.113883.3.249.12" displayName="Pneumonia Vaccination for Patients 65 Years and Older"/>
                  <text>Percentage of patients afed 65 years and older who have ever received a pneumoccal vaccine</text>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd27-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-112" codeSystem="2.16.840.1.113883.3.249.12" displayName="Screening Mammography"/>
                  <text>Percentage of womaen aged 40 through 69 years who had a mammogram to screen for breast cancer within 24 months</text>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd28-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-113" codeSystem="2.16.840.1.113883.3.249.12" displayName="Colorectal Cancer Screening"/>
                  <text>Percentage of patients aged 50 through 80 who received the appropriate colorectal cancer screening</text>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd29-865c-11df-a4ee-0800200c9a66"/>
                  <code code="PQRI-124" codeSystem="2.16.840.1.113883.3.249.12" displayName="Adoption/Use of Electronic Health Records (EHR)"/>
                  <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>
                  <statusCode code="completed"/>
                </act>
              </entry>
              <entry typeCode="DRIV">
                <act classCode="ACT" moodCode="DEF">
                  <id root="3944fd30-865c-11df-a4ee-0800200c9a66"/>
                  <code code="eRx" codeSystem="2.16.840.1.113883.3.249.12" displayName="Adoption/Use of Medication Electronic Prescribing Measure"/>
                  <text>Documents whether provider has adopted and is using ePrescribing</text>
                  <statusCode code="completed"/>
                </act>
              </entry>
                  <!--
                  *******************************
                  Reporting Parameters Section
                  *****************************
                   -->
              <component>
                  <section>
                    <code code="55187-9" codeSystem="2.16.840.1.113883.6.1"/>
                      <title>Reporting Parameters</title>
                      <text>
                        <list>
                          <item>Reporting Period Jan 1, 2010 to Dec 31, 2010</item>
                        </list>
                      </text>
                      <entry>
                        <act classCode="ACT" moodCode="EVN">
                        <code code="252116004" codeSystem="2.16.840.1.113883.6.96" displayName="Observation Parameters"/>
                        <effectiveTime>
                          <low value="20100101"/>
                          <high value="20101231"/>
                        </effectiveTime>
                      </act>
                    </entry>
                  </section>
                </component>
                  <!-- 
                  ********************************************************
                  Patient Data 
                  ********************************************************
                 -->
                <component>
                  <section>
                    <code code="55188-7" codeSystem="2.16.840.1.113883.6.1"/>
                    <title>Patient Data</title>
                  </section>
                </component>
               <!--
               **************************************************
               PROBLEM SECTION
               **************************************************
               -->
                <component>
                  <section>
                    <!--Problems are observations and the next two lines are fixed -WVP-->
                    <templateId root="2.16.840.1.113883.10.20.1.11"/>
                    <code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem list"/>
                    <title>Problems</title>
                    <text>
                      <table border="1" width="100%">
                        <tbody>
                          <tr>
                            <th>Condition</th>
                            <th>Effective Dates</th>
                            <th>Condition Status</th>
                          </tr>
                          <tr>
                            <td>Diabetes mellitus</td>
                            <td>1995</td>
                            <td>Active/Chronic</td>
                          </tr>
                          <tr>
                            <td>Congestive Heart Failure</td>
                            <td>2007</td>
                            <td>Active/Chronic</td>
                          </tr>
                          <tr>
                            <td>Myocardial Infactioon</td>
                            <td>1996</td>
                            <td>Resolved</td>
                          </tr>
                        </tbody>
                      </table>
                    </text>
                    <!--DRIV is derived from and both source and target are observations Next three lines are WVP-->
                    <entry typeCode="DRIV">
                      <act classCode="ACT" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.1.27"/>
                        <!-- Problem act template -->
                        <!--This is a UID for this problem-->
                        <id root="82dd6640-8669-11df-a4ee-0800200c9a66"/>
                        <code nullFlavor="NA"/>
                        <!--relates an aCT to a subject act that the first act is primarily concerned with-->
                        <entryRelationship typeCode="SUBJ">
                          <observation classCode="OBS" moodCode="EVN">
                            <!--10.20.1.50 is for observation-->
                            <templateId root="2.16.840.1.113883.10.20.1.28"/>
                            <!-- Problem observation template -->
                            <id root="82dd6641-8669-11df-a4ee-0800200c9a66"/>
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <effectiveTime>
                              <low value="19950101"/>
                            </effectiveTime>
                            <!--CD is a concept descriptor and the code systeem is ICD9 for 6.103 -->
                            <value xsi:type="CD" code="250.00" codeSystem="2.16.840.1.113883.6.103" displayName="Diabetes Mellitus"/>
                            <!--REFR is refers to-->
                             <entryRelationship typeCode="REFR">
                              <!-- EVN is event or a service that actually happens-->
                              <observation classCode="OBS" moodCode="EVN">
                                <!--10.20.1.50 is observation template OID-->
                                <templateId root="2.16.840.1.113883.10.20.1.50"/>
                                <!-- Problem status observation template -->
                                <!--33999-4 is for status template-->
                                <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
                                <statusCode code="completed"/>
                                <!--55561003 is fro active CE is for coded with equivalents data type and 6.96 is SNOMED  CT-->
                                <value xsi:type="CE" code="90734009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Chronic"/>
                              </observation>
                            </entryRelationship>
                          </observation>
                        </entryRelationship>
                      </act>
							      </entry>
                    <!--DRIV is derived from and both source and target are observations Next three lines are WVP-->
                    <entry typeCode="DRIV">
                      <act classCode="ACT" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.1.27"/>
                        <!-- Problem act template -->
                        <!--This is a UID for this problem-->
                        <id root="82dd6642-8669-11df-a4ee-0800200c9a66"/>
                        <code nullFlavor="NA"/>
                        <!--relates an aCT to a subject act that the first act is primarily concerned with-->
                        <entryRelationship typeCode="SUBJ">
                          <observation classCode="OBS" moodCode="EVN">
                            <!--10.20.1.50 is for observation-->
                            <templateId root="2.16.840.1.113883.10.20.1.28"/>
                            <!-- Problem observation template -->
                            <id root="82dd6643-8669-11df-a4ee-0800200c9a66"/>
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <effectiveTime>
                              <low value="20070101"/>
                            </effectiveTime>
                            <!--CD is a concept descriptor and the code systeem is ICD9 for 6.103 -->
                            <value xsi:type="CD" code="428.0" codeSystem="2.16.840.1.113883.6.103" displayName="Congestive Heart Failure"/>
                            <!--REFR is refers to-->
                            <entryRelationship typeCode="REFR">
                              <!-- EVN is event or a service that actually happens-->
                              <observation classCode="OBS" moodCode="EVN">
                                <!--10.20.1.50 is observation template OID-->
                                <templateId root="2.16.840.1.113883.10.20.1.50"/>
                                <!-- Problem status observation template -->
                                <!--33999-4 is for status template-->
                                <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
                                <statusCode code="completed"/>
                                <!--55561003 is fro active CE is for coded with equivalents data type and 6.96 is SNOMED  CT-->
                                <value xsi:type="CE" code="90734009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Chronic"/>
                              </observation>
                            </entryRelationship>
                          </observation>
                        </entryRelationship>
                      </act>
							      </entry>
                    <entry typeCode="DRIV">
                      <act classCode="ACT" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.1.27"/>
                        <!-- Problem act template -->
                        <!--This is a UID for this problem-->
                        <id root="82dd6640-8669-11df-a4ee-0800200c9a66"/>
                        <code nullFlavor="NA"/>
                        <!--relates an aCT to a subject act that the first act is primarily concerned with-->
                        <entryRelationship typeCode="SUBJ">
                          <observation classCode="OBS" moodCode="EVN">
                            <!--10.20.1.50 is for observation-->
                            <templateId root="2.16.840.1.113883.10.20.1.28"/>
                            <!-- Problem observation template -->
                            <id root="82dd6641-8669-11df-a4ee-0800200c9a66"/>
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <effectiveTime>
                              <low value="19960101"/>
                            </effectiveTime>
                            <!--CD is a concept descriptor and the code systeem is ICD9 for 6.103 -->
                            <value xsi:type="CD" code="412" codeSystem="2.16.840.1.113883.6.103" displayName="Old Myocardial Infarction"/>
                            <!--REFR is refers to-->
                            <entryRelationship typeCode="REFR">
                              <!-- EVN is event or a service that actually happens-->
                              <observation classCode="OBS" moodCode="EVN">
                                <!--10.20.1.50 is observation template OID-->
                                <templateId root="2.16.840.1.113883.10.20.1.50"/>
                                <!-- Problem status observation template -->
                                <!--33999-4 is for status template-->
                                <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
                                <statusCode code="completed"/>
                                <!--55561003 is fro active CE is for coded with equivalents data type and 6.96 is SNOMED  CT-->
                                <value xsi:type="CE" code="73425007" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Inactive"/>
                              </observation>
                            </entryRelationship>
                          </observation>
                        </entryRelationship>
                      </act>
							      </entry>
                  </section>
 </component> 
                <!--
                *********************************************
                Medication Section
                *********************************************
                -->
                <component>
                  <section>
                  <!--<templateId root="2.16.840.1.113883.3.88.11.83.112" assigningAuthorityName="HITSP/C83"/>-->
                  <!--<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.19" assigningAuthorityName="IHE PCC"/>-->
                  <templateId root="2.16.840.1.113883.10.20.1.8" assigningAuthorityName="HL7 CCD"/>
                  <code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
                  <title>Medications</title>
                  <text>
                  <table border="1" width="100%">
                  <thead>
                  <tr>
                  <th>Medication</th>
                  <th>Date</th>
                  <th>Status</th>
                  <th>Form</th>
                  <th>Strength</th>
                  <th>Quantity</th>
                  <th>SIG</th>
                   <th>Refills</th>
                  <th>Prescribed by</th>
                  </tr>
                  </thead>
                  <tbody>
                  <tr>
                  <td>GLYBURIDE-METFORMIN 2.5 mg-500 mg oral tablet</td>
                  <td>7-3-2010</td>
                  <td>ACTIVE</td>
                  <td>TABLET</td>
                  <td>2.5/500 MG</td>
                  <td>90 TAB</td>
                  <td> ONE BY MOUTH Q12H</td>
                  <td>two</td> 
	                <td>Nancy Anthracite, MD</td>
                  </tr>
                  <tr>
                  <td>ATENOLOL 100MG TAB</td>
                  <td>7-3-2010</td>
                  <td>ACTIVE</td>
                  <td>TAB</td>
                  <td>100 MG</td>
                  <td>90 TAB</td>
                  <td>ONE TAB (BY MOUTH) QD</td>
                  <td>TWO</td>
                   <td>Nancy Anthracite, MD</td>
                  </tr>
                  <tr>
                  <td>LISINOPRIL 20MG TAB</td>
                  <td>7-3-2010</td>
                  <td>ACTIVE</td>
                  <td>TAB</td>
                  <td>20 MG</td>
                  <td>90 TAB</td>
                  <td>20 MG ORAL (BY MOUTH) QAM</td>
                  <td>2</td>
                  <td>Nancy Anthracite, MD</td>
                  </tr>
                  </tbody>
                  </table>
                  </text>
                  <entry typeCode="DRIV">
                  <!-- WVP EVN mood code is for event or a service that actually happens-->
                  <substanceAdministration classCode="SBADM" moodCode="EVN">
                  <!--WVP Substance Adminstration Template 10.20.1.24 what is administered but 10.20.1.34 would be for supply activity-->
                    <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/>
                    <templateId root="2.16.840.1.113883.3.249.19.5.10" extension="10016"/>
                    <!--<id root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1" assigningAuthorityName="IHE PCC"/>-->
                    <!--<id root="MED1" extension="CCRObjectID"/>-->
                    <id root="2.16.840.1.113883.19.5.10" extension="100016"/>
                    <statusCode code="completed"/>
                    <effectiveTime xsi:type="IVL_TS">
                      <low value="20100703"/>
                      <high nullFlavor="UNK"/>
 
							        </effectiveTime>
                     <effectiveTime xsi:type="PIVL_TS" operator="A">
								          <period value="12" unit="h"/>
                    </effectiveTime>
                    <!--SHOULD have this routeOfAdminstartionbut I can't find the codes for it-->
                    <!--Downloadable resource is missing them-->
                    <!--<routeCode displayName="" code="" codeSystemName="2.16.840.1.113883.5.112"/>-->
                    <doseQuantity value="1">
                      <!--Unit was missing from generated CCD MG was added (hope it is right!)-->
                      <low value="1" unit="TAB"/>
                      <high value="1" unit="TAB"/>
                    </doseQuantity>
                    <consumable>
                      <manufacturedProduct>
                        <!--<templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/>-->
                          <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/>
                        <!--<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/>-->
                        <manufacturedMaterial>
                        <!--this will be right RxNorm in 2011-->
                        <!--Other options to use
                        00087607311 glyBURIDE-metformin 2.5 mg-500 mg oral tablet
                        00087607411 glyBURIDE-metformin 5 mg-500 mg oral tablet
                        00087607731 glipiZIDE-metformin 2.5 mg-500 mg oral tablet
                        00087607831 glipiZIDE-metformin 5 mg-500 mg oral tablet
                        00087608131 glipiZIDE-metformin 2.5 mg-250 mg oral tablet-->

                          <code code="00087607411" displayName="glyburide-metformin 2.5 mg-500 mg oral tablet" codeSystemName="NDC" codeSystem="2.16.840.1.113883.6.69">
                          <!--<name/>-->
                          <originalText>glyburide-metformin</originalText>
                          </code>
                        </manufacturedMaterial>
                      </manufacturedProduct>
                    </consumable>
                  </substanceAdministration>
                  </entry>
                  <entry typeCode="DRIV">
                  <substanceAdministration classCode="SBADM" moodCode="EVN">
                  <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/>
                  <!--<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1" assigningAuthorityName="IHE PCC"/>-->
                  <!--<id root="MED2" extension="CCRObjectID"/>-->
                  <id root="2.16.840.1.113883.19.5.10" extension="100016"/>
                  <statusCode code="completed"/>
                   <effectiveTime xsi:type="IVL_TS">
                      <low value="20100701"/>
                      <high nullFlavor="UNK"/>
 							        </effectiveTime>
                     <effectiveTime xsi:type="PIVL_TS" operator="A">
								          <period value="12" unit="h"/>
                    </effectiveTime>
                    <!--SHOULD have this routeOfAdminstartionbut I can't find the codes for it-->
                    <!--Downloadable resource is missing them-->
                    <!--<routeCode displayName="" code="" codeSystemName="2.16.840.1.113883.5.112"/>-->
                    <doseQuantity value="1">
                      <!--Unit was missing from generated CCD MG was added (hope it is right!)-->
                      <low value="1" unit="TAB"/>
                      <high value="1" unit="TAB"/>
                    </doseQuantity>  
                  <consumable>
                  <manufacturedProduct>
                  <!--<templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/>-->
                  <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/>
                  <!--<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/>-->
                  <manufacturedMaterial>
                  <!--not valid until 2011-->
                  <!--<code displayName="ATENOLOL 100MG TAB" code="197379" codeSystemName="RXNORM" codeSystem=""/>-->
                  <!--Other Options
                  00005321843	atenolol 25 mg oral tablet	Atenolol
                  00005321934	atenolol 50 mg oral tablet	Atenolol
                  00005321943	atenolol 50 mg oral tablet	Atenolol
                  00005322034	atenolol 100 mg oral tablet	Atenolol
                  00005322043	atenolol 100 mg oral tablet	Atenolol
                  -->
                  <code code="00005322034" displayName="ATENOLOL 100MG TAB" codeSystemName="NDC" codeSystem="2.16.840.1.113883.6.69">
                  <!--<name/>-->
                  <originalText>atenolol</originalText>
                  </code>
                  </manufacturedMaterial>
                  </manufacturedProduct>
                  </consumable>
                  </substanceAdministration>
                  </entry>
                  <entry typeCode="DRIV">
                  <substanceAdministration classCode="SBADM" moodCode="EVN">
                  <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/>
                  <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1" assigningAuthorityName="IHE PCC"/>
                  <id root="2.16.840.1.113883.19.5.10" extension="100016"/>
                  <statusCode code="completed"/>
                  <effectiveTime xsi:type="IVL_TS">
                  <low value="20100703"/>
                  <high nullFlavor="UNK"/>
                  </effectiveTime>
                  <!--<routeCode displayName="" code="" codeSystemName="2.16.840.1.113883.5.112"/>-->
                  <doseQuantity>
                  <low value="20" unit="MG"/>
                  <high value="20" unit="MG"/>
                  </doseQuantity>
                  <consumable>
                  <manufacturedProduct>
                  <templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/>
                  <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/>
                  <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/>
                  <!--Other options
                  00006001528	lisinopril 2.5 mg oral tablet
                  00006001531	lisinopril 2.5 mg oral tablet
                  00006001558	lisinopril 2.5 mg oral tablet
                  00006001928	lisinopril 5 mg oral tablet
                  00006001954	lisinopril 5 mg oral tablet
                  00006001958	lisinopril 5 mg oral tablet
                  00006001972	lisinopril 5 mg oral tablet
                  00006001982	lisinopril 5 mg oral tablet
                  00006001987	lisinopril 5 mg oral tablet
                  00006001994	lisinopril 5 mg oral tablet
                  00006010628	lisinopril 10 mg oral tablet
                  00006010631	lisinopril 10 mg oral tablet
                  00006010654	lisinopril 10 mg oral tablet
                  00006010658	lisinopril 10 mg oral tablet
                  00006010672	lisinopril 10 mg oral tablet
                  00006010682	lisinopril 10 mg oral tablet
                  00006010686	lisinopril 10 mg oral tablet
                  00006010687	lisinopril 10 mg oral tablet
                  00006010694	lisinopril 10 mg oral tablet
                  -->

                  
                  <manufacturedMaterial>
                  <code displayName="LISINOPRIL 10 MG TAB" code="00006010628" codeSystemName="NDC" codeSystem="2.16.840.1.113883.6.69">
                  <originalText>lisinopril</originalText>
                  </code>
                  </manufacturedMaterial>
                  </manufacturedProduct>
                  </consumable>
                  </substanceAdministration>
                  </entry>
                  </section>
                </component>
<!--
******************************
Results Section
***********************
-->
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.14"/>
<code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
<title>Results</title>
<text>
<table border="1" width="100%">
<tbody>
<tr>
<th>Test</th>
<th>Date</th>
<th>Result</th>
<th>Ref. Range</th>

</tr>

<tr>
<td>Calculated LDL</td>
<td>7-3-2010</td>
<td>LDL CHOLESTEROL 90 MG/DL</td>
<td>0-130</td>

</tr>
<tr>
<td>HEMOGLOBIN A1C 9.1 percent H</td>
<td>7-3-2010</td>
<td>A1C 9.1 percent H</td>
<td>3.5-6.0</td>
</tr>
<tr>
<td>EJECTION FRACTION</td>
<td>20100210</td>
<td>39%</td>
<td>55-75</td>
</tr>

</tbody>
</table>
</text>

<entry contextConductionInd="true" typeCode="DRIV">
<organizer classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.32"/>
<id root="38eb54f1-888c-11df-a4ee-0800200c9a66"/>
<code code="27571006" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1" displayName="chemistry"/>
<statusCode code="completed"/>
<effectiveTime value="201007031300"/>
<!--LDL -->
<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<!--WV GUID goes below-->
<id root="a32801b1-8855-11df-a4ee-0800200c9a66"/>
<code displayName="CALCULATED LDL IN MG/DL" code="13457-7" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1"/>
<!--WV Some other alternatives-->
<!--<code displayName="DIRECTLY MEASURED LDL IN MG/DL" code="18262-6" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1"/>-->
<!--<code displayName="LDL CHOLESTEROL, NO METHOD, MG/DL" code="2089-1" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1"/>-->

<text>
<reference value="90 mg/dl"/>
</text>
<effectiveTime value="201007031300"/>
<value xsi:type="PQ" value="90" unit="MG/DL"/>
<referenceRange>
<observationRange>
<text>0-130</text>
</observationRange>
</referenceRange>
</observation>
</component>
</organizer>
</entry>

<!--
********************************
Hemoglobin A1C in Hematology
***********************************
-->
<entry typeCode="DRIV">
<organizer classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.32"/>
<id root="38eb54f7-888c-11df-a4ee-0800200c9a66"/>
<code code="272275004" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1" displayName="hematology"/>
<statusCode code="completed"/>
<effectiveTime value="201007031300"/>
<component>
<observation classCode="OBS" moodCode="EVN">
<!--<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>-->
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<!--<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>-->
<id root="a32801b6-8855-11df-a4ee-0800200c9a66"/>
<code displayName="HEMOGLOBIN A1C By UNKNOWN METHOD" code="4548-4" codeSystemName="LOINC" codeSystem="2.16.840.1.113883.6.1"/>
<text>
<reference value="9.1 percent"/>
</text>


<value xsi:type="PQ" value="9.1" unit="%"/>
<interpretationCode displayName="Abnormal High" code="H" codeSystemName="2.16.840.1.113883.5.83"/>
<referenceRange>
<observationRange>
<text>3.5-6.0</text>
</observationRange>
</referenceRange>
</observation>
</component>
</organizer>
</entry>


<!--
******************************
ejection fraction
*******************************
THIS IS WHERE THE PROBLEM IS WITH STATUS 
cvc-complex-type.2.4.a: Invalid content was found starting with element 'observation'. One of '{"urn:hl7-org:v3":statusCode}' is expected.
-->

<entry contextConductionInd="true" typeCode="DRIV">
<organizer classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.32"/>
<id root="38eb54f1-888c-11df-a4ee-0800200c9a66"/>
<code code="363679005" codeSystemName="SNOMED CT" displayName="IMAGING"/>
<statusCode code="completed"/>

<component>
<observation classCode="OBS" moodCode="EVN">
<!--<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>-->
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<!--<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>-->
<id root="38eb54f2-888c-11df-a4ee-0800200c9a66"/>
<code code="250908004" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="LEFT VERTRICULAR EJECTION FRACTION"/>
<text>LEFT VERTRICULAR EJECTION FRACTION</text>
<effectiveTime value="201002101300"/>
<value xsi:type="PQ" value="39" unit="%"/>
<referenceRange>
<observationRange>
<text>55-75</text>
</observationRange>
</referenceRange>
</observation>
</component>
</organizer>
</entry>

</section>
</component>
<!--
******************************
Procedures Section
**********************
-->
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.12"/>
<code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of procedures"/>
<title>Procedures</title>
<text>
<table border="1" width="100%">
<tbody>
<tr>
<th>Procedure</th>
<th>Date </th>
<th>Ordered By</th>
<th>Performed By</th>
</tr>
<tr>
<td>Mammogram</td>
<td>2-10-2010</td>
<td>Nancy Anthracite, MD</td>
<td>Grover, Christie &amp; Merritt</td>
</tr>
<tr>
<td>Colonoscopy</td>
<td>2-18-2010</td>
<td>Nancy Anthracite, MD</td>
<td>John Gallager, MD</td>
</tr>
</tbody>
</table>
</text>

<!--There are three options to choose from here those being Acts, Observations
or Procedures. Uncomment the one you need.  These are in Tab M of the Downloadable Resource-->
<!--<entry  typeCode="DRIV"/>
<procedure classCode="PROC" moodCode="EVN/>"
<templateId root="2.16.840.1.113883.10.20.1.29"/>-->
<!-- this is a purpose type of activity and a problem is a Problem Activity with a different template-->
<!--<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.30"/>-->
<!--There are lots of observation templates as well. This is the Result observation which I hope is right-->
<!--<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.31"/>-->

<entry typeCode="DRIV">
<procedure classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.29"/>
<id root="a32801b9-8855-11df-a4ee-0800200c9a66"/>
<code code="24623002" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="SCREENING MAMMOGRAPHY"/>
<statusCode code="completed"/>
<effectiveTime value="20100210"/>
<participant typeCode="DEV">
<participantRole classCode="MANU">
<templateId root="2.16.840.1.113883.10.20.1.52"/>
<id root="7eedbc62-8a15-11df-a4ee-0800200c9a66"/>
</participantRole>
</participant>
</procedure>




</entry>
</section>
 </component>


                
              <!--
              *********************************************
                       Immunization Section
              ***********************************************
              -->
                <component>
                  <section>
                    <templateId root="2.16.840.1.113883.10.20.1.6"/>
                    <code code="11369-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of immunizations"/>
                    <title>History of Immunizations</title>
                    <text>
                      <table border="1" width="100%">
                        <thead>
                          <tr>
                          <th>Vaccine</th>
                          <th>Date</th>
                          <th>Status</th>
                          </tr>
                        </thead>
                        <tbody>
                          <tr>
                          <td>Influenza virus vaccine, split</td>
                          <td>Oct. 15. 2009</td>
                          <td>Completed</td>
                          </tr>
                          <tr>
                          <td>Pneumococcal vaccine</td>
                          <td>Jan. 10,2010</td>
                          <td>Completed</td>
                          </tr>
                        </tbody>
                      </table>
                    </text>
                    <entry typeCode="DRIV">
                      <substanceAdministration classCode="SBADM" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.1.24"/>
                        <!-- WVP Medication activity template -->
                        <id root="2.16.840.1.113883.3.543" extension="01.02.03.100020"/>
                        
                        <statusCode code="completed"/>
                        <effectiveTime xsi:type="IVL_TS">
                          <center value="20091015"/>
                        </effectiveTime>
                        <routeCode code="IM" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Intramuscular injection"/>
                        <consumable>
                          <manufacturedProduct>
                            <templateId root="2.16.840.1.113883.10.20.1.53"/>
                            <!-- Product template -->
                            <manufacturedMaterial>
                              <!--Code is from table D Downloadabe Resource CVX code system is 6.59-->
                              <code code="15" codeSystem="2.16.840.1.113883.6.59" displayName="INFLUENZA VIRUS VACCIINE, SPLIT">
                                <originalText>INFLUENZA VIRUS VACCIINE, SPLIT</originalText>
                              </code>
                            </manufacturedMaterial>
                          </manufacturedProduct>
                        </consumable>
                      </substanceAdministration>
                    </entry>
                    <entry typeCode="DRIV">
                      <substanceAdministration classCode="SBADM" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.1.24"/>
                        <!-- WVP Medication activity template -->
                        <id root="2.16.840.1.113883.3.543" extension="01.02.03.100021"/>
                        
                        <statusCode code="completed"/>
                        <effectiveTime xsi:type="IVL_TS">
                            <center value="20100110"/>
                        </effectiveTime>
                        <routeCode code="IM" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Intramuscular injection"/>		
                        <consumable>
                          <manufacturedProduct>
                            <!-- WVP Product template -->
                            <templateId root="2.16.840.1.113883.10.20.1.53"/>
                            <manufacturedMaterial>
                              <!--Code is from table D Downloadabe Resource CVX code system is 6.59-->
                              <code code="33" codeSystem="2.16.840.1.113883.6.59" displayName="PNEUMOCCAL VACCINE">
                              <originalText>PNEUMOCCAL VACCINE</originalText>
                              </code>
                            </manufacturedMaterial>
                          </manufacturedProduct>
                        </consumable>
                      </substanceAdministration>
                    </entry>
                  </section>
                </component>
                <!--
*****************************************************
Vital Signs Section
****************************************
-->
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.16"/>
<code code="8716-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Vital signs"/>
<title>Vital Signs</title>
<text>
<table border="1" width="100%">
<tbody>
<tr>
<th>Date</th>
<th>Vital Sign</th>
<th>Result</th>
<th>Source</th>
</tr>
<tr>
<td>2-5-2010</td>
<td>Systolic Blood Pressure</td>
<td>130</td>
<td>WorldVistA Test Clinic</td>

</tr>
<tr>
<td>2-5-2010</td>
<td>Diastolic Blood Pressure</td>
<td>78</td>
<td>WorldVistA Test Clinic</td>
</tr>
<tr>
<td>2-5-2010</td>
<td>Heart Rate</td>
<td>55</td>
<td>WorldVistA Test Clinic</td>
</tr>
<tr>
<td>7-3-2010</td>
<td>Systolic Blood Pressure</td>
<td>128</td>
<td>WorldVistA Test Clinic</td>

</tr>
<tr>
<td>7-3-2010</td>
<td>Diastolic Blood Pressure</td>
<td>80</td>
<td>WorldVistA Test Clinic</td>
</tr>
<tr>
<td>7-3-2010</td>
<td>Heart Rate</td>
<td>57</td>
<td>WorldVistA Test Clinic</td>
</tr>
</tbody>
</table>
</text>


<!--Vital Signs from 2-5-2010 under an organizer follow.  Onlty these 3 vistal signs are allowed-->
<!--WVV Must change the UUIDs for the vital signs and the entries-->

<entry typeCode="DRIV">
<organizer classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.32" assigningAuthorityName="CCD"/>
<templateId root="2.16.840.1.113883.10.20.1.35" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.1" assigningAuthorityName="IHE PCC"/>
<id root="7eedbc60-8a15-11df-a4ee-0800200c9a66"/>
<code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs" codeSystemName="SNOMED CT"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="20100205"/>
<high nullFlavor="UNK"/>
</effectiveTime>

<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<id root="a32801b7-8855-11df-a4ee-0800200c9a66"/>
<code displayName="SYSTOLIC BLOOD PRESSURE" code="72313002" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
<value xsi:type="PQ" value="130" unit="MM/HG"/>
</observation>
</component>

<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<id root="a32801b8-8855-11df-a4ee-0800200c9a66"/>
<code displayName="DIASTOLIC BLOOD PRESSURE" code="271649006" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
<value xsi:type="PQ" value="78" unit="MM/HG"/>
</observation>
</component>

<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<id root="7eedbc64-8a15-11df-a4ee-0800200c9a66"/>
<code displayName="HEART RATE" code="364075005" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
<value xsi:type="PQ" value="55" unit="/min"/>
</observation>
</component>
</organizer>
</entry>

<!--Vital Signs from 7-3-2010 under an organizer follow.  Onlty these 3 vistal signs are allowed-->
<!--WVV Must change the UUIDs for the vital signs and the entries-->

<entry typeCode="DRIV">
<organizer classCode="CLUSTER" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.32" assigningAuthorityName="CCD"/>
<templateId root="2.16.840.1.113883.10.20.1.35" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.1" assigningAuthorityName="IHE PCC"/>
<id root="7eede370-8a15-11df-a4ee-0800200c9a66"/>
<code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs" codeSystemName="SNOMED CT"/>
<statusCode code="completed"/>
<effectiveTime>
<low value="20100703"/>
<high nullFlavor="UNK"/>
</effectiveTime>

<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<id root="7eede371-8a15-11df-a4ee-0800200c9a66"/>
<code displayName="SYSTOLIC BLOOD PRESSURE" code="72313002" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
<value xsi:type="PQ" value="128" unit="MM/HG"/>
</observation>
</component>

<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<id root="7eede372-8a15-11df-a4ee-0800200c9a66"/>
<code displayName="DIASTOLIC BLOOD PRESSURE" code="271649006" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
<value xsi:type="PQ" value="80" unit="MM/HG"/>
</observation>
</component>

<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.88.11.83.15" assigningAuthorityName="HITSP C83"/>
<templateId root="2.16.840.1.113883.10.20.1.31" assigningAuthorityName="CCD"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13" assigningAuthorityName="IHE PCC"/>
<id root="7eede373-8a15-11df-a4ee-0800200c9a66"/>
<code displayName="HEART RATE" code="364075005" codeSystemName="SNOMED CT" codeSystem="2.16.840.1.113883.6.96"/>
<value xsi:type="PQ" value="57" unit="/min"/>
</observation>
</component>

</organizer>
</entry>
</section>
</component>

 <!--
************************
Structured Data Section
*************************
-->

<component>
<section>
<!--Template ID is in the downloadable resource bottom of S tab -->
<templateId root="2.16.840.1.113883.3.249.11.16"/>
<code code="STRUCT" codeSystem="2.16.840.1.113883.3.249.12"/>
<title> Structured data section </title>
<text> 
<table border="1" width="100%">
<tbody>
<tr>
<td>Certified System Used</td>
<td>System Type</td>
<td>Certification Type</td>
<td>Encounter Date Used</td>
</tr>
<tr>
<td>WorldVistA EHR</td>
<td> EHR</td>
<td>CCHIT Certified</td>
<td>2-5-2010</td>
</tr>
<tr>
<td>WorldVistA EHR</td>
<td>EHR</td>
<td>Qualified System</td>
<td>7-3-2010</td>
</tr>
<tr>
<td>Allscripts</td>
<td>eRx</td>
<td>Qualified</td>
<td>7-3-2010</td>
</tr>
</tbody>
</table>
</text>
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.249.11.13"/>
<id root="2.16.840.1.113883.3.543" extension="0.01.02.100000001.1"/>
<!--WV? this is in downloadable resource R and is the same for eRx and EHR-->
<!--WV? The G code changes and that is in tab R for 2010 as well-->
<!--There need to be two face to face encounters so this is one and the next one is one-->
<!--Also reflected in the documentationOf part at the end of the header-->
<code code="G8447" codeSystem="2.16.840.1.113883.6.14" displayName="Patient encounter was documented using a CCHIT certified EHR"/>
<effectiveTime value="20100205"/>
</act>
</entry>
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.249.11.13"/>
<id root="2.16.840.1.113883.3.543" extension="0.01.02.100000001.2"/>
<code code="G8448" codeSystem="2.16.840.1.113883.6.14" displayName="Patient encounter was documented using a Qualified (Non-CCHIT certified) EHR"/>
<effectiveTime value="20100703"/>
</act>
</entry>
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.3.249.11.14"/>
<id root="2.16.840.1.113883.19.5" extension="96756615"/>
<code code="G8553" codeSystem="2.16.840.1.113883.6.14" displayName="Electronic prescription has been generated using a qualified eRx system"/>
<effectiveTime value="20100703"/>
</act>
</entry>
</section>
</component>
                
                
                
                <component>
                  <section>
                    <templateId root="2.16.840.1.113883.10.20.1.1"/>
                    <code code="42348-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Advance directives"/>
                    <title/>
                  </section> 
                  </component>
<!--
 ************************************
 Payers section
 
 *******************************
 --> 

<component>
<section>
<templateId root="2.16.840.1.113883.10.20.1.9"/>
<!-- 48768-6 is payment sources -->
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Payment sources"/>
<title>Payment Sources</title>
<text>
<table border="1" width="100%">
<tbody>
<tr>
<th>Payer name</th>
<th>Group/Type</th>
<th>Primary Policy Owner/Responsible Party</th>
<th>Covered party ID</th>
<th>Payor Telephone</th>
<th>Electronic Claims Payor Number</th>
<th>Authorized</th>
</tr>
<tr>
<td>Mail Handlers Benefit Plan</td>
<td>454</td>
<td>Jody Jean Jones</td>
<td>8888888</td>
<td>1-800-410-7778</td>
<td>62413</td>
<td>Colonoscopy</td>
</tr>
<tr>
<td>Medicare</td>
<td></td>
<td>Jody Jean Jones</td>
<td>002003004</td>
<td></td>
<td></td>
<td>Colonoscopy</td>
</tr>
</tbody>
</table>
</text>

<!--Mail Handlers-->

<entry typeCode="DRIV">
<!--WVP moodCode is DEF is definition to describe the characteristics of who must be involved in an act-->
<act classCode="ACT" moodCode="DEF">
<!--WVP coverage activity templats is the 10.20.1.20-->
<templateId root="2.16.840.1.113883.10.20.1.20"/>
<id root="d5dc6d50-890c-11df-a4ee-0800200c9a66"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" displayName="Payment sources"/>
<statusCode code="completed"/>
<!--WVP COMP is has component like a sub service to this service-->
<entryRelationship typeCode="COMP">
<!-- WVP EVN for the act is event-->
<act classCode="ACT" moodCode="EVN">
<!--Policy activity is the 10.20.1.26 template-->
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<!-- another random GUID-->
<id root="d5dc6d51-890c-11df-a4ee-0800200c9a66"/>
<!--WV variable and display name is in quotes AUTOPOL - "automobile" policy;EHCPOL additional insurance in addition to Medicare in this case-->
<!--HSAPOL "Health Spending Account";PUBLICPOL "public healthcare" but not Medicare - maybe a state program for example-->
<!--WBCPOL is "workers compensation"-->
<code code="EHCPOL" codeSystem="2.16.840.1.113883.5.4" displayName="Extended healthcare"/>
<!--other statusCode normal, aborted, active, cancelled, completed, held, suspended, nullified, obsolete-->
<statusCode code="completed"/>
<!--WVP performer type codes are numerous but PRF is performer or the person who did it-->
<performer typeCode="PRF">
<assignedEntity>
<!--another GUID??-->
<id root="2.16.840.1.113883.12.86" extension="62413"/>
<representedOrganization>
<name>Mail Handler Benefit Plan</name>
</representedOrganization>
</assignedEntity>
</performer>
<participant typeCode="COV">
<participantRole>
<!--Cant find SELF in the reference documents so this might be variable, but I doubt it is-->
<!-- I suspect this is shat is used whenever the person is the primary policy holder-->
<!-- service deliver location role type is what the 5.111 code is and it is called a "RoleCode" in the downloadable resource-->
<!-- in this case theextension is the patients SSN for a medicare patient-->
<id root="2.16.840.1.113883.4.1" extension="002030004"/>
<code code="SELF" codeSystem="2.16.840.1.113883.5.111" displayName="Self"/>
</participantRole>
</participant>
<!--WVP REFR is "refers to" target act is refered to by the source act-->
<entryRelationship typeCode="REFR">
<act classCode="ACT" moodCode="EVN">
<!--Authorization activity Template-->
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<id root="2.16.840.1.113883.19.5.10" extension="100010"/>
<code nullFlavor="NA"/>
<!--WVP SUBJ is "has subject"-->
<entryRelationship typeCode="SUBJ">
<!--PROC is "procedure" and PRMS is "promise"-->
<procedure classCode="PROC" moodCode="PRMS">
<!--SNOMED code for colonoscopy-->
<code code="73761001" codeSystem="2.16.840.1.113883.6.96" displayName="Colonoscopy"/>
</procedure>
</entryRelationship>
</act>
</entryRelationship>
</act>
</entryRelationship>
</act>
</entry>
<!--Medicare-->

<!--WVP - DRIV is derived from-->
<entry typeCode="DRIV">
<!--WVP moodCode is DEF is definition to describe the characteristics of who must be involved in an act-->
<act classCode="ACT" moodCode="DEF">
<!--WVP coverage activity templats is the 10.20.1.20-->
<templateId root="2.16.840.1.113883.10.20.1.20"/>
<id root="1751b180-8a54-11df-a4ee-0800200c9a66"/>
<code code="48768-6" codeSystem="2.16.840.1.113883.6.1" displayName="Payment sources"/>
<statusCode code="completed"/>
<!--WVP COMP is has component like a sub service to this service-->
<entryRelationship typeCode="COMP">
<!-- WVP EVN for the act is event-->
<act classCode="ACT" moodCode="EVN">
<!--Policy activity is the 10.20.1.26 template-->
<templateId root="2.16.840.1.113883.10.20.1.26"/>
<!-- another random GUID-->
<id root="dbbb6311-8a4d-11df-a4ee-0800200c9a66"/>
<!--WV variable and display name is in quotes AUTOPOL - "automobile" policy;EHCPOL additional insurance in addition to Medicare in this case-->
<!--HSAPOL "Health Spending Account";PUBLICPOL "public healthcare" but not Medicare - maybe a state program for example-->
<!--WBCPOL is "workers compensation"-->
<code code="PUBLICPOL" codeSystem="2.16.840.1.113883.5.4" displayName="Public Healthcare"/>
<!--other statusCode normal, aborted, active, cancelled, completed, held, suspended, nullified, obsolete-->
<statusCode code="completed"/>
<!--WVP performer type codes are numerous but PRF is performer or the person who did it-->
<performer typeCode="PRF">
<assignedEntity>
<!--another GUID??-->
<id root="2.16.840.1.113883.12.86" extension="MC"/>
<representedOrganization>
<name>CMS</name>
</representedOrganization>
</assignedEntity>
</performer>
<participant typeCode="COV">
<participantRole>
<!--Cant find SELF in the reference documents so this might be variable, but I doubt it is-->
<!-- I suspect this is shat is used whenever the person is the primary policy holder-->
<!-- service deliver location role type is what the 5.111 code is and it is called a "RoleCode" in the downloadable resource-->
<id root="1751b180-8a54-11df-a4ee-0800200c9a66"/>
<!-- in this case theextension is the patients SSN for a medicare patient so it is the same each time for one patient-->
<id root="2.16.840.1.113883.4.1" extension="002030004"/>
<code code="SELF" codeSystem="2.16.840.1.113883.5.111" displayName="Self"/>
</participantRole>
</participant>
<!--WVP REFR is "refers to" target act is refered to by the source act-->
<entryRelationship typeCode="REFR">
<act classCode="ACT" moodCode="EVN">
<!--Authorization activity Template-->
<templateId root="2.16.840.1.113883.10.20.1.19"/>
<id root="e1e0f7e0-8a53-11df-a4ee-0800200c9a66"/>
<code nullFlavor="NA"/>
<!--WVP SUBJ is "has subject"-->
<entryRelationship typeCode="SUBJ">
<!--PROC is "procedure" and PRMS is "promise"-->
<procedure classCode="PROC" moodCode="PRMS">
<!--SNOMED code for colonoscopy-->
<code code="73761001" codeSystem="2.16.840.1.113883.6.96" displayName="Colonoscopy"/>
</procedure>
</entryRelationship>
</act>
</entryRelationship>
</act>
</entryRelationship>
</act>
</entry>


</section>
</component>
</section>
</component>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
