@TagToClass(tagName="pacient_age",title="Возраст пациента")
public class CertTagPacientAge extends TypeTextField {
public CertTagPacientAge(CertificateLocal certificateLocal, ReportParam reportParam, DiseaseLocal diseaseLocal) throws ClipsException {
super(certificateLocal, reportParam, diseaseLocal);
ClientLocal clientLocal = certificateLocal.getClientLocal();
if (certificateLocal.isNewlyCreated()) {
Date born = clientLocal.getBorn();
Date current = TimeLocal.getCurrentTime().getTime();
int calcAge = DateTimeUtils.calcAge(born, current);
setText(Integer.toString(calcAge), true);
}
}