ORY173 ;SLC/PKS -- postinit rtn for OR*3*173 ;2/11/2004 06:25 [7/1/03 2:29pm]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**173**;Dec 17, 1997
;
Q
;
PRE ; -- preinit
;
Q
;
POST ; -- postinit
;
N VER
;
S VER=$P($T(VERSION^ORY173),";",3)
I +$$PATCH^XPDUTL("TIU*1.0*112") D SURGREG
D SETVAL
D MAIL
D SUPP
;
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","TIU GET DOCUMENTS FOR REQUEST" 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
;
SENDPAR(ANAME) ; Return true if the current parameter should be sent.
Q 0
;
SETVAL ; Set package-level values for params
N VAL S VAL=1
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@ISC-SLC.VA.GOV",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
;
SUPP ;Convert all dialogs with checkbox suppressed to exclude from p/n
;
;E3R 15758 NOIS MAR-1201-20845
;DBIA 4097
;
N DIEN,FIND,SUPPRESS
S DIEN=0
F S DIEN=$O(^PXRMD(801.41,DIEN)) Q:'DIEN D
.S FIND=0
.;Elements and groups only
.I "EG"'[$P($G(^PXRMD(801.41,DIEN,0)),U,4) Q
.;Check if checkbox suppressed
.S SUPPRESS=$P($G(^PXRMD(801.41,DIEN,0)),U,11) Q:'SUPPRESS
.I $P($G(^PXRMD(801.41,DIEN,1)),U,5)'="" S FIND=1
.I FIND=1 Q
.;Set exclude from p/n
.I $P($G(^PXRMD(801.41,DIEN,2)),U,3)="" S $P(^PXRMD(801.41,DIEN,2),U,3)=1
Q
;
VERSION ;;22.11
ORY173 ;SLC/PKS -- postinit rtn for OR*3*173 ;2/11/2004 06:25 [7/1/03 2:29pm]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**173**;Dec 17, 1997
+2 ;
+3 QUIT
+4 ;
PRE ; -- preinit
+1 ;
+2 QUIT
+3 ;
POST ; -- postinit
+1 ;
+2 NEW VER
+3 ;
+4 SET VER=$PIECE($TEXT(VERSION^ORY173),";",3)
+5 IF +$$PATCH^XPDUTL("TIU*1.0*112")
DO SURGREG
+6 DO SETVAL
+7 DO MAIL
+8 DO SUPP
+9 ;
+10 QUIT
+11 ;
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","TIU GET DOCUMENTS FOR REQUEST"
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 ;
SENDPAR(ANAME) ; Return true if the current parameter should be sent.
+1 QUIT 0
+2 ;
SETVAL ; Set package-level values for params
+1 NEW VAL
SET VAL=1
+2 QUIT
+3 ;
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@ISC-SLC.VA.GOV",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 ;
SUPP ;Convert all dialogs with checkbox suppressed to exclude from p/n
+1 ;
+2 ;E3R 15758 NOIS MAR-1201-20845
+3 ;DBIA 4097
+4 ;
+5 NEW DIEN,FIND,SUPPRESS
+6 SET DIEN=0
+7 FOR
SET DIEN=$ORDER(^PXRMD(801.41,DIEN))
IF 'DIEN
QUIT
Begin DoDot:1
+8 SET FIND=0
+9 ;Elements and groups only
+10 IF "EG"'[$PIECE($GET(^PXRMD(801.41,DIEN,0)),U,4)
QUIT
+11 ;Check if checkbox suppressed
+12 SET SUPPRESS=$PIECE($GET(^PXRMD(801.41,DIEN,0)),U,11)
IF 'SUPPRESS
QUIT
+13 IF $PIECE($GET(^PXRMD(801.41,DIEN,1)),U,5)'=""
SET FIND=1
+14 IF FIND=1
QUIT
+15 ;Set exclude from p/n
+16 IF $PIECE($GET(^PXRMD(801.41,DIEN,2)),U,3)=""
SET $PIECE(^PXRMD(801.41,DIEN,2),U,3)=1
End DoDot:1
+17 QUIT
+18 ;
VERSION ;;22.11