RCDPXPAM ;WISC/RFJ-auto process payments, message generation ;1 Jun 99
 ;;4.5;Accounts Receivable;**114,153**;Mar 20, 1995
 ;;Per VHA Directive 10-93-142, this routine should not be modified.
 Q
 ;
 ;
ERROR(RCDPDATE,RCDPXMZ,ERROR) ;  reply to server message with error
 ;  pass ^tmp($j,"rcdpxpay","error",#) for additional/multiple errors
 N LINE,MESSAGE,RCDPERR
 ;
 ;  build error message
 S MESSAGE(1)="This message was received by the Automatic Payment Processing Server"
 S MESSAGE(2)="and was NOT processed because of the following error(s):"
 S MESSAGE(3)=" "
 S MESSAGE(4)=" "
 I ERROR'="" S MESSAGE(4)="  "_ERROR_"." D TRANERR^RCDPXPA1(RCDPDATE,RCDPXMZ,ERROR)
 ;  display multiple errors
 S LINE=4,RCDPERR=0 F  S RCDPERR=$O(^TMP($J,"RCDPXPAY","ERROR",RCDPERR)) Q:'RCDPERR  D
 .   S LINE=LINE+1,MESSAGE(LINE)="  "_^TMP($J,"RCDPXPAY","ERROR",RCDPERR)_"."
 .   D TRANERR^RCDPXPA1(RCDPDATE,RCDPXMZ,^TMP($J,"RCDPXPAY","ERROR",RCDPERR))
 ;
 ;  send message with response
 D MAILRESP(RCDPXMZ,.MESSAGE)
 ;
 ;  set the transmissions status to error
 I $G(RCDPDATE) D TRANSTAT^RCDPXPA1(RCDPDATE,"e")
 Q
 ;
 ;
DUPLCATE(RCDPDATE,SEQUENCE,RCDPXMZ) ;  reply with duplicate warning message
 N MESSAGE,ORIGXMZ
 S ORIGXMZ=$P($G(^RCY(344.2,RCDPDATE,1,SEQUENCE,0)),"^",4) I 'ORIGXMZ S ORIGXMZ="unknown"
 ;  same message sent to server twice
 I ORIGXMZ=RCDPXMZ Q
 ;
 S MESSAGE(1)="* * * * *  W A R N I N G  * * * * *"
 S MESSAGE(2)=" "
 S MESSAGE(3)="This message was received by the Automatic Payment Processing Server"
 S MESSAGE(4)="and is a duplicate sequence number ["_SEQUENCE_"] (line 1, piece 2)."
 S MESSAGE(5)=" "
 S MESSAGE(6)="The Automatic Payment Processing Server will only process the first"
 S MESSAGE(7)="message it receives for a sequence.  The first message for the sequence"
 S MESSAGE(8)="was in mail message number "_ORIGXMZ_" and has been forwarded to you for"
 S MESSAGE(9)="review.  Message number "_ORIGXMZ_" will be used for payment processing."
 S MESSAGE(10)="This message will not be used."
 ;
 I ORIGXMZ D MAILRESP(ORIGXMZ,"") ;  forward original
 D MAILRESP(RCDPXMZ,.MESSAGE)     ;  send response to duplicate
 Q
 ;
 ;
RETRAN ;  ask for retransmission
 N %Z,COUNT,DATA,DATE,MESSAGE,RCDPDA,STATUS,X9,XCNP,XMDUZ,XMZ
 S MESSAGE(1)="The following Automatic Payment(s) have not been processed and need"
 S MESSAGE(2)="to be retransmitted to the Automatic Payment Processing Server."
 S MESSAGE(3)=""
 S MESSAGE(4)="  TranDate    Deposit#    DepositDate    Reason"
 S MESSAGE(5)="  --------    --------    -----------    ------"
 S COUNT=5
 S RCDPDA=0 F  S RCDPDA=$O(^TMP($J,"RCDPXPAY","RETRAN",RCDPDA)) Q:'RCDPDA  D
 .   S DATE=$E($P(RCDPDA,"^"),4,5)_"-"_$E($P(RCDPDA,"^"),6,7)_"-"_$E($P(RCDPDA,"^"),2,3)
 .   S DATA=^TMP($J,"RCDPXPAY","RETRAN",RCDPDA)
 .   I $P(DATA,"^")="" S $P(DATA,"^")="unknown"
 .   I $P(DATA,"^",2)="" S $P(DATA,"^",2)="unknown"
 .   I $P(DATA,"^",3)="" S $P(DATA,"^",3)="unknown"
 .   S $P(DATA,"^")=$E($P(DATA,"^")_"        ",1,8)
 .   S $P(DATA,"^",2)=$E($P(DATA,"^",2)_"           ",1,11)
 .   S $P(DATA,"^",3)=$S($P(DATA,"^",3)="r":"Partial Payment Received",$P(DATA,"^",3)="p":"Partial Payment Processed",1:"Error in Payment Message")
 .   S COUNT=COUNT+1
 .   S MESSAGE(COUNT)="  "_DATE_"    "_$P(DATA,"^")_"    "_$P(DATA,"^",2)_"    "_$P(DATA,"^",3)
 S XMTEXT="MESSAGE("
 S XMSUB="Request Auto Payment Retransmission"
 S XMDUZ="AR Package",XMY("G.RCDP PAYMENTS")=""
 D ^XMD
 Q
 ;
 ;
MAILRESP(RCDPXMZ,MESSAGE) ;  enter response and forward message to mail group
 N %H,%I,%Z,ER,X,X9,XMA,XMC0,XMQF,XMZ,XMZ2,Z
 ;  create response
 I $G(MESSAGE(1))'="" S %=$$ENT^XMA2R(RCDPXMZ,"Automatic Payment Processing Server Response",.MESSAGE,"","AR Package")
 ;  forward original message
 S XMDUZ="AR Package",XMY("G.RCDP PAYMENTS")=""
 S XMZ=RCDPXMZ
 D ENT1^XMD
 Q
 ;
 ;
PROCMSG ;  show the message with processed deposits and receipts
 N %Z,MESSAGE,RCCOUNT,RCDPDATA,RCRECTDA,RCERROR,RCFLAG,RCUNLINK,X9,XCNP,XMDUZ,XMZ
 S MESSAGE(1)="The following Automatic Payment(s) have been processed by the"
 S MESSAGE(2)="Automatic Payment Processing Server."
 S MESSAGE(4)="  Deposit#    Receipt#  FMS Document#   Total Amount  Unlinked Accts"
 S MESSAGE(5)="  --------  ----------  -------------   ------------  --------------"
 S RCCOUNT=5
 I '$O(^TMP($J,"RCDPXPAP","PROCESS",0)) S MESSAGE(6)="  <<none>>",RCCOUNT=6
 S RCRECTDA=0 F  S RCRECTDA=$O(^TMP($J,"RCDPXPAP","PROCESS",RCRECTDA)) Q:'RCRECTDA  D
 .   D DIQ344^RCDPRPLM(RCRECTDA,".01;.06;.15;200;")
 .   S RCUNLINK=+^TMP($J,"RCDPXPAP","PROCESS",RCRECTDA)
 .   S RCCOUNT=RCCOUNT+1
 .   S MESSAGE(RCCOUNT)=$J($G(RCDPDATA(344,RCRECTDA,.06,"E")),10)
 .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J($G(RCDPDATA(344,RCRECTDA,.01,"E")),12)
 .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J($G(RCDPDATA(344,RCRECTDA,200,"E")),16)
 .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J($G(RCDPDATA(344,RCRECTDA,.15,"E")),14,2)
 .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J(+RCUNLINK,16)
 .   ;  set error flag if receipt did not process (no fms document)
 .   I $G(RCDPDATA(344,RCRECTDA,200,"E"))="" S RCERROR=1
 ;
 ;  show if any receipts need to manually be processed due to errors
 I $G(RCERROR) D
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)=" "
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="Warning: The receipts listed above that are missing the FMS Document# did not"
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="completely process due to an error.  Use the Receipt Processing option to view"
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="the error and reprocess the receipt."
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)=" "
 ;
 ;  show duplicate receipts, previously received/processed
 I $O(^TMP($J,"RCDPXPAP","DUPLICATE",0)) D
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)=" "
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="The following receipts were received as duplicates."
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="  Deposit#    Receipt#  FMS Document#   Total Amount"
 .   S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="  --------  ----------  -------------   ------------"
 .   S RCRECTDA=0 F  S RCRECTDA=$O(^TMP($J,"RCDPXPAP","DUPLICATE",RCRECTDA)) Q:'RCRECTDA  D
 .   .   D DIQ344^RCDPRPLM(RCRECTDA,".01;.06;.15;200;")
 .   .   S RCCOUNT=RCCOUNT+1
 .   .   S MESSAGE(RCCOUNT)=$J($G(RCDPDATA(344,RCRECTDA,.06,"E")),10)
 .   .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J($G(RCDPDATA(344,RCRECTDA,.01,"E")),12)
 .   .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J($G(RCDPDATA(344,RCRECTDA,200,"E")),16)
 .   .   ;  show ** if fms document processed
 .   .   I $P(^TMP($J,"RCDPXPAP","DUPLICATE",RCRECTDA),"^",2)=1 S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_"**",RCFLAG=1
 .   .   E  S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_"  "
 .   .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$J($G(RCDPDATA(344,RCRECTDA,.15,"E")),12,2)
 .   .   S MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_"  "_$P(^TMP($J,"RCDPXPAP","DUPLICATE",RCRECTDA),"^")
 ;
 I $G(RCFLAG) S RCCOUNT=RCCOUNT+1,MESSAGE(RCCOUNT)="                                      ** FMS Document Processed"
 S XMTEXT="MESSAGE("
 S XMSUB="Auto Payment Processing Completed"
 S XMDUZ="AR Package",XMY("G.RCDP PAYMENTS")=""
 D ^XMD
 Q
 ;
 ;
ZEROMSG(DATE) ;  show RT received with no payments for a date
 ;  date in the form MMDDYYYY
 S DATE=$E(DATE,1,2)_"/"_$E(DATE,3,4)_"/"_$E(DATE,5,8)
 N %Z,MESSAGE,X9,XCNP,XMDUZ,XMZ
 S MESSAGE(1)="The Automatic Payment Processing Server received a Lockbox"
 S MESSAGE(2)="transmission for "_DATE_" with no payments to process."
 S XMTEXT="MESSAGE("
 S XMSUB="Auto Payment Processing Completed"
 S XMDUZ="AR Package",XMY("G.RCDP PAYMENTS")=""
 D ^XMD
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRCDPXPAM   7686     printed  Sep 23, 2025@19:22:50                                                                                                                                                                                                    Page 2
RCDPXPAM  ;WISC/RFJ-auto process payments, message generation ;1 Jun 99
 +1       ;;4.5;Accounts Receivable;**114,153**;Mar 20, 1995
 +2       ;;Per VHA Directive 10-93-142, this routine should not be modified.
 +3        QUIT 
 +4       ;
 +5       ;
ERROR(RCDPDATE,RCDPXMZ,ERROR) ;  reply to server message with error
 +1       ;  pass ^tmp($j,"rcdpxpay","error",#) for additional/multiple errors
 +2        NEW LINE,MESSAGE,RCDPERR
 +3       ;
 +4       ;  build error message
 +5        SET MESSAGE(1)="This message was received by the Automatic Payment Processing Server"
 +6        SET MESSAGE(2)="and was NOT processed because of the following error(s):"
 +7        SET MESSAGE(3)=" "
 +8        SET MESSAGE(4)=" "
 +9        IF ERROR'=""
               SET MESSAGE(4)="  "_ERROR_"."
               DO TRANERR^RCDPXPA1(RCDPDATE,RCDPXMZ,ERROR)
 +10      ;  display multiple errors
 +11       SET LINE=4
           SET RCDPERR=0
           FOR 
               SET RCDPERR=$ORDER(^TMP($JOB,"RCDPXPAY","ERROR",RCDPERR))
               if 'RCDPERR
                   QUIT 
               Begin DoDot:1
 +12               SET LINE=LINE+1
                   SET MESSAGE(LINE)="  "_^TMP($JOB,"RCDPXPAY","ERROR",RCDPERR)_"."
 +13               DO TRANERR^RCDPXPA1(RCDPDATE,RCDPXMZ,^TMP($JOB,"RCDPXPAY","ERROR",RCDPERR))
               End DoDot:1
 +14      ;
 +15      ;  send message with response
 +16       DO MAILRESP(RCDPXMZ,.MESSAGE)
 +17      ;
 +18      ;  set the transmissions status to error
 +19       IF $GET(RCDPDATE)
               DO TRANSTAT^RCDPXPA1(RCDPDATE,"e")
 +20       QUIT 
 +21      ;
 +22      ;
DUPLCATE(RCDPDATE,SEQUENCE,RCDPXMZ) ;  reply with duplicate warning message
 +1        NEW MESSAGE,ORIGXMZ
 +2        SET ORIGXMZ=$PIECE($GET(^RCY(344.2,RCDPDATE,1,SEQUENCE,0)),"^",4)
           IF 'ORIGXMZ
               SET ORIGXMZ="unknown"
 +3       ;  same message sent to server twice
 +4        IF ORIGXMZ=RCDPXMZ
               QUIT 
 +5       ;
 +6        SET MESSAGE(1)="* * * * *  W A R N I N G  * * * * *"
 +7        SET MESSAGE(2)=" "
 +8        SET MESSAGE(3)="This message was received by the Automatic Payment Processing Server"
 +9        SET MESSAGE(4)="and is a duplicate sequence number ["_SEQUENCE_"] (line 1, piece 2)."
 +10       SET MESSAGE(5)=" "
 +11       SET MESSAGE(6)="The Automatic Payment Processing Server will only process the first"
 +12       SET MESSAGE(7)="message it receives for a sequence.  The first message for the sequence"
 +13       SET MESSAGE(8)="was in mail message number "_ORIGXMZ_" and has been forwarded to you for"
 +14       SET MESSAGE(9)="review.  Message number "_ORIGXMZ_" will be used for payment processing."
 +15       SET MESSAGE(10)="This message will not be used."
 +16      ;
 +17      ;  forward original
           IF ORIGXMZ
               DO MAILRESP(ORIGXMZ,"")
 +18      ;  send response to duplicate
           DO MAILRESP(RCDPXMZ,.MESSAGE)
 +19       QUIT 
 +20      ;
 +21      ;
RETRAN    ;  ask for retransmission
 +1        NEW %Z,COUNT,DATA,DATE,MESSAGE,RCDPDA,STATUS,X9,XCNP,XMDUZ,XMZ
 +2        SET MESSAGE(1)="The following Automatic Payment(s) have not been processed and need"
 +3        SET MESSAGE(2)="to be retransmitted to the Automatic Payment Processing Server."
 +4        SET MESSAGE(3)=""
 +5        SET MESSAGE(4)="  TranDate    Deposit#    DepositDate    Reason"
 +6        SET MESSAGE(5)="  --------    --------    -----------    ------"
 +7        SET COUNT=5
 +8        SET RCDPDA=0
           FOR 
               SET RCDPDA=$ORDER(^TMP($JOB,"RCDPXPAY","RETRAN",RCDPDA))
               if 'RCDPDA
                   QUIT 
               Begin DoDot:1
 +9                SET DATE=$EXTRACT($PIECE(RCDPDA,"^"),4,5)_"-"_$EXTRACT($PIECE(RCDPDA,"^"),6,7)_"-"_$EXTRACT($PIECE(RCDPDA,"^"),2,3)
 +10               SET DATA=^TMP($JOB,"RCDPXPAY","RETRAN",RCDPDA)
 +11               IF $PIECE(DATA,"^")=""
                       SET $PIECE(DATA,"^")="unknown"
 +12               IF $PIECE(DATA,"^",2)=""
                       SET $PIECE(DATA,"^",2)="unknown"
 +13               IF $PIECE(DATA,"^",3)=""
                       SET $PIECE(DATA,"^",3)="unknown"
 +14               SET $PIECE(DATA,"^")=$EXTRACT($PIECE(DATA,"^")_"        ",1,8)
 +15               SET $PIECE(DATA,"^",2)=$EXTRACT($PIECE(DATA,"^",2)_"           ",1,11)
 +16               SET $PIECE(DATA,"^",3)=$SELECT($PIECE(DATA,"^",3)="r":"Partial Payment Received",$PIECE(DATA,"^",3)="p":"Partial Payment Processed",1:"Error in Payment Message")
 +17               SET COUNT=COUNT+1
 +18               SET MESSAGE(COUNT)="  "_DATE_"    "_$PIECE(DATA,"^")_"    "_$PIECE(DATA,"^",2)_"    "_$PIECE(DATA,"^",3)
               End DoDot:1
 +19       SET XMTEXT="MESSAGE("
 +20       SET XMSUB="Request Auto Payment Retransmission"
 +21       SET XMDUZ="AR Package"
           SET XMY("G.RCDP PAYMENTS")=""
 +22       DO ^XMD
 +23       QUIT 
 +24      ;
 +25      ;
MAILRESP(RCDPXMZ,MESSAGE) ;  enter response and forward message to mail group
 +1        NEW %H,%I,%Z,ER,X,X9,XMA,XMC0,XMQF,XMZ,XMZ2,Z
 +2       ;  create response
 +3        IF $GET(MESSAGE(1))'=""
               SET %=$$ENT^XMA2R(RCDPXMZ,"Automatic Payment Processing Server Response",.MESSAGE,"","AR Package")
 +4       ;  forward original message
 +5        SET XMDUZ="AR Package"
           SET XMY("G.RCDP PAYMENTS")=""
 +6        SET XMZ=RCDPXMZ
 +7        DO ENT1^XMD
 +8        QUIT 
 +9       ;
 +10      ;
PROCMSG   ;  show the message with processed deposits and receipts
 +1        NEW %Z,MESSAGE,RCCOUNT,RCDPDATA,RCRECTDA,RCERROR,RCFLAG,RCUNLINK,X9,XCNP,XMDUZ,XMZ
 +2        SET MESSAGE(1)="The following Automatic Payment(s) have been processed by the"
 +3        SET MESSAGE(2)="Automatic Payment Processing Server."
 +4        SET MESSAGE(4)="  Deposit#    Receipt#  FMS Document#   Total Amount  Unlinked Accts"
 +5        SET MESSAGE(5)="  --------  ----------  -------------   ------------  --------------"
 +6        SET RCCOUNT=5
 +7        IF '$ORDER(^TMP($JOB,"RCDPXPAP","PROCESS",0))
               SET MESSAGE(6)="  <<none>>"
               SET RCCOUNT=6
 +8        SET RCRECTDA=0
           FOR 
               SET RCRECTDA=$ORDER(^TMP($JOB,"RCDPXPAP","PROCESS",RCRECTDA))
               if 'RCRECTDA
                   QUIT 
               Begin DoDot:1
 +9                DO DIQ344^RCDPRPLM(RCRECTDA,".01;.06;.15;200;")
 +10               SET RCUNLINK=+^TMP($JOB,"RCDPXPAP","PROCESS",RCRECTDA)
 +11               SET RCCOUNT=RCCOUNT+1
 +12               SET MESSAGE(RCCOUNT)=$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,.06,"E")),10)
 +13               SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,.01,"E")),12)
 +14               SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,200,"E")),16)
 +15               SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,.15,"E")),14,2)
 +16               SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY(+RCUNLINK,16)
 +17      ;  set error flag if receipt did not process (no fms document)
 +18               IF $GET(RCDPDATA(344,RCRECTDA,200,"E"))=""
                       SET RCERROR=1
               End DoDot:1
 +19      ;
 +20      ;  show if any receipts need to manually be processed due to errors
 +21       IF $GET(RCERROR)
               Begin DoDot:1
 +22               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)=" "
 +23               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)="Warning: The receipts listed above that are missing the FMS Document# did not"
 +24               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)="completely process due to an error.  Use the Receipt Processing option to view"
 +25               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)="the error and reprocess the receipt."
 +26               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)=" "
               End DoDot:1
 +27      ;
 +28      ;  show duplicate receipts, previously received/processed
 +29       IF $ORDER(^TMP($JOB,"RCDPXPAP","DUPLICATE",0))
               Begin DoDot:1
 +30               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)=" "
 +31               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)="The following receipts were received as duplicates."
 +32               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)="  Deposit#    Receipt#  FMS Document#   Total Amount"
 +33               SET RCCOUNT=RCCOUNT+1
                   SET MESSAGE(RCCOUNT)="  --------  ----------  -------------   ------------"
 +34               SET RCRECTDA=0
                   FOR 
                       SET RCRECTDA=$ORDER(^TMP($JOB,"RCDPXPAP","DUPLICATE",RCRECTDA))
                       if 'RCRECTDA
                           QUIT 
                       Begin DoDot:2
 +35                       DO DIQ344^RCDPRPLM(RCRECTDA,".01;.06;.15;200;")
 +36                       SET RCCOUNT=RCCOUNT+1
 +37                       SET MESSAGE(RCCOUNT)=$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,.06,"E")),10)
 +38                       SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,.01,"E")),12)
 +39                       SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,200,"E")),16)
 +40      ;  show ** if fms document processed
 +41                       IF $PIECE(^TMP($JOB,"RCDPXPAP","DUPLICATE",RCRECTDA),"^",2)=1
                               SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_"**"
                               SET RCFLAG=1
 +42                      IF '$TEST
                               SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_"  "
 +43                       SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_$JUSTIFY($GET(RCDPDATA(344,RCRECTDA,.15,"E")),12,2)
 +44                       SET MESSAGE(RCCOUNT)=MESSAGE(RCCOUNT)_"  "_$PIECE(^TMP($JOB,"RCDPXPAP","DUPLICATE",RCRECTDA),"^")
                       End DoDot:2
               End DoDot:1
 +45      ;
 +46       IF $GET(RCFLAG)
               SET RCCOUNT=RCCOUNT+1
               SET MESSAGE(RCCOUNT)="                                      ** FMS Document Processed"
 +47       SET XMTEXT="MESSAGE("
 +48       SET XMSUB="Auto Payment Processing Completed"
 +49       SET XMDUZ="AR Package"
           SET XMY("G.RCDP PAYMENTS")=""
 +50       DO ^XMD
 +51       QUIT 
 +52      ;
 +53      ;
ZEROMSG(DATE) ;  show RT received with no payments for a date
 +1       ;  date in the form MMDDYYYY
 +2        SET DATE=$EXTRACT(DATE,1,2)_"/"_$EXTRACT(DATE,3,4)_"/"_$EXTRACT(DATE,5,8)
 +3        NEW %Z,MESSAGE,X9,XCNP,XMDUZ,XMZ
 +4        SET MESSAGE(1)="The Automatic Payment Processing Server received a Lockbox"
 +5        SET MESSAGE(2)="transmission for "_DATE_" with no payments to process."
 +6        SET XMTEXT="MESSAGE("
 +7        SET XMSUB="Auto Payment Processing Completed"
 +8        SET XMDUZ="AR Package"
           SET XMY("G.RCDP PAYMENTS")=""
 +9        DO ^XMD
 +10       QUIT