Is there a way to print a calculated arrival time based off appointment time? For example, on our discharge handounts we have the next appointment time listed (4/23/19 at 10:00am) I would like to add a calculated arrival time 15 minutes before the appoinment time. (Please arrive by 9:45am)
Has anyone else already tackled this?
Just thinking a little about this...
In the EMR version (don't remember in CPS), there is the field APPTTIME which is in seconds of day. Common example is that a 10am appointment is stored as 36000; number of second past midnight.
Thus, need to subtract 900 from that number.
This approach would probably require use of a FIND command; not with built-in MEL commands.
Now, trying to think of an easy way to do that with just MEL.
APPT_NEXT returns 4/13/2019, 9:00 am, Follow Up, Main
Perhaps do a MATCH to find first and second commas, and the time is between that
Then do a MATCH for the : and take what is before that as HOURS
Next two characters are MINUTES
If AM then ignore, but if PM add 12 hours
You now have HOURS and MINUTES
Convert to just MINUTES (= HOURS * 60 plus MINUTES)
Subtract your 15 MINUTES
Convert MINUTES back to HOURS & MINUTES
I would try to play with this in steps -> such as, simply see if you can pull the time out of the next appointment. Then work on all the math a little bit at a time.
Sounds like an interesting exercise.