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