use of org.nhindirect.xd.transform.pojo.SimplePerson in project nhin-d by DirectProject.
the class DefaultMimeXdsTransformerTest method getSimplePerson.
/*
* ****************************************
* Methods removed, but tests may be reused
* ****************************************
*/
// /**
// * Test of getSubmitObjectsRequest method, of class MimeXDSTransformer.
// */
// public void testGetSubmitObjectsRequest() throws Exception
// {
// LOGGER.info("Begin testGetSubmitObjectsRequest");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// SubmitObjectsRequest result = null;
//
// String patientId = "AAA";
// String orgId = "BBB";
// String subject = "DDD";
// String formatCode = "TEXT";
// String mimeType = MimeType.TEXT_PLAIN.getType();
// String docId = "eabf9010-c6e4-49e9-ae5a-b62368977cf1";
// String subId = "eabf9010-c6e4-49e9-ae5a-b62368977cf2";
// String sentDate = "20100101000000";
// String from = "vlewis@lewistower.com";
// String auth = "vlewis@lewistower.com";
//
// SimplePerson person = getSimplePerson();
//
// result = transformer.getSubmitObjectsRequest(patientId, orgId, person, subject, sentDate, docId, subId,
// formatCode, mimeType, from, auth);
//
// QName qname = new QName("urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0", "SubmitObjectsRequest");
// String sresult = XmlUtils.marshal(qname, result, oasis.names.tc.ebxml_regrep.xsd.lcm._3.ObjectFactory.class);
//
// LOGGER.info("Output: " + sresult);
//
// // TODO: assertions
// }
//
// /**
// * Test of makePatientSlot method, of class MimeXDSTransformer.
// */
// public void testMakePatientSlot()
// {
// LOGGER.info("Begin testMakePatientSlot");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// SimplePerson patient = getSimplePerson();
//
// String name = "A";
// String patientId = "B";
// String orgId = "C";
//
// SlotType1 result = transformer.makePatientSlot(name, patient, patientId, orgId);
//
// assertTrue("Result is null", result != null);
// assertEquals("Name does not match expected", name, result.getName());
//
// ValueListType values = result.getValueList();
// assertTrue("Values is null", values != null);
// assertTrue("Values valueis null", values.getValue() != null);
// assertEquals("Values size does not match expected", 5, values.getValue().size());
//
// // TODO: Additional tests for valid HL7 strings
// }
//
// /**
// * Test of addClassifications method, of class MimeXDSTransformer.
// */
// public void testAddClassifications()
// {
// LOGGER.info("Begin testAddClassifications");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// List<ClassificationType> classifs = null;
//
// String docId = "A";
// String rep = "D";
//
// ClassificationTypeEnum classificationTypeEnum = ClassificationTypeEnum.DOC_AUTHOR;
//
// List<String> slotNames = Arrays.asList("codingScheme");
// List<String> slotValues = Arrays.asList("eventCodeList");
// List<String> snames = Arrays.asList("12345");
//
// try
// {
// transformer.addClassifications(classifs, docId, classificationTypeEnum, rep, slotNames, slotValues,
// snames);
// fail("Exception not thrown");
// }
// catch (IllegalArgumentException e)
// {
// assertTrue(true);
// }
//
// classifs = new ArrayList<ClassificationType>();
// transformer.addClassifications(classifs, docId, classificationTypeEnum, rep, slotNames, slotValues,
// snames);
//
// assertTrue("List is null", classifs != null);
// assertEquals("List size does not match expected", 1, classifs.size());
//
// ClassificationType ct = classifs.get(0);
// assertEquals("ClassifiedObject does not match expected", docId, ct.getClassifiedObject());
// assertEquals("ClassificationScheme does not match expected", classificationTypeEnum
// .getClassificationScheme(), ct.getClassificationScheme());
// assertEquals("Id does not match expected", classificationTypeEnum.getClassificationId(), ct.getId());
// assertEquals("NodeRepresentation does not match expected", rep, ct.getNodeRepresentation());
//
// List<SlotType1> slots = ct.getSlot();
// assertTrue("Slots list is null", slots != null);
// assertEquals("Slots list size does not match expected", 1, slots.size());
//
// assertEquals("Name does not match expected", "codingScheme", slots.get(0).getName());
// assertEquals("Value does not match expected", "eventCodeList", slots.get(0).getValueList().getValue().get(0));
//
// InternationalStringType s = ct.getName();
// assertEquals("Sname does not match expected", "12345", s.getLocalizedString().get(0).getValue());
// }
//
// /**
// * Test of addExternalIds method, of class MimeXDSTransformer.
// */
// public void testAddExternalIds()
// {
// LOGGER.info("Begin testAddExternalIds");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// List<ExternalIdentifierType> extIds = null;
//
// String docId = "A";
// String value = "E";
//
// ExternalIdentifierTypeEnum externalIdentifier = ExternalIdentifierTypeEnum.DOC_PATIENT_ID;
//
// try
// {
// transformer.addExternalIds(extIds, docId, externalIdentifier, value);
// fail("Exception not thrown");
// }
// catch (IllegalArgumentException e)
// {
// assertTrue(true);
// }
//
// extIds = new ArrayList<ExternalIdentifierType>();
// transformer.addExternalIds(extIds, docId, externalIdentifier, value);
//
// assertTrue("List is null", extIds != null);
// assertEquals("List size does not match expected", 1, extIds.size());
//
// ExternalIdentifierType ei = extIds.get(0);
//
// assertEquals("RegistryObject does not match expected", docId, ei.getRegistryObject());
// assertEquals("IdentificationScheme does not match expected", externalIdentifier.getIdentificationScheme(), ei
// .getIdentificationScheme());
// assertEquals("Id does not match expected", externalIdentifier.getIdentificationId(), ei.getId());
// assertEquals("Value does not match expected", value, ei.getValue());
//
// InternationalStringType s = ei.getName();
// assertEquals("Sname does not match expected", externalIdentifier.getLocalizedString(), s.getLocalizedString()
// .get(0).getValue());
// }
//
// /**
// * Test of formatDate method, of class MimeXDSTransformer.
// */
// public void testFormatDate()
// {
// LOGGER.info("Begin testFormatDate");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// Date edate = null;
//
// try
// {
// edate = DatatypeFactory.newInstance().newXMLGregorianCalendar("2010-08-26T00:00:00.000-05:00")
// .toGregorianCalendar().getTime();
// }
// catch (Exception x)
// {
// fail("Test setup failed");
// }
//
// String result = transformer.formatDate(edate);
// assertEquals("Output does not match expected", "20100826010000", result);
// }
//
// /**
// * Test of formatDateFromMDM method, of class MimeXDSTransformer.
// */
// public void testFormatDateFromMDM()
// {
// LOGGER.info("Begin testFormatDateFromMDM");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// String value = null;
// String result = null;
//
// value = "01/01/2000";
// result = transformer.formatDateFromMDM(value);
// assertEquals("Output does not match expected", "20000101000000", result);
//
// value = "01/01/2000+1000";
// result = transformer.formatDateFromMDM(value);
// assertEquals("Output does not match expected", "20000101000000", result);
// }
//
// /**
// * Test of makeSlot method, of class MimeXDSTransformer.
// */
// public void testMakeSlot()
// {
// LOGGER.info("Begin testMakeSlot");
//
// DefaultMimeXdsTransformer transformer = new DefaultMimeXdsTransformer();
//
// String name = "testMakeSlot-name";
// String value = "testMakeSlot-value";
//
// SlotType1 result = transformer.makeSlot(name, value);
//
// assertEquals("Name does not match expected value", name, result.getName());
//
// assertTrue("ValueList is null", result.getValueList() != null);
// assertTrue("List is null", result.getValueList().getValue() != null);
// assertEquals("List size does not match expected", 1, result.getValueList().getValue().size());
// assertEquals("Value does not match expected value", value, result.getValueList().getValue().get(0));
// }
/*
* Begin private methods
* -----------------------------------------------------------------
*/
/**
* Helper method to create a SimplePerson object.
*
* @return a SimplePerson object.
*/
@SuppressWarnings("unused")
private SimplePerson getSimplePerson() {
SimplePerson patient = new SimplePerson();
patient.setFirstName("A");
patient.setLastName("B");
patient.setBirthDateTime(formatDateForMDM(new Date()));
patient.setStreetAddress1("C");
patient.setCity("D");
patient.setState("E");
patient.setZipCode("F");
patient.setGenderCode("G");
return patient;
}
use of org.nhindirect.xd.transform.pojo.SimplePerson in project nhin-d by DirectProject.
the class DirectDocument2Test method testDirectDocument2Metadata.
/**
* Generic setter test.
*/
public void testDirectDocument2Metadata() {
DirectDocument2 document = new DirectDocument2();
DirectDocument2.Metadata metadata = document.getMetadata();
displayMetadata(metadata);
metadata.setMimeType("1");
metadata.setId("2");
metadata.setDescription("3");
metadata.setCreationTime(new Date());
metadata.setLanguageCode("5");
metadata.setServiceStartTime(new Date());
metadata.setServiceStopTime(new Date());
metadata.setSourcePatient(new SimplePerson("Bob", "Smith"));
metadata.setAuthorPerson("10");
metadata.setAuthorInstitution(Arrays.asList("11.1", "11.2"));
metadata.setAuthorRole("12");
metadata.setAuthorSpecialty("13");
metadata.setClassCode("14");
metadata.setClassCode_localized("15");
metadata.setConfidentialityCode("16");
metadata.setConfidentialityCode_localized("17");
metadata.setFormatCode("18");
metadata.setFormatCode_localized("19");
metadata.setHealthcareFacilityTypeCode("20");
metadata.setHealthcareFacilityTypeCode_localized("21");
metadata.setPracticeSettingCode("2");
metadata.setPracticeSettingCode_localized("23");
metadata.setLoinc("24");
metadata.setLoinc_localized("25");
metadata.setPatientId("26");
metadata.setUniqueId("27");
metadata.setHash("28");
metadata.setSize(Long.valueOf("29"));
metadata.setURI("30");
metadata.setSubmissionSetStatus("42");
displayMetadata(metadata);
}
use of org.nhindirect.xd.transform.pojo.SimplePerson in project nhin-d by DirectProject.
the class NHINDClientTest method getTestDirectDocuments.
private DirectDocuments getTestDirectDocuments() {
// Create a collection of documents
DirectDocuments documents = new DirectDocuments();
documents.getSubmissionSet().setId("1");
documents.getSubmissionSet().setName("2");
documents.getSubmissionSet().setDescription("3");
documents.getSubmissionSet().setSubmissionTime(new Date());
documents.getSubmissionSet().setIntendedRecipient(Arrays.asList("5.1", "5.2"));
documents.getSubmissionSet().setAuthorPerson("6");
documents.getSubmissionSet().setAuthorInstitution(Arrays.asList("7.1", "7.2"));
documents.getSubmissionSet().setAuthorRole("8");
documents.getSubmissionSet().setAuthorSpecialty("9");
documents.getSubmissionSet().setAuthorTelecommunication("10");
documents.getSubmissionSet().setContentTypeCode("11");
documents.getSubmissionSet().setContentTypeCode_localized("12");
documents.getSubmissionSet().setUniqueId("13");
documents.getSubmissionSet().setSourceId("14");
documents.getSubmissionSet().setPatientId("xxx");
DirectDocument2 doc1 = new DirectDocument2();
doc1.setData(new String("data1").getBytes());
DirectDocument2.Metadata metadata1 = doc1.getMetadata();
metadata1.setMimeType("1.1");
metadata1.setId("1.2");
metadata1.setDescription("1.3");
metadata1.setCreationTime(new Date());
metadata1.setLanguageCode("1.5");
metadata1.setServiceStartTime(new Date());
metadata1.setServiceStopTime(new Date());
metadata1.setSourcePatient(new SimplePerson("1.Bob", "1.Smith"));
metadata1.setAuthorPerson("1.10");
metadata1.setAuthorInstitution(Arrays.asList("1.11.1", "1.11.2"));
metadata1.setAuthorRole("1.12");
metadata1.setAuthorSpecialty("1.13");
metadata1.setClassCode(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata1.setClassCode_localized(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata1.setConfidentialityCode("1.16");
metadata1.setConfidentialityCode_localized("1.17");
metadata1.setFormatCode(FormatCodeEnum.XDS_MEDICAL_SUMMARIES);
metadata1.setHealthcareFacilityTypeCode(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata1.setHealthcareFacilityTypeCode_localized(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata1.setPracticeSettingCode(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata1.setPracticeSettingCode_localized(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata1.setLoinc(LoincEnum.LOINC_34133_9.getValue());
metadata1.setLoinc_localized(LoincEnum.LOINC_34133_9.getValue());
metadata1.setPatientId("xxx");
metadata1.setUniqueId("1.27");
DirectDocument2 doc2 = new DirectDocument2();
doc2.setData(new String("data2").getBytes());
DirectDocument2.Metadata metadata2 = doc2.getMetadata();
metadata2.setMimeType("2.1");
metadata2.setId("2.2");
metadata2.setDescription("2.3");
metadata2.setCreationTime(new Date());
metadata2.setLanguageCode("2.5");
metadata2.setServiceStartTime(new Date());
metadata2.setServiceStopTime(new Date());
metadata2.setSourcePatient(new SimplePerson("2.Bob", "2.Smith"));
metadata2.setAuthorPerson("2.10");
metadata2.setAuthorInstitution(Arrays.asList("2.11.1", "2.11.2"));
metadata2.setAuthorRole("2.12");
metadata2.setAuthorSpecialty("2.13");
metadata2.setClassCode(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata2.setClassCode_localized(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata2.setConfidentialityCode("2.16");
metadata2.setConfidentialityCode_localized("2.17");
metadata2.setFormatCode(FormatCodeEnum.BASIC_PATIENT_PRIVACY_CONSENTS);
metadata2.setHealthcareFacilityTypeCode(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata2.setHealthcareFacilityTypeCode_localized(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata2.setPracticeSettingCode(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata2.setPracticeSettingCode_localized(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata2.setLoinc(LoincEnum.LOINC_34133_9.getValue());
metadata2.setLoinc_localized(LoincEnum.LOINC_34133_9.getValue());
metadata2.setPatientId("xxx");
metadata2.setUniqueId("2.27");
documents.getDocuments().add(doc1);
documents.getDocuments().add(doc2);
return documents;
}
use of org.nhindirect.xd.transform.pojo.SimplePerson in project nhin-d by DirectProject.
the class DirectDocumentsTest method testDirectDocuments.
/**
* TODO: individual unit tests
*/
public void testDirectDocuments() {
// Create a collection of documents
DirectDocuments documents = new DirectDocuments();
documents.getSubmissionSet().setId("1");
documents.getSubmissionSet().setName("2");
documents.getSubmissionSet().setDescription("3");
documents.getSubmissionSet().setSubmissionTime(new Date());
documents.getSubmissionSet().setIntendedRecipient(Arrays.asList("5.1", "5.2"));
documents.getSubmissionSet().setAuthorPerson("6");
documents.getSubmissionSet().setAuthorInstitution(Arrays.asList("7.1", "7.2"));
documents.getSubmissionSet().setAuthorRole("8");
documents.getSubmissionSet().setAuthorSpecialty("9");
documents.getSubmissionSet().setAuthorTelecommunication("10");
documents.getSubmissionSet().setContentTypeCode("11");
documents.getSubmissionSet().setContentTypeCode_localized("12");
documents.getSubmissionSet().setUniqueId("13");
documents.getSubmissionSet().setSourceId("14");
documents.getSubmissionSet().setPatientId("xxx");
DirectDocument2 doc1 = new DirectDocument2();
doc1.setData(new String("this is some data for document 1").getBytes());
DirectDocument2.Metadata metadata1 = doc1.getMetadata();
metadata1.setMimeType(MimeType.TEXT_PLAIN.getType());
metadata1.setId("1.2");
metadata1.setDescription("1.3");
metadata1.setCreationTime(new Date());
metadata1.setLanguageCode("1.5");
metadata1.setServiceStartTime(new Date());
metadata1.setServiceStopTime(new Date());
metadata1.setSourcePatient(new SimplePerson("1.Bob", "1.Smith"));
metadata1.setAuthorPerson("1.10");
metadata1.setAuthorInstitution(Arrays.asList("1.11.1", "1.11.2"));
metadata1.setAuthorRole("1.12");
metadata1.setAuthorSpecialty("1.13");
metadata1.setClassCode(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata1.setClassCode_localized(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata1.setConfidentialityCode("1.16");
metadata1.setConfidentialityCode_localized("1.17");
metadata1.setFormatCode(FormatCodeEnum.CANCER_REGISTRY_CONTENT_CRC);
metadata1.setHealthcareFacilityTypeCode(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata1.setHealthcareFacilityTypeCode_localized(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata1.setPracticeSettingCode(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata1.setPracticeSettingCode_localized(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata1.setLoinc(LoincEnum.LOINC_34133_9.getValue());
metadata1.setLoinc_localized(LoincEnum.LOINC_34133_9.getValue());
metadata1.setPatientId("xxx");
metadata1.setUniqueId("1.27");
DirectDocument2 doc2 = new DirectDocument2();
doc2.setData(new String("and this is some data for document 2").getBytes());
DirectDocument2.Metadata metadata2 = doc2.getMetadata();
metadata1.setMimeType(MimeType.TEXT_XML.getType());
metadata2.setId("2.2");
metadata2.setDescription("2.3");
metadata2.setCreationTime(new Date());
metadata2.setLanguageCode("2.5");
metadata2.setServiceStartTime(new Date());
metadata2.setServiceStopTime(new Date());
metadata2.setSourcePatient(new SimplePerson("2.Bob", "2.Smith"));
metadata2.setAuthorPerson("2.10");
metadata2.setAuthorInstitution(Arrays.asList("2.11.1", "2.11.2"));
metadata2.setAuthorRole("2.12");
metadata2.setAuthorSpecialty("2.13");
metadata2.setClassCode(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata2.setClassCode_localized(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata2.setConfidentialityCode("2.16");
metadata2.setConfidentialityCode_localized("2.17");
metadata2.setFormatCode(FormatCodeEnum.HL7_CCD_DOCUMENT);
metadata2.setHealthcareFacilityTypeCode(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata2.setHealthcareFacilityTypeCode_localized(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata2.setPracticeSettingCode(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata2.setPracticeSettingCode_localized(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata2.setLoinc(LoincEnum.LOINC_34133_9.getValue());
metadata2.setLoinc_localized(LoincEnum.LOINC_34133_9.getValue());
metadata2.setPatientId("xxx");
metadata2.setUniqueId("2.27");
documents.getDocuments().add(doc1);
documents.getDocuments().add(doc2);
System.out.println(documents.getSubmitObjectsRequestAsString());
}
use of org.nhindirect.xd.transform.pojo.SimplePerson in project nhin-d by DirectProject.
the class XdmPackageTest method testXdmPackage.
/**
* Test the XdmPackage class.
*/
public void testXdmPackage() {
XdmPackage xdmPackage = new XdmPackage(UUID.randomUUID().toString());
// Create a collection of documents
DirectDocuments documents = new DirectDocuments();
documents.getSubmissionSet().setId("1");
documents.getSubmissionSet().setName("2");
documents.getSubmissionSet().setDescription("3");
documents.getSubmissionSet().setSubmissionTime(new Date());
documents.getSubmissionSet().setIntendedRecipient(Arrays.asList("5.1", "5.2"));
documents.getSubmissionSet().setAuthorPerson("6");
documents.getSubmissionSet().setAuthorInstitution(Arrays.asList("7.1", "7.2"));
documents.getSubmissionSet().setAuthorRole("8");
documents.getSubmissionSet().setAuthorSpecialty("9");
documents.getSubmissionSet().setAuthorTelecommunication("10");
documents.getSubmissionSet().setContentTypeCode("11");
documents.getSubmissionSet().setContentTypeCode_localized("12");
documents.getSubmissionSet().setUniqueId("13");
documents.getSubmissionSet().setSourceId("14");
documents.getSubmissionSet().setPatientId("xxx");
DirectDocument2 doc1 = new DirectDocument2();
doc1.setData(new String("data1").getBytes());
DirectDocument2.Metadata metadata1 = doc1.getMetadata();
metadata1.setMimeType(MimeType.TEXT_PLAIN.getType());
metadata1.setId("1.2");
metadata1.setDescription("1.3");
metadata1.setCreationTime(new Date());
metadata1.setLanguageCode("1.5");
metadata1.setServiceStartTime(new Date());
metadata1.setServiceStopTime(new Date());
metadata1.setSourcePatient(new SimplePerson("1.Bob", "1.Smith"));
metadata1.setAuthorPerson("1.10");
metadata1.setAuthorInstitution(Arrays.asList("1.11.1", "1.11.2"));
metadata1.setAuthorRole("1.12");
metadata1.setAuthorSpecialty("1.13");
metadata1.setClassCode(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata1.setClassCode_localized(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata1.setConfidentialityCode("1.16");
metadata1.setConfidentialityCode_localized("1.17");
metadata1.setFormatCode(FormatCodeEnum.CARE_MANAGEMENT_CM);
metadata1.setHealthcareFacilityTypeCode(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata1.setHealthcareFacilityTypeCode_localized(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata1.setPracticeSettingCode(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata1.setPracticeSettingCode_localized(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata1.setLoinc(LoincEnum.LOINC_34133_9.getValue());
metadata1.setLoinc_localized(LoincEnum.LOINC_34133_9.getValue());
metadata1.setPatientId("xxx");
metadata1.setUniqueId("1.27");
DirectDocument2 doc2 = new DirectDocument2();
doc2.setData(new String("doc2").getBytes());
DirectDocument2.Metadata metadata2 = doc2.getMetadata();
metadata2.setMimeType(MimeType.TEXT_XML.getType());
metadata2.setId("2.2");
metadata2.setDescription("2.3");
metadata2.setCreationTime(new Date());
metadata2.setLanguageCode("2.5");
metadata2.setServiceStartTime(new Date());
metadata2.setServiceStopTime(new Date());
metadata2.setSourcePatient(new SimplePerson("2.Bob", "2.Smith"));
metadata2.setAuthorPerson("2.10");
metadata2.setAuthorInstitution(Arrays.asList("2.11.1", "2.11.2"));
metadata2.setAuthorRole("2.12");
metadata2.setAuthorSpecialty("2.13");
metadata2.setClassCode(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata2.setClassCode_localized(ClassCodeEnum.HISTORY_AND_PHYSICAL.getValue());
metadata2.setConfidentialityCode("2.16");
metadata2.setConfidentialityCode_localized("2.17");
metadata2.setFormatCode(FormatCodeEnum.CDA_LABORATORY_REPORT);
metadata2.setHealthcareFacilityTypeCode(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata2.setHealthcareFacilityTypeCode_localized(HealthcareFacilityTypeCodeEnum.OF.getValue());
metadata2.setPracticeSettingCode(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata2.setPracticeSettingCode_localized(PracticeSettingCodeEnum.MULTIDISCIPLINARY.getValue());
metadata2.setLoinc(LoincEnum.LOINC_34133_9.getValue());
metadata2.setLoinc_localized(LoincEnum.LOINC_34133_9.getValue());
metadata2.setPatientId("xxx");
metadata2.setUniqueId("2.27");
documents.getDocuments().add(doc1);
documents.getDocuments().add(doc2);
xdmPackage.setDocuments(documents);
File f = xdmPackage.toFile();
System.out.println(f.getAbsolutePath());
}
Aggregations