ORY245 ;SLC/JM -- post-install for OR*3*245 ; 1/19/2006
;;3.0;ORDER ENTRY/RESULTS REPORTING;**245**;Dec 17, 1997;Build 2
Q
POST ; Used to insert new ORCM QUICK ORDERS BY USER option into ORCM MGMT menu
N OROPTION,ORMENU
N DO,DA,DD,DI,DIC,DIE,DLAYGO,DQ,DR,X,Y,DINUM
D BLDXREF
; find option
S OROPTION=$O(^DIC(19,"B","ORCM QUICK ORDERS BY USER",0)) I '+OROPTION D Q
. D BMES^XPDUTL("An error occurred during the installation.")
. D MES^XPDUTL("The new option ORCM QUICK ORDERS BY USER was not found.")
; find menu
S ORMENU=$O(^DIC(19,"B","ORCM MGMT",0)) I '+ORMENU D Q
. D BMES^XPDUTL("Unable to attach the new ORCM QUICK ORDERS BY USER option.")
. D MES^XPDUTL("Menu ORCM MGMT was not found.")
; If option already attached to menu then install has been run before
I +$O(^DIC(19,ORMENU,10,"B",OROPTION,0)) D Q
. D BMES^XPDUTL("Option ORCM QUICK ORDERS BY USER is already attached to ORCM MGMT menu.")
; Attach option to menu
I '$D(^DIC(19,ORMENU,10,0)) S ^(0)="^19.01PI^^"
S DIC="^DIC(19,"_ORMENU_",10,",DIC(0)="L",DLAYGO=19,DA(1)=ORMENU,X=OROPTION,DIC("DR")="2///QU;3///4.5"
D FILE^DICN
I +$O(^DIC(19,ORMENU,10,"B",OROPTION,0)) D I 1
. D BMES^XPDUTL("New option ORCM QUICK ORDERS BY USER successfully attached to ORCM MGMT menu.")
E D BMES^XPDUTL("Error trying to attach ORCM QUICK ORDERS BY USER to ORCM MGMT menu.")
Q
BLDXREF ; index new cross reference
N DIK,DA,MSG1,MSG2,IEN
I $D(^ORD(101.44,"C"))=0 S MSG1="Populating",MSG2="populated"
E S MSG1="Reindexing",MSG2="reindexed"
D BMES^XPDUTL(MSG1_" the new C cross reference of the ORDER QUICK VIEW file.")
K ^ORD(101.44,"C")
S IEN=0
F S IEN=$O(^ORD(101.44,IEN)) Q:'IEN D
. S DIK="^ORD(101.44,"_IEN_",10,",DIK(1)=".01^C",DA(1)=IEN D ENALL^DIK
D BMES^XPDUTL("The C cross reference of the ORDER QUICK VIEW file has been "_MSG2_".")
Q
ORY245 ;SLC/JM -- post-install for OR*3*245 ; 1/19/2006
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**245**;Dec 17, 1997;Build 2
+2 QUIT
POST ; Used to insert new ORCM QUICK ORDERS BY USER option into ORCM MGMT menu
+1 NEW OROPTION,ORMENU
+2 NEW DO,DA,DD,DI,DIC,DIE,DLAYGO,DQ,DR,X,Y,DINUM
+3 DO BLDXREF
+4 ; find option
+5 SET OROPTION=$ORDER(^DIC(19,"B","ORCM QUICK ORDERS BY USER",0))
IF '+OROPTION
Begin DoDot:1
+6 DO BMES^XPDUTL("An error occurred during the installation.")
+7 DO MES^XPDUTL("The new option ORCM QUICK ORDERS BY USER was not found.")
End DoDot:1
QUIT
+8 ; find menu
+9 SET ORMENU=$ORDER(^DIC(19,"B","ORCM MGMT",0))
IF '+ORMENU
Begin DoDot:1
+10 DO BMES^XPDUTL("Unable to attach the new ORCM QUICK ORDERS BY USER option.")
+11 DO MES^XPDUTL("Menu ORCM MGMT was not found.")
End DoDot:1
QUIT
+12 ; If option already attached to menu then install has been run before
+13 IF +$ORDER(^DIC(19,ORMENU,10,"B",OROPTION,0))
Begin DoDot:1
+14 DO BMES^XPDUTL("Option ORCM QUICK ORDERS BY USER is already attached to ORCM MGMT menu.")
End DoDot:1
QUIT
+15 ; Attach option to menu
+16 IF '$DATA(^DIC(19,ORMENU,10,0))
SET ^(0)="^19.01PI^^"
+17 SET DIC="^DIC(19,"_ORMENU_",10,"
SET DIC(0)="L"
SET DLAYGO=19
SET DA(1)=ORMENU
SET X=OROPTION
SET DIC("DR")="2///QU;3///4.5"
+18 DO FILE^DICN
+19 IF +$ORDER(^DIC(19,ORMENU,10,"B",OROPTION,0))
Begin DoDot:1
+20 DO BMES^XPDUTL("New option ORCM QUICK ORDERS BY USER successfully attached to ORCM MGMT menu.")
End DoDot:1
IF 1
+21 IF '$TEST
DO BMES^XPDUTL("Error trying to attach ORCM QUICK ORDERS BY USER to ORCM MGMT menu.")
+22 QUIT
BLDXREF ; index new cross reference
+1 NEW DIK,DA,MSG1,MSG2,IEN
+2 IF $DATA(^ORD(101.44,"C"))=0
SET MSG1="Populating"
SET MSG2="populated"
+3 IF '$TEST
SET MSG1="Reindexing"
SET MSG2="reindexed"
+4 DO BMES^XPDUTL(MSG1_" the new C cross reference of the ORDER QUICK VIEW file.")
+5 KILL ^ORD(101.44,"C")
+6 SET IEN=0
+7 FOR
SET IEN=$ORDER(^ORD(101.44,IEN))
IF 'IEN
QUIT
Begin DoDot:1
+8 SET DIK="^ORD(101.44,"_IEN_",10,"
SET DIK(1)=".01^C"
SET DA(1)=IEN
DO ENALL^DIK
End DoDot:1
+9 DO BMES^XPDUTL("The C cross reference of the ORDER QUICK VIEW file has been "_MSG2_".")
+10 QUIT