source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCS58.m@ 1606

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1PRCS58 ;SF-ISC/LJP/DXH - 1358 UTILITY CALLS ; 4/23/01 1:23pm
2V ;;5.1;IFCAP;**31**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5EN1 ;ASKS STATION,CONTROL POINT,OBLIGATION NUMBER (SCREEN ON CP AND IF OPEN 1358)
6 ;RETURNS Y=IRN^STA-OB#^CP^APPROP^CC^SA1^SA1$^SA2^SA2$^(sub)station code; Y=-1 IF FAILED IF NOT VALID STATION,CONTROL POINT,OBLIGATION,AND AN OPEN 1358 FORM.
7 I '$D(PRCS("X")) D EN3F^PRCSUT(1) G:'$D(PRC("SITE"))!('$D(PRC("CP")))!(Y<0) ER1
8EN1A S DIC="^PRC(442,",DIC(0)="AEMQZ",DIC("S")="S ZX=^(0) I +ZX=+PRC(""SITE""),+$P(ZX,U,3)=+PRC(""CP""),+$P(ZX,U,2)=21" S:$D(PRCS("A")) DIC("A")=PRCS("A")
9 S:$D(PRCS("X")) DIC(0)="MQXZ",X=PRCS("X"),DIC("S")="S ZX=^(0) I $P(ZX,U,2)=21" D ^DIC K DIC,ZX G ER1:Y<0
10 I '$D(PRCS("X")) S ZX=$S($D(^PRC(442,+Y,7)):+^(7),1:"") I ZX=""!(ZX=40)!(ZX=45)!(ZX=105) W $C(7),!,"Obligation number not accessible." K ZX,Y G EN1A
11 S ZX=$P($G(^PRC(442,+Y,23)),"^",7) S:ZX ZX=$P(^PRC(411,ZX,0),"^",1)
12 S Y=Y_U_$P(Y(0),U,3,9),$P(Y,"^",10)=ZX,PRCSCPAN=$P(Y(0),"^",12)
13 K PRCS("A"),PRCS("X"),ZX QUIT
14 ;
15EN2 ;POST A TRANSACTION Y=1 IF SUCCESSFUL, +Y=0 WHEN FAILED AND Y CONTAINS ERROR MESSAGE
16 ;requires PRCSX=Sta-obl#^int. Date/time^est amt^act amt^reference^comments(up to 78 characters)^interface id^complete payment flag
17 ;PRCS("TYPE")= "FB" or "COUNTER"
18 I '$D(X) S Y="NO ENTRY PASSED" G EX
19 S PRCSX=X S:$P(PRCSX,U,3)="" $P(PRCSX,U,3)=$P(PRCSX,U,4)
20 S PRCSON=$O(^PRC(442,"B",$P(PRCSX,U),0)) I PRCSON'>0 S Y="OBLIGATION NUMBER NOT FOUND" G EX
21 S PRCSCPAN=$P(^PRC(442,PRCSON,0),U,12) I 'PRCSCPAN S Y="CPA NUMBER INVALID" G EX
22 I '$D(^PRC(420,+PRCSX,1,+$P(^PRC(442,PRCSON,0),U,3),1,DUZ,0)) S Y="Unauthorized control point user" G EX
23 I '$D(^PRC(424,"AD",$P(PRCSX,U))) S Y="OBLIGATION HAS NOT BEEN ESTABLISHED" G EX
24 I $D(^PRC(442,PRCSON,7)) S PRCSS=$P(^(7),U) I $O(^PRCD(442.3,"AC",+PRCSS,0))=40 S Y="TRANSACTION IS COMPLETE" G EX
25 I '$D(^PRC(442,PRCSON,8)) S Y="NO SERVICE BALANCE ESTABLISHED" G EX
26 ;FEE BASIS PAYMENT AMOUNT IS IFCAP'S DAILY RECORD ACTUAL AMOUNT
27 ;FEE BASIS COMMITTED AMOUNT IS IFCAP'S DAILY RECORD ESTIMATED AMOUNT
28 ;DAILY RECORD REFERENCE BALANCE = OBLIGATED $ MINUS ESTIMATED $ PLUS NET/ADJ $
29 ;DAILY RECORD SERVICE BALANCE = OBLIGATED $ MINUS ACTUAL AMOUNTS
30 I $P(PRCSX,U,3)>(+^PRC(442,PRCSON,8)-$P(^PRC(442,PRCSON,8),U,3)) S Y="INSUFFICIENT REFERENCE BALANCE TO POST COMMITTED AMOUNT" G EX
31 I $P(PRCSX,U,4)>$P(^PRC(442,PRCSON,8),U) S Y="INSUFFICIENT SERVICE BALANCE TO POST ACTUAL AMOUNT" G EX
32 S %DT="TX",X=$P(PRCSX,U,2) D ^%DT S:Y>0 $P(PRCSX,U,2)=Y I Y=-1 S Y="INVALID DATE/TIME" G EX
33 I $P(PRCSX,U,3)=""&($P(PRCSX,U,4)="") S Y="NEED AT LEAST AN ESTIMATE OR AN ACTUAL AMOUNT" G EX
34 I $P(PRCSX,U,5)="" S Y="NEED THE REFERENCE FOR THIS OBLIGATION" G EX
35 S X=$P(PRCSX,U) S:$D(FBSEQ)#10=1 X=X_"-"_$P(PRCSX,U,5) I $D(FBSEQ)#10=0 D EN1^PRCSUT3 I 'X S Y="COULD NOT CREATE RECORD" G EX
36 S DLAYGO=424,DIC="^PRC(424,",DIC(0)="LXZ" D FILE^DICN I Y<0 S Y="COULD NOT CREATE RECORD" G EX
37 S (PRCSDA,DA)=+Y,DIE="^PRC(424,",DR=".02///^S X=PRCSON;.15///^S X=PRCSCPAN;.12///^S X=$S($P(PRCSX,U,3)>0:$P(PRCSX,U,3),1:$P(PRCSX,U,4));.1///^S X=$P(PRCSX,U,5);1.1///^S X=$P(PRCSX,U,6);.03///^S X=""AU"";"
38 S DR(1,424,1)=".05///^S X=$S($P(PRCSX,U,3)>0:$P(PRCSX,U,3),1:$P(PRCSX,U,4));.13///^S X=$S($P(PRCSX,U,3)>0:$P(PRCSX,U,3),1:$P(PRCSX,U,4));.07////^S X=$P(PRCSX,U,2);.08////^S X=DUZ;4////^S X=$P(PRCSX,U,7)" D ^DIE
39 S PRCSDA=1_U_DA
40 S X=^PRC(424,DA,0),AUDA=DA,AUDA0=$P(X,U,1),BAL1=$P(X,U,12),TIME=$P(PRCSX,U,2),PODA=$P(X,U,2)
41 D LREC^PRCEAU0
42 I $P(PRCSX,U,4)]"" S PRCSX=$P(PRCSDA,U,2)_"^"_$P(PRCSX,U,2)_"^"_$P(PRCSX,U,4)_"^"_$P(PRCSX,U,6)_"^"_$P(PRCSX,U,8)_"^"_$P(PRCSX,U,5) D ^PRCS58CC
43 S Y=PRCSDA K DA,DR,DIE,AUDA,AUDA0,BAL1,TIME,PODA G EX
44EN3 ;TAKE OBLIGATION#, CHECK IF AN OPEN 1358. IF OK Y=1
45 G:'$D(PRCS("X")) ER3 S X=$O(^PRC(442,"B",PRCS("X"),0)) G ER3:'$D(^PRC(442,+X,0)) S Y=$S($D(^(7)):$P(^(7),U),1:"") I Y=""!(Y=40)!(Y=45)!(Y=105) G ER3
46 S Y=1 K X,PRCS("X") Q
47ER1 S Y=-1 K PRCS("A"),PRCS("X") Q
48 ;
49ER3 S Y=-1 K X,PRCS("X") Q
50EX K PRCSDA,PRCSON,PRCS,PRCSS,PRCSX,DLAYGO Q
51 ;
52FB() ;FEE BASIS calm code sheet record identifier for 994
53 ;this extrinsic variable called from edit-template for code sheet
54 S X="FEN"
55 I $T(HDR^FBAAUTL3)]"" S X=$$HDR^FBAAUTL3
56 Q X
Note: See TracBrowser for help on using the repository browser.