本文整理汇总了Java中org.hl7.fhir.dstu3.model.Enumerations类的典型用法代码示例。如果您正苦于以下问题:Java Enumerations类的具体用法?Java Enumerations怎么用?Java Enumerations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Enumerations类属于org.hl7.fhir.dstu3.model包,在下文中一共展示了Enumerations类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getGender
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public static Enumerations.AdministrativeGender getGender(String gender) {
switch (gender)
{
case "MALE":
return Enumerations.AdministrativeGender.MALE;
case "FEMALE":
return Enumerations.AdministrativeGender.FEMALE;
case "OTHER":
return Enumerations.AdministrativeGender.OTHER;
case "UNKNOWN":
return Enumerations.AdministrativeGender.UNKNOWN;
}
return null;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:17,代码来源:daoutils.java
示例2: testTransformSimplePatientEntity
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的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
示例3: buildIdentification
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public ActivityDefinitionBuilder buildIdentification(String url, String version, Enumerations.PublicationStatus status) {
complexProperty.setUrl(url);
complexProperty.setVersion(version);
complexProperty.setStatus(status);
return this;
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:8,代码来源:ActivityDefinitionBuilder.java
示例4: main
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的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
示例5: step3_create_patient
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public static void step3_create_patient() {
// Create a patient
Patient newPatient = new Patient();
// Populate the patient with fake information
newPatient
.addName()
.setFamily("DevDays2015")
.addGiven("John")
.addGiven("Q");
newPatient
.addIdentifier()
.setSystem("http://acme.org/mrn")
.setValue("1234567");
newPatient.setGender(Enumerations.AdministrativeGender.MALE);
newPatient.setBirthDateElement(new DateType("2015-11-18"));
// Create a client
FhirContext ctx = FhirContext.forDstu3();
IGenericClient client = ctx.newRestfulGenericClient("http://fhirtest.uhn.ca/baseDstu3");
// Create the resource on the server
MethodOutcome outcome = client
.create()
.resource(newPatient)
.execute();
// Log the ID that the server assigned
IIdType id = outcome.getId();
System.out.println("Created patient, got ID: " + id);
}
开发者ID:furore-fhir,项目名称:fhirstarters,代码行数:32,代码来源:TestApplicationHints.java
示例6: getStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Enumerations.DocumentReferenceStatus getStatus() {
return status;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:4,代码来源:DocumentReferenceEntity.java
示例7: setStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public void setStatus(Enumerations.DocumentReferenceStatus status) {
this.status = status;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:4,代码来源:DocumentReferenceEntity.java
示例8: setGenderElement
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Iqicorepatient setGenderElement(
Enumeration<Enumerations.AdministrativeGender> param);
开发者ID:cqframework,项目名称:qicore_model,代码行数:3,代码来源:Iqicorepatient.java
示例9: buildStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public StructuredMapBuilder buildStatus(Enumerations.PublicationStatus publicationStatus) {
complexProperty.setStatus(publicationStatus);
return this;
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:5,代码来源:StructuredMapBuilder.java
示例10: buildStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public ValueSetBuilder buildStatus() {
complexProperty.setStatus(Enumerations.PublicationStatus.DRAFT);
return this;
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:5,代码来源:ValueSetBuilder.java
示例11: buildStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public LibraryBuilder buildStatus(Enumerations.PublicationStatus status) {
complexProperty.setStatus(status);
return this;
}
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:5,代码来源:LibraryBuilder.java
示例12: testEqualsDeep
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
/**
* See #325
*/
@Test
public void testEqualsDeep() throws Exception {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
Date date = dateFormat.parse("19920925");
FhirContext context = FhirContext.forDstu3();
Patient patient1 = new Patient();
patient1.setBirthDate(date)
.setGender(Enumerations.AdministrativeGender.MALE)
.addName().setUse(HumanName.NameUse.OFFICIAL).addGiven("first").addGiven("second").setFamily("family");
Patient patient2 = context.newJsonParser().parseResource(Patient.class,
context.newJsonParser().encodeResourceToString(patient1));
assertTrue(patient1.equalsDeep(patient2));
assertTrue(patient1.equalsShallow(patient2));
Patient patient3 = new Patient();
patient3.setBirthDate(date)
.setGender(Enumerations.AdministrativeGender.MALE)
.addName().setUse(HumanName.NameUse.OFFICIAL).addGiven("first").addGiven("second").setFamily("family");
assertTrue(patient1.equalsDeep(patient3));
assertTrue(patient1.equalsShallow(patient3));
Patient patient4 = new Patient();
patient4.setBirthDate(date)
.setGender(Enumerations.AdministrativeGender.MALE)
.addName().setUse(HumanName.NameUse.OFFICIAL).addGiven("first").addGiven("second").setFamily("family2");
assertTrue(patient1.equalsShallow(patient4));
assertFalse(patient1.equalsDeep(patient4));
Patient patient5 = new Patient();
patient5.setBirthDate(date)
.setGender(Enumerations.AdministrativeGender.FEMALE)
.addName().setUse(HumanName.NameUse.OFFICIAL).addGiven("first").addGiven("second").setFamily("family2");
assertFalse(patient1.equalsShallow(patient5));
assertFalse(patient1.equalsDeep(patient5));
}
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:47,代码来源:ModelDstu3Test.java
示例13: getGender
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Enumerations.AdministrativeGender getGender();
开发者ID:cqframework,项目名称:qicore_model,代码行数:2,代码来源:Iqicorepatient.java
示例14: getGenderElement
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Enumeration<Enumerations.AdministrativeGender> getGenderElement();
开发者ID:cqframework,项目名称:qicore_model,代码行数:2,代码来源:Iqicorepatient.java
示例15: setGender
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Iqicorepatient setGender(Enumerations.AdministrativeGender param);
开发者ID:cqframework,项目名称:qicore_model,代码行数:2,代码来源:Iqicorepatient.java
注:本文中的org.hl7.fhir.dstu3.model.Enumerations类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论