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

DGBTE1A.m

Go to the documentation of this file.
  1. DGBTE1A ;ALB/SCK - BENEFICIARY TRAVEL FIND OLD CLAIMS PART 2; 1/22/93@1530
  1. ;;5.3;Registration;**35,69,1015**;Aug 13, 1993;Build 21
  1. ;
  1. ;
  1. Q
  1. NOW ; date/time entry for NOW
  1. S (Y,Y1)=$$NOW^XLFDT()
  1. Q
  1. OTHR ; date/time entry for manually entered date
  1. S %DT(0)="-NOW" D ^%DT S Y1=Y K %DT,%DT(0)
  1. Q
  1. OLD ; date/time entry for select from past dates
  1. LIST2 ; find all previous claims, get total count in DGBTC and put those claims in utility file
  1. N X1,YY
  1. S (DGBTC,DGBTCH,DGBTCH1)=0
  1. 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
  1. 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
  1. ; build temporary global array using dates in utility file, converted to external format dates
  1. 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")
  1. LIST3 ; list claims (in external format) from temporary global, 5 at a time. Loop thru list until selection made.
  1. 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
  1. G:'$D(DTOUT)&Y="" LIST3
  1. S Y1=$S(+Y>0:Y,1:-1) K DIR
  1. EXIT ;
  1. K X1,YY,DGBTCHK,^TMP("DGBT",$J),^TMP("DGBTARA",$J)
  1. Q
  1. CHOZ ; select from the displayed past claims dates for claim to be edited.
  1. W !! S (Y1,Y)=0,DGBTCH1=X1,DIR(0)="FO^1:5",DIR("A")="Select CLAIM"
  1. S DIR("A",1)="Type '^' to exit date list, or <RETURN> to display more dates"
  1. 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."
  1. D ^DIR K DIR I $D(DTOUT)!($D(DUOUT)) S Y1=-1 Q
  1. I Y="N"!(Y="n") W " " D NOW Q
  1. Q:Y=""
  1. I X<DGBTCH!(X>DGBTCH1)!(X'=+X) W !?25,*7,"INVALID ENTRY!" G CHOZ ; value must be between 1 and last displayed number
  1. I X,$D(^TMP("DGBT",$J,X)) S Y=$O(^TMP("DGBT",$J,X,0)),Y=^TMP("DGBT",$J,X,Y),CHZFLG=1
  1. Q
  1. HELP ;
  1. S %DT="EXR" D ^%DT
  1. W !!,"Time is required when adding a new CLAIM date.",!,"If there is more than one claim per date, select by number to edit."
  1. Q