APSPEDIS ;IHS/DSD/ENM - DISPLAY LAST AWP/DRUG ED UPDATE ;11-Nov-2011 13:47;PLS
;;7.0;IHS PHARMACY MODIFICATIONS;**1013**;12/04/02;Build 33
EDISP ;EP IHS/ITSC/ENM 11/29/2001 DISPLAY LAST UPDATE DATE AND COUNT
N (APSPDATE,APSPTOT,APSPZATE,APSPZOT,APSPDEX)
I $G(^APSPCTRL("AWP DATE"))="" W !,?10,"No Benchmark Price Date on File!" G ACT
S Y=^APSPCTRL("AWP DATE") X ^DD("DD") S APSPFDB=Y
S APSPDATE=$G(^APSPCTRL("AWP LAST U-DATE")),APSPTOT=$G(^APSPCTRL("AWP UPDATE COUNT"))
S APSPZATE=$S(+APSPDATE:APSPDATE,1:"NO DATE ON FILE"),APSPZOT=$S(+APSPTOT:APSPTOT,1:"NO COUNT ON FILE")
S Y=APSPZATE X ^DD("DD") S APSPDATE=Y
W !,?20,"BENCHMARK PRICE",!,?25,">>> UPDATE STATUS <<<",!
W !,?5,"Last Benchmark price monthly update occurred on.................."_APSPFDB,!
W !,?5,"Most recent 'manual' Benchmark price update was run on..........."_APSPDATE,!
W !,?5,"Total number of DRUGS updated with Benchmark price..............."_APSPTOT,!
ACT D ACTOT ;GET COUNT OF ACTIVE DRUGS
W !,?20,">>> ACTIVE DRUGS STATUS <<<"
W !,?5,"The Total Number of Active Drugs....................."_TOTACT
;
;IHS/MSC/PLS - 09/16/2011 - Commented out per CR156
DEU ;GET THE DRUG EDUCATION UPDATE INFO
;I $G(^APSAPPI("DATE"))="" W !,?10,"No Drug Education File Date on File!" G EXT
;S Y=$G(^APSAPPI("EXPWARN")) X ^DD("DD") S APSPDEX=Y
;S Y=^APSAPPI("DATE") X ^DD("DD") S DRUGED=Y
;W !!,?18,"PATIENT DRUG EDUCATION DATABASE (PDED)",!,?25,">>> UPDATE STATUS <<<",!
;W !,?5,"The last quarterly PDED update occurred on..........."_DRUGED,!
;W !,?5,"PATIENT DRUG EDUCATION DATABASE WILL EXPIRE ON......."_APSPDEX,!
;H 4
EXT K APSPDATE,APSPTOT,APSPZATE,APSPZOT,DRUGED,APSPDEX
Q
ACTOT ;LOOP DRUG FILE AND COUNT ALL ACTIVE DRUGS
;CT=TOTAL NUMBER OF DRUGS APSPCNT=TOTAL INACTIVE DRUGS
;TOTACT=TOTAL NUMBER OF DRUGS-TOTAL INACTIVE DRUGS
S APSAX1=0,APSAIN="",CT=0,APSPCNT=0,TOTACT=0
F S APSAX1=$O(^PSDRUG(APSAX1)) Q:'APSAX1 S CT=CT+1 D INACK
S TOTACT=CT-APSPCNT
;W !,APSPCNT
;W !,CT,!,TOTACT
Q
INACK S APSAIN=$G(^PSDRUG(APSAX1,"I"))
I +APSAIN S APSPCNT=APSPCNT+1
Q
APSPEDIS ;IHS/DSD/ENM - DISPLAY LAST AWP/DRUG ED UPDATE ;11-Nov-2011 13:47;PLS
+1 ;;7.0;IHS PHARMACY MODIFICATIONS;**1013**;12/04/02;Build 33
EDISP ;EP IHS/ITSC/ENM 11/29/2001 DISPLAY LAST UPDATE DATE AND COUNT
+1 NEW (APSPDATE,APSPTOT,APSPZATE,APSPZOT,APSPDEX)
+2 IF $GET(^APSPCTRL("AWP DATE"))=""
WRITE !,?10,"No Benchmark Price Date on File!"
GOTO ACT
+3 SET Y=^APSPCTRL("AWP DATE")
XECUTE ^DD("DD")
SET APSPFDB=Y
+4 SET APSPDATE=$GET(^APSPCTRL("AWP LAST U-DATE"))
SET APSPTOT=$GET(^APSPCTRL("AWP UPDATE COUNT"))
+5 SET APSPZATE=$SELECT(+APSPDATE:APSPDATE,1:"NO DATE ON FILE")
SET APSPZOT=$SELECT(+APSPTOT:APSPTOT,1:"NO COUNT ON FILE")
+6 SET Y=APSPZATE
XECUTE ^DD("DD")
SET APSPDATE=Y
+7 WRITE !,?20,"BENCHMARK PRICE",!,?25,">>> UPDATE STATUS <<<",!
+8 WRITE !,?5,"Last Benchmark price monthly update occurred on.................."_APSPFDB,!
+9 WRITE !,?5,"Most recent 'manual' Benchmark price update was run on..........."_APSPDATE,!
+10 WRITE !,?5,"Total number of DRUGS updated with Benchmark price..............."_APSPTOT,!
ACT ;GET COUNT OF ACTIVE DRUGS
DO ACTOT
+1 WRITE !,?20,">>> ACTIVE DRUGS STATUS <<<"
+2 WRITE !,?5,"The Total Number of Active Drugs....................."_TOTACT
+3 ;
+4 ;IHS/MSC/PLS - 09/16/2011 - Commented out per CR156
DEU ;GET THE DRUG EDUCATION UPDATE INFO
+1 ;I $G(^APSAPPI("DATE"))="" W !,?10,"No Drug Education File Date on File!" G EXT
+2 ;S Y=$G(^APSAPPI("EXPWARN")) X ^DD("DD") S APSPDEX=Y
+3 ;S Y=^APSAPPI("DATE") X ^DD("DD") S DRUGED=Y
+4 ;W !!,?18,"PATIENT DRUG EDUCATION DATABASE (PDED)",!,?25,">>> UPDATE STATUS <<<",!
+5 ;W !,?5,"The last quarterly PDED update occurred on..........."_DRUGED,!
+6 ;W !,?5,"PATIENT DRUG EDUCATION DATABASE WILL EXPIRE ON......."_APSPDEX,!
+7 ;H 4
EXT KILL APSPDATE,APSPTOT,APSPZATE,APSPZOT,DRUGED,APSPDEX
+1 QUIT
ACTOT ;LOOP DRUG FILE AND COUNT ALL ACTIVE DRUGS
+1 ;CT=TOTAL NUMBER OF DRUGS APSPCNT=TOTAL INACTIVE DRUGS
+2 ;TOTACT=TOTAL NUMBER OF DRUGS-TOTAL INACTIVE DRUGS
+3 SET APSAX1=0
SET APSAIN=""
SET CT=0
SET APSPCNT=0
SET TOTACT=0
+4 FOR
SET APSAX1=$ORDER(^PSDRUG(APSAX1))
IF 'APSAX1
QUIT
SET CT=CT+1
DO INACK
+5 SET TOTACT=CT-APSPCNT
+6 ;W !,APSPCNT
+7 ;W !,CT,!,TOTACT
+8 QUIT
INACK SET APSAIN=$GET(^PSDRUG(APSAX1,"I"))
+1 IF +APSAIN
SET APSPCNT=APSPCNT+1
+2 QUIT