Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APSPEDIS

APSPEDIS.m

Go to the documentation of this file.
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