本文整理汇总了Java中org.hl7.fhir.dstu3.model.HumanName类的典型用法代码示例。如果您正苦于以下问题:Java HumanName类的具体用法?Java HumanName怎么用?Java HumanName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HumanName类属于org.hl7.fhir.dstu3.model包,在下文中一共展示了HumanName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setPractitionerProvider
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
private Practitioner setPractitionerProvider(Set<IndividualProvider> individualProviders) {
Practitioner sourcePractitionerResource = new Practitioner();
individualProviders.forEach((IndividualProvider individualProvider) ->
{
sourcePractitionerResource.setId(new IdType(individualProvider.getNpi()));
sourcePractitionerResource.addIdentifier().setSystem(fhirProperties.getNpi().getSystem()).setValue(individualProvider.getNpi());
//setting the name element
HumanName indName = new HumanName();
indName.setFamily(individualProvider.getLastName());
indName.addGiven(individualProvider.getFirstName());
sourcePractitionerResource.addName(indName);
//setting the address
sourcePractitionerResource.addAddress().addLine(individualProvider.getFirstLinePracticeLocationAddress())
.setCity(individualProvider.getPracticeLocationAddressCityName())
.setState(individualProvider.getPracticeLocationAddressStateName())
.setPostalCode(individualProvider.getPracticeLocationAddressPostalCode());
});
return sourcePractitionerResource;
}
开发者ID:bhits,项目名称:pcm-api,代码行数:23,代码来源:FhirConsentServiceImpl.java
示例2: main
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
public static void main(String[] theArgs) {
// Create a resource instance
Patient pat = new Patient();
// Add a "name" element
HumanName name = pat.addName();
name.setFamily("Simpson").addGiven("Homer").addGiven("J");
// Add an "identifier" element
Identifier identifier = pat.addIdentifier();
identifier.setSystem("http://acme.org/MRNs").setValue("7000135");
// Model is designed to be chained
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("12345");
}
开发者ID:furore-fhir,项目名称:fhirstarters,代码行数:18,代码来源:Example01_CreateAPatient.java
示例3: getNameUseDstu2
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
public org.hl7.fhir.instance.model.HumanName.NameUse getNameUseDstu2() {
switch (this.nameUse) {
case USUAL: return org.hl7.fhir.instance.model.HumanName.NameUse.USUAL;
case OLD: return org.hl7.fhir.instance.model.HumanName.NameUse.OLD;
case ANONYMOUS: return org.hl7.fhir.instance.model.HumanName.NameUse.ANONYMOUS;
case MAIDEN: return org.hl7.fhir.instance.model.HumanName.NameUse.MAIDEN;
default : return null;
}
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:11,代码来源:BaseHumanName.java
示例4: testTransformer
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@Test
public void testTransformer(){
PractitionerEntity practitionerEntity = new PractitionerEntityBuilder()
.addName("Dr", "Jenny", "Jones")
.addAddress("Church Lane Surgery", "Holmfirth", null,
"Halifax", "West Yorkshire", "HX1 2TT")
.build();
Practitioner practitioner = transformer.transform(practitionerEntity);
assertThat(practitioner, not(nullValue()));
assertThat(practitioner.getId(), not(nullValue()));
assertThat(practitioner.getId(), equalTo((new Long(PractitionerEntityBuilder.DEFAULT_ID)).toString()));
assertThat(practitioner.getActive(), equalTo(true));
List<HumanName> practitionerNames = practitioner.getName();
assertThat(practitionerNames, not(nullValue()));
assertThat(practitionerNames.size(), equalTo(1));
//assertThat(practitionerNames.get(0).getUse(), equalTo(HumanName.NameUse.USUAL));
HumanName name = practitionerNames.get(0);
assertThat(name.getPrefixAsSingleString(), equalTo("Dr"));
assertThat(name.getGivenAsSingleString(), equalTo("Jenny"));
assertThat(name.getFamily(), equalTo("Jones"));
assertThat(practitioner.getAddress(), not(nullValue()));
List<Address> addresses = practitioner.getAddress();
assertThat(addresses.size(), equalTo(1));
Address address = addresses.get(0);
assertThat(address.getLine().get(0).getValue(), equalTo("Church Lane Surgery"));
assertThat(address.getLine().get(1).getValue(), equalTo("Holmfirth"));
assertThat(address.getLine().size(), equalTo(2));
assertThat(address.getDistrict(), equalTo("West Yorkshire"));
assertThat(address.getCity(), equalTo("Halifax"));
assertThat(address.getPostalCode(), equalTo("HX1 2TT"));
assertThat(address.getUse(), equalTo(Address.AddressUse.WORK));
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:38,代码来源:PractitionerEntityToFHIRPractitionerTransformerTest.java
示例5: testTransformSimplePatientEntity
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@Test
public void testTransformSimplePatientEntity() throws FHIRException {
LocalDate dateOfBirth = LocalDate.of(1996, 6, 21);
final PatientEntity patientEntity = new PatientEntityBuilder()
.setDateOfBirth(dateOfBirth)
.build();
final Patient patient = transformer.transform(patientEntity);
assertThat(patient, not(nullValue()));
assertThat(patient.getActive(), equalTo(true));
assertThat(patient.getName().size(), equalTo(1));
HumanName name = patient.getName().get(0);
assertThat(name.getGivenAsSingleString(), equalTo("John"));
assertThat(name.getFamily(), equalTo("Smith"));
assertThat(name.getUse(), equalTo(HumanName.NameUse.USUAL));
assertThat(name.getPrefixAsSingleString(), equalTo("Mr"));
assertThat(patient.getGender(), equalTo(Enumerations.AdministrativeGender.MALE));
assertThat(patient.getBirthDate(), not(nullValue()));
LocalDate patientDoB = DateUtils.asLocalDate(patient.getBirthDate());
assertThat(patientDoB, equalTo(dateOfBirth));
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:28,代码来源:PatientEntityToFHIRPatientTransformerTest.java
示例6: addName
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
public PractitionerEntityBuilder addName(String prefix, String givenName, String familyName){
PractitionerName name = new PractitionerName();
name.setFamilyName(familyName);
name.setGivenName(givenName);
name.setPrefix(prefix);
name.setNameUse(HumanName.NameUse.USUAL);
names.add(name);
return this;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:10,代码来源:PractitionerEntityBuilder.java
示例7: build
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
public PatientEntity build() {
final PatientEntity patientEntity = new PatientEntity();
patientEntity.setId(patientId);
patientEntity.setActive(active);
patientEntity.setDateOfBirth(DateUtils.asDate(dateOfBirth));
patientEntity.setGender("MALE");
final PatientName name = patientEntity.addName();
name.setNameUse(HumanName.NameUse.USUAL);
name.setGivenName("John");
name.setFamilyName("Smith");
name.setPrefix("Mr");
// KGM 18/12/2017 Removed following line. Add name does this functionality
// patientEntity.getNames().add(name);
return patientEntity;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:16,代码来源:PatientEntityBuilder.java
示例8: getName
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
public List<HumanName> getName()
{
try
{
return adaptedClass.getName();
}
catch (Exception e)
{
throw new RuntimeException("Error getting Name", e);
}
}
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicorepractitionerAdapter.java
示例9: testSerialization2
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
/**
* Contributed by Travis from iSalus
*/
@Test
public void testSerialization2() {
Patient patient = new Patient();
patient.addName(new HumanName().addGiven("George").setFamily("Washington"));
patient.addName(new HumanName().addGiven("George2").setFamily("Washington2"));
patient.addAddress(new Address().addLine("line 1").addLine("line 2").setCity("city").setState("UT"));
patient.addAddress(new Address().addLine("line 1b").addLine("line 2b").setCity("cityb").setState("UT"));
patient.setBirthDate(new Date());
testIsSerializable(patient);
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:15,代码来源:ModelSerializationDstu3Test.java
示例10: searchByIdentifier
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Search()
public List searchByIdentifier(
@RequiredParam(name=Patient.SP_IDENTIFIER) TokenParam theIdentifier) {
ourLastMethod = "searchByIdentifier";
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("1"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:10,代码来源:SearchWithGenericListDstu3Test.java
示例11: searchByIdentifier
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@Search()
public List<Patient> searchByIdentifier() {
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().addGiven("FAMILY")).setId("1"));
retVal.add((Patient) new Patient().addName(new HumanName().addGiven("FAMILY")).setId("2"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:8,代码来源:SearchWithServerAddressStrategyDstu3Test.java
示例12: search
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Search()
public List search(
@OptionalParam(name=Patient.SP_IDENTIFIER) TokenParam theIdentifier,
@Count() Integer theParam
) {
ourLastMethod = "search";
ourLastParam = theParam;
ArrayList<Patient> retVal = new ArrayList<Patient>();
for (int i = 1; i < 100; i++) {
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i));
}
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:15,代码来源:SearchCountParamDstu3Test.java
示例13: searchWithNoCountParam
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Search(queryName="searchWithNoCountParam")
public List searchWithNoCountParam() {
ourLastMethod = "searchWithNoCountParam";
ourLastParam = null;
ArrayList<Patient> retVal = new ArrayList<Patient>();
for (int i = 1; i < 100; i++) {
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i));
}
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:12,代码来源:SearchCountParamDstu3Test.java
示例14: search
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Search()
public List search(
@Sort SortSpec theSortSpec
) {
ourLastMethod = "search";
ourLastSortSpec = theSortSpec;
ArrayList<Patient> retVal = new ArrayList<Patient>();
for (int i = 1; i < 100; i++) {
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("" + i));
}
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:14,代码来源:SearchSortDstu3Test.java
示例15: search01
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@Search()
public List<Patient> search01(
@OptionalParam(name = "param1") StringAndListParam theParam1) {
ourLastMethod = "search01";
ourLastParam1 = theParam1;
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("1"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:10,代码来源:SearchDefaultMethodDstu3Test.java
示例16: search02
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@Search()
public List<Patient> search02(
@OptionalParam(name = "param1") StringAndListParam theParam1,
@OptionalParam(name = "param2") StringAndListParam theParam2) {
ourLastMethod = "search02";
ourLastParam1 = theParam1;
ourLastParam2 = theParam2;
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("1"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:12,代码来源:SearchDefaultMethodDstu3Test.java
示例17: search03
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@Search(allowUnknownParams = true)
public List<Patient> search03(
@OptionalParam(name = "param1") StringAndListParam theParam1,
@OptionalParam(name = "param2") StringAndListParam theParam2,
@RawParam() Map<String, List<String>> theAdditionalParams) {
ourLastMethod = "search03";
ourLastParam1 = theParam1;
ourLastParam2 = theParam2;
ourLastAdditionalParams = theAdditionalParams;
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("1"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:14,代码来源:SearchDefaultMethodDstu3Test.java
示例18: search
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Search()
public List search(
@OptionalParam(name=Patient.SP_IDENTIFIER) TokenParam theIdentifier,
@OptionalParam(name="_has") HasAndListParam theParam
) {
ourLastMethod = "search";
ourLastParam = theParam;
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("1"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:13,代码来源:SearchHasParamDstu3Test.java
示例19: search
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Search()
public List search(
@Sort SortSpec theSortSpec,
@OptionalParam(name=Patient.SP_NAME) StringAndListParam theName
) {
ourLastMethod = "search";
ourLastSortSpec = theSortSpec;
ourLastName = theName;
ArrayList<Patient> retVal = new ArrayList<Patient>();
retVal.add((Patient) new Patient().addName(new HumanName().setFamily("FAMILY")).setId("foo"));
return retVal;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:14,代码来源:SearchPostDstu3Test.java
示例20: createPatient
import org.hl7.fhir.dstu3.model.HumanName; //导入依赖的package包/类
private static Patient createPatient(final String name) {
final Patient patient = new Patient();
patient.getName().add(new HumanName().setFamily(name));
patient.setId(createId(counter, 1L));
counter++;
return patient;
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:8,代码来源:PatientResourceProvider.java
注:本文中的org.hl7.fhir.dstu3.model.HumanName类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论