@Test
public void testCreateClinicalDocumentFromXMLStringAndCreateClinicalDocumentStringFromObject() throws IOException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, SAXException {

	String c32="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<?xml-stylesheet href=\"http://obhita.org/CDA.xsl\" type=\"text/xsl\"?><ClinicalDocument xmlns=\"urn:hl7-org:v3\"\r\n                  xmlns:hl7=\"urn:hl7-org:v3\"\r\n                  xmlns:sdtc=\"urn:hl7-org:sdtc\"\r\n                  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n                  xsi:schemaLocation=\"urn:hl7-org:v3 schema/cdar2c32/infrastructure/cda/C32_CDA.xsd\">\r\n   <realmCode code=\"US\"/>\r\n   <typeId root=\"2.16.840.1.113883.1.3\" extension=\"POCD_HD000040\"/>\r\n   <templateId root=\"2.16.840.1.113883.3.27.1776\" assigningAuthorityName=\"CDA/R2\"/>\r\n   <templateId root=\"2.16.840.1.113883.10.20.3\"\r\n               assigningAuthorityName=\"HL7/CDT Header\"/>\r\n   <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.1.1\" assigningAuthorityName=\"IHE/PCC\"/>\r\n   <templateId root=\"2.16.840.1.113883.3.88.11.32.1\"\r\n               assigningAuthorityName=\"HITSP/C32\"/>\r\n   <id root=\"2.16.840.1.113883.3.72\" assigningAuthorityName=\"FEI Systems Inc.\"/>\r\n   <code code=\"34133-9\"\r\n         displayName=\"Summarization of episode note\"\r\n         codeSystem=\"2.16.840.1.113883.6.1\"\r\n         codeSystemName=\"LOINC\"/>\r\n   <title>Summarization of episode note</title>\r\n   <effectiveTime value=\"201312181031\" xsi:type=\"IVL_TS\"/>\r\n   <confidentialityCode code=\"N\"/>\r\n   <languageCode code=\"en-US\"/>\r\n   <recordTarget>\r\n      <patientRole>\r\n         <id root=\"00000000-0000-0000-0000-000000000000\" extension=\"PUI100010060001\"/>\r\n         <addr>\r\n            <streetAddressLine>7175 Columbia Gateway Drive</streetAddressLine>\r\n            <city>Columbia</city>\r\n            <state>Maryland</state>\r\n            <postalCode>21046</postalCode>\r\n         </addr>\r\n         <telecom value=\"555-255-5454\"/>\r\n         <patient>\r\n            <name>\r\n               <family>Patientone</family>\r\n               <given>Asample</given>\r\n            </name>\r\n            <administrativeGenderCode code=\"M\"\r\n                                      codeSystem=\"2.16.840.1.113883.5.1\"\r\n                                      codeSystemName=\"HL7 AdministrativeGender\"\r\n                                      displayName=\"Male\"/>\r\n            <birthTime value=\"19710510\"/>\r\n            <maritalStatusCode nullFlavor=\"UNK\"/>\r\n            <religiousAffiliationCode nullFlavor=\"UNK\"/>\r\n            <raceCode nullFlavor=\"UNK\"/>\r\n            <ethnicGroupCode nullFlavor=\"UNK\"/>\r\n            <birthplace nullFlavor=\"UNK\">\r\n               <place>\r\n                  <addr>\r\n                     <streetAddressLine/>\r\n                     <city/>\r\n                     <state/>\r\n                     <postalCode/>\r\n                  </addr>\r\n               </place>\r\n            </birthplace>\r\n            <languageCommunication>\r\n               <templateId root=\"2.16.840.1.113883.3.88.11.83.2\"\r\n                           assigningAuthorityName=\"HITSP/C83\"/>\r\n               <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.2.1\" assigningAuthorityName=\"IHE/PCC\"/>\r\n               <languageCode code=\"en-US\"/>\r\n            </languageCommunication>\r\n         </patient>\r\n      </patientRole>\r\n   </recordTarget>\r\n   <author>\r\n      <time value=\"20000407130000+0500\"/>\r\n      <assignedAuthor>\r\n         <id nullFlavor=\"UNK\"/>\r\n         <addr/>\r\n         <telecom/>\r\n         <assignedPerson>\r\n            <name>\r\n               <family>family</family>\r\n               <given>given</given>\r\n               <prefix>prefix</prefix>\r\n            </name>\r\n         </assignedPerson>\r\n      </assignedAuthor>\r\n   </author>\r\n   <custodian>\r\n      <assignedCustodian>\r\n         <representedCustodianOrganization>\r\n            <id root=\"00000000-0000-0000-0000-000000000000\" extension=\"100010020002\"/>\r\n            <name>Safe Harbor Enterprises</name>\r\n            <telecom nullFlavor=\"NI\"/>\r\n            <addr nullFlavor=\"NI\"/>\r\n         </representedCustodianOrganization>\r\n      </assignedCustodian>\r\n   </custodian>\r\n   <component>\r\n      <structuredBody>\r\n         <component>\r\n            <section>\r\n               <templateId root=\"2.16.840.1.113883.3.88.11.83.103\"\r\n                           assigningAuthorityName=\"HITSP/C83\"/>\r\n               <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.3.6\" assigningAuthorityName=\"IHE PCC\"/>\r\n               <templateId root=\"2.16.840.1.113883.10.20.1.11\" assigningAuthorityName=\"HL7 CCD\"/>\r\n               <code code=\"11450-4\"\r\n                     codeSystem=\"2.16.840.1.113883.6.1\"\r\n                     codeSystemName=\"LOINC\"\r\n                     displayName=\"Problem list\"/>\r\n               <title>Problems</title>\r\n               <text>\r\n                  <table width=\"100%\" border=\"1\">\r\n                     <thead>\r\n                        <tr>\r\n                           <th>Problem Name</th>\r\n                           <th>Problem Code</th>\r\n                           <th>Effective Dates</th>\r\n                           <th>Problem Status</th>\r\n                        </tr>\r\n                     </thead>\r\n                     <tbody>\r\n                        <tr ID=\"d17e240\">\r\n                           <td>Diabetes mellitus type 2 (disorder)</td>\r\n                           <td>44054006</td>\r\n                           <td/>\r\n                           <td>Resolved</td>\r\n                        </tr>\r\n                        <tr ID=\"d17e263\">\r\n                           <td>Asthma (disorder)</td>\r\n                           <td>195967001</td>\r\n                           <td/>\r\n                           <td>Inactive</td>\r\n                        </tr>\r\n                        <tr ID=\"d17e286\">\r\n                           <td>Coronary artery atheroma (disorder)</td>\r\n                           <td>67682002</td>\r\n                           <td/>\r\n                           <td>Inactive</td>\r\n                        </tr>\r\n                        <tr ID=\"d17e309\">\r\n                           <td>Hyperlipidemia (disorder)</td>\r\n                           <td>55822004</td>\r\n                           <td/>\r\n                           <td>Active</td>\r\n                        </tr>\r\n                        <tr ID=\"d17e332\">\r\n                           <td>Hypertension associated with transplantation (disorder)</td>\r\n                           <td>427889009</td>\r\n                           <td/>\r\n                           <td>Active</td>\r\n                        </tr>\r\n                        <tr ID=\"d17e356\">\r\n                           <td>Acute HIV</td>\r\n                           <td>111880001</td>\r\n                           <td/>\r\n                           <td>Active</td>\r\n                        </tr>\r\n                        <tr ID=\"d17e379\">\r\n                           <td>Substance Abuse Disorder</td>\r\n                           <td>66214007</td>\r\n                           <td/>\r\n                           <td>Active</td>\r\n                        </tr>\r\n                     </tbody>\r\n                  </table>\r\n               </text>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e240\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e240\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e240\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"44054006\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Diabetes mellitus type 2 (disorder)\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"413322009\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Resolved\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e263\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e263\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e263\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"195967001\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Asthma (disorder)\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"73425007\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Inactive\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e286\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e286\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e286\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"67682002\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Coronary artery atheroma (disorder)\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"73425007\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Inactive\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e309\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e309\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e309\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"55822004\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Hyperlipidemia (disorder)\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"55561003\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Active\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e332\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e332\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e332\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"427889009\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Hypertension associated with transplantation (disorder)\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"55561003\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Active\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e356\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e356\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e356\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"111880001\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Acute HIV\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"55561003\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Active\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <act classCode=\"ACT\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.7\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.27\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e379\"/>\r\n                     <code nullFlavor=\"NA\"/>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                        <low nullFlavor=\"UNK\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                        <sequenceNumber value=\"1\"/>\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.28\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <id root=\"d17e379\"/>\r\n                           <code code=\"55607006\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED-CT\"\r\n                                 displayName=\"Problem\"/>\r\n                           <text>\r\n                              <reference value=\"d17e379\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                           <effectiveTime xsi:type=\"IVL_TS\" nullFlavor=\"UNK\">\r\n                              <low nullFlavor=\"UNK\"/>\r\n                              <high nullFlavor=\"UNK\"/>\r\n                           </effectiveTime>\r\n                           <value xsi:type=\"CD\"\r\n                                  code=\"66214007\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED\"\r\n                                  displayName=\"Substance Abuse Disorder\"/>\r\n                           <entryRelationship typeCode=\"REFR\">\r\n                              <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                                 <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                 <code code=\"33999-4\"\r\n                                       codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                       displayName=\"Status\"/>\r\n                                 <value xsi:type=\"CD\"\r\n                                        code=\"55561003\"\r\n                                        codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                        codeSystemName=\"SNOMED-CT\"\r\n                                        displayName=\"Active\"/>\r\n                              </observation>\r\n                           </entryRelationship>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </act>\r\n               </entry>\r\n            </section>\r\n         </component>\r\n         <component>\r\n            <section>\r\n               <templateId root=\"2.16.840.1.113883.3.88.11.83.112\"\r\n                           assigningAuthorityName=\"HITSP/C83\"/>\r\n               <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.3.19\" assigningAuthorityName=\"IHE PCC\"/>\r\n               <templateId root=\"2.16.840.1.113883.10.20.1.8\" assigningAuthorityName=\"HL7 CCD\"/>\r\n               <code code=\"10160-0\"\r\n                     codeSystem=\"2.16.840.1.113883.6.1\"\r\n                     codeSystemName=\"LOINC\"\r\n                     displayName=\"History of medication use\"/>\r\n               <title>Medications</title>\r\n               <text>\r\n                  <table width=\"100%\" border=\"1\">\r\n                     <thead>\r\n                        <tr>\r\n                           <th>RxNorm Code</th>\r\n                           <th>Product</th>\r\n                           <th>Generic Name</th>\r\n                           <th>Brand Name</th>\r\n                           <th>Dose</th>\r\n                           <th>Form</th>\r\n                           <th>Route</th>\r\n                           <th>Frequency</th>\r\n                           <th>Patient Instructions</th>\r\n                           <th>Status</th>\r\n                           <th>Date Started</th>\r\n                        </tr>\r\n                     </thead>\r\n                     <tbody>\r\n                        <tr ID=\"d17e143\">\r\n                           <td>993536</td>\r\n                           <td>Medication</td>\r\n                           <td>bupropion hydrochloride 200 MG 12 HR Extended Release Tablet [993536]</td>\r\n                           <td/>\r\n                           <td/>\r\n                           <td/>\r\n                           <td/>\r\n                           <td>Two times a day</td>\r\n                           <td/>\r\n                           <td>Active</td>\r\n                           <td>September 14, 2011 </td>\r\n                        </tr>\r\n                        <tr ID=\"d17e190\">\r\n                           <td>199663</td>\r\n                           <td>Medication</td>\r\n                           <td>Zidovudine 300 MG Oral Tablet [199663]</td>\r\n                           <td/>\r\n                           <td/>\r\n                           <td/>\r\n                           <td/>\r\n                           <td>Two times a day</td>\r\n                           <td/>\r\n                           <td>Active</td>\r\n                           <td>October 14, 2011 </td>\r\n                        </tr>\r\n                     </tbody>\r\n                  </table>\r\n               </text>\r\n               <entry typeCode=\"DRIV\">\r\n                  <substanceAdministration classCode=\"SBADM\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.8\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.24\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e143\"/>\r\n                     <code code=\"10160-0\" codeSystem=\"2.16.840.1.113883.6.1\"/>\r\n                     <text>\r\n                        <reference value=\"d17e143\"/>\r\n                     </text>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\">\r\n                        <low value=\"20110914\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <routeCode nullFlavor=\"UNK\"/>\r\n                     <doseQuantity nullFlavor=\"UNK\"/>\r\n                     <administrationUnitCode nullFlavor=\"UNK\"/>\r\n                     <consumable>\r\n                        <manufacturedProduct>\r\n                           <templateId root=\"2.16.840.1.113883.3.88.11.83.8.2\"\r\n                                       assigningAuthorityName=\"HITSP C83\"/>\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.53\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <manufacturedMaterial>\r\n                              <code code=\"993536\"\r\n                                    codeSystem=\"2.16.840.1.113883.6.88\"\r\n                                    codeSystemName=\"RxNorm\"\r\n                                    displayName=\"bupropion hydrochloride 200 MG 12 HR Extended Release Tablet [993536]\">\r\n                                 <originalText>bupropion hydrochloride 200 MG 12 HR Extended Release Tablet [993536]<reference/>\r\n                                 </originalText>\r\n                              </code>\r\n                              <name/>\r\n                           </manufacturedMaterial>\r\n                        </manufacturedProduct>\r\n                     </consumable>\r\n                     <entryRelationship typeCode=\"SUBJ\">\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.3.88.11.83.8.1\"\r\n                                       assigningAuthorityName=\"HITSP C83\"/>\r\n                           <code code=\"329505003\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED CT\"/>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                     <entryRelationship typeCode=\"SUBJ\">\r\n                        <act classCode=\"ACT\" moodCode=\"INT\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.49\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <code code=\"PINSTRUCT\"\r\n                                 codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\"\r\n                                 codeSystemName=\"IHEActCode\"/>\r\n                           <text>\r\n                              <reference value=\"PntrtoSectionText\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                        </act>\r\n                     </entryRelationship>\r\n                     <entryRelationship typeCode=\"SUBJ\">\r\n                        <act classCode=\"ACT\" moodCode=\"INT\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.43\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <code code=\"FINSTRUCT\"\r\n                                 codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\"\r\n                                 codeSystemName=\"IHEActCode\"/>\r\n                           <text>\r\n                              <reference/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                        </act>\r\n                     </entryRelationship>\r\n                     <entryRelationship typeCode=\"REFR\">\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.47\"/>\r\n                           <code code=\"33999-4\"\r\n                                 displayName=\"Status\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                 codeSystemName=\"LOINC\"/>\r\n                           <value xsi:type=\"CE\"\r\n                                  code=\"55561003\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED CT\"\r\n                                  displayName=\"Active\"/>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </substanceAdministration>\r\n               </entry>\r\n               <entry typeCode=\"DRIV\">\r\n                  <substanceAdministration classCode=\"SBADM\" moodCode=\"EVN\">\r\n                     <templateId root=\"2.16.840.1.113883.3.88.11.83.8\"\r\n                                 assigningAuthorityName=\"HITSP C83\"/>\r\n                     <templateId root=\"2.16.840.1.113883.10.20.1.24\" assigningAuthorityName=\"CCD\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                     <id root=\"d17e190\"/>\r\n                     <code code=\"10160-0\" codeSystem=\"2.16.840.1.113883.6.1\"/>\r\n                     <text>\r\n                        <reference value=\"d17e190\"/>\r\n                     </text>\r\n                     <statusCode code=\"completed\"/>\r\n                     <effectiveTime xsi:type=\"IVL_TS\">\r\n                        <low value=\"20111014\"/>\r\n                        <high nullFlavor=\"UNK\"/>\r\n                     </effectiveTime>\r\n                     <routeCode nullFlavor=\"UNK\"/>\r\n                     <doseQuantity nullFlavor=\"UNK\"/>\r\n                     <administrationUnitCode nullFlavor=\"UNK\"/>\r\n                     <consumable>\r\n                        <manufacturedProduct>\r\n                           <templateId root=\"2.16.840.1.113883.3.88.11.83.8.2\"\r\n                                       assigningAuthorityName=\"HITSP C83\"/>\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.53\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.2\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <manufacturedMaterial>\r\n                              <code code=\"199663\"\r\n                                    codeSystem=\"2.16.840.1.113883.6.88\"\r\n                                    codeSystemName=\"RxNorm\"\r\n                                    displayName=\"Zidovudine 300 MG Oral Tablet [199663]\">\r\n                                 <originalText>Zidovudine 300 MG Oral Tablet [199663]<reference/>\r\n                                 </originalText>\r\n                              </code>\r\n                              <name/>\r\n                           </manufacturedMaterial>\r\n                        </manufacturedProduct>\r\n                     </consumable>\r\n                     <entryRelationship typeCode=\"SUBJ\">\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.3.88.11.83.8.1\"\r\n                                       assigningAuthorityName=\"HITSP C83\"/>\r\n                           <code code=\"329505003\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                 codeSystemName=\"SNOMED CT\"/>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                     <entryRelationship typeCode=\"SUBJ\">\r\n                        <act classCode=\"ACT\" moodCode=\"INT\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.49\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <code code=\"PINSTRUCT\"\r\n                                 codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\"\r\n                                 codeSystemName=\"IHEActCode\"/>\r\n                           <text>\r\n                              <reference value=\"PntrtoSectionText\"/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                        </act>\r\n                     </entryRelationship>\r\n                     <entryRelationship typeCode=\"SUBJ\">\r\n                        <act classCode=\"ACT\" moodCode=\"INT\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.43\" assigningAuthorityName=\"CCD\"/>\r\n                           <templateId root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3.1\" assigningAuthorityName=\"IHE PCC\"/>\r\n                           <code code=\"FINSTRUCT\"\r\n                                 codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\"\r\n                                 codeSystemName=\"IHEActCode\"/>\r\n                           <text>\r\n                              <reference/>\r\n                           </text>\r\n                           <statusCode code=\"completed\"/>\r\n                        </act>\r\n                     </entryRelationship>\r\n                     <entryRelationship typeCode=\"REFR\">\r\n                        <observation classCode=\"OBS\" moodCode=\"EVN\">\r\n                           <templateId root=\"2.16.840.1.113883.10.20.1.47\"/>\r\n                           <code code=\"33999-4\"\r\n                                 displayName=\"Status\"\r\n                                 codeSystem=\"2.16.840.1.113883.6.1\"\r\n                                 codeSystemName=\"LOINC\"/>\r\n                           <value xsi:type=\"CE\"\r\n                                  code=\"55561003\"\r\n                                  codeSystem=\"2.16.840.1.113883.6.96\"\r\n                                  codeSystemName=\"SNOMED CT\"\r\n                                  displayName=\"Active\"/>\r\n                        </observation>\r\n                     </entryRelationship>\r\n                  </substanceAdministration>\r\n               </entry>\r\n            </section>\r\n         </component>\r\n      </structuredBody>\r\n   </component>\r\n</ClinicalDocument>";
	POCDMT000040ClinicalDocument document=clinicalDocumentProvider.createClinicalDocumentFromXMLString(c32);
	assertEquals(document.getClass().getName(),"org.hl7.v3.POCDMT000040ClinicalDocument");
	
	Method createClinicalDocumentStringFromObject=ClinicalDocumentProvider.class.getDeclaredMethod("createClinicalDocumentStringFromObject",POCDMT000040ClinicalDocument.class);
	createClinicalDocumentStringFromObject.setAccessible(true);
	assertXMLEqual("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<ClinicalDocument xsi:schemaLocation=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:hl7-org:v3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n    <realmCode code=\"US\"/>\r\n    <typeId extension=\"POCD_HD000040\" root=\"2.16.840.1.113883.1.3\"/>\r\n    <templateId assigningAuthorityName=\"CDA/R2\" root=\"2.16.840.1.113883.3.27.1776\"/>\r\n    <templateId assigningAuthorityName=\"HL7/CDT Header\" root=\"2.16.840.1.113883.10.20.3\"/>\r\n    <templateId assigningAuthorityName=\"IHE/PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.1.1\"/>\r\n    <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.1\"/>\r\n    <id assigningAuthorityName=\"FEI Systems Inc.\" root=\"2.16.840.1.113883.3.72\"/>\r\n    <code displayName=\"Summarization of episode note\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"34133-9\"/>\r\n    <title>Summarization of episode note</title>\r\n    <effectiveTime xsi:type=\"IVL_TS\" value=\"201312181031\"/>\r\n    <confidentialityCode code=\"N\"/>\r\n    <languageCode code=\"en-US\"/>\r\n    <recordTarget>\r\n        <patientRole>\r\n            <id extension=\"PUI100010060001\" root=\"00000000-0000-0000-0000-000000000000\"/>\r\n            <addr>\r\n            \r\n                <streetAddressLine>7175 Columbia Gateway Drive</streetAddressLine>\r\n            \r\n                <city>Columbia</city>\r\n            \r\n                <state>Maryland</state>\r\n            \r\n                <postalCode>21046</postalCode>\r\n         </addr>\r\n            <telecom value=\"555-255-5454\"/>\r\n            <patient>\r\n                <name>\r\n               \r\n                    <family>Patientone</family>\r\n               \r\n                    <given>Asample</given>\r\n            </name>\r\n                <administrativeGenderCode displayName=\"Male\" codeSystemName=\"HL7 AdministrativeGender\" codeSystem=\"2.16.840.1.113883.5.1\" code=\"M\"/>\r\n                <birthTime value=\"19710510\"/>\r\n                <maritalStatusCode nullFlavor=\"UNK\"/>\r\n                <religiousAffiliationCode nullFlavor=\"UNK\"/>\r\n                <raceCode nullFlavor=\"UNK\"/>\r\n                <ethnicGroupCode nullFlavor=\"UNK\"/>\r\n                <birthplace nullFlavor=\"UNK\">\r\n                    <place>\r\n                        <addr>\r\n                     \r\n                            <streetAddressLine/>\r\n                     \r\n                            <city/>\r\n                     \r\n                            <state/>\r\n                     \r\n                            <postalCode/>\r\n                  </addr>\r\n                    </place>\r\n                </birthplace>\r\n                <languageCommunication>\r\n                    <templateId assigningAuthorityName=\"HITSP/C83\" root=\"2.16.840.1.113883.3.88.11.83.2\"/>\r\n                    <templateId assigningAuthorityName=\"IHE/PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.2.1\"/>\r\n                    <languageCode code=\"en-US\"/>\r\n                </languageCommunication>\r\n            </patient>\r\n        </patientRole>\r\n    </recordTarget>\r\n    <author>\r\n        <time value=\"20000407130000+0500\"/>\r\n        <assignedAuthor>\r\n            <id nullFlavor=\"UNK\"/>\r\n            <addr/>\r\n            <telecom/>\r\n            <assignedPerson>\r\n                <name>\r\n               \r\n                    <family>family</family>\r\n               \r\n                    <given>given</given>\r\n               \r\n                    <prefix>prefix</prefix>\r\n            </name>\r\n            </assignedPerson>\r\n        </assignedAuthor>\r\n    </author>\r\n    <custodian>\r\n        <assignedCustodian>\r\n            <representedCustodianOrganization>\r\n                <id extension=\"100010020002\" root=\"00000000-0000-0000-0000-000000000000\"/>\r\n                <name>Safe Harbor Enterprises</name>\r\n                <telecom nullFlavor=\"NI\"/>\r\n                <addr/>\r\n            </representedCustodianOrganization>\r\n        </assignedCustodian>\r\n    </custodian>\r\n    <component>\r\n        <structuredBody>\r\n            <component>\r\n                <section>\r\n                    <templateId assigningAuthorityName=\"HITSP/C83\" root=\"2.16.840.1.113883.3.88.11.83.103\"/>\r\n                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.3.6\"/>\r\n                    <templateId assigningAuthorityName=\"HL7 CCD\" root=\"2.16.840.1.113883.10.20.1.11\"/>\r\n                    <code displayName=\"Problem list\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"11450-4\"/>\r\n                    <title>Problems</title>\r\n                    <text>\r\n                  \r\n                        <table border=\"1\" width=\"100%\">\r\n                            <thead>\r\n                                <tr>\r\n                                    <th>Problem Name</th>\r\n                                    <th>Problem Code</th>\r\n                                    <th>Effective Dates</th>\r\n                                    <th>Problem Status</th>\r\n                                </tr>\r\n                            </thead>\r\n                            <tbody>\r\n                                <tr ID=\"d17e240\">\r\n                                    <td>Diabetes mellitus type 2 (disorder)</td>\r\n                                    <td>44054006</td>\r\n                                    <td/>\r\n                                    <td>Resolved</td>\r\n                                </tr>\r\n                                <tr ID=\"d17e263\">\r\n                                    <td>Asthma (disorder)</td>\r\n                                    <td>195967001</td>\r\n                                    <td/>\r\n                                    <td>Inactive</td>\r\n                                </tr>\r\n                                <tr ID=\"d17e286\">\r\n                                    <td>Coronary artery atheroma (disorder)</td>\r\n                                    <td>67682002</td>\r\n                                    <td/>\r\n                                    <td>Inactive</td>\r\n                                </tr>\r\n                                <tr ID=\"d17e309\">\r\n                                    <td>Hyperlipidemia (disorder)</td>\r\n                                    <td>55822004</td>\r\n                                    <td/>\r\n                                    <td>Active</td>\r\n                                </tr>\r\n                                <tr ID=\"d17e332\">\r\n                                    <td>Hypertension associated with transplantation (disorder)</td>\r\n                                    <td>427889009</td>\r\n                                    <td/>\r\n                                    <td>Active</td>\r\n                                </tr>\r\n                                <tr ID=\"d17e356\">\r\n                                    <td>Acute HIV</td>\r\n                                    <td>111880001</td>\r\n                                    <td/>\r\n                                    <td>Active</td>\r\n                                </tr>\r\n                                <tr ID=\"d17e379\">\r\n                                    <td>Substance Abuse Disorder</td>\r\n                                    <td>66214007</td>\r\n                                    <td/>\r\n                                    <td>Active</td>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n               </text>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e240\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e240\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e240\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Diabetes mellitus type 2 (disorder)\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"44054006\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Resolved\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"413322009\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e263\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e263\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e263\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Asthma (disorder)\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"195967001\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Inactive\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"73425007\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e286\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e286\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e286\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Coronary artery atheroma (disorder)\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"67682002\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Inactive\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"73425007\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e309\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e309\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e309\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Hyperlipidemia (disorder)\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55822004\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Active\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55561003\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e332\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e332\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e332\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Hypertension associated with transplantation (disorder)\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"427889009\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Active\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55561003\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e356\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e356\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e356\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Acute HIV\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"111880001\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Active\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55561003\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <act moodCode=\"EVN\" classCode=\"ACT\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.7\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.1\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5.2\"/>\r\n                            <id root=\"d17e379\"/>\r\n                            <code nullFlavor=\"NA\"/>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime nullFlavor=\"UNK\">\r\n                                <low nullFlavor=\"UNK\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <entryRelationship inversionInd=\"false\" typeCode=\"SUBJ\">\r\n                                <sequenceNumber value=\"1\"/>\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.5\"/>\r\n                                    <id root=\"d17e379\"/>\r\n                                    <code displayName=\"Problem\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55607006\"/>\r\n                                    <text>\r\n                                        <reference value=\"d17e379\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                    <effectiveTime nullFlavor=\"UNK\">\r\n                                        <low nullFlavor=\"UNK\"/>\r\n                                        <high nullFlavor=\"UNK\"/>\r\n                                    </effectiveTime>\r\n                                    <value xsi:type=\"CD\" displayName=\"Substance Abuse Disorder\" codeSystemName=\"SNOMED\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"66214007\"/>\r\n                                    <entryRelationship typeCode=\"REFR\">\r\n                                        <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                            <templateId root=\"2.16.840.1.113883.10.20.1.50\"/>\r\n                                            <code displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                            <value xsi:type=\"CD\" displayName=\"Active\" codeSystemName=\"SNOMED-CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55561003\"/>\r\n                                        </observation>\r\n                                    </entryRelationship>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </act>\r\n                    </entry>\r\n                </section>\r\n            </component>\r\n            <component>\r\n                <section>\r\n                    <templateId assigningAuthorityName=\"HITSP/C83\" root=\"2.16.840.1.113883.3.88.11.83.112\"/>\r\n                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.3.19\"/>\r\n                    <templateId assigningAuthorityName=\"HL7 CCD\" root=\"2.16.840.1.113883.10.20.1.8\"/>\r\n                    <code displayName=\"History of medication use\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"10160-0\"/>\r\n                    <title>Medications</title>\r\n                    <text>\r\n                  \r\n                        <table border=\"1\" width=\"100%\">\r\n                            <thead>\r\n                                <tr>\r\n                                    <th>RxNorm Code</th>\r\n                                    <th>Product</th>\r\n                                    <th>Generic Name</th>\r\n                                    <th>Brand Name</th>\r\n                                    <th>Dose</th>\r\n                                    <th>Form</th>\r\n                                    <th>Route</th>\r\n                                    <th>Frequency</th>\r\n                                    <th>Patient Instructions</th>\r\n                                    <th>Status</th>\r\n                                    <th>Date Started</th>\r\n                                </tr>\r\n                            </thead>\r\n                            <tbody>\r\n                                <tr ID=\"d17e143\">\r\n                                    <td>993536</td>\r\n                                    <td>Medication</td>\r\n                                    <td>bupropion hydrochloride 200 MG 12 HR Extended Release Tablet [993536]</td>\r\n                                    <td/>\r\n                                    <td/>\r\n                                    <td/>\r\n                                    <td/>\r\n                                    <td>Two times a day</td>\r\n                                    <td/>\r\n                                    <td>Active</td>\r\n                                    <td>September 14, 2011 </td>\r\n                                </tr>\r\n                                <tr ID=\"d17e190\">\r\n                                    <td>199663</td>\r\n                                    <td>Medication</td>\r\n                                    <td>Zidovudine 300 MG Oral Tablet [199663]</td>\r\n                                    <td/>\r\n                                    <td/>\r\n                                    <td/>\r\n                                    <td/>\r\n                                    <td>Two times a day</td>\r\n                                    <td/>\r\n                                    <td>Active</td>\r\n                                    <td>October 14, 2011 </td>\r\n                                </tr>\r\n                            </tbody>\r\n                        </table>\r\n               </text>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <substanceAdministration moodCode=\"EVN\" classCode=\"SBADM\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.8\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.24\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.1\"/>\r\n                            <id root=\"d17e143\"/>\r\n                            <code codeSystem=\"2.16.840.1.113883.6.1\" code=\"10160-0\"/>\r\n                            <text>\r\n                                <reference value=\"d17e143\"/>\r\n                         \r\n                     </text>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime xsi:type=\"IVL_TS\">\r\n                                <low value=\"20110914\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <routeCode nullFlavor=\"UNK\"/>\r\n                            <doseQuantity nullFlavor=\"UNK\"/>\r\n                            <administrationUnitCode nullFlavor=\"UNK\"/>\r\n                            <consumable>\r\n                                <manufacturedProduct>\r\n                                    <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.8.2\"/>\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.53\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.2\"/>\r\n                                    <manufacturedMaterial>\r\n                                        <code displayName=\"bupropion hydrochloride 200 MG 12 HR Extended Release Tablet [993536]\" codeSystemName=\"RxNorm\" codeSystem=\"2.16.840.1.113883.6.88\" code=\"993536\">\r\n                                            <originalText>\r\n                                                <reference/>bupropion hydrochloride 200 MG 12 HR Extended Release Tablet [993536] \r\n                                 </originalText>\r\n                                        </code>\r\n                                        <name/>\r\n                                    </manufacturedMaterial>\r\n                                </manufacturedProduct>\r\n                            </consumable>\r\n                            <entryRelationship typeCode=\"SUBJ\">\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.8.1\"/>\r\n                                    <code codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"329505003\"/>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                            <entryRelationship typeCode=\"SUBJ\">\r\n                                <act moodCode=\"INT\" classCode=\"ACT\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.49\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3\"/>\r\n                                    <code codeSystemName=\"IHEActCode\" codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\" code=\"PINSTRUCT\"/>\r\n                                    <text>\r\n                                        <reference value=\"PntrtoSectionText\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                </act>\r\n                            </entryRelationship>\r\n                            <entryRelationship typeCode=\"SUBJ\">\r\n                                <act moodCode=\"INT\" classCode=\"ACT\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.43\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3.1\"/>\r\n                                    <code codeSystemName=\"IHEActCode\" codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\" code=\"FINSTRUCT\"/>\r\n                                    <text>\r\n                                        <reference/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                </act>\r\n                            </entryRelationship>\r\n                            <entryRelationship typeCode=\"REFR\">\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId root=\"2.16.840.1.113883.10.20.1.47\"/>\r\n                                    <code displayName=\"Status\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                    <value xsi:type=\"CE\" displayName=\"Active\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55561003\"/>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </substanceAdministration>\r\n                    </entry>\r\n                    <entry typeCode=\"DRIV\">\r\n                        <substanceAdministration moodCode=\"EVN\" classCode=\"SBADM\">\r\n                            <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.8\"/>\r\n                            <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.24\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7\"/>\r\n                            <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.1\"/>\r\n                            <id root=\"d17e190\"/>\r\n                            <code codeSystem=\"2.16.840.1.113883.6.1\" code=\"10160-0\"/>\r\n                            <text>\r\n                                <reference value=\"d17e190\"/>\r\n                         \r\n                     </text>\r\n                            <statusCode code=\"completed\"/>\r\n                            <effectiveTime xsi:type=\"IVL_TS\">\r\n                                <low value=\"20111014\"/>\r\n                                <high nullFlavor=\"UNK\"/>\r\n                            </effectiveTime>\r\n                            <routeCode nullFlavor=\"UNK\"/>\r\n                            <doseQuantity nullFlavor=\"UNK\"/>\r\n                            <administrationUnitCode nullFlavor=\"UNK\"/>\r\n                            <consumable>\r\n                                <manufacturedProduct>\r\n                                    <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.8.2\"/>\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.53\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.7.2\"/>\r\n                                    <manufacturedMaterial>\r\n                                        <code displayName=\"Zidovudine 300 MG Oral Tablet [199663]\" codeSystemName=\"RxNorm\" codeSystem=\"2.16.840.1.113883.6.88\" code=\"199663\">\r\n                                            <originalText>\r\n                                                <reference/>Zidovudine 300 MG Oral Tablet [199663] \r\n                                 </originalText>\r\n                                        </code>\r\n                                        <name/>\r\n                                    </manufacturedMaterial>\r\n                                </manufacturedProduct>\r\n                            </consumable>\r\n                            <entryRelationship typeCode=\"SUBJ\">\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId assigningAuthorityName=\"HITSP C83\" root=\"2.16.840.1.113883.3.88.11.83.8.1\"/>\r\n                                    <code codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"329505003\"/>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                            <entryRelationship typeCode=\"SUBJ\">\r\n                                <act moodCode=\"INT\" classCode=\"ACT\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.49\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3\"/>\r\n                                    <code codeSystemName=\"IHEActCode\" codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\" code=\"PINSTRUCT\"/>\r\n                                    <text>\r\n                                        <reference value=\"PntrtoSectionText\"/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                </act>\r\n                            </entryRelationship>\r\n                            <entryRelationship typeCode=\"SUBJ\">\r\n                                <act moodCode=\"INT\" classCode=\"ACT\">\r\n                                    <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.43\"/>\r\n                                    <templateId assigningAuthorityName=\"IHE PCC\" root=\"1.3.6.1.4.1.19376.1.5.3.1.4.3.1\"/>\r\n                                    <code codeSystemName=\"IHEActCode\" codeSystem=\"1.3.6.1.4.1.19376.1.5.3.2\" code=\"FINSTRUCT\"/>\r\n                                    <text>\r\n                                        <reference/>\r\n                               \r\n                           </text>\r\n                                    <statusCode code=\"completed\"/>\r\n                                </act>\r\n                            </entryRelationship>\r\n                            <entryRelationship typeCode=\"REFR\">\r\n                                <observation moodCode=\"EVN\" classCode=\"OBS\">\r\n                                    <templateId root=\"2.16.840.1.113883.10.20.1.47\"/>\r\n                                    <code displayName=\"Status\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"33999-4\"/>\r\n                                    <value xsi:type=\"CE\" displayName=\"Active\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\" code=\"55561003\"/>\r\n                                </observation>\r\n                            </entryRelationship>\r\n                        </substanceAdministration>\r\n                    </entry>\r\n                </section>\r\n            </component>\r\n        </structuredBody>\r\n    </component>\r\n</ClinicalDocument>"
			,createClinicalDocumentStringFromObject.invoke(clinicalDocumentProvider, document).toString());
}