source: WorldVistAEHR/trunk/r/BENEFICIARY_TRAVEL-DGBT/DGBTE1A.m@ 701

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1DGBTE1A ;ALB/SCK - BENEFICIARY TRAVEL FIND OLD CLAIMS PART 2; 1/22/93@1530
2 ;;1.0;Beneficiary Travel;;September 25, 2001
3 ;
4 ;
5 Q
6NOW ; date/time entry for NOW
7 S (Y,Y1)=$$NOW^XLFDT()
8 Q
9OTHR ; date/time entry for manually entered date
10 S %DT(0)="-NOW" D ^%DT S Y1=Y K %DT,%DT(0)
11 Q
12OLD ; date/time entry for select from past dates
13LIST2 ; find all previous claims, get total count in DGBTC and put those claims in utility file
14 N X1,YY
15 S (DGBTC,DGBTCH,DGBTCH1)=0
16 F I=0:0 S I=$O(^DGBT(392,"AI",DFN,I)) Q:'I S DGBTC=DGBTC+1,^TMP("DGBT",$J,DGBTC,I)=9999999.99999-I ; order through claim file
17 I '$D(^TMP("DGBT",$J))!('$D(^DGBT(392,"C",DFN))) W !!?10,"There are no entries on file for this patient",! S Y1=-1 G EXIT
18 ; build temporary global array using dates in utility file, converted to external format dates
19 F I=0:0 S I=$O(^TMP("DGBT",$J,I)) Q:'I F J=0:0 S J=$O(^TMP("DGBT",$J,I,J)) Q:'J S K=I,VADAT("W")=^(J) D ^VADATE S ^TMP("DGBTARA",$J,K)=VADATE("E")
20LIST3 ; list claims (in external format) from temporary global, 5 at a time. Loop thru list until selection made.
21 S DGBTCH=1 W ! F X1=1:1:DGBTC W !?5,X1,".",?10,^TMP("DGBTARA",$J,X1) I X1#5=0!(X1=DGBTC) D CHOZ I $D(DUOUT)!$D(DTOUT)!(Y>0) S Y1=$S(+Y>0:Y,1:-1) K DIR Q
22 G:'$D(DTOUT)&Y="" LIST3
23 S Y1=$S(+Y>0:Y,1:-1) K DIR
24EXIT ;
25 K X1,YY,DGBTCHK,^TMP("DGBT",$J),^TMP("DGBTARA",$J)
26 Q
27CHOZ ; select from the displayed past claims dates for claim to be edited.
28 W !! S (Y1,Y)=0,DGBTCH1=X1,DIR(0)="FO^1:5",DIR("A")="Select CLAIM"
29 S DIR("A",1)="Type '^' to exit date list, or <RETURN> to display more dates"
30 S DIR("?")="Entering a '^' will exit the Past CLAIM list, entering <RETURN> will continue to scroll through past dates.",DIR("?",1)="Select a Past CLAIM date by number, or enter 'N' for NOW."
31 D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) S Y1=-1 Q
32 I Y="N"!(Y="n") W " " D NOW Q
33 Q:Y=""
34 I X<DGBTCH!(X>DGBTCH1)!(X'=+X) W !?25,*7,"INVALID ENTRY!" G CHOZ ; value must be between 1 and last displayed number
35 I X,$D(^TMP("DGBT",$J,X)) S Y=$O(^TMP("DGBT",$J,X,0)),Y=^TMP("DGBT",$J,X,Y),CHZFLG=1
36 Q
37HELP ;
38 S %DT="EXR" D ^%DT
39 W !!,"Time is required when adding a new CLAIM date.",!,"If there is more than one claim per date, select by number to edit."
40 Q
Note: See TracBrowser for help on using the repository browser.