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

PSNVFY.m

Go to the documentation of this file.
PSNVFY ;BIR/CCH&WRT-verifies matches allows rematch ; 02/08/00 8:45
 ;;4.0; NATIONAL DRUG FILE;**3,22,65**; 30 Oct 98
 ;
 ;Reference to ^DIC(51.5 supported by DBIA #1931
 ;Reference to ^PSDRUG supported by DBIA #2352,#221
 ;
 S PSNFL=0,PSNW=0 F PSNB=0:0 S PSNB=$O(^PSNTRAN(PSNB)) Q:'PSNB  D CHK I $D(PSNFL) Q:PSNFL
DONE W:PSNW=0 !!,?13,"No Data has been generated" K PSNB,PSNFL D KILL Q
CHK I $D(PSNFL) Q:PSNFL
 S PSNP=$G(^PSDRUG(PSNB,"I")) I PSNP,PSNP<DT K ^PSNTRAN(PSNB,0) Q
 Q:'$D(^PSNTRAN(PSNB,0))  Q:$P(^PSNTRAN(PSNB,0),"^",9)="Y"  Q:'$P(^PSNTRAN(PSNB,0),"^",2)
 S PSNPST=^PSNTRAN(PSNB,0),PSNOLD=$P(^PSDRUG(PSNB,0),U),PSNNEW=$P(^PSNDF(50.68,$P(PSNPST,"^",2),0),"^")
START W @IOF W ?2,"LOCAL DRUG NAME: ",PSNOLD S PSNW=1 W:$P(^PSDRUG(PSNB,0),"^",9)=1 ?68,"N/F"
 W !,?40,"ORDER UNIT:"
 I $D(^PSDRUG(PSNB,660)) S NODE=^PSDRUG(PSNB,660) I $P(NODE,"^",2) S PSNWRT=$P(NODE,"^",2) I $D(^DIC(51.5)),$D(^DIC(51.5,PSNWRT)) W ?52,$S('$D(PSNWRT):"",1:$P(^DIC(51.5,PSNWRT,0),"^",1))
 W !,?24,"DISPENSE UNITS/ORDER UNITS: ",$S('$D(NODE):"",1:$P(NODE,"^",5)),!,?37,"DISPENSE UNIT: ",$S('$D(NODE):"",1:$P(NODE,"^",8))
 W !!,"VA PRODUCT NAME: ",PSNNEW
 S D0=$P(^PSNTRAN(PSNB,0),"^",1),PSNFNM=$P(^PSNTRAN(PSNB,0),"^",2)
 S DA=D0,K=PSNFNM,X=$$PROD2^PSNAPIS(DA,K) I X]"",$P(X,"^")]"" W !,"VA PRINT NAME: ",$P(X,"^"),?57,"CMOP ID: ",$P(X,"^",2),!,"VA DISPENSE UNIT: ",$P(X,"^",4)
 W ?57,"MARKABLE FOR CMOP: " W:$P(X,"^",3)=1 "YES" W:$P(X,"^",3)=0 "NO" W:$P(X,"^",3)="" "NOT MARKED"
 S PSNSIZE=$P(^PSNTRAN(PSNB,0),"^",5),PSNTYPE=$P(^PSNTRAN(PSNB,0),"^",7)
 D PKSIZE^PSNOUT,PKTYPE^PSNOUT W !,?5,"PACKAGE SIZE: ",PSNSZE,!,?5,"PACKAGE TYPE: ",PSNTPE
 S PSNVADC=$P(^PSNTRAN(PSNB,0),"^",3) W !,"VA CLASS: ",$P(^PS(50.605,PSNVADC,0),"^",1)_"  "_$P(^PS(50.605,PSNVADC,0),"^",2)
 W !,"CS FEDERAL SCHEDULE: "_$S($P($G(^PSNDF(50.68,PSNFNM,7)),"^"):$P(^PSNDF(50.68,PSNFNM,7),"^"),1:"")
 W !,"INGREDIENTS:" D INGRED^PSNOUT
 S NFI=$P($G(^PSNDF(50.68,PSNFNM,5)),"^"),NFR=$P($G(^PSNDF(50.68,PSNFNM,6,1,0)),"^")
 W !,"NATIONAL FORMULARY INDICATOR: " W:NFI=1 ?30,"YES" W:NFI=0 ?30,"NO"
 W !,"NATIONAL FORMULARY RESTRICTION:",!,NFR
 K D0,Y,PSNSIZE,PSNTYPE,PSNTPE,PSNSZE,PSNCON,STOPIT
RESP W !!,"< Enter ""Y"" for yes, ""N"" for no >"
 W:'$D(Z9) !,"< Press RETURN to Pass to Next Drug >"
 R !!!,?10,"Is this a match ? ",ANS:DTIME I '$T S ANS="^" S PSNFL=1 Q
 I ANS?.E1C.E G RESP
 I ANS="" K ANS Q
 W ! I ANS["^" S PSNFL=1 Q
 I "Nn"[$E(ANS) K ANS D BLDIT^PSNCOMP Q:$P(^PSNTRAN(PSNB,0),"^",2)']""  G CHK
 I ANS["?" D RES2^PSNHELP K ANS G START
 I "YyNn"'[$E(ANS) W !," Invalid Response " G RESP
 S $P(^PSNTRAN(PSNB,0),"^",9)="Y",$P(^PSNTRAN(PSNB,0),"^",10)=DUZ
 Q
KILL K ANS,PSNSIZE,PSNSZ,PSNTYP,PSNTYPE,PSNDA,PSNSTDA,PSNDDA,PSNUNDA,PSNCLASS,PSNDF,PSNFNM,PSNFORM,PSNNDF,DIC,PSNFL,NBR,PSNNEW,PSNOLD,PSNPST,X,Y,PSNCON,STOPIT
 K PSNFN,PSNNAM,PSNNAME,PSNNL,PSNVAR,PSND,PSNDFM,PSNVC,PSNVCL,RM,SL,ZZ,ZZZ,PSNTPE,PSNSZE,VV,VVV,JJ,MJL,KK,IN,PSNODE,PSNOU,NODE,PSNWRT,PSNVADC,PSNENT,PSNF,PSNM,PSNLOC,^TMP($J,"PSNND"),ASC,PSNRAN,PSNV,PSNWR,PSNX,PSNZ,WRT,BB,END,PSNP,PSNW
 K CODE,DA,DATE,DIR,EEE,FFF,FL,GGG,IEN,J,K,NO31,NOM31,NOMSYN,DUNCE,PP,PSNARY,PSNIEN,PSNP,PTPS,QQ,RR,ST,TT,TTT,WR,XX,XXX,Y,ZXZX,DDD,LIST,PPQ,PSNTRFL,PSNXZ,STOP,PSNPD,PSNUP,PSNINQ,NFI