PSDCORP ;BIR/BJW-CS Correction Log Report ; 6 Feb 98 ;;3.0; CONTROLLED SUBSTANCES ;**8**;13 Feb 97 ;**Y2K compliance**,"P" added to date input string I '$D(PSDSITE) D ^PSDSET Q:'$D(PSDSITE) I '$D(^XUSEC("PSDMGR",DUZ)) W $C(7),!!,?9,"** Please contact your Pharmacy Coordinator for access to print",!,?12,"the narcotic corrections log.",!!,"PSDMGR security key required.",! Q ASKD ;ask disp site S PSDS=$P(PSDSITE,U,3),PSDSN=$P(PSDSITE,U,4) G:$P(PSDSITE,U,5) TYPE W ! K DIC,DA S DIC=58.8,DIC(0)="QEAZ",DIC("S")="I $P(^(0),""^"",3)=+PSDSITE,$S($P(^(0),""^"",2)[""M"":1,$P(^(0),""^"",2)[""S"":1,1:0)" S DIC("A")="Select Primary Dispensing Site: " S DIC("B")=PSDSN D ^DIC K DIC G:Y<0 END S PSDS=+Y,PSDSN=$P(Y,"^",2),$P(PSDSITE,U,3)=+Y,$P(PSDSITE,U,4)=PSDSN TYPE ;ask correction type K DA,DIR,DIRUT S DIR(0)="SO^1:GREEN SHEET READY FOR PICKUP CORRECTION;2:DELETE EXISTING GREEN SHEET CORRECTION;3:ERROR FOUND ON COMPLETED GS;4:RESOLVED ERROR ON GREEN SHEET" S DIR("A")="Select Type of Correction Log" S DIR("?",1)="Answer '1' to print Green Sheets flagged ready for pickup corrections," S DIR("?",2)="answer '2' to print existing Green Sheets deleted,",DIR("?",3)="answer '3' to print Green Sheets with an error found after initial completion," S DIR("?",4)="answer '4' to print Green Sheets with errors resolved or",DIR("?")="answer '^' to quit without printing the report." D ^DIR K DIR G:$D(DIRUT) END S TYPE=Y DATE ;ask date range W ! K %DT S %DT="AEP",%DT("A")="Start with Date: " D ^%DT I Y<0 S PSDOUT=1 G END S PSDSD=Y D D^DIQ S PSDATE=Y,%DT("A")="End with Date: " D ^%DT I Y<0 S PSDOUT=1 G END I Y