本文整理汇总了Java中org.marc.everest.datatypes.TEL类的典型用法代码示例。如果您正苦于以下问题:Java TEL类的具体用法?Java TEL怎么用?Java TEL使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TEL类属于org.marc.everest.datatypes包,在下文中一共展示了TEL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: telecomFullTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void telecomFullTest() {
SET<TEL> telecoms = recordTargetModel.getTelecoms();
assertNotNull(telecoms);
assertEquals(3, telecoms.size());
TEL tel0 = telecoms.get(0);
assertNotNull(tel0);
assertTrue(TEL.isValidPhoneFlavor(tel0));
assertEquals("tel:" + demographic.getPhone().replaceAll("-", ""), tel0.getValue());
TEL tel1 = telecoms.get(1);
assertNotNull(tel1);
assertTrue(TEL.isValidPhoneFlavor(tel1));
assertEquals("tel:" + demographic.getPhone2().replaceAll("-", ""), tel1.getValue());
TEL tel2 = telecoms.get(2);
assertNotNull(tel2);
assertTrue(TEL.isValidEMailFlavor(tel2));
assertEquals("mailto:" + demographic.getEmail(), tel2.getValue());
}
示例2: telecomFullTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void telecomFullTest() {
SET<TEL> telecoms = authorModel.getTelecoms();
assertNotNull(telecoms);
assertEquals(3, telecoms.size());
TEL tel0 = telecoms.get(0);
assertNotNull(tel0);
assertTrue(TEL.isValidPhoneFlavor(tel0));
assertEquals("tel:" + provider.getPhone().replaceAll("-", ""), tel0.getValue());
TEL tel1 = telecoms.get(1);
assertNotNull(tel1);
assertTrue(TEL.isValidPhoneFlavor(tel1));
assertEquals("tel:" + provider.getWorkPhone().replaceAll("-", ""), tel1.getValue());
TEL tel2 = telecoms.get(2);
assertNotNull(tel2);
assertTrue(TEL.isValidEMailFlavor(tel2));
assertEquals("mailto:" + provider.getEmail(), tel2.getValue());
}
示例3: ProviderTelecomLens
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
public ProviderTelecomLens() {
get = source -> {
Provider provider = EverestUtils.getProviderFromString(source.getLeft());
SET<TEL> telecoms = source.getRight().get(0).getAssignedAuthor().getTelecom();
if(telecoms == null && provider != null) {
ArrayList<TEL> tels = new ArrayList<>();
tels.add(new TelecomPartLens(TelecomType.TELEPHONE, TelecommunicationsAddressUse.Home).get(provider.getPhone()));
tels.add(new TelecomPartLens(TelecomType.TELEPHONE, TelecommunicationsAddressUse.WorkPlace).get(provider.getWorkPhone()));
tels.add(new TelecomPartLens(TelecomType.EMAIL, TelecommunicationsAddressUse.Home).get(provider.getEmail()));
tels.removeAll(Collections.singleton(null));
if(!tels.isEmpty()) {
telecoms = new SET<>(tels);
}
}
source.getRight().get(0).getAssignedAuthor().setTelecom(telecoms);
return new ImmutablePair<>(source.getLeft(), source.getRight());
};
put = (source, target) -> {
return new ImmutablePair<>(target.getLeft(), target.getRight());
};
}
示例4: providerTelecomLensGetTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void providerTelecomLensGetTest() {
ProviderTelecomLens lens = new ProviderTelecomLens();
assertNotNull(lens);
Pair<String, ArrayList<Author>> pair = lens.get(getPair);
assertNotNull(pair);
assertNotNull(pair.getLeft());
assertNotNull(pair.getRight());
SET<TEL> telecoms = pair.getRight().get(0).getAssignedAuthor().getTelecom();
assertNotNull(telecoms);
assertEquals(3, telecoms.size());
assertTrue(telecoms.contains(new TEL(Constants.DocumentHeader.TEL_PREFIX + provider.getPhone().replaceAll("[^0-9]", ""), TelecommunicationsAddressUse.Home)));
assertTrue(telecoms.contains(new TEL(Constants.DocumentHeader.TEL_PREFIX + provider.getWorkPhone().replaceAll("[^0-9]", ""), TelecommunicationsAddressUse.WorkPlace)));
assertTrue(telecoms.contains(new TEL(Constants.DocumentHeader.EMAIL_PREFIX + provider.getEmail(), TelecommunicationsAddressUse.Home)));
}
示例5: telecomLensGetTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void telecomLensGetTest() {
TelecomLens lens = new TelecomLens();
assertNotNull(lens);
Pair<Demographic, RecordTarget> pair = lens.get(getPair);
assertNotNull(pair);
assertNotNull(pair.getLeft());
assertNotNull(pair.getRight());
SET<TEL> telecoms = pair.getRight().getPatientRole().getTelecom();
assertNotNull(telecoms);
assertEquals(3, telecoms.size());
assertTrue(telecoms.contains(new TEL(Constants.DocumentHeader.TEL_PREFIX + demographic.getPhone().replaceAll("[^0-9]", ""), TelecommunicationsAddressUse.Home)));
assertTrue(telecoms.contains(new TEL(Constants.DocumentHeader.TEL_PREFIX + demographic.getPhone2().replaceAll("[^0-9]", ""), TelecommunicationsAddressUse.WorkPlace)));
assertTrue(telecoms.contains(new TEL(Constants.DocumentHeader.EMAIL_PREFIX + demographic.getEmail(), TelecommunicationsAddressUse.Home)));
}
示例6: telecomLensPutTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void telecomLensPutTest() {
TelecomLens lens = new TelecomLens();
assertNotNull(lens);
ArrayList<TEL> tels = new ArrayList<>();
tels.add(new TelecomPartLens(TelecomType.TELEPHONE, TelecommunicationsAddressUse.Home).get(demographic.getPhone()));
tels.add(new TelecomPartLens(TelecomType.TELEPHONE, TelecommunicationsAddressUse.WorkPlace).get(demographic.getPhone2()));
tels.add(new TelecomPartLens(TelecomType.EMAIL, TelecommunicationsAddressUse.Home).get(demographic.getEmail()));
SET<TEL> telecoms = new SET<>(tels);
putPair.getRight().getPatientRole().setTelecom(telecoms);
Pair<Demographic, RecordTarget> pair = lens.put(putPair, putPair);
assertNotNull(pair);
assertNotNull(pair.getLeft());
assertNotNull(pair.getRight());
assertEquals(demographic.getPhone().replaceAll("[^0-9]", ""), pair.getLeft().getPhone());
assertEquals(demographic.getPhone2().replaceAll("[^0-9]", ""), pair.getLeft().getPhone2());
assertEquals(demographic.getEmail(), pair.getLeft().getEmail());
}
示例7: telecomPartLensPutTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void telecomPartLensPutTest() {
final String testNumber = "123-4567";
final String testEmail = "[email protected]";
TelecomPartLens phoneLens = new TelecomPartLens(TelecomType.TELEPHONE);
assertNotNull(phoneLens);
assertNull(phoneLens.put(null, null));
assertEquals(testNumber, phoneLens.put(testNumber, new TEL()));
assertEquals(testNumber.replaceAll("[^0-9]", ""), phoneLens.put(phoneLens.get(testNumber)));
TelecomPartLens emailLens = new TelecomPartLens(TelecomType.EMAIL);
assertNotNull(emailLens);
assertEquals(testEmail, emailLens.put(testEmail, new TEL()));
assertEquals(testEmail, emailLens.put(emailLens.get(testEmail)));
}
示例8: setTelecoms
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
private void setTelecoms() {
SET<TEL> telecoms = new SET<TEL>();
EverestUtils.addTelecomPart(telecoms, demographic.getPhone(), TelecommunicationsAddressUse.Home, TelecomType.TELEPHONE);
EverestUtils.addTelecomPart(telecoms, demographic.getPhone2(), TelecommunicationsAddressUse.WorkPlace, TelecomType.TELEPHONE);
EverestUtils.addTelecomPart(telecoms, demographic.getEmail(), TelecommunicationsAddressUse.Home, TelecomType.EMAIL);
if(!telecoms.isEmpty()) {
this.telecoms = telecoms;
}
else {
this.telecoms = null;
}
}
示例9: setTelecoms
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
private void setTelecoms() {
SET<TEL> telecoms = new SET<TEL>();
EverestUtils.addTelecomPart(telecoms, provider.getPhone(), TelecommunicationsAddressUse.Home, TelecomType.TELEPHONE);
EverestUtils.addTelecomPart(telecoms, provider.getWorkPhone(), TelecommunicationsAddressUse.WorkPlace, TelecomType.TELEPHONE);
EverestUtils.addTelecomPart(telecoms, provider.getEmail(), TelecommunicationsAddressUse.Home, TelecomType.EMAIL);
if(!telecoms.isEmpty()) {
this.telecoms = telecoms;
} else {
this.telecoms = null;
}
}
示例10: addTelecomPart
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
public static void addTelecomPart(SET<TEL> telecoms, String value, TelecommunicationsAddressUse telecomAddressUse, TelecomType telecomType) {
if(!isNullorEmptyorWhitespace(value)) {
if(telecomType == Constants.TelecomType.TELEPHONE) {
telecoms.add(new TEL(Constants.DocumentHeader.TEL_PREFIX + value.replaceAll("-", ""), telecomAddressUse));
} else if(telecomType == Constants.TelecomType.EMAIL) {
telecoms.add(new TEL(Constants.DocumentHeader.EMAIL_PREFIX + value, telecomAddressUse));
}
}
}
示例11: setCustodianInfo
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
private static CustodianTemplate setCustodianInfo(Clinic clinic) {
CustodianTemplate result = phrExtractDocument.setCustodian(OidUtil.getOid(OidType.CLINIC_OID), clinic.getClinicLocationCode(), clinic.getClinicName(), new TEL(clinic.getClinicPhone(), TelecommunicationsAddressUse.Home));
result.addAddress(PostalAddressUse.WorkPlace, clinic.getClinicAddress(), AddressPartType.AddressLine);
result.addAddress(PostalAddressUse.WorkPlace, clinic.getClinicCity(), AddressPartType.City);
result.addAddress(PostalAddressUse.WorkPlace, clinic.getClinicProvince(), AddressPartType.State);
result.addAddress(PostalAddressUse.WorkPlace, clinic.getClinicPostal(), AddressPartType.PostalCode);
result.addAddress(PostalAddressUse.WorkPlace, "CA", AddressPartType.Country);
return result;
}
示例12: toQuery
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
/**
* Creates new query instance
*
* @param demographic
* Demographic to create query for
* @return Returns the new query
*/
private PRPA_IN101103CA toQuery(Provider provider, Demographic demographic) {
PRPA_IN101103CA findCandidates = new PRPA_IN101103CA(new II(UUID.randomUUID()), // II.TOKEN in pCS
TS.now(), ResponseMode.Immediate, PRPA_IN101103CA.defaultInteractionId(), PRPA_IN101103CA.defaultProfileId(), ProcessingID.Training, AcknowledgementCondition.Always);
// Setup sender
findCandidates.setSender(new Sender(
new TEL(getSender().getUrl()),
new Device1(new II("1.3.6.1.4.1.33349.3.1.1.22", getSender().getName()),
new ST(getSender().getName()),
new ST(getSender().getName()),
null,
null,
null
)));
findCandidates.setReceiver(new Receiver(new TEL(getReceiver().getUrl()),
new Device2(
new II("1.3.6.1.4.1.33349.3.1.1.2", "CR")
)
));
// Setup request
findCandidates.setControlActEvent(new ControlActEvent<ParameterList>());
findCandidates.getControlActEvent().setCode(PRPA_IN101103CA.defaultTriggerEvent());
findCandidates.getControlActEvent().setEffectiveTime(TS.now());
// Add author data
if (provider != null) {
findCandidates.getControlActEvent().setAuthor(new Author(TS.now()));
findCandidates.getControlActEvent().getAuthor().setAuthorPerson(new AssignedEntity(SET.createSET(new II("1.2.3.4", "FS-39485")), getProviderAsPerson(provider)));
}
// Query control data
findCandidates.getControlActEvent().setQueryByParameter(new QueryByParameter<ParameterList>());
findCandidates.getControlActEvent().getQueryByParameter().setQueryId(UUID.randomUUID());
findCandidates.getControlActEvent().getQueryByParameter().setInitialQuantity(10);
findCandidates.getControlActEvent().getQueryByParameter().setInitialQuantityCode(QueryRequestLimit.Record);
// Parameter list
findCandidates.getControlActEvent().getQueryByParameter().setParameterList(new ParameterList());
findCandidates.getControlActEvent().getQueryByParameter().getParameterList().setAdministrativeGender(new org.marc.everest.rmim.ca.r020403.prpa_mt101103ca.AdministrativeGender(Utils.toAdminGender(demographic.getSex())));
findCandidates.getControlActEvent().getQueryByParameter().getParameterList().getPersonName().add(new PersonName(PN.fromEN(EN.createEN(EntityNameUse.Search, new ENXP(demographic.getFirstName(), EntityNamePartType.Given), new ENXP(demographic.getLastName(), EntityNamePartType.Family)))));
return findCandidates;
}
示例13: initIdentifiedEntity
import org.marc.everest.datatypes.TEL; //导入依赖的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);
}
示例14: getTelecoms
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
public SET<TEL> getTelecoms() {
return telecoms;
}
示例15: telecomNullTest
import org.marc.everest.datatypes.TEL; //导入依赖的package包/类
@Test
public void telecomNullTest() {
SET<TEL> telecoms = nullRecordTargetModel.getTelecoms();
assertNull(telecoms);
}