PSO736PO ;BIR/KML - Patch 736 Post Install routine ;8/28/23
;;7.0;OUTPATIENT PHARMACY;**736**;DEC 1997;Build 19
;
;External reference to HL LOGICAL LINK file (#870) supported by DBIA 6409
;
POST ; post installation to assign new domain, TCP/IP and port values for oneVA to VDIF
D SET
D MAIL
Q
;
SET ; edit and save the values in HL LOGICAL LINK file entry for PSORRXSEND according to environment type
N LIEN,VAL,FDA,ERR,TEXT,NOENTRY,PSSLINE,PSOLINK,PSOSERV,PSOPORT
;
K ^TMP("PSO736PO",$J)
S PSOLINK=$$FIND1^DIC(870,,,"PSORRXSEND")
S (PSOLDPRT,PSOLDNS,PSOLDNS)=""
I PSOLINK>0 D SETORIG(PSOLINK)
S VAL="PSORRXSEND",NOENTRY=0,PSSLINE=0,LIEN=0
S LIEN=$$FIND1^DIC(870,,"B",.VAL)
I 'LIEN S NOENTRY=1 D ERROR Q
;
S PSOSERV=$S($$PROD^XUPROD:"hc-vdif-ent-a.domain.ext",1:"")
S PSOPORT=$S($$PROD^XUPROD:"6230",1:"")
;
S FDA(870,LIEN_",",.08)=PSOSERV
S FDA(870,LIEN_",",400.01)=PSOSERV
S FDA(870,LIEN_",",400.02)=PSOPORT
D FILE^DIE("K","FDA","ERR")
I $D(ERR("DIERR",1,"TEXT",1)) D ERROR Q
S TEXT="The TCP/IP, Port, and Domain of the HL LOGICAL LINK entry, PSORRXSEND, has been successfully updated."
D BMES^XPDUTL(TEXT),SETTXT(TEXT)
Q
;
SETORIG(PSOLNK) ; create ^XTMP("PSO736RR") in case of data rollback
N DIE,DR,DIC,DA,X,Y,PSOLDPRT,PSOLDNS,PSOLDIP
K ^XTMP("PSO736RR")
S PSOLDPRT=$$GET1^DIQ(870,+PSOLNK,400.02)
S PSOLDNS=$$GET1^DIQ(870,+PSOLNK,.08)
S PSOLDIP=$$GET1^DIQ(870,+PSOLNK,400.01)
S ^XTMP("PSO736RR",0)=$$FMADD^XLFDT($$DT^XLFDT(),90)_"^"_$$DT^XLFDT()_"^"_"TCP/IP ADDRESS, TCP/IP PORT, AND DNS DOMAIN BACKUP FOR PSO*7*736"
S ^XTMP("PSO736RR","PSOLDPRT")=PSOLDPRT
S ^XTMP("PSO736RR","PSOLDNS")=PSOLDNS
S ^XTMP("PSO736RR","PSOLDIP")=PSOLDIP
Q
;
ERROR ; an error condition needs to be reported
S TEXT="The HL LOGICAL LINK entry PSORRXSEND was not updated due to the following error condition:"
D BMES^XPDUTL(TEXT),SETTXT(TEXT)
S TEXT=$S($G(ERR("DIERR",1,"TEXT",1))]"":$G(ERR("DIERR",1,"TEXT",1)),NOENTRY:"PSORRXSEND entry not found",1:"No error text available.")
D BMES^XPDUTL(TEXT),SETTXT(TEXT)
S TEXT="Submit a ServiceNow ticket requesting assistance in researching the error."
D BMES^XPDUTL(TEXT),SETTXT(TEXT)
Q
;
MAIL ; Sends Mailman message
N XMSUB,XMDUZ,XMTEXT,XMY,DIFROM
D BMES^XPDUTL("Sending Mailman Message with update...")
S XMY(DUZ)="",XMSUB="PSO*7*736 Post-Install Complete"
S XMDUZ="PSO*7*736 Install",XMTEXT="^TMP(""PSO736PO"",$J,"
D ^XMD
Q
;
SETTXT(TXT) ; Setting Plain Text
S PSSLINE=PSSLINE+1,^TMP("PSO736PO",$J,PSSLINE)=TXT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSO736PO 2563 printed Nov 22, 2024@17:33:33 Page 2
PSO736PO ;BIR/KML - Patch 736 Post Install routine ;8/28/23
+1 ;;7.0;OUTPATIENT PHARMACY;**736**;DEC 1997;Build 19
+2 ;
+3 ;External reference to HL LOGICAL LINK file (#870) supported by DBIA 6409
+4 ;
POST ; post installation to assign new domain, TCP/IP and port values for oneVA to VDIF
+1 DO SET
+2 DO MAIL
+3 QUIT
+4 ;
SET ; edit and save the values in HL LOGICAL LINK file entry for PSORRXSEND according to environment type
+1 NEW LIEN,VAL,FDA,ERR,TEXT,NOENTRY,PSSLINE,PSOLINK,PSOSERV,PSOPORT
+2 ;
+3 KILL ^TMP("PSO736PO",$JOB)
+4 SET PSOLINK=$$FIND1^DIC(870,,,"PSORRXSEND")
+5 SET (PSOLDPRT,PSOLDNS,PSOLDNS)=""
+6 IF PSOLINK>0
DO SETORIG(PSOLINK)
+7 SET VAL="PSORRXSEND"
SET NOENTRY=0
SET PSSLINE=0
SET LIEN=0
+8 SET LIEN=$$FIND1^DIC(870,,"B",.VAL)
+9 IF 'LIEN
SET NOENTRY=1
DO ERROR
QUIT
+10 ;
+11 SET PSOSERV=$SELECT($$PROD^XUPROD:"hc-vdif-ent-a.domain.ext",1:"")
+12 SET PSOPORT=$SELECT($$PROD^XUPROD:"6230",1:"")
+13 ;
+14 SET FDA(870,LIEN_",",.08)=PSOSERV
+15 SET FDA(870,LIEN_",",400.01)=PSOSERV
+16 SET FDA(870,LIEN_",",400.02)=PSOPORT
+17 DO FILE^DIE("K","FDA","ERR")
+18 IF $DATA(ERR("DIERR",1,"TEXT",1))
DO ERROR
QUIT
+19 SET TEXT="The TCP/IP, Port, and Domain of the HL LOGICAL LINK entry, PSORRXSEND, has been successfully updated."
+20 DO BMES^XPDUTL(TEXT)
DO SETTXT(TEXT)
+21 QUIT
+22 ;
SETORIG(PSOLNK) ; create ^XTMP("PSO736RR") in case of data rollback
+1 NEW DIE,DR,DIC,DA,X,Y,PSOLDPRT,PSOLDNS,PSOLDIP
+2 KILL ^XTMP("PSO736RR")
+3 SET PSOLDPRT=$$GET1^DIQ(870,+PSOLNK,400.02)
+4 SET PSOLDNS=$$GET1^DIQ(870,+PSOLNK,.08)
+5 SET PSOLDIP=$$GET1^DIQ(870,+PSOLNK,400.01)
+6 SET ^XTMP("PSO736RR",0)=$$FMADD^XLFDT($$DT^XLFDT(),90)_"^"_$$DT^XLFDT()_"^"_"TCP/IP ADDRESS, TCP/IP PORT, AND DNS DOMAIN BACKUP FOR PSO*7*736"
+7 SET ^XTMP("PSO736RR","PSOLDPRT")=PSOLDPRT
+8 SET ^XTMP("PSO736RR","PSOLDNS")=PSOLDNS
+9 SET ^XTMP("PSO736RR","PSOLDIP")=PSOLDIP
+10 QUIT
+11 ;
ERROR ; an error condition needs to be reported
+1 SET TEXT="The HL LOGICAL LINK entry PSORRXSEND was not updated due to the following error condition:"
+2 DO BMES^XPDUTL(TEXT)
DO SETTXT(TEXT)
+3 SET TEXT=$SELECT($GET(ERR("DIERR",1,"TEXT",1))]"":$GET(ERR("DIERR",1,"TEXT",1)),NOENTRY:"PSORRXSEND entry not found",1:"No error text available.")
+4 DO BMES^XPDUTL(TEXT)
DO SETTXT(TEXT)
+5 SET TEXT="Submit a ServiceNow ticket requesting assistance in researching the error."
+6 DO BMES^XPDUTL(TEXT)
DO SETTXT(TEXT)
+7 QUIT
+8 ;
MAIL ; Sends Mailman message
+1 NEW XMSUB,XMDUZ,XMTEXT,XMY,DIFROM
+2 DO BMES^XPDUTL("Sending Mailman Message with update...")
+3 SET XMY(DUZ)=""
SET XMSUB="PSO*7*736 Post-Install Complete"
+4 SET XMDUZ="PSO*7*736 Install"
SET XMTEXT="^TMP(""PSO736PO"",$J,"
+5 DO ^XMD
+6 QUIT
+7 ;
SETTXT(TXT) ; Setting Plain Text
+1 SET PSSLINE=PSSLINE+1
SET ^TMP("PSO736PO",$JOB,PSSLINE)=TXT
+2 QUIT