;"Custom version -- formatted for easier reading... PSSDEE ;BIR/WRT-MASTER DRUG ENTER/EDIT ROUTINE ;01/21/00 ;;1.0;PHARMACY DATA MANAGEMENT;**3,5,15,16,20,22,28,32,34,33,38,57,47,68,61**;9/30/97 ; ;Reference to REACT1^PSNOUT supported by DBIA #2080 ;Reference to $$UP^XLFSTR(X) supported by DBIA #10104 ;Reference to $$PSJDF^PSNAPIS(P1,P3) supported by DBIA #2531 ; BEGIN S PSSFLAG=0 D ^PSSDEE2 S PSSZ=1 F PSSXX=1:1 do Q:PSSFLAG . K DA . D ASK DONE D ^PSSDEE2 K PSSFLAG Q ASK W ! S DIC="^PSDRUG(",DIC(0)="QEALMNTV",DLAYGO=50,DIC("T")="" D ^DIC K DIC I Y<0 S PSSFLAG=1 Q S (FLG1,FLG2,FLG3,FLG4,FLG5,FLG6,FLG7,FLAG,FLGKY,FLGOI)=0 K ^TMP($J,"ADD"),^TMP($J,"SOL") S DA=+Y S DISPDRG=DA L +^PSDRUG(DISPDRG):0 I '$T W !,$C(7),"Another person is editing this one." Q S PSSHUIDG=1 S PSSNEW=$P(Y,"^",3) D USE D NOPE D COMMON D DEA D MF K PSSHUIDG D DRG^PSSHUIDG(DISPDRG,PSSNEW) L -^PSDRUG(DISPDRG) K FLG3,PSSNEW Q COMMON S DIE="^PSDRUG(",DR="[PSSCOMMON]" D ^DIE Q:$D(Y)!($D(DTOUT)) W:'$D(Y) !,"PRICE PER DISPENSE UNIT: " S:'$D(^PSDRUG(DA,660)) $P(^PSDRUG(DA,660),"^",6)="" W:'$D(Y) $P(^PSDRUG(DA,660),"^",6) D DEA D CK D ASKND D OIKILL^PSSDEE1 D COMMON1 Q COMMON1 W !,"Just a reminder...you are editing ",$P(^PSDRUG(DISPDRG,0),"^"),"." S (PSSVVDA,DA)=DISPDRG D DOSN^PSSDOS S DA=PSSVVDA K PSSVVDA D USE D APP D ORDITM^PSSDEE1 Q CK D DSPY^PSSDEE1 S FLGNDF=0 Q ASKND ;"Purpose: allow user to match to National Drug File S %=-1 I $D(^XUSEC("PSNMGR",DUZ)) do . D MESSAGE^PSSDEE1 . W !!,"Do you wish to match/rematch to NATIONAL DRUG file" . S %=1 . S:FLGMTH=1 %=2 . D YN^DICN I %=0 W !,"If you answer ""yes"", you will attempt to match to NDF." G ASKND I %=2 K X,Y Q I %<0 K X,Y Q I %=1 do . D EN1^PSSUTIL(DISPDRG,1) . D RSET^PSSDEE1 . S X="PSNOUT" . X ^%ZOSF("TEST") I D REACT1^PSNOUT . S DA=DISPDRG . I $D(^PSDRUG(DA,"ND")),$P(^PSDRUG(DA,"ND"),"^",2)]"" D ONE Q ONE S PSNP=$G(^PSDRUG(DA,"I")) I PSNP,PSNP