Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am having a hard time with the set analysis for the expression below. I am trying to count the patient encounter if the difference between discharge order and discharge time is less than 60 minutes, and the Discharge Year is 2022, and the unit is NOT CICU or NICU. Appreciate any help!
(count(if(((HOSP_DISCH_TIME-DISCHARGE_ORDER_TIME)*1440) <=60.01 and [Discharge Unit] =-'CICU' or 'NICU' and year(HOSP_DISCH_TIME)= '2022', PAT_ENC_CSN_ID)))
/
[2022 Total DCs]
Try this -
count({< [Discharge Unit] -={'CICU','NICU'} , HOSP_DISCH_TIME= {'*2022*'}>} if(((HOSP_DISCH_TIME-DISCHARGE_ORDER_TIME)*1440) <=60.01 , PAT_ENC_CSN_ID))
/
[2022 Total DCs]
This formula doesn't contain any set analysis. If you're just trying to fix the if() statement, try replacing the out-of-place syntax with a Match() function:
(count(if(((HOSP_DISCH_TIME-DISCHARGE_ORDER_TIME)*1440) <=60.01 and (Not Match([Discharge Unit],'CICU', 'NICU')) and year(HOSP_DISCH_TIME)= '2022', PAT_ENC_CSN_ID)))
/
[2022 Total DCs]
Try this -
count({< [Discharge Unit] -={'CICU','NICU'} , HOSP_DISCH_TIME= {'*2022*'}>} if(((HOSP_DISCH_TIME-DISCHARGE_ORDER_TIME)*1440) <=60.01 , PAT_ENC_CSN_ID))
/
[2022 Total DCs]