MHV1P11 ;KUM - My HealtheVet Install Utility Routine ; [1/15/13 15:01pm]
;;1.0;My HealtheVet;**11**;Aug 23, 2005;Build 61
;;Per VHA Directive 2004-038, this routine should not be modified.
;
; Integration Agreements:
; 10141 : BMES^XPDUTL
; : MES^XPDUTL
; 10018 : UPDATE^DIE
; 10103 : $$FMTH^XLFDT
; : $$HTFM^XLFDT
; : $$NOW^XLFDT
;
ENV ;
Q
;
PRE ; Pre-init routine
; Turn on MHV Application Logging, add a log entry for the start
; of the patch install.
D LOGON
D LOG^MHVUL2(XPDNM,"PRE-INIT","S","TRACE")
S ERR=""
S MHVC=0
D LOG^MHVUL2("CHECK","INSTITUTION","S","TRACE")
D CHKHLOC(.ERR)
I ERR'="" D
. D LOG^MHVUL2("CHECK INSTITUTION",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket to check INSTITUTION and DIVISION in Hospital Location File.")
. D BMES^XPDUTL(" This install will now abort. Only attempt to re-install when ")
. D MES^XPDUTL(" corrective action has been taken.")
. S XPDABORT=2
. Q
D LOG^MHVUL2(XPDNM,"PRE-INIT END","S","TRACE")
Q
;
POST ; Post-init routine
N ERR
D LOG^MHVUL2(XPDNM,"POST-INIT BEGIN","S","TRACE")
;
D QRYDSS
D QRYPROC
D QRYECLS
D QRYPPRB
D QRYDIAG
D QRYFILE
D RSPQ13
D RSPQ11
D RSPP03
;
D LOG^MHVUL2(XPDNM,"POST-INIT END","S","TRACE")
D LOGOFF
D RESET^MHVUL2
Q
;
LOGON ; Turn on MHV application logging
N UPDATE,SUCCESS
D BMES^XPDUTL(" Turning on MHV Application Logging")
S UPDATE("STATE")=1
S UPDATE("DELETE")=$$HTFM^XLFDT($H+60)
S UPDATE("LEVEL")="DEBUG"
D LOGSET^MHVUL1(.SUCCESS,.UPDATE)
Q
;
LOGOFF ; Turn off MHV application logging
N SUCCESS
D BMES^XPDUTL(" Turning off MHV Application Logging")
D LOGOFF^MHVUL1(.SUCCESS)
Q
;
QRYDSS ; Setup for DSS Units query
; Setup MHV REQUEST TYPE
;
D BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMDSSUNITS ")
N FIELDS,ERR
S ERR=""
S FIELDS("REQUEST TYPE")="SMDSSUNITS"
S FIELDS("NUMBER")=44
S FIELDS("BLOCK")=0
S FIELDS("REALTIME")=1
S FIELDS("DATATYPE")="SMDSSUnitsByProviderAndClinic"
S FIELDS("EXECUTE")="SPDSS~MHVXWLC"
S FIELDS("BUILDER")="MHV7B1K"
S FIELDS("DESCRIPTION",1)="QBP^Q13 query for DSS Units information."
S FIELDS("DESCRIPTION",2)="Specify Provider DUZ and Associated Clinic."
S FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
D LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
D UPDREQ^MHVU2(.FIELDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
;
QRYPROC ; Setup for ECS Procedures query
; Setup MHV REQUEST TYPE
;
D BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMECSPROCS ")
N FIELDS,ERR
S ERR=""
S FIELDS("REQUEST TYPE")="SMECSPROCS"
S FIELDS("NUMBER")=45
S FIELDS("BLOCK")=0
S FIELDS("REALTIME")=1
S FIELDS("DATATYPE")="SMECSProcedures"
S FIELDS("EXECUTE")="SPECS~MHVXWLC"
S FIELDS("BUILDER")="MHV7B1L"
S FIELDS("DESCRIPTION",1)="QBP^Q13 query for ECS Procedures information."
S FIELDS("DESCRIPTION",2)="Specify DSS Unit IEN and Location IEN."
S FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
D LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
D UPDREQ^MHVU2(.FIELDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
;
QRYECLS ; Setup for Patient Eligibility and Classificaiton query
; Setup MHV REQUEST TYPE
;
D BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMPATIENTECLASS ")
N FIELDS,ERR
S ERR=""
S FIELDS("REQUEST TYPE")="SMPATIENTECLASS"
S FIELDS("NUMBER")=46
S FIELDS("BLOCK")=0
S FIELDS("REALTIME")=1
S FIELDS("DATATYPE")="SMPatientEClass"
S FIELDS("EXECUTE")="PECLASS~MHVXWLC"
S FIELDS("BUILDER")="ZEL~MHV7B1M"
S FIELDS("DESCRIPTION",1)="QBP^Q11 query for Patient Eligibility and Classificaiton."
S FIELDS("DESCRIPTION",2)="Specify Patient ICN and DSS Unit IEN."
S FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
D LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
D UPDREQ^MHVU2(.FIELDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
;
QRYPPRB ; Setup for Patient Problems query
; Setup MHV REQUEST TYPE
;
D BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMPATIENTPROBLEMS ")
N FIELDS,ERR
S ERR=""
S FIELDS("REQUEST TYPE")="SMPATIENTPROBLEMS"
S FIELDS("NUMBER")=47
S FIELDS("BLOCK")=0
S FIELDS("REALTIME")=1
S FIELDS("DATATYPE")="SMPatientProblems"
S FIELDS("EXECUTE")="SMPPRB~MHVXWLC"
S FIELDS("BUILDER")="DG1~MHV7B1N"
S FIELDS("DESCRIPTION",1)="QBP^Q11 query for Patient Problems."
S FIELDS("DESCRIPTION",2)="Specify Patient ICN and DSS Unit IEN."
S FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
D LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
D UPDREQ^MHVU2(.FIELDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
;
QRYDIAG ; Setup for Diagnoses query
; Setup MHV REQUEST TYPE
;
D BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMDIAGNOSES ")
N FIELDS,ERR
S ERR=""
S FIELDS("REQUEST TYPE")="SMDIAGNOSES"
S FIELDS("NUMBER")=48
S FIELDS("BLOCK")=0
S FIELDS("REALTIME")=1
S FIELDS("DATATYPE")="SMDiagnoses"
S FIELDS("EXECUTE")="SMDIAG~MHVXWLC"
S FIELDS("BUILDER")="DG1~MHV7B1O"
S FIELDS("DESCRIPTION",1)="QBP^Q11 query for Diagnoses information."
S FIELDS("DESCRIPTION",2)="Specify Search String."
S FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
D LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
D UPDREQ^MHVU2(.FIELDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
;
QRYFILE ; Setup for Workload Credit Filer
; Setup MHV REQUEST TYPE
;
D BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMFILER ")
N FIELDS,ERR
S ERR=""
S FIELDS("REQUEST TYPE")="SMFILER"
S FIELDS("NUMBER")=49
S FIELDS("BLOCK")=0
S FIELDS("REALTIME")=1
S FIELDS("DATATYPE")="SMFiler"
S FIELDS("EXECUTE")="SMFILE~MHVXWLC"
S FIELDS("BUILDER")="ERR~MHV7B1P"
S FIELDS("DESCRIPTION",1)="DFT^P03 query for WLC Filer."
S FIELDS("DESCRIPTION",2)="Specify String with all data required for WLC Filer."
S FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
D LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
D UPDREQ^MHVU2(.FIELDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
;
RSPQ13 ; Set up RESPONSE MAP FOR SMDSSUNITS, SMECSPROCS
D BMES^XPDUTL(" Creating Entry in MHV RESPONSE MAP - MHVSM QBP-Q13 Subscriber ")
N FLDS,ERR
K FLDS
S ERR=""
S FLDS("SUBSCRIBER")="MHVSM QBP-Q13 Subscriber"
S FLDS("PROTOCOL")="MHVSM RTB-K13 Event Driver"
S FLDS("BUILDER")="RTBK13~MHV7B1"
S FLDS("SEGMENT")="RDT"
D LOG^MHVUL2("UPDATE RESPONSE MAP",.FLDS,"M","DEBUG")
D UPDMAP^MHVU2(.FLDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
Q
;
RSPQ11 ; Set up RESPONSE MAP FOR SMPATIENTECLASS, SMPATIENTPROBLEMS, SMDIAGNOSES
D BMES^XPDUTL(" Creating Entry in MHV RESPONSE MAP - MHVSM QBP-Q11 Subscriber ")
N FLDS,ERR
K FLDS
S ERR=""
S FLDS("SUBSCRIBER")="MHVSM QBP-Q11 Subscriber"
S FLDS("PROTOCOL")="MHVSM RSP-K11 Event Driver"
S FLDS("BUILDER")="RSPK11~MHV7B9"
S FLDS("SEGMENT")="PID"
D LOG^MHVUL2("UPDATE RESPONSE MAP",.FLDS,"M","DEBUG")
D UPDMAP^MHVU2(.FLDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
Q
;
RSPP03 ; Set up RESPONSE MAP FOR SMFILER
D BMES^XPDUTL(" Creating Entry in MHV RESPONSE MAP - MHVSM DFT-P03 Subscriber ")
N FLDS,ERR
K FLDS
S ERR=""
S FLDS("SUBSCRIBER")="MHVSM DFT-P03 Subscriber"
S FLDS("PROTOCOL")="MHVSM ACK-P03 Event Driver"
S FLDS("BUILDER")="ACKP03~MHV7B10"
S FLDS("SEGMENT")="ERR"
D LOG^MHVUL2("UPDATE RESPONSE MAP",.FLDS,"M","DEBUG")
D UPDMAP^MHVU2(.FLDS,1,.ERR)
I ERR'="" D
. D LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
. D BMES^XPDUTL(" *** An Error occurred during installation.")
. D MES^XPDUTL(" Please log a remedy ticket.")
. Q
Q
;
CHKHLOC(ERR) ; Check Institution in Hospital Location File (#44)
N MHVCSIEN,MHVCLIEN,MHVINST,MHVDIVN
S MHVCSIEN=$$SCIEN(719)
I $G(MHVCSIEN)="" S ERR="MHV SECURE MESSAGING Stop Code is not found in STOP CODE File" Q
S MHVCLIEN=0
F S MHVCLIEN=$O(^SC("ACST",MHVCSIEN,MHVCLIEN)) Q:'MHVCLIEN D
.S MHVCLNM=$$GET1^DIQ(44,+MHVCLIEN,.01,"I")
.I ($G(MHVCLNM)'="")&($$UP^XLFSTR($E(MHVCLNM,1,2))'="ZZ") D
..S MHVINST=$$GET1^DIQ(44,+MHVCLIEN,3,"E")
..S MHVDIVN=$$GET1^DIQ(44,+MHVCLIEN,3.5,"E")
..I ($G(MHVINST)="")!($G(MHVDIVN)="") D
...D CHKLERR(.MHVCLNM)
...S ERR="Missing Institution/Division field in Hospital Location File (#44)"
...Q
Q
CHKLERR(MHVCLNM) ; Print messages in case of Institution or Division missing
D LOG^MHVUL2("INSTITUTION-DIVISION MISSING",$G(MHVCLNM),"S","ERROR")
I MHVC=0 D
.D BMES^XPDUTL(" *** Please check the following Secure Messaging Clinics that the")
.D MES^XPDUTL(" *** Institution field and Division field have valid values")
S MHVC=MHVC+1
D MES^XPDUTL(" "_$G(MHVCLNM))
Q
SCIEN(SCN) ;Get stop code IEN
N SCIEN
I SCN="" Q ""
S SCIEN=$O(^DIC(40.7,"C",SCN,0))
I $G(SCIEN)="" Q ""
Q SCIEN
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMHV1P11 10344 printed Nov 22, 2024@17:25:32 Page 2
MHV1P11 ;KUM - My HealtheVet Install Utility Routine ; [1/15/13 15:01pm]
+1 ;;1.0;My HealtheVet;**11**;Aug 23, 2005;Build 61
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;
+4 ; Integration Agreements:
+5 ; 10141 : BMES^XPDUTL
+6 ; : MES^XPDUTL
+7 ; 10018 : UPDATE^DIE
+8 ; 10103 : $$FMTH^XLFDT
+9 ; : $$HTFM^XLFDT
+10 ; : $$NOW^XLFDT
+11 ;
ENV ;
+1 QUIT
+2 ;
PRE ; Pre-init routine
+1 ; Turn on MHV Application Logging, add a log entry for the start
+2 ; of the patch install.
+3 DO LOGON
+4 DO LOG^MHVUL2(XPDNM,"PRE-INIT","S","TRACE")
+5 SET ERR=""
+6 SET MHVC=0
+7 DO LOG^MHVUL2("CHECK","INSTITUTION","S","TRACE")
+8 DO CHKHLOC(.ERR)
+9 IF ERR'=""
Begin DoDot:1
+10 DO LOG^MHVUL2("CHECK INSTITUTION",ERR,"S","ERROR")
+11 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+12 DO MES^XPDUTL(" Please log a remedy ticket to check INSTITUTION and DIVISION in Hospital Location File.")
+13 DO BMES^XPDUTL(" This install will now abort. Only attempt to re-install when ")
+14 DO MES^XPDUTL(" corrective action has been taken.")
+15 SET XPDABORT=2
+16 QUIT
End DoDot:1
+17 DO LOG^MHVUL2(XPDNM,"PRE-INIT END","S","TRACE")
+18 QUIT
+19 ;
POST ; Post-init routine
+1 NEW ERR
+2 DO LOG^MHVUL2(XPDNM,"POST-INIT BEGIN","S","TRACE")
+3 ;
+4 DO QRYDSS
+5 DO QRYPROC
+6 DO QRYECLS
+7 DO QRYPPRB
+8 DO QRYDIAG
+9 DO QRYFILE
+10 DO RSPQ13
+11 DO RSPQ11
+12 DO RSPP03
+13 ;
+14 DO LOG^MHVUL2(XPDNM,"POST-INIT END","S","TRACE")
+15 DO LOGOFF
+16 DO RESET^MHVUL2
+17 QUIT
+18 ;
LOGON ; Turn on MHV application logging
+1 NEW UPDATE,SUCCESS
+2 DO BMES^XPDUTL(" Turning on MHV Application Logging")
+3 SET UPDATE("STATE")=1
+4 SET UPDATE("DELETE")=$$HTFM^XLFDT($HOROLOG+60)
+5 SET UPDATE("LEVEL")="DEBUG"
+6 DO LOGSET^MHVUL1(.SUCCESS,.UPDATE)
+7 QUIT
+8 ;
LOGOFF ; Turn off MHV application logging
+1 NEW SUCCESS
+2 DO BMES^XPDUTL(" Turning off MHV Application Logging")
+3 DO LOGOFF^MHVUL1(.SUCCESS)
+4 QUIT
+5 ;
QRYDSS ; Setup for DSS Units query
+1 ; Setup MHV REQUEST TYPE
+2 ;
+3 DO BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMDSSUNITS ")
+4 NEW FIELDS,ERR
+5 SET ERR=""
+6 SET FIELDS("REQUEST TYPE")="SMDSSUNITS"
+7 SET FIELDS("NUMBER")=44
+8 SET FIELDS("BLOCK")=0
+9 SET FIELDS("REALTIME")=1
+10 SET FIELDS("DATATYPE")="SMDSSUnitsByProviderAndClinic"
+11 SET FIELDS("EXECUTE")="SPDSS~MHVXWLC"
+12 SET FIELDS("BUILDER")="MHV7B1K"
+13 SET FIELDS("DESCRIPTION",1)="QBP^Q13 query for DSS Units information."
+14 SET FIELDS("DESCRIPTION",2)="Specify Provider DUZ and Associated Clinic."
+15 SET FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
+16 DO LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
+17 DO UPDREQ^MHVU2(.FIELDS,1,.ERR)
+18 IF ERR'=""
Begin DoDot:1
+19 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+20 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+21 DO MES^XPDUTL(" Please log a remedy ticket.")
+22 QUIT
End DoDot:1
+23 ;
QRYPROC ; Setup for ECS Procedures query
+1 ; Setup MHV REQUEST TYPE
+2 ;
+3 DO BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMECSPROCS ")
+4 NEW FIELDS,ERR
+5 SET ERR=""
+6 SET FIELDS("REQUEST TYPE")="SMECSPROCS"
+7 SET FIELDS("NUMBER")=45
+8 SET FIELDS("BLOCK")=0
+9 SET FIELDS("REALTIME")=1
+10 SET FIELDS("DATATYPE")="SMECSProcedures"
+11 SET FIELDS("EXECUTE")="SPECS~MHVXWLC"
+12 SET FIELDS("BUILDER")="MHV7B1L"
+13 SET FIELDS("DESCRIPTION",1)="QBP^Q13 query for ECS Procedures information."
+14 SET FIELDS("DESCRIPTION",2)="Specify DSS Unit IEN and Location IEN."
+15 SET FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
+16 DO LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
+17 DO UPDREQ^MHVU2(.FIELDS,1,.ERR)
+18 IF ERR'=""
Begin DoDot:1
+19 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+20 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+21 DO MES^XPDUTL(" Please log a remedy ticket.")
+22 QUIT
End DoDot:1
+23 ;
QRYECLS ; Setup for Patient Eligibility and Classificaiton query
+1 ; Setup MHV REQUEST TYPE
+2 ;
+3 DO BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMPATIENTECLASS ")
+4 NEW FIELDS,ERR
+5 SET ERR=""
+6 SET FIELDS("REQUEST TYPE")="SMPATIENTECLASS"
+7 SET FIELDS("NUMBER")=46
+8 SET FIELDS("BLOCK")=0
+9 SET FIELDS("REALTIME")=1
+10 SET FIELDS("DATATYPE")="SMPatientEClass"
+11 SET FIELDS("EXECUTE")="PECLASS~MHVXWLC"
+12 SET FIELDS("BUILDER")="ZEL~MHV7B1M"
+13 SET FIELDS("DESCRIPTION",1)="QBP^Q11 query for Patient Eligibility and Classificaiton."
+14 SET FIELDS("DESCRIPTION",2)="Specify Patient ICN and DSS Unit IEN."
+15 SET FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
+16 DO LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
+17 DO UPDREQ^MHVU2(.FIELDS,1,.ERR)
+18 IF ERR'=""
Begin DoDot:1
+19 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+20 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+21 DO MES^XPDUTL(" Please log a remedy ticket.")
+22 QUIT
End DoDot:1
+23 ;
QRYPPRB ; Setup for Patient Problems query
+1 ; Setup MHV REQUEST TYPE
+2 ;
+3 DO BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMPATIENTPROBLEMS ")
+4 NEW FIELDS,ERR
+5 SET ERR=""
+6 SET FIELDS("REQUEST TYPE")="SMPATIENTPROBLEMS"
+7 SET FIELDS("NUMBER")=47
+8 SET FIELDS("BLOCK")=0
+9 SET FIELDS("REALTIME")=1
+10 SET FIELDS("DATATYPE")="SMPatientProblems"
+11 SET FIELDS("EXECUTE")="SMPPRB~MHVXWLC"
+12 SET FIELDS("BUILDER")="DG1~MHV7B1N"
+13 SET FIELDS("DESCRIPTION",1)="QBP^Q11 query for Patient Problems."
+14 SET FIELDS("DESCRIPTION",2)="Specify Patient ICN and DSS Unit IEN."
+15 SET FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
+16 DO LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
+17 DO UPDREQ^MHVU2(.FIELDS,1,.ERR)
+18 IF ERR'=""
Begin DoDot:1
+19 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+20 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+21 DO MES^XPDUTL(" Please log a remedy ticket.")
+22 QUIT
End DoDot:1
+23 ;
QRYDIAG ; Setup for Diagnoses query
+1 ; Setup MHV REQUEST TYPE
+2 ;
+3 DO BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMDIAGNOSES ")
+4 NEW FIELDS,ERR
+5 SET ERR=""
+6 SET FIELDS("REQUEST TYPE")="SMDIAGNOSES"
+7 SET FIELDS("NUMBER")=48
+8 SET FIELDS("BLOCK")=0
+9 SET FIELDS("REALTIME")=1
+10 SET FIELDS("DATATYPE")="SMDiagnoses"
+11 SET FIELDS("EXECUTE")="SMDIAG~MHVXWLC"
+12 SET FIELDS("BUILDER")="DG1~MHV7B1O"
+13 SET FIELDS("DESCRIPTION",1)="QBP^Q11 query for Diagnoses information."
+14 SET FIELDS("DESCRIPTION",2)="Specify Search String."
+15 SET FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
+16 DO LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
+17 DO UPDREQ^MHVU2(.FIELDS,1,.ERR)
+18 IF ERR'=""
Begin DoDot:1
+19 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+20 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+21 DO MES^XPDUTL(" Please log a remedy ticket.")
+22 QUIT
End DoDot:1
+23 ;
QRYFILE ; Setup for Workload Credit Filer
+1 ; Setup MHV REQUEST TYPE
+2 ;
+3 DO BMES^XPDUTL(" Creating Entry in MHV REQUEST TYPE File - SMFILER ")
+4 NEW FIELDS,ERR
+5 SET ERR=""
+6 SET FIELDS("REQUEST TYPE")="SMFILER"
+7 SET FIELDS("NUMBER")=49
+8 SET FIELDS("BLOCK")=0
+9 SET FIELDS("REALTIME")=1
+10 SET FIELDS("DATATYPE")="SMFiler"
+11 SET FIELDS("EXECUTE")="SMFILE~MHVXWLC"
+12 SET FIELDS("BUILDER")="ERR~MHV7B1P"
+13 SET FIELDS("DESCRIPTION",1)="DFT^P03 query for WLC Filer."
+14 SET FIELDS("DESCRIPTION",2)="Specify String with all data required for WLC Filer."
+15 SET FIELDS("DESCRIPTION",3)="Developed for Secure Messaging."
+16 DO LOG^MHVUL2("UPDATE REQUEST TYPE",.FIELDS,"M","DEBUG")
+17 DO UPDREQ^MHVU2(.FIELDS,1,.ERR)
+18 IF ERR'=""
Begin DoDot:1
+19 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+20 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+21 DO MES^XPDUTL(" Please log a remedy ticket.")
+22 QUIT
End DoDot:1
+23 ;
RSPQ13 ; Set up RESPONSE MAP FOR SMDSSUNITS, SMECSPROCS
+1 DO BMES^XPDUTL(" Creating Entry in MHV RESPONSE MAP - MHVSM QBP-Q13 Subscriber ")
+2 NEW FLDS,ERR
+3 KILL FLDS
+4 SET ERR=""
+5 SET FLDS("SUBSCRIBER")="MHVSM QBP-Q13 Subscriber"
+6 SET FLDS("PROTOCOL")="MHVSM RTB-K13 Event Driver"
+7 SET FLDS("BUILDER")="RTBK13~MHV7B1"
+8 SET FLDS("SEGMENT")="RDT"
+9 DO LOG^MHVUL2("UPDATE RESPONSE MAP",.FLDS,"M","DEBUG")
+10 DO UPDMAP^MHVU2(.FLDS,1,.ERR)
+11 IF ERR'=""
Begin DoDot:1
+12 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+13 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+14 DO MES^XPDUTL(" Please log a remedy ticket.")
+15 QUIT
End DoDot:1
+16 QUIT
+17 ;
RSPQ11 ; Set up RESPONSE MAP FOR SMPATIENTECLASS, SMPATIENTPROBLEMS, SMDIAGNOSES
+1 DO BMES^XPDUTL(" Creating Entry in MHV RESPONSE MAP - MHVSM QBP-Q11 Subscriber ")
+2 NEW FLDS,ERR
+3 KILL FLDS
+4 SET ERR=""
+5 SET FLDS("SUBSCRIBER")="MHVSM QBP-Q11 Subscriber"
+6 SET FLDS("PROTOCOL")="MHVSM RSP-K11 Event Driver"
+7 SET FLDS("BUILDER")="RSPK11~MHV7B9"
+8 SET FLDS("SEGMENT")="PID"
+9 DO LOG^MHVUL2("UPDATE RESPONSE MAP",.FLDS,"M","DEBUG")
+10 DO UPDMAP^MHVU2(.FLDS,1,.ERR)
+11 IF ERR'=""
Begin DoDot:1
+12 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+13 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+14 DO MES^XPDUTL(" Please log a remedy ticket.")
+15 QUIT
End DoDot:1
+16 QUIT
+17 ;
RSPP03 ; Set up RESPONSE MAP FOR SMFILER
+1 DO BMES^XPDUTL(" Creating Entry in MHV RESPONSE MAP - MHVSM DFT-P03 Subscriber ")
+2 NEW FLDS,ERR
+3 KILL FLDS
+4 SET ERR=""
+5 SET FLDS("SUBSCRIBER")="MHVSM DFT-P03 Subscriber"
+6 SET FLDS("PROTOCOL")="MHVSM ACK-P03 Event Driver"
+7 SET FLDS("BUILDER")="ACKP03~MHV7B10"
+8 SET FLDS("SEGMENT")="ERR"
+9 DO LOG^MHVUL2("UPDATE RESPONSE MAP",.FLDS,"M","DEBUG")
+10 DO UPDMAP^MHVU2(.FLDS,1,.ERR)
+11 IF ERR'=""
Begin DoDot:1
+12 DO LOG^MHVUL2("UPDATE FAILED",ERR,"S","ERROR")
+13 DO BMES^XPDUTL(" *** An Error occurred during installation.")
+14 DO MES^XPDUTL(" Please log a remedy ticket.")
+15 QUIT
End DoDot:1
+16 QUIT
+17 ;
CHKHLOC(ERR) ; Check Institution in Hospital Location File (#44)
+1 NEW MHVCSIEN,MHVCLIEN,MHVINST,MHVDIVN
+2 SET MHVCSIEN=$$SCIEN(719)
+3 IF $GET(MHVCSIEN)=""
SET ERR="MHV SECURE MESSAGING Stop Code is not found in STOP CODE File"
QUIT
+4 SET MHVCLIEN=0
+5 FOR
SET MHVCLIEN=$ORDER(^SC("ACST",MHVCSIEN,MHVCLIEN))
if 'MHVCLIEN
QUIT
Begin DoDot:1
+6 SET MHVCLNM=$$GET1^DIQ(44,+MHVCLIEN,.01,"I")
+7 IF ($GET(MHVCLNM)'="")&($$UP^XLFSTR($EXTRACT(MHVCLNM,1,2))'="ZZ")
Begin DoDot:2
+8 SET MHVINST=$$GET1^DIQ(44,+MHVCLIEN,3,"E")
+9 SET MHVDIVN=$$GET1^DIQ(44,+MHVCLIEN,3.5,"E")
+10 IF ($GET(MHVINST)="")!($GET(MHVDIVN)="")
Begin DoDot:3
+11 DO CHKLERR(.MHVCLNM)
+12 SET ERR="Missing Institution/Division field in Hospital Location File (#44)"
+13 QUIT
End DoDot:3
End DoDot:2
End DoDot:1
+14 QUIT
CHKLERR(MHVCLNM) ; Print messages in case of Institution or Division missing
+1 DO LOG^MHVUL2("INSTITUTION-DIVISION MISSING",$GET(MHVCLNM),"S","ERROR")
+2 IF MHVC=0
Begin DoDot:1
+3 DO BMES^XPDUTL(" *** Please check the following Secure Messaging Clinics that the")
+4 DO MES^XPDUTL(" *** Institution field and Division field have valid values")
End DoDot:1
+5 SET MHVC=MHVC+1
+6 DO MES^XPDUTL(" "_$GET(MHVCLNM))
+7 QUIT
SCIEN(SCN) ;Get stop code IEN
+1 NEW SCIEN
+2 IF SCN=""
QUIT ""
+3 SET SCIEN=$ORDER(^DIC(40.7,"C",SCN,0))
+4 IF $GET(SCIEN)=""
QUIT ""
+5 QUIT SCIEN
+6 ;