PXRMP40I ;SLC/PKR - Inits for PXRM*2.0*40. ;01/14/2014
;;2.0;CLINICAL REMINDERS;**40**;Feb 04, 2005;Build 202
Q
;==========================================
CHKAB ;Check all entries in the file #100.21 Member multiple and make sure
;they are in the "AB" index.
D BMES^XPDUTL("Checking ^OR(100.21,""AB"") index.")
N IEN,IND,MLIST,TNAME,VPTR
S IEN=0
F S IEN=$O(^OR(100.21,IEN)) Q:+IEN=0 D
. S IND=0
. F S IND=+$O(^OR(100.21,IEN,10,IND)) Q:IND=0 D
.. S VPTR=$P(^OR(100.21,IEN,10,IND,0),U,1)
.. I VPTR="" Q
.. I $D(^OR(100.21,"AB",VPTR,IEN,IND)) Q
.. S TNAME=$P(^OR(100.21,IEN,0),U,1)
.. S MLIST(TNAME)=IEN
.. S ^OR(100.21,"AB",VPTR,IEN,IND)=""
I '$D(MLIST) D MES^XPDUTL("No patients were missing from the ""AB"" index.") Q
D BMES^XPDUTL("Added entries to the ""AB"" index for the following teams:")
S TNAME=""
F S TNAME=$O(MLIST(TNAME)) Q:TNAME="" D
. D MES^XPDUTL(" "_TNAME)
Q
;
;==========================================
PRE ;Pre-init
;Disable options and protocols
D OPTION^PXRMUTIL("DISABLE")
D PROTOCOL^PXRMUTIL("DISABLE")
Q
;
;==========================================
POST ;Post-init
D SETPVER^PXRMUTIL("2.0P40")
D CHKAB
;Enable options and protocols
D OPTION^PXRMUTIL("ENABLE")
D PROTOCOL^PXRMUTIL("ENABLE")
D SENDIM^PXRMP40I
Q
;
;==========================================
SENDIM ;Send install message.
N FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
S NODE="PXRM*2.0*40"
K ^TMP(NODE,$J)
;DBIA #1131 for ^XMB("NETNAME")
S FROM="PXRM*2.0*40 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*40"
S ^TMP(NODE,$J,1,0)="PXRM*2.0*40 has been installed."
S ^TMP(NODE,$J,2,0)="System is "_SYSTEM
D SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMP40I 2016 printed Oct 16, 2024@17:48:29 Page 2
PXRMP40I ;SLC/PKR - Inits for PXRM*2.0*40. ;01/14/2014
+1 ;;2.0;CLINICAL REMINDERS;**40**;Feb 04, 2005;Build 202
+2 QUIT
+3 ;==========================================
CHKAB ;Check all entries in the file #100.21 Member multiple and make sure
+1 ;they are in the "AB" index.
+2 DO BMES^XPDUTL("Checking ^OR(100.21,""AB"") index.")
+3 NEW IEN,IND,MLIST,TNAME,VPTR
+4 SET IEN=0
+5 FOR
SET IEN=$ORDER(^OR(100.21,IEN))
if +IEN=0
QUIT
Begin DoDot:1
+6 SET IND=0
+7 FOR
SET IND=+$ORDER(^OR(100.21,IEN,10,IND))
if IND=0
QUIT
Begin DoDot:2
+8 SET VPTR=$PIECE(^OR(100.21,IEN,10,IND,0),U,1)
+9 IF VPTR=""
QUIT
+10 IF $DATA(^OR(100.21,"AB",VPTR,IEN,IND))
QUIT
+11 SET TNAME=$PIECE(^OR(100.21,IEN,0),U,1)
+12 SET MLIST(TNAME)=IEN
+13 SET ^OR(100.21,"AB",VPTR,IEN,IND)=""
End DoDot:2
End DoDot:1
+14 IF '$DATA(MLIST)
DO MES^XPDUTL("No patients were missing from the ""AB"" index.")
QUIT
+15 DO BMES^XPDUTL("Added entries to the ""AB"" index for the following teams:")
+16 SET TNAME=""
+17 FOR
SET TNAME=$ORDER(MLIST(TNAME))
if TNAME=""
QUIT
Begin DoDot:1
+18 DO MES^XPDUTL(" "_TNAME)
End DoDot:1
+19 QUIT
+20 ;
+21 ;==========================================
PRE ;Pre-init
+1 ;Disable options and protocols
+2 DO OPTION^PXRMUTIL("DISABLE")
+3 DO PROTOCOL^PXRMUTIL("DISABLE")
+4 QUIT
+5 ;
+6 ;==========================================
POST ;Post-init
+1 DO SETPVER^PXRMUTIL("2.0P40")
+2 DO CHKAB
+3 ;Enable options and protocols
+4 DO OPTION^PXRMUTIL("ENABLE")
+5 DO PROTOCOL^PXRMUTIL("ENABLE")
+6 DO SENDIM^PXRMP40I
+7 QUIT
+8 ;
+9 ;==========================================
SENDIM ;Send install message.
+1 NEW FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
+2 SET NODE="PXRM*2.0*40"
+3 KILL ^TMP(NODE,$JOB)
+4 ;DBIA #1131 for ^XMB("NETNAME")
+5 SET FROM="PXRM*2.0*40 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*40"
+15 SET ^TMP(NODE,$JOB,1,0)="PXRM*2.0*40 has been installed."
+16 SET ^TMP(NODE,$JOB,2,0)="System is "_SYSTEM
+17 DO SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
+18 QUIT
+19 ;