PSGWI001 ; ; 04-JAN-1994
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
Q:'DIFQ(50) F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) X NO E S @X=Y
Q Q
;;^DIC(50,0,"GL")
;;=^PSDRUG(
;;^DIC("B","DRUG",50)
;;=
;;^DIC(50,"%",0)
;;=^1.005^1^1
;;^DIC(50,"%",1,0)
;;=PS
;;^DIC(50,"%","B","PS",1)
;;=
;;^DIC(50,"%D",0)
;;=^^9^9^2920518^^^^
;;^DIC(50,"%D",1,0)
;;=This file holds the information related to each drug that can be used
;;^DIC(50,"%D",2,0)
;;=to fill a prescription. It is pointed to from several other files and
;;^DIC(50,"%D",3,0)
;;=should be handled carefully, usually only by special individuals in the
;;^DIC(50,"%D",4,0)
;;=pharmacy service. Entries are not typically deleted, but rather made
;;^DIC(50,"%D",5,0)
;;=inactive by entering an inactive date.
;;^DIC(50,"%D",6,0)
;;=
;;^DIC(50,"%D",7,0)
;;=This file must be built by Pharmacy Service BEFORE going on-line. It is
;;^DIC(50,"%D",8,0)
;;=common to use another centers file and edit it to match your center's
;;^DIC(50,"%D",9,0)
;;=unique formulary.
;;^DD(50,0)
;;=FIELD^NL^623008^78
;;^DD(50,0,"DDA")
;;=N
;;^DD(50,0,"DT")
;;=2920716
;;^DD(50,0,"ID",2)
;;=W ""
;;^DD(50,0,"ID",6)
;;=W ""
;;^DD(50,0,"ID",25)
;;=S %I=Y,Y=$S('$D(^("ND")):"",$D(^PS(50.605,+$P(^("ND"),U,6),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(50.605,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I
;;^DD(50,0,"ID",51)
;;=W:$P(^(0),"^",9) " N/F"
;;^DD(50,0,"ID",101)
;;=W:$P(^(0),"^",10)]"" " ",$P(^(0),U,10),*7
;;^DD(50,0,"ID",102)
;;=W:$D(^(2)) " ",$P(^(2),U,2)
;;^DD(50,0,"IX","AB",50.0441,.01)
;;=
;;^DD(50,0,"IX","AC",50,2)
;;=
;;^DD(50,0,"IX","ACLOZ",50,17.5)
;;=
;;^DD(50,0,"IX","AD",50,201)
;;=
;;^DD(50,0,"IX","AE",50,202)
;;=
;;^DD(50,0,"IX","AEXP",50,17.1)
;;=
;;^DD(50,0,"IX","AF",50,201.3)
;;=
;;^DD(50,0,"IX","AFA",50.065,.01)
;;=
;;^DD(50,0,"IX","AI",50,100)
;;=
;;^DD(50,0,"IX","AIU",50,63)
;;=
;;^DD(50,0,"IX","AIUU",50,.01)
;;=
;;^DD(50,0,"IX","AP",50,64)
;;=
;;^DD(50,0,"IX","APC",50,64)
;;=
;;^DD(50,0,"IX","APCC",50,2)
;;=
;;^DD(50,0,"IX","APN",50,64)
;;=
;;^DD(50,0,"IX","APN1",50,20)
;;=
;;^DD(50,0,"IX","APN2",50,22)
;;=
;;^DD(50,0,"IX","AR",50,100)
;;=
;;^DD(50,0,"IX","AUDAP",50,.01)
;;=
;;^DD(50,0,"IX","AV1",50,200)
;;=
;;^DD(50,0,"IX","AV2",50,201)
;;=
;;^DD(50,0,"IX","B",50,.01)
;;=
;;^DD(50,0,"IX","C",50.1,.01)
;;=
;;^DD(50,0,"IX","IU",50,63)
;;=
;;^DD(50,0,"IX","IV",50.03,.01)
;;=
;;^DD(50,0,"IX","IV1",50,204)
;;=
;;^DD(50,0,"IX","IV2",50,201.1)
;;=
;;^DD(50,0,"IX","VAC",50,25)
;;=
;;^DD(50,0,"IX","XATC",50,212.2)
;;=
;;^DD(50,0,"IX","ZATC",50,212.2)
;;=
;;^DD(50,0,"NM","DRUG")
;;=
;;^DD(50,0,"PT",2.55,.01)
;;=
;;^DD(50,0,"PT",50,62.05)
;;=
;;^DD(50,0,"PT",50.065,.01)
;;=
;;^DD(50,0,"PT",52,6)
;;=
;;^DD(50,0,"PT",58.11,.01)
;;=
;;^DD(50,0,"PT",58.3,.01)
;;=
;;^DD(50,0,"PT",58.52,.01)
;;=
;;^DD(50,0,"PT",58.8001,.01)
;;=
;;^DD(50,0,"PT",58.81,4)
;;=
;;^DD(50,0,"PT",58.85,3)
;;=
;;^DD(50,0,"PT",58.86,1)
;;=
;;^DD(50,0,"PT",58.87,4)
;;=
;;^DD(50,0,"PT",59,.52)
;;=
;;^DD(50,0,"PT",59.7,70)
;;=
;;^DD(50,0,"PT",100.1,.01)
;;=
;;^DD(50,.01,0)
;;=GENERIC NAME^RF^^0;1^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>40!($L(X)<1)!'(X'?1P.E)!(X'?.ANP) X
;;^DD(50,.01,1,0)
;;=^.1^^-1
;;^DD(50,.01,1,1,0)
;;=50^B
;;^DD(50,.01,1,1,1)
;;=S ^PSDRUG("B",$E(X,1,40),DA)=""
;;^DD(50,.01,1,1,2)
;;=K ^PSDRUG("B",$E(X,1,40),DA)
;;^DD(50,.01,1,3,0)
;;=50^AUDAP^MUMPS
;;^DD(50,.01,1,3,1)
;;=I '$D(PSGINITF) S ^PSDRUG("AUDAP")=$S($D(^PS(59.7,1,20)):$P(^(20),"^"),1:"")
;;^DD(50,.01,1,3,1.1)
;;=S X=Y(0) S Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P(Y(1),U,1) S XMB(1)=X
;;^DD(50,.01,1,3,1.2)
;;=S X=Y(0) S Y(2)=$C(59)_$S($D(^DD(50,51,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,9)_":",2),$C(59),1) S XMB(2)=X
;;^DD(50,.01,1,3,1.3)
;;=S X=Y(0) S Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$S('$D(^PS(50.5,+$P(Y(1),U,2),0)):"",1:$P(^(0),U,1)) S XMB(3)=X
;;^DD(50,.01,1,3,1.4)
;;=S X=Y(0) S Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P(Y(1),U,10) S XMB(4)=X
;;^DD(50,.01,1,3,2)
;;=Q
;;^DD(50,.01,1,3,2.2)
;;=S X=Y(0) S Y(2)=$C(59)_$S($D(^DD(50,51,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,9)_":",2),$C(59),1) S XMB(2)=X
PSGWI001 ; ; 04-JAN-1994
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
+2 IF 'DIFQ(50)
QUIT
FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
XECUTE NO
IF '$TEST
SET @X=Y
Q QUIT
+1 ;;^DIC(50,0,"GL")
+2 ;;=^PSDRUG(
+3 ;;^DIC("B","DRUG",50)
+4 ;;=
+5 ;;^DIC(50,"%",0)
+6 ;;=^1.005^1^1
+7 ;;^DIC(50,"%",1,0)
+8 ;;=PS
+9 ;;^DIC(50,"%","B","PS",1)
+10 ;;=
+11 ;;^DIC(50,"%D",0)
+12 ;;=^^9^9^2920518^^^^
+13 ;;^DIC(50,"%D",1,0)
+14 ;;=This file holds the information related to each drug that can be used
+15 ;;^DIC(50,"%D",2,0)
+16 ;;=to fill a prescription. It is pointed to from several other files and
+17 ;;^DIC(50,"%D",3,0)
+18 ;;=should be handled carefully, usually only by special individuals in the
+19 ;;^DIC(50,"%D",4,0)
+20 ;;=pharmacy service. Entries are not typically deleted, but rather made
+21 ;;^DIC(50,"%D",5,0)
+22 ;;=inactive by entering an inactive date.
+23 ;;^DIC(50,"%D",6,0)
+24 ;;=
+25 ;;^DIC(50,"%D",7,0)
+26 ;;=This file must be built by Pharmacy Service BEFORE going on-line. It is
+27 ;;^DIC(50,"%D",8,0)
+28 ;;=common to use another centers file and edit it to match your center's
+29 ;;^DIC(50,"%D",9,0)
+30 ;;=unique formulary.
+31 ;;^DD(50,0)
+32 ;;=FIELD^NL^623008^78
+33 ;;^DD(50,0,"DDA")
+34 ;;=N
+35 ;;^DD(50,0,"DT")
+36 ;;=2920716
+37 ;;^DD(50,0,"ID",2)
+38 ;;=W ""
+39 ;;^DD(50,0,"ID",6)
+40 ;;=W ""
+41 ;;^DD(50,0,"ID",25)
+42 ;;=S %I=Y,Y=$S('$D(^("ND")):"",$D(^PS(50.605,+$P(^("ND"),U,6),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(50.605,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I
+43 ;;^DD(50,0,"ID",51)
+44 ;;=W:$P(^(0),"^",9) " N/F"
+45 ;;^DD(50,0,"ID",101)
+46 ;;=W:$P(^(0),"^",10)]"" " ",$P(^(0),U,10),*7
+47 ;;^DD(50,0,"ID",102)
+48 ;;=W:$D(^(2)) " ",$P(^(2),U,2)
+49 ;;^DD(50,0,"IX","AB",50.0441,.01)
+50 ;;=
+51 ;;^DD(50,0,"IX","AC",50,2)
+52 ;;=
+53 ;;^DD(50,0,"IX","ACLOZ",50,17.5)
+54 ;;=
+55 ;;^DD(50,0,"IX","AD",50,201)
+56 ;;=
+57 ;;^DD(50,0,"IX","AE",50,202)
+58 ;;=
+59 ;;^DD(50,0,"IX","AEXP",50,17.1)
+60 ;;=
+61 ;;^DD(50,0,"IX","AF",50,201.3)
+62 ;;=
+63 ;;^DD(50,0,"IX","AFA",50.065,.01)
+64 ;;=
+65 ;;^DD(50,0,"IX","AI",50,100)
+66 ;;=
+67 ;;^DD(50,0,"IX","AIU",50,63)
+68 ;;=
+69 ;;^DD(50,0,"IX","AIUU",50,.01)
+70 ;;=
+71 ;;^DD(50,0,"IX","AP",50,64)
+72 ;;=
+73 ;;^DD(50,0,"IX","APC",50,64)
+74 ;;=
+75 ;;^DD(50,0,"IX","APCC",50,2)
+76 ;;=
+77 ;;^DD(50,0,"IX","APN",50,64)
+78 ;;=
+79 ;;^DD(50,0,"IX","APN1",50,20)
+80 ;;=
+81 ;;^DD(50,0,"IX","APN2",50,22)
+82 ;;=
+83 ;;^DD(50,0,"IX","AR",50,100)
+84 ;;=
+85 ;;^DD(50,0,"IX","AUDAP",50,.01)
+86 ;;=
+87 ;;^DD(50,0,"IX","AV1",50,200)
+88 ;;=
+89 ;;^DD(50,0,"IX","AV2",50,201)
+90 ;;=
+91 ;;^DD(50,0,"IX","B",50,.01)
+92 ;;=
+93 ;;^DD(50,0,"IX","C",50.1,.01)
+94 ;;=
+95 ;;^DD(50,0,"IX","IU",50,63)
+96 ;;=
+97 ;;^DD(50,0,"IX","IV",50.03,.01)
+98 ;;=
+99 ;;^DD(50,0,"IX","IV1",50,204)
+100 ;;=
+101 ;;^DD(50,0,"IX","IV2",50,201.1)
+102 ;;=
+103 ;;^DD(50,0,"IX","VAC",50,25)
+104 ;;=
+105 ;;^DD(50,0,"IX","XATC",50,212.2)
+106 ;;=
+107 ;;^DD(50,0,"IX","ZATC",50,212.2)
+108 ;;=
+109 ;;^DD(50,0,"NM","DRUG")
+110 ;;=
+111 ;;^DD(50,0,"PT",2.55,.01)
+112 ;;=
+113 ;;^DD(50,0,"PT",50,62.05)
+114 ;;=
+115 ;;^DD(50,0,"PT",50.065,.01)
+116 ;;=
+117 ;;^DD(50,0,"PT",52,6)
+118 ;;=
+119 ;;^DD(50,0,"PT",58.11,.01)
+120 ;;=
+121 ;;^DD(50,0,"PT",58.3,.01)
+122 ;;=
+123 ;;^DD(50,0,"PT",58.52,.01)
+124 ;;=
+125 ;;^DD(50,0,"PT",58.8001,.01)
+126 ;;=
+127 ;;^DD(50,0,"PT",58.81,4)
+128 ;;=
+129 ;;^DD(50,0,"PT",58.85,3)
+130 ;;=
+131 ;;^DD(50,0,"PT",58.86,1)
+132 ;;=
+133 ;;^DD(50,0,"PT",58.87,4)
+134 ;;=
+135 ;;^DD(50,0,"PT",59,.52)
+136 ;;=
+137 ;;^DD(50,0,"PT",59.7,70)
+138 ;;=
+139 ;;^DD(50,0,"PT",100.1,.01)
+140 ;;=
+141 ;;^DD(50,.01,0)
+142 ;;=GENERIC NAME^RF^^0;1^K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>40!($L(X)<1)!'(X'?1P.E)!(X'?.ANP) X
+143 ;;^DD(50,.01,1,0)
+144 ;;=^.1^^-1
+145 ;;^DD(50,.01,1,1,0)
+146 ;;=50^B
+147 ;;^DD(50,.01,1,1,1)
+148 ;;=S ^PSDRUG("B",$E(X,1,40),DA)=""
+149 ;;^DD(50,.01,1,1,2)
+150 ;;=K ^PSDRUG("B",$E(X,1,40),DA)
+151 ;;^DD(50,.01,1,3,0)
+152 ;;=50^AUDAP^MUMPS
+153 ;;^DD(50,.01,1,3,1)
+154 ;;=I '$D(PSGINITF) S ^PSDRUG("AUDAP")=$S($D(^PS(59.7,1,20)):$P(^(20),"^"),1:"")
+155 ;;^DD(50,.01,1,3,1.1)
+156 ;;=S X=Y(0) S Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P(Y(1),U,1) S XMB(1)=X
+157 ;;^DD(50,.01,1,3,1.2)
+158 ;;=S X=Y(0) S Y(2)=$C(59)_$S($D(^DD(50,51,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,9)_":",2),$C(59),1) S XMB(2)=X
+159 ;;^DD(50,.01,1,3,1.3)
+160 ;;=S X=Y(0) S Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$S('$D(^PS(50.5,+$P(Y(1),U,2),0)):"",1:$P(^(0),U,1)) S XMB(3)=X
+161 ;;^DD(50,.01,1,3,1.4)
+162 ;;=S X=Y(0) S Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P(Y(1),U,10) S XMB(4)=X
+163 ;;^DD(50,.01,1,3,2)
+164 ;;=Q
+165 ;;^DD(50,.01,1,3,2.2)
+166 ;;=S X=Y(0) S Y(2)=$C(59)_$S($D(^DD(50,51,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^PSDRUG(D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,9)_":",2),$C(59),1) S XMB(2)=X