ACKQP17 ;ST/BP-OIFO Post Install routine for ACKQ*3*17 ; 9/23/09 6:37am
;;3.0;QUASAR;**17**;Sept. 26, 2007;Build 28
;
;This is the Post install for ACKQ*3*17
;Data migration of file 509850.3 and Mailman message displaying after
; data in file.
;
Q
POST ;Repoint (POST INSTALL ACKQ*3*17)
N ACKQA,DA,DIE,DR,MSG,MCNT,NPIEN,NPNAM,XMDUZ,XMSUB,XMTEXT,USRPT,MASK,ERR
S MCNT=1,MASK=" "
S ACKQA=0,DIE="^ACK(509850.3,"
;Quit if this patch has been previously installed.
I $$PATCH^XPDUTL("ACKQ*3.0*17") D Q
. S XMSUB="ACKQ*3.0*17 Installed Without Data Migration."
. F S ACKQA=$O(^ACK(509850.3,ACKQA)) Q:'ACKQA I $$GET1^DIQ(509850.3,ACKQA,.06,"I") S:$$GET1^DIQ(509850.3,ACKQA,.07,"I") XMY($$GET1^DIQ(509850.3,ACKQA,.07,"I"))=""
. S XMY(DUZ)=""
. S MSG(MCNT)="Patch ACKQ*3.0*17 was previously installed, the data migration",MCNT=MCNT+1
. S MSG(MCNT)="has been skipped on the previously rebuilt file #509850.3",MCNT=MCNT+1
. S XMDUZ="QUASAR",XMSUB="ACKQ*3.0*17 Post Install Message.",XMTEXT="MSG("
. N DIFROM D ^XMD
S MSG(MCNT)="This is a list of data in the A&SP Staff File after installation",MCNT=MCNT+1
S MSG(MCNT)=" of ACKQ*3*17. Be sure to double check this data is correct before running",MCNT=MCNT+1
S MSG(MCNT)=" any ACKQ Menu options.",MCNT=MCNT+1
S MSG(MCNT)="File 200 IEN & NAME File 509850.3 IEN",MCNT=MCNT+1
F S ACKQA=$O(^ACK(509850.3,ACKQA)) Q:'ACKQA D
. S USRPT=$$GET1^DIQ(509850.3,ACKQA,.01,"I"),NPIEN=$$GET1^DIQ(8930.3,$G(USRPT),.01,"I"),NPNAM=$$GET1^DIQ(200,NPIEN,.01,"E")
. I (NPNAM="")!('NPIEN) S ERR(MCNT)="Bad entry at ^ACK(509850.3,"_ACKQA_" Please review." Q
. I $$GET1^DIQ(509850.3,ACKQA,.06,"I") S XMY(NPIEN)=""
. S MSG(MCNT)=NPIEN_$E(MASK,1,12-$L(NPIEN))_NPNAM_$E(MASK,1,35-$L(NPNAM))_ACKQA_$E(MASK,1,12-$L(ACKQA)),MCNT=MCNT+1
. S DA=ACKQA,DR=".01////"_NPNAM_";.07////"_NPIEN
. D ^DIE
S DIK="^ACK(509850.3," D IXALL^DIK ;reindex.
D DELIX^DDMOD(509850.3,.01,2,"") K ^ACK(509850.3,"D") ; Remove "D" X-ref.
;Tack known ERROR data on at end of mail msg.
S CNT=0 F S CNT=$O(ERR(CNT)) Q:'CNT S MSG(MCNT)=ERR(CNT),MCNT=MCNT+1
S XMDUZ="QUASAR",XMSUB="VERIFY A&SP STAFF DATA (POST INSTALL)",XMTEXT="MSG("
N DIFROM D ^XMD
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HACKQP17 2297 printed Dec 13, 2024@02:32:21 Page 2
ACKQP17 ;ST/BP-OIFO Post Install routine for ACKQ*3*17 ; 9/23/09 6:37am
+1 ;;3.0;QUASAR;**17**;Sept. 26, 2007;Build 28
+2 ;
+3 ;This is the Post install for ACKQ*3*17
+4 ;Data migration of file 509850.3 and Mailman message displaying after
+5 ; data in file.
+6 ;
+7 QUIT
POST ;Repoint (POST INSTALL ACKQ*3*17)
+1 NEW ACKQA,DA,DIE,DR,MSG,MCNT,NPIEN,NPNAM,XMDUZ,XMSUB,XMTEXT,USRPT,MASK,ERR
+2 SET MCNT=1
SET MASK=" "
+3 SET ACKQA=0
SET DIE="^ACK(509850.3,"
+4 ;Quit if this patch has been previously installed.
+5 IF $$PATCH^XPDUTL("ACKQ*3.0*17")
Begin DoDot:1
+6 SET XMSUB="ACKQ*3.0*17 Installed Without Data Migration."
+7 FOR
SET ACKQA=$ORDER(^ACK(509850.3,ACKQA))
if 'ACKQA
QUIT
IF $$GET1^DIQ(509850.3,ACKQA,.06,"I")
if $$GET1^DIQ(509850.3,ACKQA,.07,"I")
SET XMY($$GET1^DIQ(509850.3,ACKQA,.07,"I"))=""
+8 SET XMY(DUZ)=""
+9 SET MSG(MCNT)="Patch ACKQ*3.0*17 was previously installed, the data migration"
SET MCNT=MCNT+1
+10 SET MSG(MCNT)="has been skipped on the previously rebuilt file #509850.3"
SET MCNT=MCNT+1
+11 SET XMDUZ="QUASAR"
SET XMSUB="ACKQ*3.0*17 Post Install Message."
SET XMTEXT="MSG("
+12 NEW DIFROM
DO ^XMD
End DoDot:1
QUIT
+13 SET MSG(MCNT)="This is a list of data in the A&SP Staff File after installation"
SET MCNT=MCNT+1
+14 SET MSG(MCNT)=" of ACKQ*3*17. Be sure to double check this data is correct before running"
SET MCNT=MCNT+1
+15 SET MSG(MCNT)=" any ACKQ Menu options."
SET MCNT=MCNT+1
+16 SET MSG(MCNT)="File 200 IEN & NAME File 509850.3 IEN"
SET MCNT=MCNT+1
+17 FOR
SET ACKQA=$ORDER(^ACK(509850.3,ACKQA))
if 'ACKQA
QUIT
Begin DoDot:1
+18 SET USRPT=$$GET1^DIQ(509850.3,ACKQA,.01,"I")
SET NPIEN=$$GET1^DIQ(8930.3,$GET(USRPT),.01,"I")
SET NPNAM=$$GET1^DIQ(200,NPIEN,.01,"E")
+19 IF (NPNAM="")!('NPIEN)
SET ERR(MCNT)="Bad entry at ^ACK(509850.3,"_ACKQA_" Please review."
QUIT
+20 IF $$GET1^DIQ(509850.3,ACKQA,.06,"I")
SET XMY(NPIEN)=""
+21 SET MSG(MCNT)=NPIEN_$EXTRACT(MASK,1,12-$LENGTH(NPIEN))_NPNAM_$EXTRACT(MASK,1,35-$LENGTH(NPNAM))_ACKQA_$EXTRACT(MASK,1,12-$LENGTH(ACKQA))
SET MCNT=MCNT+1
+22 SET DA=ACKQA
SET DR=".01////"_NPNAM_";.07////"_NPIEN
+23 DO ^DIE
End DoDot:1
+24 ;reindex.
SET DIK="^ACK(509850.3,"
DO IXALL^DIK
+25 ; Remove "D" X-ref.
DO DELIX^DDMOD(509850.3,.01,2,"")
KILL ^ACK(509850.3,"D")
+26 ;Tack known ERROR data on at end of mail msg.
+27 SET CNT=0
FOR
SET CNT=$ORDER(ERR(CNT))
if 'CNT
QUIT
SET MSG(MCNT)=ERR(CNT)
SET MCNT=MCNT+1
+28 SET XMDUZ="QUASAR"
SET XMSUB="VERIFY A&SP STAFF DATA (POST INSTALL)"
SET XMTEXT="MSG("
+29 NEW DIFROM
DO ^XMD
+30 QUIT
+31 ;