PXRMP36I ;SLC/PKR - Inits for PXRM*2.0*36. ;11/19/2013
;;2.0;CLINICAL REMINDERS;**36**;Feb 04, 2005;Build 207
;==========================================
ENVCHK ;Environment check.
N IEN,IMM,TEXT
S IMM="PNEUMOVAX POLYSACCHARIDE PPSV23"
S IEN=+$$FIND1^DIC(9999999.14,,"BX",IMM,,,"MSG")
I IEN<100000 D Q
. S TEXT(1)="The environment check was successful, this build can be installed."
. D BMES^XPDUTL(.TEXT)
S TEXT(1)="Your site has a locally defined immunization named:"
S TEXT(2)=" "_IMM
S TEXT(3)="This name is reserved for a national immunization, therefore this build"
S TEXT(4)="cannot be installed until the local entry it is renamed."
D BMES^XPDUTL(.TEXT)
S XPDABORT=1
Q
;
;==========================================
PRE ;Pre-init
;Disable options and protocols
D OPTION^PXRMUTIL("DISABLE")
D PROTOCOL^PXRMUTIL("DISABLE")
D RENAME^PXRMP36I
D DELEXE^PXRMEXSI("EXARRAY","PXRMP36E")
Q
;
;==========================================
POST ;Post-init
;Enable options and protocols
D OPTION^PXRMUTIL("ENABLE")
D PROTOCOL^PXRMUTIL("ENABLE")
D SETPVER^PXRMUTIL("2.0P36")
;Install Exchange File entries.
;Make sure immunizations are installed as national.
N PXRMIHSC
S $P(^AUTTIMM(0),U,3)=0,PXRMIHSC=1
;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP36E")
D SENDIM^PXRMP36I
Q
;
;=========================================
RENAME ;Rename some entries.
N IEN,FILENUM,MSG,NEWNAME,OLDNAME
D BMES^XPDUTL("Checking for entries that need renamed.")
S FILENUM=9999999.14
S NEWNAME="PNEUMOVAX POLYSACCHARIDE PPSV23"
S OLDNAME="PNEUMOVAX"
S IEN=+$$FIND1^DIC(FILENUM,"","BX",OLDNAME,"","","MSG")
I IEN>0 D
. D BMES^XPDUTL("Renaming immunization "_OLDNAME_" to "_NEWNAME)
. D RENAME^PXRMUTIL(FILENUM,OLDNAME,NEWNAME)
S FILENUM=811.2
S NEWNAME="VA-PNEUMOC DZ RISK - HIGH"
S OLDNAME="VA-HIGH RISK FOR PNEUMOCOCCAL DZ"
S IEN=+$$FIND1^DIC(FILENUM,"","BX",OLDNAME,"","","MSG")
I IEN>0 D
. D BMES^XPDUTL("Renaming taxonomy "_OLDNAME_" to "_NEWNAME)
. D RENAME^PXRMUTIL(FILENUM,OLDNAME,NEWNAME)
Q
;
;==========================================
SENDIM ;Send install message.
N FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
S NODE="PXRM*2.0*36"
K ^TMP(NODE,$J)
;DBIA #1131 for ^XMB("NETNAME")
S FROM="PXRM*2.0*36 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*36"
S ^TMP(NODE,$J,1,0)="PXRM*2.0*36 has been installed."
S ^TMP(NODE,$J,2,0)="System is "_SYSTEM
D SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
Q
;
PXRMP36I ;SLC/PKR - Inits for PXRM*2.0*36. ;11/19/2013
+1 ;;2.0;CLINICAL REMINDERS;**36**;Feb 04, 2005;Build 207
+2 ;==========================================
ENVCHK ;Environment check.
+1 NEW IEN,IMM,TEXT
+2 SET IMM="PNEUMOVAX POLYSACCHARIDE PPSV23"
+3 SET IEN=+$$FIND1^DIC(9999999.14,,"BX",IMM,,,"MSG")
+4 IF IEN<100000
Begin DoDot:1
+5 SET TEXT(1)="The environment check was successful, this build can be installed."
+6 DO BMES^XPDUTL(.TEXT)
End DoDot:1
QUIT
+7 SET TEXT(1)="Your site has a locally defined immunization named:"
+8 SET TEXT(2)=" "_IMM
+9 SET TEXT(3)="This name is reserved for a national immunization, therefore this build"
+10 SET TEXT(4)="cannot be installed until the local entry it is renamed."
+11 DO BMES^XPDUTL(.TEXT)
+12 SET XPDABORT=1
+13 QUIT
+14 ;
+15 ;==========================================
PRE ;Pre-init
+1 ;Disable options and protocols
+2 DO OPTION^PXRMUTIL("DISABLE")
+3 DO PROTOCOL^PXRMUTIL("DISABLE")
+4 DO RENAME^PXRMP36I
+5 DO DELEXE^PXRMEXSI("EXARRAY","PXRMP36E")
+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.0P36")
+5 ;Install Exchange File entries.
+6 ;Make sure immunizations are installed as national.
+7 NEW PXRMIHSC
+8 SET $PIECE(^AUTTIMM(0),U,3)=0
SET PXRMIHSC=1
+9 ;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP36E")
+10 DO SENDIM^PXRMP36I
+11 QUIT
+12 ;
+13 ;=========================================
RENAME ;Rename some entries.
+1 NEW IEN,FILENUM,MSG,NEWNAME,OLDNAME
+2 DO BMES^XPDUTL("Checking for entries that need renamed.")
+3 SET FILENUM=9999999.14
+4 SET NEWNAME="PNEUMOVAX POLYSACCHARIDE PPSV23"
+5 SET OLDNAME="PNEUMOVAX"
+6 SET IEN=+$$FIND1^DIC(FILENUM,"","BX",OLDNAME,"","","MSG")
+7 IF IEN>0
Begin DoDot:1
+8 DO BMES^XPDUTL("Renaming immunization "_OLDNAME_" to "_NEWNAME)
+9 DO RENAME^PXRMUTIL(FILENUM,OLDNAME,NEWNAME)
End DoDot:1
+10 SET FILENUM=811.2
+11 SET NEWNAME="VA-PNEUMOC DZ RISK - HIGH"
+12 SET OLDNAME="VA-HIGH RISK FOR PNEUMOCOCCAL DZ"
+13 SET IEN=+$$FIND1^DIC(FILENUM,"","BX",OLDNAME,"","","MSG")
+14 IF IEN>0
Begin DoDot:1
+15 DO BMES^XPDUTL("Renaming taxonomy "_OLDNAME_" to "_NEWNAME)
+16 DO RENAME^PXRMUTIL(FILENUM,OLDNAME,NEWNAME)
End DoDot:1
+17 QUIT
+18 ;
+19 ;==========================================
SENDIM ;Send install message.
+1 NEW FROM,NODE,PARAM,SYSTEM,SUBJECT,TO,VALUE
+2 SET NODE="PXRM*2.0*36"
+3 KILL ^TMP(NODE,$JOB)
+4 ;DBIA #1131 for ^XMB("NETNAME")
+5 SET FROM="PXRM*2.0*36 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*36"
+15 SET ^TMP(NODE,$JOB,1,0)="PXRM*2.0*36 has been installed."
+16 SET ^TMP(NODE,$JOB,2,0)="System is "_SYSTEM
+17 DO SEND^PXRMMSG(NODE,SUBJECT,.TO,FROM)
+18 QUIT
+19 ;