本文整理汇总了Java中ca.uhn.fhir.model.dstu2.resource.Patient.SP_BIRTHDATE属性的典型用法代码示例。如果您正苦于以下问题:Java Patient.SP_BIRTHDATE属性的具体用法?Java Patient.SP_BIRTHDATE怎么用?Java Patient.SP_BIRTHDATE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类ca.uhn.fhir.model.dstu2.resource.Patient
的用法示例。
在下文中一共展示了Patient.SP_BIRTHDATE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findBySubject
@Search()
public List<Observation> findBySubject(
@RequiredParam(name=Observation.SP_SUBJECT, chainWhitelist = {"", Patient.SP_IDENTIFIER, Patient.SP_BIRTHDATE}) ReferenceParam subject
) {
List<Observation> observations = new ArrayList<Observation>();
String chain = subject.getChain();
if (Patient.SP_IDENTIFIER.equals(chain)) {
// Because the chained parameter "subject.identifier" is actually of type
// "token", we convert the value to a token before processing it.
TokenParam tokenSubject = subject.toTokenParam();
String system = tokenSubject.getSystem();
String identifier = tokenSubject.getValue();
// TODO: populate all the observations for the identifier
} else if (Patient.SP_BIRTHDATE.equals(chain)) {
// Because the chained parameter "subject.birthdate" is actually of type
// "date", we convert the value to a date before processing it.
DateParam dateSubject = subject.toDateParam();
DateTimeDt birthDate = dateSubject.getValueAsDateTimeDt();
// TODO: populate all the observations for the birthdate
} else if ("".equals(chain)) {
String resourceId = subject.getValue();
// TODO: populate all the observations for the resource id
}
return observations;
}
示例2: searchByObservationNames
@Search()
public List<Patient> searchByObservationNames( @RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theDate ) {
QuantityCompararatorEnum comparator = theDate.getComparator(); // e.g. <=
Date date = theDate.getValue(); // e.g. 2011-01-02
TemporalPrecisionEnum precision = theDate.getPrecision(); // e.g. DAY
List<Patient> retVal = new ArrayList<Patient>();
// ...populate...
return retVal;
}
示例3: getPatientByDob
@Search
List<Patient> getPatientByDob(@RequiredParam(name=Patient.SP_BIRTHDATE) DateParam theParam);