BPS10P17 ; ALB/hrubovcak - BPS*1.0*17 Post-Installation Processing ;Jun 06, 2014@19:13:53
;;1.0;E CLAIMS MGMT ENGINE;**17**; 15 May 2014;Build 99
;Per VA Directive 6402, this routine should not be modified.
;
; References to ^XPDMENU supported by DBIA 1157
Q
;
PRE ; pre-installation processing
;
Q
;
POST ; post-installation processing
D XREF ; cross-ref. file #9002313.57
Q
;
XREF ; Task job to cross-ref. #9002313.57
;
N ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
D MES^XPDUTL(" "),MES^XPDUTL(" "_$$FMTE^XLFDT($$NOW^XLFDT)) ; add blank line and date/time to log
D MES^XPDUTL("Queueing the BPS LOG OF TRANSACTIONS file (#9002313.57) cross-reference task.")
S ZTRTN="AECXREF^BPS10P17",ZTDESC="BPS LOG OF TRANSACTIONS file cross-ref.",ZTIO="",ZTDTH=$H
D ^%ZTLOAD
D MES^XPDUTL($S($G(ZTSK):"Task number "_ZTSK_" has been queued.",1:"Unable to queue this task."))
I $G(ZTSK) D MES^XPDUTL("A MailMan message will be sent on completion.")
;
Q
;
AECXREF ; set "AEC" cross-ref. for PRESCRIPTION NUMBER field (#1.11) in BPS LOG OF TRANSACTIONS file (#9002313.57)
; sends MailMan message on completion, this subroutine can be called manually
;
N BPSCNTR,BPSDA,BPTOTL,BPXMBODY,BPXMSUBJ,BPXMTO,BPXMZR,DA,DIK,X
; DA, DIK used for ^DIK call
; BPSDA - IEN in BPS LOG OF TRANSACTIONS
; BPSCNTR - count of cross-refs. set
; BPTOTL - count of entries checked
; BPXMSUBJ - message subject
; BPXMTO - array of MailMan message recipients
; BPXMZR - message number returned
;
; loop through BPS LOG OF TRANSACTIONS file (#9002313.57), find PRESCRIPTION NUMBER
S (BPSCNTR,BPTOTL)=0,BPSCNTR("BEG")=$$NOW^XLFDT
;
S BPSDA=$C(1) ; iterating backwards, set to value past numbers
F S BPSDA=$O(^BPSTL(BPSDA),-1) Q:'(BPSDA>0) D
.S BPTOTL=BPTOTL+1,X=$P($G(^BPSTL(BPSDA,1)),U,11) Q:X=""
.Q:$D(^BPSTL("AEC",X,BPSDA)) ; cross-ref. exists
.S DA=BPSDA,DIK="^BPSTL(",DIK(1)="1.11^AEC",BPSCNTR=BPSCNTR+1 D IX1^DIK
;
S BPSCNTR("END")=$$NOW^XLFDT
; create MailMan message text
S BPXMBODY(1,0)="Finished cross-reference of BPS LOG OF TRANSACTIONS file (#9002313.57)"
S BPXMBODY(2,0)="for the PRESCRIPTION NUMBER field (#1.11)"
S BPXMBODY(3,0)=" Total Entries examined: "_$FN(BPTOTL,",")
S BPXMBODY(4,0)=" Prescriptions cross-referenced: "_$FN(BPSCNTR,",")
S BPXMBODY(5,0)=" Work begun: "_$$FMTE^XLFDT(BPSCNTR("BEG"))
S BPXMBODY(6,0)=" Work ended: "_$$FMTE^XLFDT(BPSCNTR("END"))
S:$G(ZTSK) BPXMBODY(7,0)=" * Queued as Task #"_ZTSK_" *"
;
; send via MailMan
S BPXMSUBJ="Updated cross-reference of BPS LOG OF TRANSACTIONS"
S BPXMTO(.5)="",BPXMTO(DUZ)="" ; POSTMASTER and user who queued it
S BPXMTO("G.RCDPE PAYMENTS MGMT")=""
;
D SENDMSG^XMXAPI(DUZ,BPXMSUBJ,"BPXMBODY",.BPXMTO,,.BPXMZR) ; send message
I $G(BPXMZR),'$G(ZTSK),$E(IOST,1,2)="C-" D MES^XPDUTL("MailMan message number: "_BPXMZR)
;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HBPS10P17 2888 printed Dec 13, 2024@01:50:15 Page 2
BPS10P17 ; ALB/hrubovcak - BPS*1.0*17 Post-Installation Processing ;Jun 06, 2014@19:13:53
+1 ;;1.0;E CLAIMS MGMT ENGINE;**17**; 15 May 2014;Build 99
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; References to ^XPDMENU supported by DBIA 1157
+5 QUIT
+6 ;
PRE ; pre-installation processing
+1 ;
+2 QUIT
+3 ;
POST ; post-installation processing
+1 ; cross-ref. file #9002313.57
DO XREF
+2 QUIT
+3 ;
XREF ; Task job to cross-ref. #9002313.57
+1 ;
+2 NEW ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSK
+3 ; add blank line and date/time to log
DO MES^XPDUTL(" ")
DO MES^XPDUTL(" "_$$FMTE^XLFDT($$NOW^XLFDT))
+4 DO MES^XPDUTL("Queueing the BPS LOG OF TRANSACTIONS file (#9002313.57) cross-reference task.")
+5 SET ZTRTN="AECXREF^BPS10P17"
SET ZTDESC="BPS LOG OF TRANSACTIONS file cross-ref."
SET ZTIO=""
SET ZTDTH=$HOROLOG
+6 DO ^%ZTLOAD
+7 DO MES^XPDUTL($SELECT($GET(ZTSK):"Task number "_ZTSK_" has been queued.",1:"Unable to queue this task."))
+8 IF $GET(ZTSK)
DO MES^XPDUTL("A MailMan message will be sent on completion.")
+9 ;
+10 QUIT
+11 ;
AECXREF ; set "AEC" cross-ref. for PRESCRIPTION NUMBER field (#1.11) in BPS LOG OF TRANSACTIONS file (#9002313.57)
+1 ; sends MailMan message on completion, this subroutine can be called manually
+2 ;
+3 NEW BPSCNTR,BPSDA,BPTOTL,BPXMBODY,BPXMSUBJ,BPXMTO,BPXMZR,DA,DIK,X
+4 ; DA, DIK used for ^DIK call
+5 ; BPSDA - IEN in BPS LOG OF TRANSACTIONS
+6 ; BPSCNTR - count of cross-refs. set
+7 ; BPTOTL - count of entries checked
+8 ; BPXMSUBJ - message subject
+9 ; BPXMTO - array of MailMan message recipients
+10 ; BPXMZR - message number returned
+11 ;
+12 ; loop through BPS LOG OF TRANSACTIONS file (#9002313.57), find PRESCRIPTION NUMBER
+13 SET (BPSCNTR,BPTOTL)=0
SET BPSCNTR("BEG")=$$NOW^XLFDT
+14 ;
+15 ; iterating backwards, set to value past numbers
SET BPSDA=$CHAR(1)
+16 FOR
SET BPSDA=$ORDER(^BPSTL(BPSDA),-1)
if '(BPSDA>0)
QUIT
Begin DoDot:1
+17 SET BPTOTL=BPTOTL+1
SET X=$PIECE($GET(^BPSTL(BPSDA,1)),U,11)
if X=""
QUIT
+18 ; cross-ref. exists
if $DATA(^BPSTL("AEC",X,BPSDA))
QUIT
+19 SET DA=BPSDA
SET DIK="^BPSTL("
SET DIK(1)="1.11^AEC"
SET BPSCNTR=BPSCNTR+1
DO IX1^DIK
End DoDot:1
+20 ;
+21 SET BPSCNTR("END")=$$NOW^XLFDT
+22 ; create MailMan message text
+23 SET BPXMBODY(1,0)="Finished cross-reference of BPS LOG OF TRANSACTIONS file (#9002313.57)"
+24 SET BPXMBODY(2,0)="for the PRESCRIPTION NUMBER field (#1.11)"
+25 SET BPXMBODY(3,0)=" Total Entries examined: "_$FNUMBER(BPTOTL,",")
+26 SET BPXMBODY(4,0)=" Prescriptions cross-referenced: "_$FNUMBER(BPSCNTR,",")
+27 SET BPXMBODY(5,0)=" Work begun: "_$$FMTE^XLFDT(BPSCNTR("BEG"))
+28 SET BPXMBODY(6,0)=" Work ended: "_$$FMTE^XLFDT(BPSCNTR("END"))
+29 if $GET(ZTSK)
SET BPXMBODY(7,0)=" * Queued as Task #"_ZTSK_" *"
+30 ;
+31 ; send via MailMan
+32 SET BPXMSUBJ="Updated cross-reference of BPS LOG OF TRANSACTIONS"
+33 ; POSTMASTER and user who queued it
SET BPXMTO(.5)=""
SET BPXMTO(DUZ)=""
+34 SET BPXMTO("G.RCDPE PAYMENTS MGMT")=""
+35 ;
+36 ; send message
DO SENDMSG^XMXAPI(DUZ,BPXMSUBJ,"BPXMBODY",.BPXMTO,,.BPXMZR)
+37 IF $GET(BPXMZR)
IF '$GET(ZTSK)
IF $EXTRACT(IOST,1,2)="C-"
DO MES^XPDUTL("MailMan message number: "_BPXMZR)
+38 ;
+39 QUIT
+40 ;