ORY141 ;SLC/REV/JLI -- postinit rtn for OR*3*141 ;12/13/01 06:25 [5/21/02 2:02pm] 6/7/02 1:33PM [11/14/02 2:39pm]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**141**;Dec 17, 1997
;
Q
;
PRE ; -- preinit
D PRE^ORY141ED
Q
;
POST ; -- postinit
;
N VER
;
S VER=$P($T(VERSION^ORY141),";",3)
I +$$PATCH^XPDUTL("TIU*1.0*112") D SURGREG
D POST^ORY141ED
D POST^ORY141EC
D CLNXPAR
D CURCLT
D MAIL
;
Q
;
CLNXPAR ;Clear up the value of frmOrders.hdrOrders for
;parameter ORWCH COLUMNS"
N XPID,UID,COLID,DIK
S UID=0
S XPID=$O(^XTV(8989.51,"B","ORWCH COLUMNS",0))
S DIK="^XTV(8989.5,"
F S UID=$O(^XTV(8989.5,"AC",XPID,UID)) Q:'+UID D
. I $D(^XTV(8989.5,"AC",XPID,UID,"frmOrders.hdrOrders")) D
.. S COLID=0
.. S COLID=$O(^XTV(8989.5,"AC",XPID,UID,"frmOrders.hdrOrders",0))
.. I COLID S DA=COLID D ^DIK
Q
;
CURCLT ; Only Current Client Allowed
D EN^XPAR("SYS","ORWOR REQUIRE CURRENT CLIENT",1,1)
Q
;
SURGREG ; Register TIU SURGERY RPCs if TIU*1.0*112 present
N MENU,RPC
S MENU="OR CPRS GUI CHART"
F RPC="TIU IS THIS A SURGERY?","TIU IDENTIFY SURGERY CLASS","TIU LONG LIST SURGERY TITLES" D INSERT(MENU,RPC)
Q
;
INSERT(OPTION,RPC) ; Call FM Updater with each RPC
; Input -- OPTION Option file (#19) Name field (#.01)
; RPC RPC sub-file (#19.05) RPC field (#.01)
; Output -- None
N FDA,FDAIEN,ERR,DIERR
S FDA(19,"?1,",.01)=OPTION
S FDA(19.05,"?+2,?1,",.01)=RPC
D UPDATE^DIE("E","FDA","FDAIEN","ERR")
Q
;
MAIL ; send bulletin of installation time
N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
S COUNT=0
S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
S XMDUZ="CPRS PACKAGE"
F I="G.CPRS GUI INSTALL@DOMAIN.NAME",DUZ S XMY(I)=""
S XMTEXT="TEXT("
;
S X=$P($T(VERSION),";;",2)
D LINE("Version "_X_" has been installed.")
D LINE(" ")
D LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
;
D ^XMD
Q
;
LINE(DATA) ; set text into array
S COUNT=COUNT+1
S TEXT(COUNT)=DATA
Q
;
VERSION ;;20.21
ORY141 ;SLC/REV/JLI -- postinit rtn for OR*3*141 ;12/13/01 06:25 [5/21/02 2:02pm] 6/7/02 1:33PM [11/14/02 2:39pm]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**141**;Dec 17, 1997
+2 ;
+3 QUIT
+4 ;
PRE ; -- preinit
+1 DO PRE^ORY141ED
+2 QUIT
+3 ;
POST ; -- postinit
+1 ;
+2 NEW VER
+3 ;
+4 SET VER=$PIECE($TEXT(VERSION^ORY141),";",3)
+5 IF +$$PATCH^XPDUTL("TIU*1.0*112")
DO SURGREG
+6 DO POST^ORY141ED
+7 DO POST^ORY141EC
+8 DO CLNXPAR
+9 DO CURCLT
+10 DO MAIL
+11 ;
+12 QUIT
+13 ;
CLNXPAR ;Clear up the value of frmOrders.hdrOrders for
+1 ;parameter ORWCH COLUMNS"
+2 NEW XPID,UID,COLID,DIK
+3 SET UID=0
+4 SET XPID=$ORDER(^XTV(8989.51,"B","ORWCH COLUMNS",0))
+5 SET DIK="^XTV(8989.5,"
+6 FOR
SET UID=$ORDER(^XTV(8989.5,"AC",XPID,UID))
IF '+UID
QUIT
Begin DoDot:1
+7 IF $DATA(^XTV(8989.5,"AC",XPID,UID,"frmOrders.hdrOrders"))
Begin DoDot:2
+8 SET COLID=0
+9 SET COLID=$ORDER(^XTV(8989.5,"AC",XPID,UID,"frmOrders.hdrOrders",0))
+10 IF COLID
SET DA=COLID
DO ^DIK
End DoDot:2
End DoDot:1
+11 QUIT
+12 ;
CURCLT ; Only Current Client Allowed
+1 DO EN^XPAR("SYS","ORWOR REQUIRE CURRENT CLIENT",1,1)
+2 QUIT
+3 ;
SURGREG ; Register TIU SURGERY RPCs if TIU*1.0*112 present
+1 NEW MENU,RPC
+2 SET MENU="OR CPRS GUI CHART"
+3 FOR RPC="TIU IS THIS A SURGERY?","TIU IDENTIFY SURGERY CLASS","TIU LONG LIST SURGERY TITLES"
DO INSERT(MENU,RPC)
+4 QUIT
+5 ;
INSERT(OPTION,RPC) ; Call FM Updater with each RPC
+1 ; Input -- OPTION Option file (#19) Name field (#.01)
+2 ; RPC RPC sub-file (#19.05) RPC field (#.01)
+3 ; Output -- None
+4 NEW FDA,FDAIEN,ERR,DIERR
+5 SET FDA(19,"?1,",.01)=OPTION
+6 SET FDA(19.05,"?+2,?1,",.01)=RPC
+7 DO UPDATE^DIE("E","FDA","FDAIEN","ERR")
+8 QUIT
+9 ;
MAIL ; send bulletin of installation time
+1 NEW COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
+2 SET COUNT=0
+3 SET XMSUB="Version "_$PIECE($TEXT(VERSION),";;",2)_" Installed"
+4 SET XMDUZ="CPRS PACKAGE"
+5 FOR I="G.CPRS GUI INSTALL@DOMAIN.NAME",DUZ
SET XMY(I)=""
+6 SET XMTEXT="TEXT("
+7 ;
+8 SET X=$PIECE($TEXT(VERSION),";;",2)
+9 DO LINE("Version "_X_" has been installed.")
+10 DO LINE(" ")
+11 DO LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
+12 ;
+13 DO ^XMD
+14 QUIT
+15 ;
LINE(DATA) ; set text into array
+1 SET COUNT=COUNT+1
+2 SET TEXT(COUNT)=DATA
+3 QUIT
+4 ;
VERSION ;;20.21