source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCXFMSTR.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1RCXFMSTR ;WASH-ISC@ALTOONA,PA/CLH-TRI CARE EXTRACT ROUTINE ;1 Oct 97
2 ;;4.5;Accounts Receivable;**90,148**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7EN ; creates report from TRI data in file 423.6
8 N %,BILL,BILLDA,DATA,LINE,LINEDA,SUBJECT,TRICARDA,XMSUB,XMDUZ,XMY,XMZ,Y
9 K ^TMP($J,"RCXFMSTR"),^TMP($J,"RCXFMSTRXMB")
10 ;
11 S SUBJECT="TRI-"
12 F S SUBJECT=$O(^PRCF(423.6,"B",SUBJECT)) Q:$E(SUBJECT,1,4)'="TRI-" D
13 . S TRICARDA=$O(^PRCF(423.6,"B",SUBJECT,0)) Q:'TRICARDA
14 . ;
15 . ; loop through the bills and set the line number
16 . S LINEDA=0 F S LINEDA=$O(^PRCF(423.6,TRICARDA,1,LINEDA)) Q:'LINEDA D
17 . . S DATA=$G(^PRCF(423.6,TRICARDA,1,LINEDA,0)) I DATA="" Q
18 . . I $E(DATA,1,3)'="TRI" Q
19 . . S BILL=$E($P(DATA,"^",4),1,3)_"-"_$E($P(DATA,"^",4),4,10)
20 . . S BILLDA=$O(^PRCA(430,"B",BILL,0))
21 . . I 'BILLDA S ^TMP($J,"RCXFMSTR","NOTFOUND",BILL)=$P(DATA,"^",6) Q
22 . . ;
23 . . ; store the line number
24 . . S $P(^PRCA(430,BILLDA,11),"^",4)=$P(DATA,"^",5)
25 . . S ^TMP($J,"RCXFMSTR","CONVERT",BILLDA)=BILL_"^"_$P(DATA,"^",6)
26 ;
27 ; send report
28 D NOW^%DTC S Y=% D DD^%DT
29 S ^TMP($J,"RCXFMSTRXMB",1)="Date of Report: "_Y
30 S ^TMP($J,"RCXFMSTRXMB",2)="NOTE: This report contains the records which FMS"
31 S ^TMP($J,"RCXFMSTRXMB",3)="has moved to current fiscal year."
32 S ^TMP($J,"RCXFMSTRXMB",4)=" "
33 S ^TMP($J,"RCXFMSTRXMB",5)="No FMS data exists to report!"
34 ;
35 S LINE=4
36 I $O(^TMP($J,"RCXFMSTR","NOTFOUND",""))'="" D
37 . D SET(" ")
38 . D SET("The following bills were not found in AR and could not be converted:")
39 . S BILL="" F S BILL=$O(^TMP($J,"RCXFMSTR","NOTFOUND",BILL)) Q:BILL="" D SET(" "_BILL_$J(^(BILL),20,2))
40 ;
41 I $O(^TMP($J,"RCXFMSTR","CONVERT",0)) D
42 . D SET(" ")
43 . D SET("The following bills were converted and moved to current fiscal year:")
44 . S BILLDA=0 F S BILLDA=$O(^TMP($J,"RCXFMSTR","CONVERT",BILLDA)) Q:'BILLDA D SET(" "_$P(^(BILLDA),"^")_$J($P(^(BILLDA),"^",2),20,2))
45 ;
46 S XMTEXT="^TMP($J,""RCXFMSTRXMB"","
47 S XMSUB="FMS PRIOR YEAR RECEIVABLES"
48 S XMDUZ="Accounts Receivable Package",XMY("G.FMS")="",XMY(DUZ)=""
49 D ^XMD
50 ;
51 K ^TMP($J,"RCXFMSTR"),^TMP($J,"RCXFMSTRXMB")
52 Q
53 ;
54 ;
55SET(STRING) ; set the line for the report
56 S LINE=LINE+1,^TMP($J,"RCXFMSTRXMB",LINE)=STRING
57 Q
Note: See TracBrowser for help on using the repository browser.