Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RCXFMSTR

RCXFMSTR.m

Go to the documentation of this file.
  1. RCXFMSTR ;WASH-ISC@ALTOONA,PA/CLH-TRI CARE EXTRACT ROUTINE ;1 Oct 97
  1. ;;4.5;Accounts Receivable;**90,148**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. ;
  1. ;
  1. EN ; creates report from TRI data in file 423.6
  1. N %,BILL,BILLDA,DATA,LINE,LINEDA,SUBJECT,TRICARDA,XMSUB,XMDUZ,XMY,XMZ,Y
  1. K ^TMP($J,"RCXFMSTR"),^TMP($J,"RCXFMSTRXMB")
  1. ;
  1. S SUBJECT="TRI-"
  1. F S SUBJECT=$O(^PRCF(423.6,"B",SUBJECT)) Q:$E(SUBJECT,1,4)'="TRI-" D
  1. . S TRICARDA=$O(^PRCF(423.6,"B",SUBJECT,0)) Q:'TRICARDA
  1. . ;
  1. . ; loop through the bills and set the line number
  1. . S LINEDA=0 F S LINEDA=$O(^PRCF(423.6,TRICARDA,1,LINEDA)) Q:'LINEDA D
  1. . . S DATA=$G(^PRCF(423.6,TRICARDA,1,LINEDA,0)) I DATA="" Q
  1. . . I $E(DATA,1,3)'="TRI" Q
  1. . . S BILL=$E($P(DATA,"^",4),1,3)_"-"_$E($P(DATA,"^",4),4,10)
  1. . . S BILLDA=$O(^PRCA(430,"B",BILL,0))
  1. . . I 'BILLDA S ^TMP($J,"RCXFMSTR","NOTFOUND",BILL)=$P(DATA,"^",6) Q
  1. . . ;
  1. . . ; store the line number
  1. . . S $P(^PRCA(430,BILLDA,11),"^",4)=$P(DATA,"^",5)
  1. . . S ^TMP($J,"RCXFMSTR","CONVERT",BILLDA)=BILL_"^"_$P(DATA,"^",6)
  1. ;
  1. ; send report
  1. D NOW^%DTC S Y=% D DD^%DT
  1. S ^TMP($J,"RCXFMSTRXMB",1)="Date of Report: "_Y
  1. S ^TMP($J,"RCXFMSTRXMB",2)="NOTE: This report contains the records which FMS"
  1. S ^TMP($J,"RCXFMSTRXMB",3)="has moved to current fiscal year."
  1. S ^TMP($J,"RCXFMSTRXMB",4)=" "
  1. S ^TMP($J,"RCXFMSTRXMB",5)="No FMS data exists to report!"
  1. ;
  1. S LINE=4
  1. I $O(^TMP($J,"RCXFMSTR","NOTFOUND",""))'="" D
  1. . D SET(" ")
  1. . D SET("The following bills were not found in AR and could not be converted:")
  1. . S BILL="" F S BILL=$O(^TMP($J,"RCXFMSTR","NOTFOUND",BILL)) Q:BILL="" D SET(" "_BILL_$J(^(BILL),20,2))
  1. ;
  1. I $O(^TMP($J,"RCXFMSTR","CONVERT",0)) D
  1. . D SET(" ")
  1. . D SET("The following bills were converted and moved to current fiscal year:")
  1. . S BILLDA=0 F S BILLDA=$O(^TMP($J,"RCXFMSTR","CONVERT",BILLDA)) Q:'BILLDA D SET(" "_$P(^(BILLDA),"^")_$J($P(^(BILLDA),"^",2),20,2))
  1. ;
  1. S XMTEXT="^TMP($J,""RCXFMSTRXMB"","
  1. S XMSUB="FMS PRIOR YEAR RECEIVABLES"
  1. S XMDUZ="Accounts Receivable Package",XMY("G.FMS")="",XMY(DUZ)=""
  1. D ^XMD
  1. ;
  1. K ^TMP($J,"RCXFMSTR"),^TMP($J,"RCXFMSTRXMB")
  1. Q
  1. ;
  1. ;
  1. SET(STRING) ; set the line for the report
  1. S LINE=LINE+1,^TMP($J,"RCXFMSTRXMB",LINE)=STRING
  1. Q