Index: ccr2ccd-xslt/trunk/gpl/qrda-header.xsl
===================================================================
--- ccr2ccd-xslt/trunk/gpl/qrda-header.xsl	(revision 981)
+++ ccr2ccd-xslt/trunk/gpl/qrda-header.xsl	(revision 982)
@@ -67,6 +67,9 @@
 	<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"/>
+	<id>
+                <xsl:attribute name="root">
+                    <xsl:value-of select="/a:ContinuityOfCareRecord/a:CCRDocumentObjectID"></xsl:value-of>
+                </xsl:attribute>
+            </id>
 		 <!--WVP next two lines fixed-->
 	<code code="55182-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Quality Measure Report"/>
@@ -89,55 +92,9 @@
 	<!-- 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>
+<patientRole>
+                <xsl:call-template name="ccdPatientRole">
+                    <xsl:with-param name="ccrActorObjectID" select="/a:ContinuityOfCareRecord/a:Patient[1]/a:ActorID"/>
+                </xsl:call-template>
+                </patientRole>
 	</recordTarget>
 
