当前位置: 首页>>代码示例>>Java>>正文


Java ContactPoint类代码示例

本文整理汇总了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;
        }
    }
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:17,代码来源:BaseContactPoint.java

示例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;
        }
    }

}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:18,代码来源:BaseContactPoint.java

示例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;
    }
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:11,代码来源:BaseContactPoint.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:8,代码来源:LocationEntityBuilder.java

示例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());
					}
				}
			}
		}
	}
}
 
开发者ID:jmiddleton,项目名称:cassandra-fhir-index,代码行数:41,代码来源:SearchParamExtractorTest.java

示例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);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepractitionerAdapter.java

示例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;
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepatientAdapter.java

示例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;
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:10,代码来源:qicorepatientAdapter.java

示例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);
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:8,代码来源:qicorepatientAdapter.java

示例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);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepatientTelecomAdapter.java

示例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);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepatientTelecomAdapter.java

示例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);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepatientTelecomAdapter.java

示例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);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepatientTelecomAdapter.java

示例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);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicoredeviceAdapter.java


注:本文中的org.hl7.fhir.dstu3.model.ContactPoint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。