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

ADEMPRT.m

Go to the documentation of this file.
  1. ADEMPRT ; IHS/HQT/MJL - FOLLOWUP GROUP OUTPUT ;07:02 PM [ 03/24/1999 9:04 AM ]
  1. ;;6.0;ADE;;APRIL 1999
  1. ;------->INIT
  1. K DIS
  1. ;------->GET SEARCH TEMPLATE
  1. D TEM G:Y<1 END
  1. ;------->GET OUTPUT FORM
  1. D FORM G:'Y END
  1. ;------->GET HEADER
  1. I '$D(FLDS) D DHD G:'Y END
  1. I $D(FLDS),FLDS'["LET" D DHD G:'Y END
  1. ;------->CALL DIP
  1. D DIP
  1. ;------->END
  1. END K ADEMDFN,ADEPAT,ADEQ,ADESUB,ADETMD,ADEDHIT Q
  1. TEM K DIC S DIC="^DIBT(",DIC("A")="Select SEARCH TEMPLATE: ",DIC(0)="AEQMZ",DIC("S")="I $P(^(0),U,4)=9002003.2,$P(^(0),U,5)=DUZ,$D(^(""DIS""))" D ^DIC K DIC Q:Y<1
  1. S ADETMD=+Y,BY="["_Y(0,0)_"],.01",FR="",TO=""
  1. I '$D(^DIBT(ADETMD,1)) W !,"***NO DATA IN TEMPLATE***" S Y=0
  1. Q
  1. DIP S DIC="^ADEFOL(" D EN1^DIP Q
  1. FORM W !!?5,"OUTPUT FORMAT:",!,?10,"1. Letters",!,?10,"2. Standard Sorted List",!,?10,"3. Customized List",!,?5,"Select FORMAT (1-3): "
  1. R FLDS:DTIME S:'$T FLDS=""
  1. I FLDS=""!(FLDS["^") S Y=0 Q
  1. S FLDS=$S(FLDS=1:"[ADEMLET]",FLDS=2:"[ADEMLST]",FLDS=3:"USER",1:"")
  1. I FLDS="" W *7," ??" G FORM
  1. S Y=1,L=0
  1. D DHIT K:FLDS="USER" FLDS Q
  1. Q
  1. DHD S Y=0 W !,"HEADING: DENTAL FOLLOWUP LIST// "
  1. R DHD:DTIME I '$T S DHD="^" Q
  1. Q:DHD["^"
  1. I DHD["?" W !!,?5,"Enter the Report Heading." G DHD
  1. S:DHD="" DHD="DENTAL FOLLOWUP LIST"
  1. S Y=1 Q
  1. DHIT S Y=0 K DHIT
  1. I FLDS="[ADEMLET]" S ADEDHIT=" LETTER PRINTED" G DHIT1
  1. W !,"ACTION TO BE TAKEN: " R ADEDHIT:DTIME S:'$T ADEDHIT="^"
  1. Q:ADEDHIT="^"
  1. I $E(ADEDHIT,1,2)["?" W !,?5,"Enter the Action to be Taken based on the list you are about to print out.",!?5,"or press `RETURN' to skip." G DHIT
  1. I ADEDHIT="" S Y=1 Q
  1. I ADEDHIT="@" S DHIT="S $P(^ADEFOL(D0,0),U,6)=""""",Y=1 Q
  1. S ADEDHIT=" "_ADEDHIT
  1. S X=ADEDHIT S:X["^" X="^" X $P(^DD(9002003.2,5,0),U,5,99) I '$D(X) W *7,!?5,"ANSWER MUST BE 3-30 CHARACTERS AND NOT CONTAIN `^'" G DHIT
  1. DHIT1 S DHIT="S $P(^ADEFOL(D0,0),U,6)=$E(DT,4,5)_""/""_$E(DT,6,7)_""/""_$E(DT,2,3)_"_$C(34)_ADEDHIT_$C(34)
  1. S Y=1 K X Q