Originally posted by Amdy Diene
I need to convert a patient birth date to days and use the result to check for patient age. I am using the code below in the pre proc in the xlate. the result I am getting for a birth date of '20110209' is 17697, and I know for a fact this is not the correct number of days from 02/09/2011 til now.
lassign $xlateInVals pid_7_1 dob
set dob [string range $pid_7_1 0 0]
set dob [expr [clock scan $dob] / 60 / 60 / 24]
echo "birthdate: $pid_7_1; dob: $dobn"
set xlateOutVals $dob
Need assistance on this one. I have stared at this code for two days and made several changes and switches but nothing seems to give me what I need.