cancel
Showing results for 
Search instead for 
Did you mean: 

Medication Taken Time versus Discharge Time

cothmer
Participant
0 Kudos

I am trying to write a formula where if the patients medication given time is less than the patients discharge time then display the word 'Justified', else 'NA'. All of my patients say 'Justified' which is not correct.

if ({Command.TAKEN_TIME}) < {Command.HOSP_DISCH_TIME} then "Justified" else

"NA"

DellSC
Active Contributor
0 Kudos

In order to help with this, we need a little more information. Could you please provide a sample of what your data looks like? (without patient identifying info, of course) Are there multiple records per patient?

Thanks!

-Dell

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Looks like the time portion of the data is in different formats. so you'll need to take that into account when calculating.

Check the Help file fo option to convert one of the fields time portion into the same format as the other.

Search on CRDate...

cothmer
Participant
0 Kudos

This is what the data looks like. I forgot to add that if the Administration time is within 60 minutes of the Discharge time then this should display 'Justified', etc...Thanks.

0 Kudos

If you drop both fields onto the report do you see date/time in the info?

What format is the time data?

You may want to use Date functions to check the values also.

Hit the F1 key to bring up CR's Help then search for "DateDiff" it gives examples on how to use it.