source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC5B5.m@ 836

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1PRC5B5 ;WISC/PLT-Receiver of AAF-document from FMS V5 ; 06/29/94 2:30 PM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 QUIT ;invalid entry
5 ;
6 ;invoked from task manager (see trin^prcosrv2)
7 ;set accrue y/n in file 442 from AAF-doc.
8 ;PRCDA=ri of file 423.6 passed
9EN ;AAF-message from sever FMS MESSAGE SEVER routine PRCOSRV2
10 N PRCRI,PRCTY,PRCERR,PRCSEQ,A,B
11 S PRCRI(423.6)=PRCDA,PRCTY=""
12 ;check txn message
13 S PRCERR="",PRCSQE="" D CHECK(PRCRI(423.6))
14 I PRCERR D G EXIT
15 . N A,B,C
16 . S A(1)="IFCAP/FMS AAF MESSAGE IS IN INVALID FORMAT."
17 . S A(2)="PLEASE CALL FMS-CONVERSION TEAM USER TO RESEND THIS MESSAGE:"
18 . S A(3)=$P($G(^PRCF(423.6,PRCDA,0)),"^")_" WITH IFCAP ERROR: "_PRCERR
19 . I PRCTY="" S B(.5)=""
20 . E S X=$$FIRST^PRC0B1("^PRCF(423.5,""B"""_",""CTL-"_PRCTY_""",",0) S X=$S(X:"G."_$$MG^PRC0B2($P(^PRCF(423.5,X,0),"^",2)),1:.5),B(X)=""
21 . S C="IFCAP/FMS CONVERSION ERROR MESSAGE-AAF^IFCAP FMS MESSAGE SERVER"
22 . D MM^PRC0B2(C,"A(",.B)
23 . QUIT
24 ;process message
25 S A=$T(@PRCTY)
26 D PRO(PRCRI(423.6),$P(A," ",1)_"^"_$P(A,";",3,999))
27 I PRCERR D G EXIT
28 . N A,B,C
29 . S A(1)="IFCAP/FMS CONVERSION MESSAGE "_PRCTY_" PROCESS FAILS"
30 . S A(2)="PLEASE CALL FMS-CONVERSION TEAM USER TO RESEND THIS MESSAGE:"
31 . S A(3)=$P($G(^PRCF(423.6,PRCDA,0)),"^")_" WITH IFCAP ERROR: "_PRCERR
32 . S X=$$FIRST^PRC0B1("^PRCF(423.5,""B"""_",""CTL-"_PRCTY_""",",0) S X=$S(X:"G."_$$MG^PRC0B2($P(^PRCF(423.5,X,0),"^",2)),1:.5),B(X)=""
33 . S C="IFCAP/FMS COPY ERROR MESSAGE-AAF^IFCAP FMS MESSAGE SERVER"
34 . D MM^PRC0B2(C,"A(",.B)
35 . QUIT
36 ;send processing done message
37 D
38 . N A,B,C
39 . S A(1)="IFCAP/FMS CONVERSION MESSAGE "_PRCTY_" PROCESSING DONE."
40 . S A(2)=$P($G(^PRCF(423.6,PRCDA,0)),"^")
41 . S X=$$FIRST^PRC0B1("^PRCF(423.5,""B"""_",""CTL-"_PRCTY_""",",0) S X=$S(X:"G."_$$MG^PRC0B2($P(^PRCF(423.5,X,0),"^",2)),1:.5),B(X)=""
42 . S C="IFCAP/FMS PROCESS DONE MESSAGE-AAF^IFCAP FMS MESSAGE SERVER"
43 . D MM^PRC0B2(C,"A(",.B)
44 . QUIT
45 ;
46EXIT ;delete fms conversion message in file 423.6
47 D KILL^PRCOSRV3(PRCRI(423.6))
48 QUIT
49 ;
50CHECK(PRCA,PRCB) ;PRCA=ri of file 423.6, PRCB=^1 txn class from FMS, ^2=description
51 N PRCC,PRCD,A
52 S PRCC=$O(^PRCF(423.6,PRCA,1,9999)) I 'PRCC S PRCERR=2 QUIT ;no message
53 S PRCD=$G(^PRCF(423.6,PRCA,1,PRCC,0)) I PRCD="" S PRCERR=2 QUIT
54 S PRCTY=$P(PRCD,"^",5),A="" S:PRCTY?1.5A A=$T(@PRCTY)
55 I $P(PRCD,"^")'="CTL"!(A="") S PRCERR=3,PRCTY="" QUIT ;wrong type
56 S PRCSEQ=+$P(PRCD,"^",13)_"-"_(+$P(PRCD,"^",14))
57 F S PRCC=$O(^PRCF(423.6,PRCA,1,PRCC)) Q:'PRCC S PRCD=^(PRCC,0)
58 I PRCD'="{" S PRCERR=4 QUIT ;missing txn delimeter
59 QUIT
60 ;
61PRO(PRCA,PRCB) ;PRCA=ri of file 423.6, PRCB=^1 txn class from FMS, ^2=description
62 N PRCC,PRCD,A,B,X,Y
63 S PRCC=$O(^PRCF(423.6,PRCA,1,9999))
64 F S PRCC=$O(^PRCF(423.6,PRCA,1,PRCC)) Q:'PRCC S PRCD=^(PRCC,0) I PRCD?1"AAF".E D
65 . S A=$P(PRCD,"^",3),A=$P(A," ",1),A=$E(A,1,3)_"-"_$E(A,4,999),B=""
66 . S:$P(PRCD,"^",4)]"" B=$F("NY",$P(PRCD,"^",4))-2
67 . S PRCRI(442)=$O(^PRC(442,"B",A,"")) QUIT:'PRCRI(442)
68 . D EDIT^PRC0B(.X,"442;^PRC(442,;"_PRCRI(442),"30////"_B)
69 . QUIT
70 QUIT
71 ;
72 ;
73AAF ;;AUTO-ACCRUE DATA
74 ;
Note: See TracBrowser for help on using the repository browser.