package gov.va.ds4p.cas.providers; import static org.junit.Assert.*; import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import gov.samhsa.consent2share.commonunit.xml.XmlComparator; import gov.va.ds4p.policy.reference.Addr; import gov.va.ds4p.policy.reference.AssignedAuthor; import gov.va.ds4p.policy.reference.AssignedAuthoringDevice; import gov.va.ds4p.policy.reference.AssignedPerson; import gov.va.ds4p.policy.reference.DefaultCustodianInfo; import gov.va.ds4p.policy.reference.DefaultPatientDemographics; import gov.va.ds4p.policy.reference.ManufacturingModelName; import gov.va.ds4p.policy.reference.Name; import gov.va.ds4p.policy.reference.OrganizationConsentPolicyInfo; import gov.va.ds4p.policy.reference.OrganizationPolicy; import gov.va.ds4p.policy.reference.SoftwareName; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import org.hl7.v3.POCDMT000040ClinicalDocument; import org.junit.Before; import org.junit.Test; import org.xml.sax.SAXException; public class ClinicalDocumentProviderTest { ClinicalDocumentProvider clinicalDocumentProvider; @Before public void setUp(){ clinicalDocumentProvider=new ClinicalDocumentProvider(); } @Test public void testCreateConsentDirective() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, SAXException, IOException{ OrganizationPolicy orgPolicy=new OrganizationPolicy(); Field usPrivacyLaw=orgPolicy.getClass().getDeclaredField("usPrivacyLaw"); usPrivacyLaw.setAccessible(true); usPrivacyLaw.set(orgPolicy, "Title38Section7332"); List<String> maskingActions=new ArrayList<String>(); maskingActions.add("action1"); maskingActions.add("action2"); Addr addr=new Addr(); addr.setCity("Columbia"); addr.setCountry("United States"); addr.setCounty("Howard"); addr.setPostalCode("21044"); addr.setState("MD"); addr.setStreetAddressLine("7175 Columbia Gateway Dr."); Field organizationConsentPolicyInfo=orgPolicy.getClass().getDeclaredField("organizationConsentPolicyInfo"); OrganizationConsentPolicyInfo organizationConsentPolicyInfoField=new OrganizationConsentPolicyInfo(); DefaultPatientDemographics defaultPatientDemographics=new DefaultPatientDemographics(); defaultPatientDemographics.setAddr(addr); organizationConsentPolicyInfoField.setDefaultPatientDemographics(defaultPatientDemographics); Name name=new Name(); name.setFamily("Smith"); name.setGiven("Albert"); AssignedPerson person=new AssignedPerson(); person.setName(name); AssignedAuthor assignedAuthor=new AssignedAuthor(); assignedAuthor.setAssignedPerson(person); ManufacturingModelName manufacturingModelName=new ManufacturingModelName(); manufacturingModelName.setCode("1"); manufacturingModelName.setDisplayName("Company One"); SoftwareName softwareName=new SoftwareName(); softwareName.setCode("2"); softwareName.setDisplayName("Software Company"); AssignedAuthoringDevice assignedAuthoringDevice=new AssignedAuthoringDevice(); assignedAuthoringDevice.setManufacturingModelName(manufacturingModelName); assignedAuthoringDevice.setSoftwareName(softwareName); DefaultCustodianInfo defaultCustodianInfo=new DefaultCustodianInfo(); defaultCustodianInfo.setTelcom("telcom"); organizationConsentPolicyInfoField.setDefaultCustodianInfo(defaultCustodianInfo); organizationConsentPolicyInfoField.setAssignedAuthor(assignedAuthor); organizationConsentPolicyInfoField.setAssignedAuthoringDevice(assignedAuthoringDevice); organizationConsentPolicyInfo.setAccessible(true); organizationConsentPolicyInfo.set(orgPolicy, organizationConsentPolicyInfoField); List<String> redactActions=new ArrayList<String>(); redactActions.add("action1"); redactActions.add("action2"); List<String> ignoredTags=new ArrayList<String>(); ignoredTags.add("effectiveTime"); XmlComparator.compareXMLs("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<ClinicalDocument moodCode=\"EVN\" classCode=\"DOCCLIN\" 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=\"09230\" root=\"2.16.840.1.113883.1.3\"/>\r\n <templateId root=\"2.16.840.1.113883.10.20.3\"/>\r\n <templateId root=\"2.16.840.1.113883.3.445.1\"/>\r\n <id extension=\"221\" root=\"1.3.6.4.1.4.1.2835.888888\"/>\r\n <code displayName=\"Privacy Policy Acknowledgement Document\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"57016-8\"/>\r\n <title mediaType=\"text/plain\" representation=\"TXT\">Privacy Consent Authorization</title>\r\n <effectiveTime value=\"20131230032417\"/>\r\n <confidentialityCode displayName=\"R (restricted)\" codeSystemVersion=\"3.0\" codeSystemName=\"Confidentiality\" codeSystem=\"2.16.840.1.113883.5.25\" code=\"R\"/>\r\n <recordTarget>\r\n <patientRole>\r\n <id extension=\"1\"/>\r\n <addr>\r\n <streetAddressLine xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">7175 Columbia Gateway Dr.</streetAddressLine>\r\n <city xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Columbia</city>\r\n <state xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">MD</state>\r\n <postalCode xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">21044</postalCode>\r\n <county xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Howard</county>\r\n <country xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">United States</country>\r\n </addr>\r\n <patient>\r\n <name>\r\n <given xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Albert</given>\r\n <family xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Smith</family>\r\n </name>\r\n <administrativeGenderCode code=\"M\"/>\r\n <birthTime value=\"03-10-1982\"/>\r\n </patient>\r\n </patientRole>\r\n </recordTarget>\r\n <author>\r\n <typeId root=\"2.16.840.1.113883.3.445.2\"/>\r\n <time value=\"20131230032417\"/>\r\n <assignedAuthor classCode=\"PSN\">\r\n <typeId extension=\"999999999^^^&null&ISO\" root=\"1.3.5.35.1.4436.7\"/>\r\n <assignedPerson>\r\n <name>\r\n <given xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Albert</given>\r\n <family xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Smith</family>\r\n </name>\r\n </assignedPerson>\r\n <assignedAuthoringDevice>\r\n <manufacturerModelName displayName=\"Company One\" code=\"1\"/>\r\n <softwareName displayName=\"Software Company\" code=\"2\"/>\r\n </assignedAuthoringDevice>\r\n </assignedAuthor>\r\n </author>\r\n <custodian>\r\n <assignedCustodian>\r\n <representedCustodianOrganization>\r\n <name use=\"\"/>\r\n <telecom value=\"telcom\"/>\r\n </representedCustodianOrganization>\r\n </assignedCustodian>\r\n </custodian>\r\n <informationRecipient typeCode=\"PRCP\">\r\n <intendedRecipient>\r\n <typeId extension=\"7878\"/>\r\n <receivedOrganization determinerCode=\"INSTANCE\" classCode=\"ORG\">\r\n <typeId root=\"2.16.840.1.113883.4.349\"/>\r\n </receivedOrganization>\r\n </intendedRecipient>\r\n </informationRecipient>\r\n <legalAuthenticator>\r\n <time value=\"20131230032417\"/>\r\n <signatureCode code=\"S\"/>\r\n <assignedEntity>\r\n <addr>\r\n <streetAddressLine xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">7175 Columbia Gateway Dr.</streetAddressLine>\r\n <city xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Columbia</city>\r\n <state xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">MD</state>\r\n <postalCode xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">21044</postalCode>\r\n <county xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Howard</county>\r\n <country xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">United States</country>\r\n </addr>\r\n <assignedPerson>\r\n <name>\r\n <given xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Albert</given>\r\n <family xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">Smith</family>\r\n </name>\r\n </assignedPerson>\r\n </assignedEntity>\r\n </legalAuthenticator>\r\n <documentationOf typeCode=\"DOC\">\r\n <serviceEvent moodCode=\"EVN\">\r\n <templateId root=\"2.16.840.1.113883.3.445.3\"/>\r\n <id root=\"2.16.840.1.113883.3.72.4.2.5\"/>\r\n <code displayName=\"Privacy Policy Acknowledgement Document\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\" code=\"57016-8\"/>\r\n <effectiveTime>\r\n <low xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">20131230</low>\r\n <high xsi:type=\"xs:string\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">20181230</high>\r\n </effectiveTime>\r\n </serviceEvent>\r\n </documentationOf>\r\n <component>\r\n <structuredBody>\r\n <component typeCode=\"COMP\">\r\n <section moodCode=\"EVN\" classCode=\"DOCSECT\">\r\n <templateId root=\"2.16.840.1.113883.3.445.17\"/>\r\n <title>Consent Directive Detail</title>\r\n <confidentialityCode displayName=\"R (restricted)\" codeSystemVersion=\"3.0\" codeSystemName=\"Confidentiality\" codeSystem=\"2.16.840.1.113883.5.25\" code=\"R\"/>\r\n <entry typeCode=\"COMP\">\r\n <typeId root=\"2.16.840.1.113883.3.445.4\"/>\r\n <act>\r\n <typeId root=\"2.16.840.1.113883.3.445.4\"/>\r\n <code displayName=\"intendedPOU\" codeSystemName=\"ActReason\" codeSystem=\"2.16.840.1.113883.5.8\" code=\"intendedPOU\"/>\r\n <statusCode code=\"active\"/>\r\n <participant typeCode=\"IRCP\">\r\n <typeId root=\"2.16.840.1.113883.3.445.5\"/>\r\n </participant>\r\n <entryRelationship contextConductionInd=\"true\" typeCode=\"COMP\">\r\n <act negationInd=\"true\" moodCode=\"DEF\" classCode=\"ACT\">\r\n <code displayName=\"Disclose\" codeSystemName=\"ActConsentType\" codeSystem=\"2.16.840.1.113883.5.4\" code=\"DISCLOSE\"/>\r\n </act>\r\n </entryRelationship>\r\n <entryRelationship contextConductionInd=\"true\" typeCode=\"COMP\">\r\n <templateId root=\"2.16.840.1.113883.3.445.13\"/>\r\n <act moodCode=\"DEF\" classCode=\"CONS\">\r\n <code displayName=\"Title38Section7332\" codeSystemName=\"ActUSPrivacyLaw\" codeSystem=\"2.16.840.1.113883.5.1138\" code=\"Title38Section7332\"/>\r\n <precondition>\r\n <templateId root=\"2.16.840.1.113883.3.445.14\"/>\r\n <criterion moodCode=\"EVN.CRT\" classCode=\"OBS\">\r\n <code displayName=\"NORDSCLCD\" codeSystemName=\"RefrainPolicy\" codeSystem=\"2.16.840.1.113883.1.11.20446\" code=\"NORDSCLCD\"/>\r\n </criterion>\r\n </precondition>\r\n </act>\r\n </entryRelationship>\r\n <entryRelationship>\r\n <templateId root=\"2.16.840.1.113883.3.445.15\"/>\r\n <observationMedia moodCode=\"EVN\" classCode=\"OBS\">\r\n <value mediaType=\"application/pdf\" representation=\"B_64\">cGRmU3RyaW5n</value>\r\n </observationMedia>\r\n </entryRelationship>\r\n <entryRelationship>\r\n <templateId root=\"2.16.840.1.113883.3.445.16\"/>\r\n <observationMedia moodCode=\"EVN\" classCode=\"OBS\">\r\n <value mediaType=\"application/xacml+xml\" representation=\"B_64\">WEFDTUxWYWx1ZQ==</value>\r\n </observationMedia>\r\n </entryRelationship>\r\n <precondition>\r\n <typeId root=\"2.16.840.1.113883.3.445.12\"/>\r\n <criterion moodCode=\"EVN.CRT\" classCode=\"COND\">\r\n <code displayName=\"action1\" codeSystemName=\"ActInformationSensitivity\" codeSystem=\"2.16.840.1.113883.1.11.20429\" code=\"action1\"/>\r\n </criterion>\r\n </precondition>\r\n <precondition>\r\n <typeId root=\"2.16.840.1.113883.3.445.12\"/>\r\n <criterion moodCode=\"EVN.CRT\" classCode=\"COND\">\r\n <code displayName=\"action2\" codeSystemName=\"ActInformationSensitivity\" codeSystem=\"2.16.840.1.113883.1.11.20429\" code=\"action2\"/>\r\n </criterion>\r\n </precondition>\r\n <precondition>\r\n <typeId root=\"2.16.840.1.113883.3.445.12\"/>\r\n <criterion moodCode=\"EVN.CRT\" classCode=\"COND\">\r\n <code displayName=\"action1\" codeSystemName=\"ActInformationSensitivity\" codeSystem=\"2.16.840.1.113883.1.11.20429\" code=\"action1\"/>\r\n </criterion>\r\n </precondition>\r\n <precondition>\r\n <typeId root=\"2.16.840.1.113883.3.445.12\"/>\r\n <criterion moodCode=\"EVN.CRT\" classCode=\"COND\">\r\n <code displayName=\"action2\" codeSystemName=\"ActInformationSensitivity\" codeSystem=\"2.16.840.1.113883.1.11.20429\" code=\"action2\"/>\r\n </criterion>\r\n </precondition>\r\n </act>\r\n </entry>\r\n </section>\r\n </component>\r\n </structuredBody>\r\n </component>\r\n</ClinicalDocument>\r\n" , clinicalDocumentProvider.createConsentDirective(orgPolicy, "Albert Smith", "1", "GlobalID", "03-10-1982", "M", "authorization", "intendedPOU", null, null, null, maskingActions, redactActions, "pdfString", "XACMLValue") , ignoredTags); } @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()); } }