PXRMP28I ;SLC/PKR - Inits for PXRM*2.0*28. ;01/14/2013
;;2.0;CLINICAL REMINDERS;**28**;Feb 04, 2005;Build 206
Q
;==========================================
LENDIAG(DEF,DIALOG) ;Link and enable a dialog.
N DIEN,RIEN,TEXT
S RIEN=$O(^PXD(811.9,"B",DEF,""))
I RIEN="" D
. S TEXT="Reminder definition "_DEF_" was not installed!"
. D MES^XPDUTL(TEXT)
S DIEN=$O(^PXRMD(801.41,"B",DIALOG,""))
I DIEN="" D
. S TEXT="Reminder dialog "_DIALOG_" was not installed!"
. D MES^XPDUTL(TEXT)
I (+RIEN>0),(+DIEN>0) D
. K TEXT
. S TEXT(1)="Linking and enabling reminder dialog "_DIALOG
. S TEXT(2)="to reminder definition "_DEF_"."
. S TEXT(3)=""
. D MES^XPDUTL(.TEXT)
. S ^PXD(811.9,RIEN,51)=DIEN
. S $P(^PXRMD(801.41,DIEN,0),U,3)=0
Q
;
;==========================================
LENDIAGA ;Make sure the dialogs are linked and enabled.
N IND,DEFL,DLGL
S DEFL(1)="VA-WH DISCUSS BREAST CA SCREEN WOMAN 40-49"
S DLGL(1)="VA-WH DISCUSS BREAST CA WOMAN 40-49"
S DEFL(2)="VA-WH MAMMOGRAM SCREENING"
S DLGL(2)="VA-WH MAMMOGRAM SCREENING"
S DEFL(3)="VA-WH PAP SMEAR REVIEW RESULTS"
S DLGL(3)="VA-WH PAP SMEAR REVIEW RESULTS"
S DEFL(4)="VA-WH PAP SMEAR SCREENING"
S DLGL(4)="VA-WH PAP SMEAR SCREENING"
S DEFL(5)="VA-WH MAMMOGRAM REVIEW RESULTS"
S DLGL(5)="VA-WH MAMMOGRAM REVIEW RESULTS"
D BMES^XPDUTL("Linking and enabling dialogs")
F IND=1:1:5 D LENDIAG^PXRMP28I(DEFL(IND),DLGL(IND))
Q
;
;==========================================
PRE ;Pre-init
;Disable options and protocols
D OPTION^PXRMUTIL("DISABLE")
D PROTOCOL^PXRMUTIL("DISABLE")
D DELEXE^PXRMEXSI("EXARRAY","PXRMP28E")
D RENAME^PXRMP28I
Q
;
;==========================================
POST ;Post-init
;Enable options and protocols
D OPTION^PXRMUTIL("ENABLE")
D PROTOCOL^PXRMUTIL("ENABLE")
D SETPVER^PXRMUTIL("2.0P28")
;Install Exchange File entries.
;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP28E")
D LENDIAGA^PXRMP28I
;D SENDIM^PXRMP28I
Q
;
;==========================================
RENAME ;
D BMES^XPDUTL("Renaming health factors.")
D RENAME^PXRMUTIL(9999999.64,"WH BR CA SCREEN N/A 5 YRS","WH BR CA SCREEN N/A 5 YRS-LE<5YRS")
D RENAME^PXRMUTIL(9999999.64,"CERVICAL CA SCRN N/A 5 YRS","WH CERV CA SCRN N/A 5 YRS-LE<5YRS")
Q
;
;==========================================
SENDIM ;Send install message.
N FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
S NODE="PXRM*2.0*28"
K ^TMP(NODE,$J)
;DBIA #1131 for ^XMB("NETNAME")
S FROM="PXRM*2.0*28 Install@"_^XMB("NETNAME")
;DBIA #2541
S SYSTEM=$$KSP^XUPARAM("WHERE")
I $$PROD^XUPROD(1) S TO("G.CLINICAL REMINDERS SUPPORT@domain.ext")=""
E D
. N MGIEN,MGROUP
. S MGIEN=$G(^PXRM(800,1,"MGFE"))
. S MGROUP=$S(MGIEN'="":"G."_$$GET1^DIQ(3.8,MGIEN,.01),1:DUZ)
. S TO(MGROUP)=""
S SUBJECT="Install of PXRM*2.0*28"
S ^TMP(NODE,$J,1,0)="PXRM*2.0*28 has been installed."
S ^TMP(NODE,$J,2,0)="System is "_SYSTEM
D SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
Q
;
PXRMP28I ;SLC/PKR - Inits for PXRM*2.0*28. ;01/14/2013
+1 ;;2.0;CLINICAL REMINDERS;**28**;Feb 04, 2005;Build 206
+2 QUIT
+3 ;==========================================
LENDIAG(DEF,DIALOG) ;Link and enable a dialog.
+1 NEW DIEN,RIEN,TEXT
+2 SET RIEN=$ORDER(^PXD(811.9,"B",DEF,""))
+3 IF RIEN=""
Begin DoDot:1
+4 SET TEXT="Reminder definition "_DEF_" was not installed!"
+5 DO MES^XPDUTL(TEXT)
End DoDot:1
+6 SET DIEN=$ORDER(^PXRMD(801.41,"B",DIALOG,""))
+7 IF DIEN=""
Begin DoDot:1
+8 SET TEXT="Reminder dialog "_DIALOG_" was not installed!"
+9 DO MES^XPDUTL(TEXT)
End DoDot:1
+10 IF (+RIEN>0)
IF (+DIEN>0)
Begin DoDot:1
+11 KILL TEXT
+12 SET TEXT(1)="Linking and enabling reminder dialog "_DIALOG
+13 SET TEXT(2)="to reminder definition "_DEF_"."
+14 SET TEXT(3)=""
+15 DO MES^XPDUTL(.TEXT)
+16 SET ^PXD(811.9,RIEN,51)=DIEN
+17 SET $PIECE(^PXRMD(801.41,DIEN,0),U,3)=0
End DoDot:1
+18 QUIT
+19 ;
+20 ;==========================================
LENDIAGA ;Make sure the dialogs are linked and enabled.
+1 NEW IND,DEFL,DLGL
+2 SET DEFL(1)="VA-WH DISCUSS BREAST CA SCREEN WOMAN 40-49"
+3 SET DLGL(1)="VA-WH DISCUSS BREAST CA WOMAN 40-49"
+4 SET DEFL(2)="VA-WH MAMMOGRAM SCREENING"
+5 SET DLGL(2)="VA-WH MAMMOGRAM SCREENING"
+6 SET DEFL(3)="VA-WH PAP SMEAR REVIEW RESULTS"
+7 SET DLGL(3)="VA-WH PAP SMEAR REVIEW RESULTS"
+8 SET DEFL(4)="VA-WH PAP SMEAR SCREENING"
+9 SET DLGL(4)="VA-WH PAP SMEAR SCREENING"
+10 SET DEFL(5)="VA-WH MAMMOGRAM REVIEW RESULTS"
+11 SET DLGL(5)="VA-WH MAMMOGRAM REVIEW RESULTS"
+12 DO BMES^XPDUTL("Linking and enabling dialogs")
+13 FOR IND=1:1:5
DO LENDIAG^PXRMP28I(DEFL(IND),DLGL(IND))
+14 QUIT
+15 ;
+16 ;==========================================
PRE ;Pre-init
+1 ;Disable options and protocols
+2 DO OPTION^PXRMUTIL("DISABLE")
+3 DO PROTOCOL^PXRMUTIL("DISABLE")
+4 DO DELEXE^PXRMEXSI("EXARRAY","PXRMP28E")
+5 DO RENAME^PXRMP28I
+6 QUIT
+7 ;
+8 ;==========================================
POST ;Post-init
+1 ;Enable options and protocols
+2 DO OPTION^PXRMUTIL("ENABLE")
+3 DO PROTOCOL^PXRMUTIL("ENABLE")
+4 DO SETPVER^PXRMUTIL("2.0P28")
+5 ;Install Exchange File entries.
+6 ;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP28E")
+7 DO LENDIAGA^PXRMP28I
+8 ;D SENDIM^PXRMP28I
+9 QUIT
+10 ;
+11 ;==========================================
RENAME ;
+1 DO BMES^XPDUTL("Renaming health factors.")
+2 DO RENAME^PXRMUTIL(9999999.64,"WH BR CA SCREEN N/A 5 YRS","WH BR CA SCREEN N/A 5 YRS-LE<5YRS")
+3 DO RENAME^PXRMUTIL(9999999.64,"CERVICAL CA SCRN N/A 5 YRS","WH CERV CA SCRN N/A 5 YRS-LE<5YRS")
+4 QUIT
+5 ;
+6 ;==========================================
SENDIM ;Send install message.
+1 NEW FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
+2 SET NODE="PXRM*2.0*28"
+3 KILL ^TMP(NODE,$JOB)
+4 ;DBIA #1131 for ^XMB("NETNAME")
+5 SET FROM="PXRM*2.0*28 Install@"_^XMB("NETNAME")
+6 ;DBIA #2541
+7 SET SYSTEM=$$KSP^XUPARAM("WHERE")
+8 IF $$PROD^XUPROD(1)
SET TO("G.CLINICAL REMINDERS SUPPORT@domain.ext")=""
+9 IF '$TEST
Begin DoDot:1
+10 NEW MGIEN,MGROUP
+11 SET MGIEN=$GET(^PXRM(800,1,"MGFE"))
+12 SET MGROUP=$SELECT(MGIEN'="":"G."_$$GET1^DIQ(3.8,MGIEN,.01),1:DUZ)
+13 SET TO(MGROUP)=""
End DoDot:1
+14 SET SUBJECT="Install of PXRM*2.0*28"
+15 SET ^TMP(NODE,$JOB,1,0)="PXRM*2.0*28 has been installed."
+16 SET ^TMP(NODE,$JOB,2,0)="System is "_SYSTEM
+17 DO SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
+18 QUIT
+19 ;