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

ADEMP.m

Go to the documentation of this file.
ADEMP ; IHS/HQT/MJL  - DENTAL FOLLOWUP OUTPUT ;08:04 PM  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 ;CALL AT EN TO GET OUTPUT FOR INDIVIDUAL PATIENT
INIT ;ADEMCAT="rc" set in Calling option
 G:'$D(ADEMCAT) END
 ;------->GET TYPE - ENDO,PROS,ETC
 D TYPE G:Y<1 END S ADEMTYP=+Y,ADEMTYPN=Y(0,0)
 ;------->LETTERS OR SORTED LIST?
 D FORM G:Y<1 END
 ;------->SET SCREENS
 D SCR G:Y<1 END
 ;------->CALL DIS
 D DIS G END
END ;------->END
 K ADEMCAT,ADEMTYP,ADEMTYPN Q
TYPE K DIC S DIC="^ADETYP(",DIC("S")="I $P(^(0),U,4)=ADEMCAT",DIC(0)="AEQMZ",DIC("A")="Select "_$S(ADEMCAT="w":"WAITING ",ADEMCAT="rc":"RECALL",1:"REFERRAL")_" LIST: " D ^DIC K DIC
 Q
DIBT K DIC S DIC="^DIBT(",X=ADETEM,DIC(0)="LZ",DIC("DR")="4///9002003.2"
 K DD,DO D FILE^DICN S ADETDFN=+Y K DIC
 Q
DELDBT I '$D(^DIBT("B",ADETEM)) Q
 S DA=$O(^DIBT("B",ADETEM,0))
 S DR=".01///@",DIE="^DIBT("
 D ^DIE K DR,DA,DIE
 Q
PRINT K DIC S DIC="^ADEFOL(",BY="["_ADETEM_"]",FR="",TO=""
 D EN1^DIP
 K DIC
 Q
FORM S FLDS="[ADEMLST]"
 S Y=1,L=0,BY=".01",DHD=ADEMTYPN_" "_$S(ADEMCAT="w":"WAITING",ADEMCAT="rc":"RECALL",ADEMCAT="rf":"RECALL",1:"")_" LIST"
 Q
SCR S DIS(0)="I $P(^ADEFOL(D0,0),U,2)=ADEMTYP"
 S Y=1 Q
DIS K DIC S DIC="^ADEFOL(" S DICS="I $P(^(0),U)'=""CATEGORY"",$P(^(0),U)'=""TYPE""" D EN^DIS K DIC,DICS,DIS(0)
 Q
EN ;EP -    INTERNAL ENTRY POINT WITH ENTRY IN ^ADEFOL DEFINED AS ADEMDFN
 ;        TO PRINT LETTER FOR INDIVIDUALLY SELECTED PT.
 ;ADEMDFN=19 set in calling option
 S ADETEM="ADEMP"_$J D DELDBT,DIBT
 ;------->SET DIBT NODE
E2 S ^DIBT(ADETDFN,1,ADEMDFN)=""
 ;------->OUTPUT
E3 G:'$D(^DIBT(ADETDFN,1)) E4
 S FLDS="[ADEMLET]"
 S DHIT="S $P(^ADEFOL(D0,0),U,6)=$E(DT,4,5)_""/""_$E(DT,6,7)_""/""_$E(DT,2,3)_"_$C(34)_" LETTER PRINTED"_$C(34)
 D PRINT
 ;------->DELETE ENTRY IN ^DIBT
E4 D DELDBT
 ;------->END
 K ADEMDFN,ADETEM,ADETDFN Q