本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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);
}
示例6: getStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Enumerations.DocumentReferenceStatus getStatus() {
return status;
}
示例7: setStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public void setStatus(Enumerations.DocumentReferenceStatus status) {
this.status = status;
}
示例8: setGenderElement
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Iqicorepatient setGenderElement(
Enumeration<Enumerations.AdministrativeGender> param);
示例9: buildStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public StructuredMapBuilder buildStatus(Enumerations.PublicationStatus publicationStatus) {
complexProperty.setStatus(publicationStatus);
return this;
}
示例10: buildStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public ValueSetBuilder buildStatus() {
complexProperty.setStatus(Enumerations.PublicationStatus.DRAFT);
return this;
}
示例11: buildStatus
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public LibraryBuilder buildStatus(Enumerations.PublicationStatus status) {
complexProperty.setStatus(status);
return this;
}
示例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));
}
示例13: getGender
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Enumerations.AdministrativeGender getGender();
示例14: getGenderElement
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Enumeration<Enumerations.AdministrativeGender> getGenderElement();
示例15: setGender
import org.hl7.fhir.dstu3.model.Enumerations; //导入依赖的package包/类
public Iqicorepatient setGender(Enumerations.AdministrativeGender param);