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

ADEATT.m

Go to the documentation of this file.
ADEATT ; IHS/HQT/MJL - ATTENDING DDS STMT I ;12:31 PM  [ 03/24/1999   9:04 AM ]
 ;;6.0;ADE;;APRIL 1999
 ;------->INIT
CTRL S $P(ADELIN,"$",79)="",ADETITL="ATTENDING DENTIST STATEMENT"
 S ADEFAST=0,ADEINT=0
 ;------->PATIENT LOOKUP
 S ADENEWVS=0,ADEDIR=1,ADECON=0,AUPNLK("ALL")=""
 D PTLOOK G:Y<1 END
VIS ;------->VISIT LOOKUP
 D ^ADEGRL2 G:'Y CTRL I ADENEWVS W " ??",*7 G VIS
 D HRN^ADEGRL3
 ;------->LOAD LOCALS
 S ADECON=1,ADEDIR=0 D MOD^ADEGRL
 ;------->LOAD FEES BASED ON ^ADEFEE
INT D FEE^ADEATT2 S ADETCHF=0
 D LIST^ADEGRL3
 ;------->PROMPT FOR CARRIER INFO (ENTER HERE INTERNALLY)
 D INS G:Y<1 RET
 ;------->PROMPT FOR FEES
 D ^ADEATT2 G:'Y RET
 ;------->UPDATE INSURANCE ELIGIBLE FILE
 I ADEINSN'["MEDICAID",ADEINSN'["MEDICARE",ADEINSN'["RAILROAD RETIREMENT" D ^ADEATT3
 ;------->DEVICE SELECTION
 S %ZIS="Q" D ^%ZIS G:POP RET I $D(IO("Q")) K IO("Q") D QUE W !,"REQUEST QUEUED." G RET
 ;------->PRINT STATEMENT
 D ^ADEATT4
RET ;------->RETURN
 I 'ADEINT D END G CTRL
 I ADEINT D ENDINT Q
END ;------->END
 D END^ADEGRL
 K ADEINS,ADEINSN,ADENOD,ADEINT
 Q
PTLOOK ;
 K DIC,Y,ADEPAT D ^ADECLS R "Select Dental Patient Name: ",X:DTIME
 I '$T!(X="")!(X["^") S Y=-1 Q
 I X["?" S XQH="ADE-DVIS-PATIENT" D EN^XQH K XQH G PTLOOK
 S DIC="^AUPNPAT(",DIC(0)="MEZQ" D ^DIC K DIC
 G:Y<1 PTLOOK
 S ADEPAT=$P(Y,U)
 S Y=1 Q
INS K DIC,Y R !,"Select INSURER: ",X:DTIME
 I '$T!(X="")!(X["^") S Y=-1 Q
 S DIC="^AUTNINS(",DIC(0)="MEZQ"
 I X["?" S X="?" D ^ADECLS,^DIC R "Press `Return' to continue: ",X:DTIME D LIST^ADEGRL3 G INS
 S DIC="^AUTNINS(",DIC(0)="MEZQ"
 D ^DIC K DIC
 G:Y<1 INS
 S ADEINS=+Y,ADEINSN=$P(Y,U,2)
 S Y=1 Q
INS2 ;Not allowed to edit the Insurer file
 Q
 S Y=1 D INS3
 I 'ADEDIT S Y=1 Q
 W !?5,"Please provide Address information for this insurer (`^' to abort):"
 S DIE="^AUTNINS(",DR=".02;.03;.04;.05",DA=ADEINS,DIE("NO^")="OUTOK"
 D ^DIE K DR,DIE,DA
 D INS3 I ADEDIT S Y=0 W !?5,"***INCOMPLETE INSURER ADDRESS -- ABORTED***" H 1 Q
 S Y=1 Q
INS3 S ADEDIT=0 F J=2:1:5 I $P(^AUTNINS(ADEINS,0),U,J)="" S ADEDIT=1
 Q
DUZ1 Q
DUZ2 Q
 ;
QUE S ZTRTN="^ADEATT4",ZTDESC="ATTENDING DDS STATEMENT"
 F Z="ADEDES(","ADEINS","ADEINSN","ADEPAT","ADEPNM","ADERDNM","ADERDNMD","ADETCH","ADEV(","ADEVFM" S ZTSAVE(Z)=""
 D ^%ZTLOAD
 Q
EN ;EP
 N ADECON,ADEDIR,ADELIN,ADEFAST,ADETCHF,ADETITL
 S ADECON=1,ADEDIR=0,ADEFAST=0,ADEINT=1
 S $P(ADELIN,"$",79)="",ADETITL="ATTENDING DENTIST STATEMENT"
 G INT
ENDINT S X=0 F J=0:0 S X=$O(ADEV(X)) Q:X=""  S $P(ADEV(X),U,3)=""
 K ADEDIR,ADECON,ADELIN,ADEFAST,ADETCHF,ADEINT,ADEINS,ADEINSN,ADENOD
 Q