source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCDPXPA1.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1RCDPXPA1 ;WISC/RFJ-server, utilities for transmission file 344.2 ;1 Jun 99
2 ;;4.5;Accounts Receivable;**114,150**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7ADDTRAN(DATE) ; if the transmission date is not entered, add it
8 ; already in file
9 I $D(^RCY(344.2,+DATE,0)) Q 1
10 ;
11 ; add it
12 N %DT,D0,DA,DD,DI,DIC,DIE,DINUM,DLAYGO,DO,DQ,DR,X,Y
13 S DIC="^RCY(344.2,",DIC(0)="L",DLAYGO=344.2
14 ; .02 = total sequences (set to 0) .03 = total dollars (set to 0)
15 ; .04 = status (set to receiving) .06 = checksum (set to 0)
16 S DIC("DR")=".02////0;.03////0;.04////r;.05///TODAY;.06////0"
17 S (X,DINUM)=DATE
18 D FILE^DICN
19 I Y>0 Q 1
20 Q 0
21 ;
22 ;
23TRANDOLL(DA,SEQUENCE,DOLLARS) ; store the total sequences and total dollars
24 I '$D(^RCY(344.2,+DA,0)) Q
25 N D,D0,DI,DIC,DIE,DQ,DR,X
26 S (DIC,DIE)="^RCY(344.2,"
27 S DR=""
28 ; only store total sequence and dollars if not zero, otherwise it
29 ; may reset the values to zero
30 I SEQUENCE S DR=".02////"_SEQUENCE_";"
31 I DOLLARS S DR=DR_".03////"_DOLLARS_";"
32 I DR="" Q
33 D ^DIE
34 Q
35 ;
36 ;
37TRANCSUM(TRANSDA,SEQUENCE,CHECKSUM) ; store the transmissions checksum
38 N D,D0,DA,DI,DIC,DIE,DQ,DR,X
39 S (DIC,DIE)="^RCY(344.2,"_TRANSDA_",1,"
40 S DA(1)=TRANSDA,DA=SEQUENCE
41 S DR=".05///"_CHECKSUM_";"
42 D ^DIE
43 Q
44 ;
45 ;
46TRANSTAT(DA,STATUS) ; store the transmissions status
47 I '$D(^RCY(344.2,+DA,0)) Q
48 N %,%DT,D,D0,DDER,DI,DIC,DIE,DQ,DR,X
49 S (DIC,DIE)="^RCY(344.2,"
50 S DR=".04///"_STATUS_";.05///TODAY;"
51 D ^DIE
52 Q
53 ;
54 ;
55TRANERR(DA,RCDPXMZ,ERROR) ; store the error message
56 I '$D(^RCY(344.2,+DA,0)) Q
57 N DA1
58 S DA1=$P($G(^RCY(344.2,DA,2,0)),"^",3)+1
59 S ^RCY(344.2,DA,2,DA1,0)="Message: "_RCDPXMZ_", Error: "_ERROR
60 S ^RCY(344.2,DA,2,0)="^^"_DA1_"^"_DA1_"^"_DT_"^"
61 Q
62 ;
63 ;
64ADDSEQ(TRANSDA,SEQUENCE) ; add sequence for transmission (in transda)
65 I 'SEQUENCE Q 0
66 I '$D(^RCY(344.2,+TRANSDA,0)) Q 0
67 I $D(^RCY(344.2,TRANSDA,1,SEQUENCE,0)) Q SEQUENCE
68 I '$D(^RCY(344.2,TRANSDA,1,0)) S ^(0)="^344.21^"
69 N D0,DA,DI,DIC,DIE,DINUM,DLAYGO,DO,DQ,DR,X,Y
70 ;
71 S (DINUM,X)=+SEQUENCE
72 S DA(1)=TRANSDA
73 S DIC="^RCY(344.2,"_TRANSDA_",1,",DIC(0)="L",DLAYGO=344.21
74 S DIC("DR")=".12////"_DUZ_";.06///TODAY;"
75 D FILE^DICN
76 Q +Y
77 ;
78 ;
79SEQUDOLL(TRANSDA,SEQUENCE,COUNT,DOLLARS,MAILMESS) ; store the total
80 ; transactions (in count), dollars (in dollars), and mail message
81 ; number for the transmission sequence
82 N D,D0,DA,DI,DIC,DIE,DQ,DR,X
83 S (DIC,DIE)="^RCY(344.2,"_TRANSDA_",1,"
84 S DA(1)=TRANSDA,DA=SEQUENCE
85 S DR=".02///"_COUNT_";.03///"_DOLLARS_";"
86 I MAILMESS S DR=DR_".04////"_MAILMESS_";"
87 D ^DIE
88 Q
89 ;
90 ;
91DELETRAN(DA) ; delete the transmission from the file
92 I '$D(^RCY(344.2,+DA,0)) Q
93 N %,DIC,DIK
94 S DIK="^RCY(344.2,"
95 D ^DIK
96 Q
Note: See TracBrowser for help on using the repository browser.