本文整理汇总了Java中org.marc.everest.datatypes.ADXP类的典型用法代码示例。如果您正苦于以下问题:Java ADXP类的具体用法?Java ADXP怎么用?Java ADXP使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ADXP类属于org.marc.everest.datatypes包,在下文中一共展示了ADXP类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addressFullTest
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
@Test
public void addressFullTest() {
SET<AD> addrSet = recordTargetModel.getAddresses();
assertNotNull(addrSet);
assertEquals(1, addrSet.size());
AD addr = addrSet.get(0);
assertNotNull(addr);
assertEquals(1, addr.getUse().size());
assertEquals(PostalAddressUse.HomeAddress, addr.getUse().get(0).getCode());
assertEquals(4, addr.getPart().size());
assertTrue(addr.getPart().contains(new ADXP(demographic.getAddress(), AddressPartType.Delimiter)));
assertTrue(addr.getPart().contains(new ADXP(demographic.getCity(), AddressPartType.City)));
assertTrue(addr.getPart().contains(new ADXP(demographic.getProvince(), AddressPartType.State)));
assertTrue(addr.getPart().contains(new ADXP(demographic.getPostal(), AddressPartType.PostalCode)));
}
示例2: addressLensGetTest
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
@Test
public void addressLensGetTest() {
AddressLens lens = new AddressLens();
assertNotNull(lens);
Pair<Demographic, RecordTarget> pair = lens.get(getPair);
assertNotNull(pair);
assertNotNull(pair.getLeft());
assertNotNull(pair.getRight());
SET<AD> addresses = pair.getRight().getPatientRole().getAddr();
assertNotNull(addresses);
List<ADXP> addrParts = addresses.get(0).getPart();
assertNotNull(addrParts);
assertEquals(4, addrParts.size());
assertTrue(addrParts.contains(new ADXP(demographic.getAddress(), AddressPartType.Delimiter)));
assertTrue(addrParts.contains(new ADXP(demographic.getCity(), AddressPartType.City)));
assertTrue(addrParts.contains(new ADXP(demographic.getProvince(), AddressPartType.State)));
assertTrue(addrParts.contains(new ADXP(demographic.getPostal(), AddressPartType.PostalCode)));
}
示例3: addressLensPutTest
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
@Test
public void addressLensPutTest() {
AddressLens lens = new AddressLens();
assertNotNull(lens);
List<ADXP> addrParts = new ArrayList<ADXP>();
addrParts.add(new ADXP(demographic.getAddress(), AddressPartType.Delimiter));
addrParts.add(new ADXP(demographic.getCity(), AddressPartType.City));
addrParts.add(new ADXP(demographic.getProvince(), AddressPartType.State));
addrParts.add(new ADXP(demographic.getPostal(), AddressPartType.PostalCode));
SET<AD> addresses = new SET<>(new AD(new CS<>(PostalAddressUse.HomeAddress), addrParts));
putPair.getRight().getPatientRole().setAddr(addresses);;
Pair<Demographic, RecordTarget> pair = lens.put(putPair, putPair);
assertNotNull(pair);
assertNotNull(pair.getLeft());
assertNotNull(pair.getRight());
assertEquals(demographic.getAddress(), pair.getLeft().getAddress());
assertEquals(demographic.getCity(), pair.getLeft().getCity());
assertEquals(demographic.getProvince(), pair.getLeft().getProvince());
assertEquals(demographic.getPostal(), pair.getLeft().getPostal());
}
示例4: addressPartLensPutTest
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
@Test
public void addressPartLensPutTest() {
final String test = "test";
AddressPartLens lens = new AddressPartLens(AddressPartType.Delimiter);
assertNotNull(lens);
assertNull(lens.put(null));
assertNull(lens.put(new ADXP(test, AddressPartType.City)));
assertEquals(test, lens.put(new ADXP(test, AddressPartType.Delimiter)));
assertEquals(test, lens.put(test, null));
assertEquals(test, lens.put(test, new ADXP() {{setNullFlavor(NullFlavor.NoInformation);}}));
assertEquals(test, lens.put(test, new ADXP("wrong", null)));
assertEquals(test, lens.put(test, new ADXP("wrong", AddressPartType.City)));
assertEquals(test, lens.put("wrong", new ADXP(test, AddressPartType.Delimiter)));
}
示例5: setAddresses
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
private void setAddresses() {
ArrayList<ADXP> addrParts = new ArrayList<ADXP>();
EverestUtils.addAddressPart(addrParts, demographic.getAddress(), AddressPartType.Delimiter);
EverestUtils.addAddressPart(addrParts, demographic.getCity(), AddressPartType.City);
EverestUtils.addAddressPart(addrParts, demographic.getProvince(), AddressPartType.State);
EverestUtils.addAddressPart(addrParts, demographic.getPostal(), AddressPartType.PostalCode);
if(!addrParts.isEmpty()) {
CS<PostalAddressUse> use = new CS<PostalAddressUse>(PostalAddressUse.HomeAddress);
AD addr = new AD(use, addrParts);
this.addresses = new SET<AD>(addr);
}
else {
this.addresses = null;
}
}
示例6: addAddressPart
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
/**
* Header Utility Functions
*/
// Add an address to the addrParts list
public static void addAddressPart(ArrayList<ADXP> addrParts, String value, AddressPartType addressPartType) {
if(!isNullorEmptyorWhitespace(value)) {
ADXP addrPart = new ADXP(value, addressPartType);
addrParts.add(addrPart);
}
}
示例7: addressPartLensGetTest
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
@Test
public void addressPartLensGetTest() {
final String test = "test";
AddressPartLens lens = new AddressPartLens(AddressPartType.Delimiter);
assertNotNull(lens);
assertNull(lens.get(null));
assertEquals(new ADXP(test, AddressPartType.Delimiter), lens.get(test));
}
示例8: toIdentifiedPerson
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
private org.marc.everest.rmim.ca.r020403.prpa_mt101001ca.Person toIdentifiedPerson(String first, String last, AdministrativeGender gender, PersonBirthtime birthTime) {
org.marc.everest.rmim.ca.r020403.prpa_mt101001ca.Person person = new org.marc.everest.rmim.ca.r020403.prpa_mt101001ca.Person();
if (gender != null && gender.getValue() != null && gender.getValue().getCode() != null) {
person.setAdministrativeGenderCode(new CV<org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender>(gender.getValue().getCode()));
}
if (birthTime != null && birthTime.getValue() != null) {
person.setBirthTime(birthTime.getValue().getDateValue());
}
LIST<PN> pns = new LIST<PN>();
PN pn = PN.fromFamilyGiven(EntityNameUse.Legal, last, first);
pns.add(pn);
person.setName(pns);
LIST<AD> addr = new LIST<AD>();
AD ad = new AD();
ad.getPart().add(new ADXP("1532 Home Street"));
ad.getPart().add(new ADXP("Ann Arbor", AddressPartType.City));
ad.getPart().add(new ADXP("MI", AddressPartType.State));
ad.getPart().add(new ADXP("99999", AddressPartType.PostalCode));
addr.add(ad);
person.setAddr(addr);
org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs otherId = new org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs();
// generate dummy UUID
otherId.setId(new II("2.16.840.1.113883.4.50", UUID.randomUUID().toString()));
otherId.setCode(new CV<String>("DL", "2.16.840.1.113883.2.20.5.2"));
IdOrganization idOrganization = new IdOrganization();
idOrganization.setName("Department of National Defence");
otherId.setAssigningIdOrganization(idOrganization);
person.getAsOtherIDs().add(otherId);
otherId = new org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs();
// generate dummy UUID
otherId.setId(new II("2.16.840.1.113883.4.50", UUID.randomUUID().toString()));
otherId.setCode(new CV<String>("DL", "2.16.840.1.113883.2.20.5.2"));
idOrganization = new IdOrganization();
idOrganization.setName("British Columbia Ministry of Transportation");
otherId.setAssigningIdOrganization(idOrganization);
person.getAsOtherIDs().add(otherId);
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("FTH", "2.16.840.1.113883.5.111");
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444111234"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Neville", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("MTH", "2.16.840.1.113883.5.111");
parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444112345"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Nelda", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication lang = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication(new CV<String>("en", "2.16.840.1.113883.6.121"));
person.getLanguageCommunication().add(lang);
return person;
}
示例9: toAnotherIdentifiedPerson
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
static org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.Person toAnotherIdentifiedPerson(String first, String last, AdministrativeGender gender, PersonBirthtime birthTime) {
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.Person person = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.Person();
if (gender != null && gender.getValue() != null && gender.getValue().getCode() != null) {
person.setAdministrativeGenderCode(new CV<org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender>(gender.getValue().getCode()));
}
if (birthTime != null && birthTime.getValue() != null) {
person.setBirthTime(birthTime.getValue().getDateValue());
}
LIST<PN> pns = new LIST<PN>();
PN pn = PN.fromFamilyGiven(EntityNameUse.Legal, last, first);
pns.add(pn);
person.setName(pns);
LIST<AD> addr = new LIST<AD>();
AD ad = new AD();
ad.getPart().add(new ADXP("1532 Home Street"));
ad.getPart().add(new ADXP("Ann Arbor", AddressPartType.City));
ad.getPart().add(new ADXP("MI", AddressPartType.State));
ad.getPart().add(new ADXP("99999", AddressPartType.PostalCode));
addr.add(ad);
person.setAddr(addr);
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.OtherIDs otherId = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.OtherIDs();
// generate dummy UUID
otherId.setId(new II("2.16.840.1.113883.4.50", UUID.randomUUID().toString()));
otherId.setCode(new CV<String>("DL", "2.16.840.1.113883.2.20.5.2"));
IdOrganization idOrganization = new IdOrganization();
idOrganization.setName("Department of National Defence");
otherId.setAssigningIdOrganization(idOrganization);
person.getAsOtherIDs().add(otherId);
otherId = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.OtherIDs();
// generate dummy UUID
otherId.setId(new II("2.16.840.1.113883.4.50", UUID.randomUUID().toString()));
otherId.setCode(new CV<String>("DL", "2.16.840.1.113883.2.20.5.2"));
idOrganization = new IdOrganization();
idOrganization.setName("British Columbia Ministry of Transportation");
otherId.setAssigningIdOrganization(idOrganization);
person.getAsOtherIDs().add(otherId);
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("FTH", "2.16.840.1.113883.5.111");
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444111234"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Neville", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("MTH", "2.16.840.1.113883.5.111");
parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444112345"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Nelda", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication lang = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication(new CV<String>("en", "2.16.840.1.113883.6.121"));
person.getLanguageCommunication().add(lang);
return person;
}
示例10: initIdentifiedEntity
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
private void initIdentifiedEntity(org.marc.everest.rmim.ca.r020403.prpa_mt101001ca.IdentifiedEntity identifiedEntity, Demographic demo) {
org.marc.everest.rmim.ca.r020403.prpa_mt101001ca.Person person = new org.marc.everest.rmim.ca.r020403.prpa_mt101001ca.Person();
identifiedEntity.setIdentifiedPerson(person);
LIST<PN> pns = new LIST<PN>();
PN pn = PN.fromFamilyGiven(EntityNameUse.Legal, demo.getLastName(), demo.getFirstName());
pns.add(pn);
person.setName(pns);
LIST<TEL> tel = new LIST<TEL>();
if (demo.getPhone() != null) {
tel.add(new TEL(demo.getPhone()));
}
if (demo.getPhone() != null) {
tel.add(new TEL(demo.getPhone2()));
}
person.setTelecom(tel);
if ("M".equals(demo.getSex())) {
person.setAdministrativeGenderCode(new CV<org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender>(org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender.Male));
} else if ("F".equals(demo.getSex())) {
person.setAdministrativeGenderCode(new CV<org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender>(org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender.Female));
} else {
person.setAdministrativeGenderCode(new CV<org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender>(org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender.Undifferentiated));
}
person.setBirthTime(demo.getBirthDay());
// FIXME assume we only deal with alive patients
person.setDeceasedInd(new BL(false));
LIST<AD> addr = new LIST<AD>();
AD ad = new AD();
ad.getPart().add(new ADXP(demo.getAddress()));
ad.getPart().add(new ADXP(demo.getCity(), AddressPartType.City));
ad.getPart().add(new ADXP(demo.getProvince(), AddressPartType.State));
ad.getPart().add(new ADXP(demo.getPostal(), AddressPartType.PostalCode));
addr.add(ad);
person.setAddr(addr);
org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs otherId = new org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs();
// FIXME get proper root for this ID - will be based on "per clinic" approach
if (demo.getDemographicNo() != null) {
otherId.setId(new II("2.16.840.1.113883.4.50", demo.getDemographicNo().toString()));
}
otherId.setCode(new CV<String>("DL", "2.16.840.1.113883.2.20.5.2"));
IdOrganization idOrganization = new IdOrganization();
// FIXME set proper clinic name
idOrganization.setName("OSCAR");
otherId.setAssigningIdOrganization(idOrganization);
person.getAsOtherIDs().add(otherId);
// FIXME add proper personal relationship handling
/*
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("FTH", "2.16.840.1.113883.5.111");
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444111234"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Neville", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
*/
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication lang = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication(new CV<String>(demo.getSpokenLanguage(), "2.16.840.1.113883.6.121"));
person.getLanguageCommunication().add(lang);
}
示例11: toIdentifiedPerson
import org.marc.everest.datatypes.ADXP; //导入依赖的package包/类
private Person toIdentifiedPerson(Demographic demo) {
Person person = new Person();
String first = demo.getFirstName();
String last = demo.getLastName();
AdministrativeGender gender = new AdministrativeGender(Utils.toAdminGender(demo.getSex()));
PersonBirthtime birthTime = new PersonBirthtime(new TS(demo.getBirthDay()));
if (gender != null && gender.getValue() != null && gender.getValue().getCode() != null) {
person.setAdministrativeGenderCode(new CV<org.marc.everest.rmim.ca.r020403.vocabulary.AdministrativeGender>(gender.getValue().getCode()));
}
if (birthTime != null && birthTime.getValue() != null) {
person.setBirthTime(birthTime.getValue().getDateValue());
}
LIST<PN> pns = new LIST<PN>();
PN pn = PN.fromFamilyGiven(EntityNameUse.Legal, last, first);
pns.add(pn);
person.setName(pns);
LIST<AD> addr = new LIST<AD>();
AD ad = new AD();
ad.getPart().add(new ADXP(demo.getAddress()));
ad.getPart().add(new ADXP(demo.getCity(), AddressPartType.City));
ad.getPart().add(new ADXP(demo.getProvince(), AddressPartType.State));
ad.getPart().add(new ADXP(demo.getPostal(), AddressPartType.PostalCode));
addr.add(ad);
person.setAddr(addr);
// FIXME - Update to provide the correct info - incl. root and clinic name
org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs otherId = new org.marc.everest.rmim.ca.r020403.prpa_mt101104ca.OtherIDs();
otherId.setId(new II("2.16.840.1.113883.4.50", "" + demo.getDemographicNo()));
otherId.setCode(new CV<String>("DL", "2.16.840.1.113883.2.20.5.2"));
IdOrganization idOrganization = new IdOrganization();
idOrganization.setName("OSCAR McMaster");
otherId.setAssigningIdOrganization(idOrganization);
person.getAsOtherIDs().add(otherId);
/*
// FIXME provide proper relationships
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("FTH", "2.16.840.1.113883.5.111");
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444111234"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Neville", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
personalRelationship = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.PersonalRelationship();
personalRelationship.setCode("MTH", "2.16.840.1.113883.5.111");
parentPerson = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.ParentPerson();
parentPerson.setId(new II("2.16.840.1.113883.4.57", "444112345"));
parentPerson.setName(PN.fromFamilyGiven(EntityNameUse.Legal, "Nelda", "Johnson"));
personalRelationship.setRelationshipHolder(parentPerson);
person.getPersonalRelationship().add(personalRelationship);
*/
org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication lang = new org.marc.everest.rmim.ca.r020403.prpa_mt101102ca.LanguageCommunication(new CV<String>("en", "2.16.840.1.113883.6.121"));
person.getLanguageCommunication().add(lang);
return person;
}