TMGPSSDE ;TMG/kst/Custom version of PSSDEE ;03/25/06 ;;1.0;TMG-LIB;**1**;04/25/04 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 ;"***************************************************************** ;"* Custom version of code by Kevin Toppenberg, MD ;"* to allow customization of the code. ;"* ;"***************************************************************** ;"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 set PSSFLAG=0 do ^PSSDEE2 ;"kill vars set PSSZ=1 F PSSXX=1:1 do quit:PSSFLAG . kill DA . do ASK ;" ask users all questions DONE do ^PSSDEE2 ;" kill vars kill PSSFLAG quit ; ;"================================================================= ASK W ! set DIC="^PSDRUG(" set DIC(0)="QEALMNTV" ;"query/echo/ask/learn=OK/multIndex/IntNumOK/T->searchAllIndexes/verify set DLAYGO=50 ;"force allowing adding record to file 50 set DIC("T")="" ;"present every match to the lookup value do ^DIC kill DIC if Y<0 set PSSFLAG=1 quit ; set (FLG1,FLG2,FLG3,FLG4,FLG5,FLG6,FLG7,FLAG,FLGKY,FLGOI)=0 kill ^TMP($J,"ADD") kill ^TMP($J,"SOL") ; set DA=+Y set DISPDRG=DA L +^PSDRUG(DISPDRG):0 if '$T W !,$C(7),"Another person is editing this one." quit set PSSHUIDG=1 set PSSNEW=$P(Y,"^",3) do USE do NOPE do COMMON do DEA do MF kill PSSHUIDG do DRG^PSSHUIDG(DISPDRG,PSSNEW) L -^PSDRUG(DISPDRG) kill FLG3,PSSNEW quit ; ;"================================================================= COMMON set DIE="^PSDRUG(" set DR="[PSSCOMMON]" do ^DIE quit:$data(Y)!($data(DTOUT)) W:'$data(Y) !,"PRICE PER DISPENSE UNIT: " S:'$data(^PSDRUG(DA,660)) $P(^PSDRUG(DA,660),"^",6)="" W:'$data(Y) $P(^PSDRUG(DA,660),"^",6) do DEA do CK do ASKND do OIKILL^PSSDEE1 do COMMON1 quit ; COMMON1 W !,"Just a reminder...you are editing ",$P(^PSDRUG(DISPDRG,0),"^"),"." set (PSSVVDA,DA)=DISPDRG do DOSN^PSSDOS set DA=PSSVVDA kill PSSVVDA do USE do APP do ORDITM^PSSDEE1 quit ; CK do DSPY^PSSDEE1 set FLGNDF=0 quit ; ASKND set %=-1 if $data(^XUSEC("PSNMGR",DUZ)) do . do MESSAGE^PSSDEE1 . W !!,"Do you wish to match/rematch to NATIONAL DRUG file" . set %=1 . S:FLGMTH=1 %=2 . do YN^DICN if %=0 W !,"If you answer ""yes"", you will attempt to match to NDF." G ASKND if %=2 kill X,Y quit if %<0 kill X,Y quit if %=1 do . do RSET^PSSDEE1 . do EN1^PSSUTIL(DISPDRG,1) . set X="PSNOUT" . X ^%ZOSF("TEST") . if do . . do REACT1^PSNOUT . . set DA=DISPDRG . . if $data(^PSDRUG(DA,"ND")),$P(^PSDRUG(DA,"ND"),"^",2)]"" do ONE quit ; ONE set PSNP=$G(^PSDRUG(DA,"I")) if PSNP,PSNP