38 lines
2.1 KiB
Mathematica
38 lines
2.1 KiB
Mathematica
PRCALT2 ;WASH-ISC@ALTOONA,PA/RGY-PRINT COLLECTION LETTER UB-82 ;2/28/95 10:44 AM
|
|
V ;;4.5;Accounts Receivable;**48**;Mar 20, 1995
|
|
;;Per VHA Directive 10-93-142, this routine should not be modified.
|
|
NEW DEB,STAT,PRCABN,PRCA,PRCASV,EVN,ERR,DA,DIE
|
|
S STAT=$O(^PRCA(430.3,"AC",102,0))
|
|
F DEB=0:0 S DEB=$O(^RCD(340,"AB","DIC(36,",DEB)) Q:'DEB F PRCABN=0:0 S PRCABN=$O(^PRCA(430,"AS",DEB,STAT,PRCABN)) Q:'PRCABN D CHK
|
|
Q
|
|
CHK I "^21^35^37^39^"'[("^"_$P($G(^PRCA(430.2,+$P($G(^PRCA(430,PRCABN,0)),"^",2),0)),U,7)_"^") G Q
|
|
I $G(^PRCA(430,PRCABN,1)) G Q
|
|
S PRCA7=$G(^PRCA(430,PRCABN,7))
|
|
I $P(PRCA7,U)+$P(PRCA7,U,2)+$P(PRCA7,U,3)+$P(PRCA7,U,4)+$P(PRCA7,U,5)<1 G Q
|
|
I $P(^PRCA(430,PRCABN,0),U,8)'=STAT G Q
|
|
L1 I "^21^35^37^39^"'[("^"_$P(^PRCA(430.2,+$P($G(^PRCA(430,PRCABN,0)),"^",2),0),"^",7)_"^") G Q
|
|
I '$G(^PRCA(430,PRCABN,6)) D G Q
|
|
.D OPEN^RCEVDRV1(9,$P(^RCD(340,DEB,0),"^"),DT,DUZ,$$SITE^RCMSITE(),.ERR,.EVN,$P($G(^PRCA(430,PRCABN,7)),"^",1,5)) Q:ERR]""
|
|
.S $P(^PRCA(430,PRCABN,6),"^")=DT,$P(^(6),"^",9)=DT
|
|
.S DIE="^RC(341,",DA=EVN,DR="5.01////^S X="_PRCABN_";5.02////^S X=1" D ^DIE
|
|
.D CLOSE^RCEVDRV1(EVN,.ERR) I ERR]"" D DEL^RCEVDRV1(EVN)
|
|
.Q
|
|
I $P(^PRCA(430,PRCABN,6),U,4) G Q
|
|
L2 I '$P(^PRCA(430,PRCABN,6),U,2) D G Q
|
|
.S X1=DT,X2=$P(^PRCA(430,PRCABN,6),U,1) D ^%DTC Q:X<45
|
|
.D OPEN^RCEVDRV1(9,$P(^RCD(340,DEB,0),"^"),DT,DUZ,$$SITE^RCMSITE(),.ERR,.EVN,$P($G(^PRCA(430,PRCABN,7)),"^",1,5)) Q:ERR]""
|
|
.S PRCASV("ARREC")=PRCABN,PRCASV("NOTICE")=2 D REPRNT^IBCF13 Q:'IBAR("OKAY")
|
|
.S $P(^PRCA(430,PRCABN,6),U,2)=DT,$P(^(6),"^",9)=DT
|
|
.S DIE="^RC(341,",DA=EVN,DR="5.01////^S X="_PRCABN_";5.02////^S X=2" D ^DIE
|
|
.D CLOSE^RCEVDRV1(EVN,.ERR) I ERR]"" D DEL^RCEVDRV1(EVN)
|
|
.Q
|
|
L3 I '$P(^PRCA(430,PRCABN,6),"^",3) D
|
|
.S X1=DT,X2=$P(^PRCA(430,PRCABN,6),U,2) D ^%DTC Q:X<30
|
|
.D OPEN^RCEVDRV1(9,$P(^RCD(340,DEB,0),"^"),DT,DUZ,$$SITE^RCMSITE(),.ERR,.EVN,$P($G(^PRCA(430,PRCABN,7)),"^",1,5)) Q:ERR]""
|
|
.S PRCASV("ARREC")=PRCABN,PRCASV("NOTICE")=3 D REPRNT^IBCF13 Q:'IBAR("OKAY")
|
|
.S $P(^PRCA(430,PRCABN,6),U,3)=DT,$P(^(6),"^",9)=DT
|
|
.S DIE="^RC(341,",DA=EVN,DR="5.01////^S X="_PRCABN_";5.02////^S X=3" D ^DIE
|
|
.D CLOSE^RCEVDRV1(EVN,.ERR) I ERR]"" D DEL^RCEVDRV1(EVN)
|
|
.Q
|
|
Q Q
|