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

ADEKNT61.m

Go to the documentation of this file.
  1. ADEKNT61 ; IHS/HQT/MJL - COMPILE DENTAL REPORTS ; [ 03/24/1999 9:04 AM ]
  1. ;;6.0;ADE;;APRIL 1999
  1. ;
  1. ASKFY() ;EP
  1. ;Displays FY periods for which objectives data
  1. ;have already been compiled in ^ADEKNT
  1. ;Asks for FISCAL YEAR YYYY
  1. ;Default is most recent FY
  1. ;Returns YYYY.Q where Q is always 3
  1. ;Returns 0 if no valid YYYY entered or hatout
  1. ;
  1. N ADEY,ADEQ,ADEYQ,ADESET,ADECNT,DIR,DTOUT,DUOUT,DIRUT,DIROUT
  1. ;
  1. S ADEYQ=0
  1. F S ADEYQ=$O(^ADEKNT("AD",ADEYQ)) Q:ADEYQ="" D
  1. . Q:$P(ADEYQ,".",2)'=3
  1. . S ADEYQ=$P(ADEYQ,".",1,2)
  1. . S ADEYQ(ADEYQ)=""
  1. . S $P(ADEYQ,".",3)=99999
  1. ;
  1. DIR ;
  1. ;beginning Y2K fix
  1. ;S DIR(0)="F^2:4"
  1. S DIR(0)="F^4:4"
  1. ;end Y2K fix block
  1. S DIR("A")="Select FISCAL YEAR"
  1. S DIR("A",1)="A mail message may be created containing dental statistics"
  1. S DIR("A",2)="for one of the Fiscal years listed above."
  1. ;beginning Y2K fix
  1. ;S DIR("?")="Enter the Fiscal Year (or '^' to exit)"
  1. S DIR("?")="Enter the Fiscal Year as YYYY (or '^' to exit)" ;Y2000
  1. ;end Y2K fix block
  1. I '$O(ADEYQ(0)) W !,"No prior Fiscal year statistics are on file on this computer." Q 0
  1. E S ADEYQ=0 W !!!,"Statistics have been compiled for the following Fiscal years:" F S ADEYQ=$O(ADEYQ(ADEYQ)) Q:'ADEYQ D
  1. . W !,?5,$P(ADEYQ,".")
  1. D ^DIR
  1. I $$HAT^ADEPQA Q 0
  1. ;beginning Y2K fix
  1. ;I X'?1.4N W *7," ??" G DIR
  1. I X'?4N W *7," "_DIR("?") G DIR ;Y2000
  1. ;S ADEY=$P(X,".")
  1. ;I $L(ADEY)>2 S ADEY=$E(ADEY,$L(ADEY)-1,$L(ADEY))
  1. ;I ADEY<80 W *7,!," Must be 1980 or later." G DIR
  1. S ADEY=X
  1. I ADEY<1980 W *7,!," Must be 1980 or later." G DIR ;Y2000
  1. ;end Y2K fix block
  1. S ADEQ=3
  1. I ADEY_"."_ADEQ>$$QTR^ADEKNT5(DT) W *7,!," You must select a prior Fiscal year." G DIR
  1. S ADEYQ=ADEY_".3"
  1. I '$D(ADEYQ(ADEYQ)) W !,"No statistics for FY"_ADEY_" have been compiled on this computer. " G DIR
  1. Q ADEYQ