Editing template for printing age of the patient on medical reports instead of date of birth

Hi everyone,
The new update in Senaite Health 1.2.4 that allows to input age instead of date of birth (https://github.com/senaite/senaite.health/pull/187) was highly sought, since a few of the patients don’t know their exact date of birth. Another reason is that the reference range of many of the analytes depends on patient’s age.

Now I tried editing the report templates to print the age (tried using the variable AgeSplitted) instead of date of birth, but it doesn’t work.

It would be great if one can print the age of the patient instead of their DOB, since it will be easy for a doctor to correlate results with age rather than calculating the age from DOB and then interpreting it.

Seek your guidance for the same.

Regards,
Himanshu.

Hi @hsgkp,

I guess you want the patient’s age when he/she got its clinical case, right?

Can you try with this field? https://github.com/senaite/senaite.health/blob/1.x/bika/health/content/batch.py#L150

If you are getting the age from the patient itself, it will vary over the time, but you can use the “age” field. I think age-split depends on “date of birth”: https://github.com/senaite/senaite.health/blob/1.x/bika/health/content/patient.py#L121

Best regards,