Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RCCPW

RCCPW.m

Go to the documentation of this file.
  1. RCCPW ;WASH-ISC@ALTOONA,PA/TJK-CO-PAY WAIVER ;11/23/94 9:52 AM
  1. V ;;4.5;Accounts Receivable;;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. N SITE,MO,YR,LINE,BEG,END,START,QUIT,DIR,DIRUT,LNNO,TEXT
  1. ENTERDT I +$E(DT,6,7)>7 W !,*7,"This data can only be entered between the 1st and the 7th of the month." H 3 Q
  1. S SITE=$$SITE^RCMSITE()
  1. S MO=$E(DT,4,5)-1,YR=$E(DT,2,3) S:$L(MO)'=2 MO="0"_MO
  1. I +MO=0 S MO=12,YR=YR-1 S:+YR=0 YR=100
  1. S YR=YR+200
  1. S DIR("A")="Enter Month/Year of Waiver Data"
  1. S DIR(0)="D^:"_(YR_MO_31)_":EP"
  1. S Y=YR_MO_"00" D DD^%DT S DIR("B")=Y
  1. D ^DIR Q:Y<0 K DIR
  1. I $E(Y,4,5)="00" W !,*7,"You must enter month and year" G ENTERDT
  1. S BEG=$E(Y,1,5)_"00",END=$E(Y,1,5)_32
  1. S START=9
  1. READ F I=START:1:20 Q:$D(QUIT) D ENTER(I)
  1. I $D(QUIT),QUIT S START=QUIT K QUIT G READ
  1. Q:$D(QUIT)
  1. DISPLAY ;Display user input-allows editing of data
  1. W @IOF F I=9:1:20 D
  1. .W !,"LINE ",I,?10,$S(I#2:"SC",1:"NSC")_","_$$TEXT(I)
  1. .W ?40,"# OF BILLS: ",$J($P(LINE(I),U),6)," ","Amount: ",$J($P(LINE(I),U,2),12,2)
  1. .Q
  1. K DIR S DIR(0)="Y",DIR("A")="Is Data Correct",DIR("B")="NO"
  1. D ^DIR G LOAD:Y Q:$D(DIRUT)
  1. K DIR S DIR(0)="NO^9:20:0",DIR("A")="Line Number to Edit" D ^DIR
  1. G DISPLAY:Y="",DISPLAY:$D(DIRUT) D ENTER(Y) G DISPLAY
  1. LOAD ;CALLS TASKMAN TO DO BACKGROUND JOB
  1. K ^TMP("RCCPW",$J) F I=9:1:20 S ^TMP("RCCPW",$J,I)=LINE(I)
  1. S ZTRTN="^RCCPW1",ZTSAVE("BEG")="",ZTSAVE("END")="",ZTSAVE("SITE")=""
  1. S ZTSAVE("^TMP(""RCCPW"",$J,")="",ZTDTH=$H,ZTIO="" D ^%ZTLOAD
  1. K ^TMP("RCCPW",$J) W !,*7,"Report Queued"
  1. K ZTDTH,ZTIO,ZTRTN,ZTSAVE
  1. Q
  1. ENTER(LNNO) ;Data entry done here--needs Line number
  1. W !!,"Data Entry for Line ",LNNO,!,$S(I#2:"SC",1:"NSC")," ",$$TEXT(LNNO)
  1. K DIR,X,Y S DIR(0)="N^0:999999:0",DIR("A")="Enter Total Number of Bills"
  1. I $P($G(LINE(LNNO)),U) S DIR("B")=$P(LINE(LNNO),U)
  1. D ^DIR,CHECK Q:$D(QUIT)
  1. S $P(LINE(LNNO),U)=Y
  1. K DIR,X,Y S DIR(0)="N^0:999999999.99:2",DIR("A")="Enter Total Amount"
  1. I $P($G(LINE(LNNO)),U,2) S DIR("B")=$P(LINE(LNNO),U,2)
  1. D ^DIR,CHECK Q:$D(QUIT)
  1. K DIR S $P(LINE(LNNO),U,2)=Y
  1. Q
  1. CHECK ;
  1. K QUIT
  1. I X?1"^"1.2N S QUIT=$E(X,2,3) Q:QUIT'>LNNO I QUIT>LNNO W !,*7,"No Forward Jumping Allowed" S QUIT=LNNO Q
  1. I $D(DIRUT) S QUIT="" Q
  1. Q
  1. TEXT(I) ;Computes Line Text
  1. S TEXT=$S(I<11:"Initial Waiver Request",I<13:"Waiver Request Resolved",I<15:"Appeal Waiver",I<17:"Appeal Waiver Resolved",I<19:"Waiver Approved Refund",1:"Appeal Approved Refund")
  1. Q TEXT