本文整理汇总了Java中org.hl7.fhir.dstu3.model.ContactPoint类的典型用法代码示例。如果您正苦于以下问题:Java ContactPoint类的具体用法?Java ContactPoint怎么用?Java ContactPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContactPoint类属于org.hl7.fhir.dstu3.model包,在下文中一共展示了ContactPoint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSystemDstu2
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public void setSystemDstu2(org.hl7.fhir.instance.model.ContactPoint.ContactPointSystem systemEntity) {
switch (systemEntity) {
case EMAIL: {
this.system = ContactPoint.ContactPointSystem.EMAIL;
break;
}
case PHONE: {
this.system = ContactPoint.ContactPointSystem.PHONE;
break;
}
case FAX: {
this.system = ContactPoint.ContactPointSystem.FAX;
break;
}
}
}
示例2: setTelecomUseDstu2
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public void setTelecomUseDstu2(org.hl7.fhir.instance.model.ContactPoint.ContactPointUse use) {
switch (use) {
case HOME: {
this.telecomUse = ContactPoint.ContactPointUse.HOME;
break;
}
case MOBILE: {
this.telecomUse = ContactPoint.ContactPointUse.MOBILE;
break;
}
case WORK: {
this.telecomUse = ContactPoint.ContactPointUse.WORK;
break;
}
}
}
示例3: getTelecomUseDstu2
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public org.hl7.fhir.instance.model.ContactPoint.ContactPointUse getTelecomUseDstu2() {
switch (this.telecomUse)
{
case HOME: return org.hl7.fhir.instance.model.ContactPoint.ContactPointUse.HOME;
case WORK: return org.hl7.fhir.instance.model.ContactPoint.ContactPointUse.WORK;
case MOBILE: return org.hl7.fhir.instance.model.ContactPoint.ContactPointUse.MOBILE;
default:
return null;
}
}
示例4: addHomePhone
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public LocationEntityBuilder addHomePhone(String phoneNumber) {
LocationTelecom telecom = new LocationTelecom();
telecom.setTelecomUse(ContactPoint.ContactPointUse.HOME);
telecom.setValue(phoneNumber);
telecoms.add(telecom);
return this;
}
示例5: testTransformLocationEntity
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
@Test
public void testTransformLocationEntity(){
LocationEntity locationEntity = new LocationEntityBuilder()
.setName("Example Location")
.addAddress("20 High Street", "Holmfirth", null,
"Halifax", "West Yorkshire", "HX1 2TT")
.addHomePhone("0113240998")
.build();
Location location = transformer.transform(locationEntity);
// Check that the Name has been populated
assertThat(location, not(nullValue()));
assertThat(location.getName(), equalTo("Example Location"));
// Check that the Address has been populated
Address address = location.getAddress();
assertThat(address, not(nullValue()));
assertThat(address.getLine().get(0).getValue(), equalTo("20 High Street"));
assertThat(address.getLine().get(1).getValue(), equalTo("Holmfirth"));
assertThat(address.getLine().size(),equalTo(2));
// assertThat(address.getLine().get(3), nullValue());
assertThat(address.getDistrict(), equalTo("West Yorkshire"));
assertThat(address.getCity(), equalTo("Halifax"));
assertThat(address.getPostalCode(), equalTo("HX1 2TT"));
// Check that the Telephone Number has been populated
assertThat(location.getTelecom(), not(nullValue()));
assertThat(location.getTelecom().size(), equalTo(1));
ContactPoint phoneNumber = location.getTelecom().get(0);
assertThat(phoneNumber.getValue(), equalTo("0113240998"));
assertThat(phoneNumber.getUse().getDisplay(), equalTo("Home"));
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:35,代码来源:LocationEntityToFHIRLocationTransformerTest.java
示例6: testLoadPatient
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
@Test
public void testLoadPatient() throws Exception {
FileReader fileReader = new FileReader(
new File(this.getClass().getClassLoader().getResource("fhir/patient_f001.json").getPath()));
IBaseResource resource = ctx.newJsonParser().parseResource(fileReader);
Set<String> parameters = new HashSet<String>();
parameters.add("name");
parameters.add("email");
Set<AbstractSearchParam> values = helper.extractParametersValues(resource, parameters);
assertNotNull(values);
assertFalse(values.isEmpty());
for (AbstractSearchParam entry : values) {
String ename = entry.getName();
SearchParamTypes type = entry.getType();
if (SearchParamTypes.STRING == type) {
if (ename.equals("name")) {
assertEquals("van de Heuvel Pieter", entry.getValue());
}
}
if (SearchParamTypes.TOKEN == type) {
SearchParamToken token = (SearchParamToken) entry;
if (ename.equals("email")) {
assertEquals("email", token.getSystem());
List<ContactPoint> contacts = ((Patient) resource).getTelecom();
for (ContactPoint contactPoint : contacts) {
if (ContactPointSystem.EMAIL == contactPoint.getSystem()) {
assertEquals(contactPoint.getValue(), token.getCode());
}
}
}
}
}
}
示例7: getTelecom
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public List<ContactPoint> getTelecom()
{
try
{
return adaptedClass.getTelecom();
}
catch (Exception e)
{
throw new RuntimeException("Error getting Telecom", e);
}
}
示例8: getWrappedTelecom
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public List<qicorepatientTelecomAdapter> getWrappedTelecom() {
List<org.cqf.qicore.dstu3.qicorepatientTelecomAdapter> wrappedItems = new java.util.ArrayList<>();
List<org.hl7.fhir.dstu3.model.ContactPoint> items = adaptedClass
.getTelecom();
for (org.hl7.fhir.dstu3.model.ContactPoint item : items) {
wrappedItems
.add(new org.cqf.qicore.dstu3.qicorepatientTelecomAdapter(
item));
}
return wrappedItems;
}
示例9: setWrappedTelecom
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public Iqicorepatient setWrappedTelecom(
List<qicorepatientTelecomAdapter> param) {
List<org.hl7.fhir.dstu3.model.ContactPoint> items = new java.util.ArrayList<>();
for (org.cqf.qicore.dstu3.qicorepatientTelecomAdapter item : param) {
items.add(item.getAdaptee());
}
adaptedClass.getTelecom().addAll(items);
return this;
}
示例10: addWrappedTelecom
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public qicorepatientTelecomAdapter addWrappedTelecom()
{
org.hl7.fhir.dstu3.model.ContactPoint item = new org.hl7.fhir.dstu3.model.ContactPoint();
adaptedClass.addTelecom(item);
return new org.cqf.qicore.dstu3.qicorepatientTelecomAdapter(
item);
}
示例11: getUse
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public ContactPoint.ContactPointUse getUse()
{
try
{
return adaptedClass.getUse();
}
catch (Exception e)
{
throw new RuntimeException("Error getting Use", e);
}
}
示例12: getUseElement
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public Enumeration<ContactPoint.ContactPointUse> getUseElement()
{
try
{
return adaptedClass.getUseElement();
}
catch (Exception e)
{
throw new RuntimeException("Error getting UseElement", e);
}
}
示例13: getSystem
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public ContactPoint.ContactPointSystem getSystem()
{
try
{
return adaptedClass.getSystem();
}
catch (Exception e)
{
throw new RuntimeException("Error getting System", e);
}
}
示例14: getSystemElement
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public Enumeration<ContactPoint.ContactPointSystem> getSystemElement()
{
try
{
return adaptedClass.getSystemElement();
}
catch (Exception e)
{
throw new RuntimeException("Error getting SystemElement", e);
}
}
示例15: getContact
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public List<ContactPoint> getContact()
{
try
{
return adaptedClass.getContact();
}
catch (Exception e)
{
throw new RuntimeException("Error getting Contact", e);
}
}