use of org.openmrs.module.reporting.data.person.definition.AgeAtDateOfOtherDataDefinition in project openmrs-module-pihcore by PIH.
the class PihPatientDataLibrary method getRegistrationAge.
@DocumentedDefinition("registration.age")
public PatientDataDefinition getRegistrationAge() {
MappedData<PatientDataDefinition> effectiveDate = new MappedData<PatientDataDefinition>(getRegistrationDatetime(), null);
AgeAtDateOfOtherDataDefinition ageAtRegistration = new AgeAtDateOfOtherDataDefinition();
ageAtRegistration.setEffectiveDateDefinition(effectiveDate);
return new ConvertedPatientDataDefinition(new PersonToPatientDataDefinition(ageAtRegistration), new AgeConverter("{y:1}"));
}
Aggregations