PSU23PI ;BIR/MFR - Post-Install to update the HL LOGICAL LINK file w/ correct DNS DOMAIN ;30 OCT 2017
;;4.0;PHARMACY BENEFITS MANAGEMENT;**23**;MAR 2005;Build 3
;
EN ; - Entry Point
N HLDNS,HLIEN,DIE,DA,DR,X,Y,FOUND,LIST,LSTIDX
S HLDNS="" F S HLDNS=$O(^HLCS(870,"DNS",HLDNS)) Q:(HLDNS="") D
. I $$UP^XLFSTR(HLDNS)'="CMOP-NAT.DOMAIN.EXT" Q
. S HLIEN=0 F S HLIEN=$O(^HLCS(870,"DNS",HLDNS,HLIEN)) Q:'HLIEN D
. . D BMES^XPDUTL("Updating DNS DOMAIN field (#.08) for the HL LOGICAL LINK entry '"_$$GET1^DIQ(870,HLIEN,.01)_"'")
. . S LSTIDX=$G(LSTIDX)+1,LIST(LSTIDX)=$E($$GET1^DIQ(870,HLIEN,.01),1,25)_"^"_HLDNS
. . S DIE="^HLCS(870,",DA=HLIEN,DR=".08///HL7.CMOP-NAT.DOMAIN.EXT" D ^DIE
. . S $P(LIST(LSTIDX),"^",3)=$$GET1^DIQ(870,HLIEN,.08)
. . D BMES^XPDUTL("Done!") S FOUND=1
I '$G(FOUND) D
. D BMES^XPDUTL("No records found in the HL LOGICAL LINK file (#870) with the DNS DOMAIN field set to 'CMOP-NAT.DOMAIN.EXT'. No updates performed.")
;
; Sends Mailman message about update or no update
N XMX,PSOTEXT,XMSUB,XMDUZ,XMTEXT,I
S XMDUZ=.5,XMY(DUZ)=DUZ,XMY("G.PSU PBM")=""
S XMSUB="PSU*4*23 DNS DOMAIN CMOP-NAT.DOMAIN.EXT Update"
I $G(FOUND) D
. S PSOTEXT(1)="The post-install routine performed the following updates:"
. S PSOTEXT(2)=""
. S PSOTEXT(3)="HL LOGICAL LINK DNS DOMAIN (Before Patch) DNS DOMAIN (After Patch)"
. S PSOTEXT(4)="------------------------ -------------------------- -------------------------"
. F I=1:1 Q:'$D(LIST(I)) S PSOTEXT(4+I)=$P(LIST(I),"^"),$E(PSOTEXT(4+I),26)=$P(LIST(I),"^",2),$E(PSOTEXT(4+I),55)=$P(LIST(I),"^",3)
E D
. S PSOTEXT(1)="The post-install routine found no records in the HL LOGICAL LINK file (#870)"
. S PSOTEXT(2)="with the DNS DOMAIN field (#.08) set to 'CMOP-NAT.DOMAIN.EXT'."
. S PSOTEXT(3)="No updates performed."
S XMTEXT="PSOTEXT(" N DIFROM D ^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSU23PI 1878 printed Sep 02, 2024@19:12:35 Page 2
PSU23PI ;BIR/MFR - Post-Install to update the HL LOGICAL LINK file w/ correct DNS DOMAIN ;30 OCT 2017
+1 ;;4.0;PHARMACY BENEFITS MANAGEMENT;**23**;MAR 2005;Build 3
+2 ;
EN ; - Entry Point
+1 NEW HLDNS,HLIEN,DIE,DA,DR,X,Y,FOUND,LIST,LSTIDX
+2 SET HLDNS=""
FOR
SET HLDNS=$ORDER(^HLCS(870,"DNS",HLDNS))
if (HLDNS="")
QUIT
Begin DoDot:1
+3 IF $$UP^XLFSTR(HLDNS)'="CMOP-NAT.DOMAIN.EXT"
QUIT
+4 SET HLIEN=0
FOR
SET HLIEN=$ORDER(^HLCS(870,"DNS",HLDNS,HLIEN))
if 'HLIEN
QUIT
Begin DoDot:2
+5 DO BMES^XPDUTL("Updating DNS DOMAIN field (#.08) for the HL LOGICAL LINK entry '"_$$GET1^DIQ(870,HLIEN,.01)_"'")
+6 SET LSTIDX=$GET(LSTIDX)+1
SET LIST(LSTIDX)=$EXTRACT($$GET1^DIQ(870,HLIEN,.01),1,25)_"^"_HLDNS
+7 SET DIE="^HLCS(870,"
SET DA=HLIEN
SET DR=".08///HL7.CMOP-NAT.DOMAIN.EXT"
DO ^DIE
+8 SET $PIECE(LIST(LSTIDX),"^",3)=$$GET1^DIQ(870,HLIEN,.08)
+9 DO BMES^XPDUTL("Done!")
SET FOUND=1
End DoDot:2
End DoDot:1
+10 IF '$GET(FOUND)
Begin DoDot:1
+11 DO BMES^XPDUTL("No records found in the HL LOGICAL LINK file (#870) with the DNS DOMAIN field set to 'CMOP-NAT.DOMAIN.EXT'. No updates performed.")
End DoDot:1
+12 ;
+13 ; Sends Mailman message about update or no update
+14 NEW XMX,PSOTEXT,XMSUB,XMDUZ,XMTEXT,I
+15 SET XMDUZ=.5
SET XMY(DUZ)=DUZ
SET XMY("G.PSU PBM")=""
+16 SET XMSUB="PSU*4*23 DNS DOMAIN CMOP-NAT.DOMAIN.EXT Update"
+17 IF $GET(FOUND)
Begin DoDot:1
+18 SET PSOTEXT(1)="The post-install routine performed the following updates:"
+19 SET PSOTEXT(2)=""
+20 SET PSOTEXT(3)="HL LOGICAL LINK DNS DOMAIN (Before Patch) DNS DOMAIN (After Patch)"
+21 SET PSOTEXT(4)="------------------------ -------------------------- -------------------------"
+22 FOR I=1:1
if '$DATA(LIST(I))
QUIT
SET PSOTEXT(4+I)=$PIECE(LIST(I),"^")
SET $EXTRACT(PSOTEXT(4+I),26)=$PIECE(LIST(I),"^",2)
SET $EXTRACT(PSOTEXT(4+I),55)=$PIECE(LIST(I),"^",3)
End DoDot:1
+23 IF '$TEST
Begin DoDot:1
+24 SET PSOTEXT(1)="The post-install routine found no records in the HL LOGICAL LINK file (#870)"
+25 SET PSOTEXT(2)="with the DNS DOMAIN field (#.08) set to 'CMOP-NAT.DOMAIN.EXT'."
+26 SET PSOTEXT(3)="No updates performed."
End DoDot:1
+27 SET XMTEXT="PSOTEXT("
NEW DIFROM
DO ^XMD
+28 QUIT