APSGPOST ; IHS/DSD/ENM - ADD P28 OPTIONS TO IV MENU'S ; [ 01/14/2002 3:19 PM ]
;;3.2;INPATIENT MEDICATIONS;**3**;12/28/01
EP ;
W !!,"Now, I'm going to add the following menu options to the 'PSJI MGR'",!,"Menu Option",!,?10,"PSJ4 MGR - Inpatient Meds V4 Pre-Release Menu"
W !!,?10,"and PSJU MARK UD ITEMS Option added to PSJ4 MGR Menu",!
W !,?10,"........One moment please!",!! H 3
S M1="PSJI MGR"
;GET FILE 19 DETAILS FOR OPTIONS
S DIC("P")=$P(^DD(19,10,0),"^",2) ;GET MENU SUB FILE NBR
S DA=$O(^DIC(19,"B","PSJ4 MGR",0)) ;item rec nbr
S DIC("DR")="2///PRE4" ;synonym
S DA(1)=$O(^DIC(19,"B","PSJI MGR",0)) ;main option nbr
D PT1
;
S M1="PSJ4 MGR"
S DIC("P")=$P(^DD(19,10,0),"^",2) ;GET MENU SUB FILE NBR
S DA=$O(^DIC(19,"B","PSJU MARK UD ITEMS",0)) ;item rec nbr
S DIC("DR")="2///MUD" ;synonym
S DA(1)=$O(^DIC(19,"B","PSJ4 MGR",0)) ;main option nbr
D PT1
W !!,"OK, I'm done!",!!
Q
PT1 Q:DA=""
S APSPN=$P(^DIC(19,DA,0),"^",1) ;name of item option
I 'DA(1) W !!,*7,*7,"*** The "_APSPN_" option has not been added to the"_M1_" menu",!," because the "_M1_" menu does not exist on your system. Install"
I W !," the "_M1_" menu then rerun this routine again." G EX
S THERE=$O(^DIC(19,DA(1),10,"B",DA,0))
I THERE W !,*7,*7,"The "_APSPN_" option has already been added to the "_M1_" menu.",!! G EX
S X=DA,DIC="^DIC(19,"_DA(1)_",10,",DIC(0)="LMZ" K DD,DO D FILE^DICN K DIC
W !,APSPN_" Option added to "_M1_" menu!"
EX K DA,THERE,X,Y,APSPN Q
Q
APSGPOST ; IHS/DSD/ENM - ADD P28 OPTIONS TO IV MENU'S ; [ 01/14/2002 3:19 PM ]
+1 ;;3.2;INPATIENT MEDICATIONS;**3**;12/28/01
EP ;
+1 WRITE !!,"Now, I'm going to add the following menu options to the 'PSJI MGR'",!,"Menu Option",!,?10,"PSJ4 MGR - Inpatient Meds V4 Pre-Release Menu"
+2 WRITE !!,?10,"and PSJU MARK UD ITEMS Option added to PSJ4 MGR Menu",!
+3 WRITE !,?10,"........One moment please!",!!
HANG 3
+4 SET M1="PSJI MGR"
+5 ;GET FILE 19 DETAILS FOR OPTIONS
+6 ;GET MENU SUB FILE NBR
SET DIC("P")=$PIECE(^DD(19,10,0),"^",2)
+7 ;item rec nbr
SET DA=$ORDER(^DIC(19,"B","PSJ4 MGR",0))
+8 ;synonym
SET DIC("DR")="2///PRE4"
+9 ;main option nbr
SET DA(1)=$ORDER(^DIC(19,"B","PSJI MGR",0))
+10 DO PT1
+11 ;
+12 SET M1="PSJ4 MGR"
+13 ;GET MENU SUB FILE NBR
SET DIC("P")=$PIECE(^DD(19,10,0),"^",2)
+14 ;item rec nbr
SET DA=$ORDER(^DIC(19,"B","PSJU MARK UD ITEMS",0))
+15 ;synonym
SET DIC("DR")="2///MUD"
+16 ;main option nbr
SET DA(1)=$ORDER(^DIC(19,"B","PSJ4 MGR",0))
+17 DO PT1
+18 WRITE !!,"OK, I'm done!",!!
+19 QUIT
PT1 IF DA=""
QUIT
+1 ;name of item option
SET APSPN=$PIECE(^DIC(19,DA,0),"^",1)
+2 IF 'DA(1)
WRITE !!,*7,*7,"*** The "_APSPN_" option has not been added to the"_M1_" menu",!," because the "_M1_" menu does not exist on your system. Install"
+3 IF $TEST
WRITE !," the "_M1_" menu then rerun this routine again."
GOTO EX
+4 SET THERE=$ORDER(^DIC(19,DA(1),10,"B",DA,0))
+5 IF THERE
WRITE !,*7,*7,"The "_APSPN_" option has already been added to the "_M1_" menu.",!!
GOTO EX
+6 SET X=DA
SET DIC="^DIC(19,"_DA(1)_",10,"
SET DIC(0)="LMZ"
KILL DD,DO
DO FILE^DICN
KILL DIC
+7 WRITE !,APSPN_" Option added to "_M1_" menu!"
EX KILL DA,THERE,X,Y,APSPN
QUIT
+1 QUIT