use of org.openmrs.module.reporting.data.converter.AgeConverter 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