本文整理汇总了Java中org.hl7.fhir.dstu3.model.ContactPoint类的典型用法代码示例。如果您正苦于以下问题:Java ContactPoint类的具体用法?Java ContactPoint怎么用?Java ContactPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContactPoint类属于org.hl7.fhir.dstu3.model包,在下文中一共展示了ContactPoint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: main
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public static void main(String[] theArgs) {
Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("J");
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("7000135");
// Enumerated types are provided for many coded elements
ContactPoint contact = pat.addTelecom();
contact.setUse(ContactPoint.ContactPointUse.HOME);
contact.setSystem(ContactPoint.ContactPointSystem.PHONE);
contact.setValue("1 (416) 340-4800");
pat.setGender(Enumerations.AdministrativeGender.MALE);
}
开发者ID:furore-fhir,项目名称:fhirstarters,代码行数:16,代码来源:Example02_EnumeratedTypes.java
示例17: getResourceById
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
/**
* The "@Read" annotation indicates that this method supports the read operation. It takes one argument, the Resource type being returned.
*
* @param theId
* The read operation takes one parameter, which must be of type IdDt and must be annotated with the "@Read.IdParam" annotation.
* @return Returns a resource matching this identifier, or null if none exists.
*/
@Read()
public MyOrganization getResourceById(@IdParam IdType theId) {
/*
* We only support one organization, so the follwing
* exception causes an HTTP 404 response if the
* ID of "1" isn't used.
*/
if (!"1".equals(theId.getValue())) {
throw new ResourceNotFoundException(theId);
}
MyOrganization retVal = new MyOrganization();
retVal.setId("1");
retVal.addIdentifier().setSystem("urn:example:orgs").setValue("FooOrganization");
retVal.addAddress().addLine("123 Fake Street").setCity("Toronto");
retVal.addTelecom().setUse(ContactPointUse.WORK).setValue("1-888-123-4567");
// Populate the first, primitive extension
retVal.setBillingCode(new CodeType("00102-1"));
// The second extension is repeatable and takes a block type
MyOrganization.EmergencyContact contact = new MyOrganization.EmergencyContact();
contact.setActive(new BooleanType(true));
contact.setContact(new ContactPoint());
retVal.getEmergencyContact().add(contact);
return retVal;
}
开发者ID:furore-fhir,项目名称:fhirstarters,代码行数:37,代码来源:OrganizationResourceProvider.java
示例18: makeContactFromTEL
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public ContactPoint makeContactFromTEL(Element e) throws Exception {
if (e == null)
return null;
if (e.hasAttribute("nullFlavor"))
return null;
ContactPoint c = new ContactPoint();
String use = e.getAttribute("use");
if (use != null) {
if (use.equals("H") || use.equals("HP") || use.equals("HV"))
c.setUse(ContactPointUse.HOME);
else if (use.equals("WP") || use.equals("DIR") || use.equals("PUB"))
c.setUse(ContactPointUse.WORK);
else if (use.equals("TMP"))
c.setUse(ContactPointUse.TEMP);
else if (use.equals("BAD"))
c.setUse(ContactPointUse.OLD);
}
if (e.getAttribute("value") != null) {
String[] url = e.getAttribute("value").split(":");
if (url.length == 1) {
c.setValue(url[0].trim());
c.setSystem(ContactPointSystem.PHONE);
} else {
if (url[0].equals("tel"))
c.setSystem(ContactPointSystem.PHONE);
else if (url[0].equals("mailto"))
c.setSystem(ContactPointSystem.EMAIL);
else if (e.getAttribute("value").contains(":"))
c.setSystem(ContactPointSystem.OTHER);
else
c.setSystem(ContactPointSystem.PHONE);
c.setValue(url[1].trim());
}
}
return c;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:38,代码来源:Convert.java
示例19: addToContactList
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
protected void addToContactList(List<ContactPoint> list, ContactPoint c) throws Exception {
for (ContactPoint item : list) {
if (Comparison.matches(item, c, null))
Comparison.merge(item, c);
}
list.add(c);
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:8,代码来源:CCDAConverter.java
示例20: getSystem
import org.hl7.fhir.dstu3.model.ContactPoint; //导入依赖的package包/类
public ContactPoint.ContactPointSystem getSystem() {
return this.system;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:4,代码来源:BaseContactPoint.java
注:本文中的org.hl7.fhir.dstu3.model.ContactPoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论