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

ADEGRL31.m

Go to the documentation of this file.
  1. ADEGRL31 ; IHS/HQT/MJL - DENTAL ENTRY PART 5 ; [ 03/24/1999 9:04 AM ]
  1. ;;6.0;ADE;**26**;APRIL 1999;Build 13
  1. ;;IHS/OIT/GAB 10.2014 Modified for 2015 Code Updates - PATCH 26
  1. DEL ;EP
  1. Q:'$D(ADEV) D LIST^ADEGRL3
  1. D1 W !!,"DELETE WHICH CODE? "
  1. R X:DTIME S:'$T X="^"
  1. Q:X=""!(X="^")
  1. I X["?" W !,?5,"ENTER AN ADA CODE FROM THE ABOVE LIST TO DELETE",!,?10,"OR PRESS 'RETURN' TO DELETE NOTHING" G D1
  1. I '$D(ADEV(X)) W *7,"??" G D1
  1. K ADEV(X),ADEDES(X)
  1. Q
  1. EXIT ;EP
  1. I (X="^Q")!(X="^") S ADENOUPD=1,Y=1 W !!,?20,"***DATA ENTRY ABORTED***",*7 H 1 Q
  1. I ADELOED']"" W !,*7,"YOU MUST ENTER A LOCATION OF ENCOUNTER. ENTER ^L AT THE 'Select ADA CODE",!,"(or Action)' PROMPT TO EDIT LOCATION OF ENCOUNTER." D CON S Y=0 Q
  1. I ADERDNMD']"" W !,*7,"YOU MUST ENTER AN ATTENDING DENTIST. ENTER ^D AT THE 'Select ADA CODE,",!,"(or Action)' PROMPT TO EDIT ATTENDING DENTIST." D CON S Y=0 Q
  1. ;/IHS/OIT/GAB 11.2014 Patch #26 Removed below line to add 2015 codes 9986 & 9987 (cancelled or missed appt.)
  1. ;I '$D(ADEV("0000")),'$D(ADEV("0190")),'$D(ADEV("9130")),'$D(ADEV("9140")) W !,*7,"You must enter a VISIT STATUS Code, either 0000, 0190, 9130, or 9140." D CON S Y=0 Q
  1. ;/IHS/OIT/GAB 11.2014 Patch #26 Added below line to change to 9986 & 9987 for 2015 code updates
  1. I '$D(ADEV("0000")),'$D(ADEV("0190")),'$D(ADEV("9130")),'$D(ADEV("9140")),'$D(ADEV("9986")),'$D(ADEV("9987")) W !,*7,"You must enter a VISIT STATUS Code, either 0000, 0190, 9986, or 9987." D CON S Y=0 Q
  1. ;PROMPT FOR FINISH CONFIRMATION HERE
  1. D HYGCHK
  1. D CHK Q:'Y
  1. S Y=1 Q
  1. ;
  1. CHK W !!,"Ready to file this record" S %=2 D YN^DICN
  1. I %Y["?" W !,?5,"Enter `Y' to save this visit permanently in the computer",!,?5,"Enter `N' to go back and continue editing the visit." G CHK
  1. I %=1 S Y=1 Q
  1. I %=2 S Y=0 Q
  1. S Y=0 Q
  1. ;
  1. HYGCHK ;
  1. Q:ADEPVNM]""
  1. N DIR,ADEFLG,ADEGRP,ADEJ
  1. S ADEFLG=0 S ADEGRP=$O(^ADEDIT("GRP","B","HYG/THER DATA ENTRY CHECK",0)),ADEGRP=^ADEDIT("GRP",ADEGRP,1) D
  1. . F ADEJ=1:1:$L(ADEGRP,"|") I $D(ADEV($P(ADEGRP,"|",ADEJ))) S ADEFLG=1 Q
  1. Q:'ADEFLG
  1. S DIR(0)="Y",DIR("A",1)="Some of the procedures entered are often performed by a HYGIENIST/THERAPIST."
  1. S DIR("A")="Do you want to add a HYGIENIST/THERAPIST for this visit"
  1. S DIR("B")="YES"
  1. D ^DIR
  1. I $$HAT^ADEGRL1()!(Y'=1)!(X[U) Q
  1. D PROV^ADEGRL4
  1. Q
  1. K ADEGRP ;*NE
  1. ;
  1. TFEE ;EP
  1. W !,"TOTAL CHARGE THIS VISIT: ",$J(ADETCH,4,2),"// "
  1. R X:DTIME
  1. I X="" S Y=1 Q
  1. I X["?" W !,"ENTER THE TOTAL CHARGE FOR THIS VISIT" G TFEE
  1. I X["^" S Y=0 Q
  1. S:X["$" X=$P(X,"$",2) I X'?.N.1".".2N!(X>9999)!(X<0) K X W *7," ??" G TFEE
  1. S ADETCH=X,ADETCHF=1,Y=1 Q
  1. CON R !,"(Press ENTER to continue) ",X:DTIME K X Q
  1. FEE ;EP
  1. W !,"FEE: "
  1. S ADEDEF=$S($D(ADEV(ADECOD)):$P(ADEV(ADECOD),U,3),1:"") W:ADEDEF]"" ADEDEF,"// "
  1. R ADEFEE:DTIME S:'$T ADEFEE="^"
  1. S:ADEFEE="" ADEFEE=+ADEDEF
  1. I ADEFEE["?" S ADEHOLD=Y(0),XQH="ADE-DVIS-CDV-FEES" D EN^XQH,LIST^ADEGRL3 W !,"ADA Code: ",ADECOD S Y(0)=ADEHOLD K ADEHOLD,XQH G FEE
  1. I ADEFEE["^" S ADEY=0 Q
  1. S:ADEFEE["$" ADEFEE=$P(ADEFEE,"$",2) I ADEFEE'?.N.1".".2N!(ADEFEE>9999)!(ADEFEE<0) K ADEFEE W *7," ??" G FEE
  1. S $P(ADEV(ADECOD),U,3)=ADEFEE
  1. Q