source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC7B.m@ 623

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1PRC7B ;WISC/PLT-Receiver/Copy FND/PCL/PAC/CPF FMS message for 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 ;copy conversion message to file 420.92
8 ;PRCDA=ri of file 423.6 passed
9EN ;Conversion 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 CONVERSION MESSAGE PAC/CPF/FND/PCL 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-PAC/CPF/FND/PCL^IFCAP FMS MESSAGE SERVER"
22 . D MM^PRC0B2(C,"A(",.B)
23 . QUIT
24 ;copy fms records to file 420.92
25 S A=$T(@PRCTY)
26 D COPY(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_" COPY FAILURE"
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-PAC/CPF/FND/PCL^IFCAP FMS MESSAGE SERVER"
34 . D MM^PRC0B2(C,"A(",.B)
35 . QUIT
36 ;send copy done message
37 D
38 . N A,B,C
39 . S A(1)="IFCAP/FMS CONVERSION MESSAGE "_PRCTY_" COPY DONE."
40 . S A(2)="READY FOR CONVERSION THIS MESSAGE DURING POST-INITIAL IFCAP v.5"
41 . S A(3)=$P($G(^PRCF(423.6,PRCDA,0)),"^")
42 . 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)=""
43 . S C="IFCAP/FMS COPY DONE MESSAGE-PAC/CPF/FND/PCL^IFCAP FMS MESSAGE SERVER"
44 . D MM^PRC0B2(C,"A(",.B)
45 . QUIT
46 ;
47EXIT ;delete fms conversion message in file 423.6
48 D KILL^PRCOSRV3(PRCRI(423.6))
49 QUIT
50 ;
51CHECK(PRCA,PRCB) ;PRCA=ri of file 423.6, PRCB=^1 txn class from FMS, ^2=description
52 N PRCC,PRCD,A
53 S PRCC=$O(^PRCF(423.6,PRCA,1,9999)) I 'PRCC S PRCERR=2 QUIT ;no message
54 S PRCD=$G(^PRCF(423.6,PRCA,1,PRCC,0)) I PRCD="" S PRCERR=2 QUIT
55 S PRCTY=$P(PRCD,"^",5),A="" S:PRCTY?1.5A A=$T(@PRCTY)
56 I $P(PRCD,"^")'="CTL"!(A="") S PRCERR=3,PRCTY="" QUIT ;wrong type
57 S PRCSEQ=+$P(PRCD,"^",13)_"-"_(+$P(PRCD,"^",14))
58 F S PRCC=$O(^PRCF(423.6,PRCA,1,PRCC)) Q:'PRCC S PRCD=^(PRCC,0)
59 I PRCD'="{" S PRCERR=4 QUIT ;missing txn delimeter
60 QUIT
61 ;
62COPY(PRCA,PRCB) ;PRCA=ri of file 423.6, PRCB=^1 txn class from FMS, ^2=description
63 N PRCC,PRCD,A,X,Y
64 S X=$P(PRCB,"^"),X("DR")="1////"_$P(PRCB,"^",2)_";2///^S X=""N"""_";5////"_PRCSEQ
65 D ADD^PRC0B1(.X,.Y,"420.92;^PRCU(420.92,")
66 I Y=-1 S PRCERR=101 QUIT ;copy failure
67 S PRCRI(420.92)=+Y
68 S PRCC=$O(^PRCF(423.6,PRCA,1,9999))
69 F S PRCC=$O(^PRCF(423.6,PRCA,1,PRCC)) Q:'PRCC S PRCD=^(PRCC,0) D:PRCD["~" Q:PRCERR
70 . S A="420.92;^PRCU(420.92,;"_PRCRI(420.92)_";3~420.923;^PRCU(420.92,"_PRCRI(420.92)_",1,"
71 . S X=0,X("DR")=".01///^S X=DA;1///^S X=$TR(PRCD,""^"",""~"")"
72 . D ADD^PRC0B1(.X,.Y,A) I Y=-1 S PRCERR=102
73 . QUIT
74 I 'PRCERR D EDIT^PRC0B(.X,"420.92;^PRCU(420.92,;"_PRCRI(420.92),"2.5///^S X=""N""","LS")
75 QUIT
76 ;
77 ;
78PAC ;;STATION FCC/PRJ CONVERSION
79CPF ;;STATION CONTROL POINT CONVERSION
80FND ;;ALD/FUND CONVERSION
81PCL ;;PROGRAM CONVERSION
82SUB ;;SUB OBJECT CLASS
83 ;
Note: See TracBrowser for help on using the repository browser.