PXRMP32I ;SLC/PKR - Inits for PXRM*2.0*32. ;06/02/2014
;;2.0;CLINICAL REMINDERS;**32**;Feb 04, 2005;Build 194
Q
;==========================================
HFINACT ;Inactivate all health factors that start with "SST SESSION NUMBER".
N DONE,IEN,NAME
S DONE=0
S NAME="SST SESSION NUMBER"
D BMES^XPDUTL("Inactivating health factors that start with "_NAME)
F S NAME=$O(^AUTTHF("B",NAME)) Q:DONE D
. I $E(NAME,1,18)'="SST SESSION NUMBER" S DONE=1 Q
. S IEN=$O(^AUTTHF("B",NAME,""))
. D BMES^XPDUTL("Inactivating "_NAME)
. S $P(^AUTTHF(IEN,0),U,11)=1
Q
;
;==========================================
HFRENAME ;Rename some health factors.
N DONE,IND,NEWNAME,OLDNAME,TEXT,TOTAL
D BMES^XPDUTL("Checking for health factors that need to be renamed.")
S (DONE,TOTAL)=0
F IND=1:1 Q:DONE D
. S TEXT=$P($T(HFLIST+IND^PXRMP32H),";",3)
. I TEXT="" S DONE=1 Q
. S TOTAL=TOTAL+1
. S OLDNAME=$P(TEXT,U,1)
. S NEWNAME=$P(TEXT,U,2)
. D BMES^XPDUTL("Renaming "_OLDNAME_" to "_NEWNAME)
. D RENAME^PXRMUTIL(9999999.64,OLDNAME,NEWNAME)
;
S DONE=0
F IND=1:1 Q:DONE D
. S TEXT=$P($T(HFLIST+IND^PXRMP32F),";",3)
. I TEXT="" S DONE=1 Q
. S TOTAL=TOTAL+1
. S OLDNAME=$P(TEXT,U,1)
. S NEWNAME=$P(TEXT,U,2)
. D BMES^XPDUTL("Renaming "_OLDNAME_" to "_NEWNAME)
. D RENAME^PXRMUTIL(9999999.64,OLDNAME,NEWNAME)
D BMES^XPDUTL(TOTAL_" entries were processed.")
Q
;
;==========================================
PRE ;Pre-init
;Disable options and protocols
D OPTION^PXRMUTIL("DISABLE")
D PROTOCOL^PXRMUTIL("DISABLE")
D DELEXE^PXRMEXSI("EXARRAY","PXRMP32E")
D HFRENAME^PXRMP32I
Q
;
;==========================================
POST ;Post-init
;Enable options and protocols
D OPTION^PXRMUTIL("ENABLE")
D PROTOCOL^PXRMUTIL("ENABLE")
D SETPVER^PXRMUTIL("2.0P32")
;Install Exchange File entries.
D SMEXINS^PXRMEXSI("EXARRAY","PXRMP32E")
D HFINACT^PXRMP32I
D SENDIM^PXRMP32I
Q
;
;==========================================
SENDIM ;Send install message.
N FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
S NODE="PXRM*2.0*32"
K ^TMP(NODE,$J)
;DBIA #1131 for ^XMB("NETNAME")
S FROM="PXRM*2.0*32 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*32"
S ^TMP(NODE,$J,1,0)="PXRM*2.0*32 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[HPXRMP32I 2647 printed Nov 22, 2024@16:57:42 Page 2
PXRMP32I ;SLC/PKR - Inits for PXRM*2.0*32. ;06/02/2014
+1 ;;2.0;CLINICAL REMINDERS;**32**;Feb 04, 2005;Build 194
+2 QUIT
+3 ;==========================================
HFINACT ;Inactivate all health factors that start with "SST SESSION NUMBER".
+1 NEW DONE,IEN,NAME
+2 SET DONE=0
+3 SET NAME="SST SESSION NUMBER"
+4 DO BMES^XPDUTL("Inactivating health factors that start with "_NAME)
+5 FOR
SET NAME=$ORDER(^AUTTHF("B",NAME))
if DONE
QUIT
Begin DoDot:1
+6 IF $EXTRACT(NAME,1,18)'="SST SESSION NUMBER"
SET DONE=1
QUIT
+7 SET IEN=$ORDER(^AUTTHF("B",NAME,""))
+8 DO BMES^XPDUTL("Inactivating "_NAME)
+9 SET $PIECE(^AUTTHF(IEN,0),U,11)=1
End DoDot:1
+10 QUIT
+11 ;
+12 ;==========================================
HFRENAME ;Rename some health factors.
+1 NEW DONE,IND,NEWNAME,OLDNAME,TEXT,TOTAL
+2 DO BMES^XPDUTL("Checking for health factors that need to be renamed.")
+3 SET (DONE,TOTAL)=0
+4 FOR IND=1:1
if DONE
QUIT
Begin DoDot:1
+5 SET TEXT=$PIECE($TEXT(HFLIST+IND^PXRMP32H),";",3)
+6 IF TEXT=""
SET DONE=1
QUIT
+7 SET TOTAL=TOTAL+1
+8 SET OLDNAME=$PIECE(TEXT,U,1)
+9 SET NEWNAME=$PIECE(TEXT,U,2)
+10 DO BMES^XPDUTL("Renaming "_OLDNAME_" to "_NEWNAME)
+11 DO RENAME^PXRMUTIL(9999999.64,OLDNAME,NEWNAME)
End DoDot:1
+12 ;
+13 SET DONE=0
+14 FOR IND=1:1
if DONE
QUIT
Begin DoDot:1
+15 SET TEXT=$PIECE($TEXT(HFLIST+IND^PXRMP32F),";",3)
+16 IF TEXT=""
SET DONE=1
QUIT
+17 SET TOTAL=TOTAL+1
+18 SET OLDNAME=$PIECE(TEXT,U,1)
+19 SET NEWNAME=$PIECE(TEXT,U,2)
+20 DO BMES^XPDUTL("Renaming "_OLDNAME_" to "_NEWNAME)
+21 DO RENAME^PXRMUTIL(9999999.64,OLDNAME,NEWNAME)
End DoDot:1
+22 DO BMES^XPDUTL(TOTAL_" entries were processed.")
+23 QUIT
+24 ;
+25 ;==========================================
PRE ;Pre-init
+1 ;Disable options and protocols
+2 DO OPTION^PXRMUTIL("DISABLE")
+3 DO PROTOCOL^PXRMUTIL("DISABLE")
+4 DO DELEXE^PXRMEXSI("EXARRAY","PXRMP32E")
+5 DO HFRENAME^PXRMP32I
+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.0P32")
+5 ;Install Exchange File entries.
+6 DO SMEXINS^PXRMEXSI("EXARRAY","PXRMP32E")
+7 DO HFINACT^PXRMP32I
+8 DO SENDIM^PXRMP32I
+9 QUIT
+10 ;
+11 ;==========================================
SENDIM ;Send install message.
+1 NEW FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
+2 SET NODE="PXRM*2.0*32"
+3 KILL ^TMP(NODE,$JOB)
+4 ;DBIA #1131 for ^XMB("NETNAME")
+5 SET FROM="PXRM*2.0*32 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*32"
+15 SET ^TMP(NODE,$JOB,1,0)="PXRM*2.0*32 has been installed."
+16 SET ^TMP(NODE,$JOB,2,0)="System is "_SYSTEM
+17 DO SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
+18 QUIT
+19 ;