source: FOIAVistA/trunk/r/NATIONAL_DRUG_FILE-PSN/PSNBLD.m

Last change on this file was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PSNBLD ;BIR/CCH&WRT-Builds temporary file for matches ; 10/13/98 13:37
2 ;;4.0; NATIONAL DRUG FILE;; 30 Oct 98
3 S PSNFL=0,PSNFLB=0 S:'$D(^PSNTRAN("END")) ^PSNTRAN("END")=""
4STWHN I $P(^PSNTRAN("END"),"^",1)']"" W !,"Automatic match by NDC Code process will begin",!!
5 I $P(^PSNTRAN("END"),"^",1)']"" R "Are you sure you want to continue ? N// ",ANS:DTIME S:'$T ANS="^" S:ANS']"" ANS="N" G:"^Nn"[$E(ANS) KILL
6 I $D(ANS),ANS?.E1C.E K ANS G PSNBLD
7 I $D(ANS),"?"[$E(ANS) D AUTO^PSNHELP1 G PSNBLD
8 I $D(ANS),"NnYy^"'[$E(ANS) G PSNBLD
9 S PSNFLB=1 I $D(ANS) D:"Yy"[$E(ANS) ^PSNNDC S:$D(XRT0) XRTN=$T(+0) D:$D(XRT0) T1^%ZOSV K ANS I $P(^PS(59.7,1,10),"^",3)=1 S NBR=0 D ^PSNCOMP,KILL Q
10CCK I $P(^PS(59.7,1,10),"^",3)=1 D BEG
11 Q
12BEG W !!,"Enter ""B"" to start at the beginning or press return",!,"to continue with next ==>> Drug: " R ANS:DTIME S:'$T ANS="^" G:ANS["^" KILL
13 I ANS?.E1C.E K ANS G BEG
14 I ANS="" S NBR=$P(^PSNTRAN("END"),"^",1) S:'$D(^PSNTRAN(NBR,"END")) ^PSNTRAN(NBR,"END")=NBR K:$P(^PSNTRAN(NBR,"END"),"^",3)="" ^PSNTRAN(NBR,"END") S:$D(^PSNTRAN(NBR,"END")) $P(^PSNTRAN(NBR,"END"),"^",1)="" K ANS D ^PSNCOMP,KILL Q
15 I "Bb"'[ANS D BLD1^PSNHELP G STWHN
16 S NBR=$P(^PSNTRAN("END"),"^",1) K:$P(^PSNTRAN(NBR,"END"),"^",3)="" ^PSNTRAN(NBR,"END") S:$D(^PSNTRAN(NBR,"END")) $P(^PSNTRAN(NBR,"END"),"^",1)="" S NBR=0 K ANS D ^PSNCOMP
17KILL K PSNB,PSNDA,PSNSTDA,PSNUNDA,PSNDDA,ANS,DIC,II,MJL,JJ,NBR,PSNCLASS,PSNFL,PSNFLB,PSNFNM,PSNFORM,PSNNAM,PSNNAME,PSNNDA,PSNNDC,PSNNDF,PSNSP,PSNVAR,PSNSIZE,PSNTYPE,PSNSZ,PSNTRFL,PSNTYP,X,Y,KK,STOP,VAR,PSNDEA,PSNINACT
18 K PSND,PSNDFM,PSNVC,PSNVCL,PSNENT,PSNF,PSNM,PSNLOC,^TMP($J,"PSNND"),ASC,PSNRAN,PSNV,PSNWR,PSNX,PSNZ,WRT,BB,PSNP,END Q
Note: See TracBrowser for help on using the repository browser.