I am trying to write a crystal report formula to determine the patient's age at the date of onset for a specific diagnosis. The formula I tried using is
datediff("d",{PatientProfile.Birthdate},{PatientVisitDiags.Created})
This formula gives me the patient's age on the day that their most recent problem was entered in but I need it to be specific to a certain problem that may have been entered in the past. Thanks!
Why not link PatientProfile PID to Problems PID, filter on the desired Dx, retrieve the current entry for that problem with XID=1*10^18, then calculate the date difference for date of birth and onset date. I apologize in advance if I have misinterpreted the problem. Feel free to contact me directly.
If I had to guess, you will need to adjust the table you are pulling the onset date from. Perhaps use The PROBLEM_CHAIN view, might be in the right direction.
If you would like to send me a copy of your Crystal Report, I can try to figure out where the discrepancy is.
-James Caswell
[email protected]