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

ADEPSUB1.m

Go to the documentation of this file.
ADEPSUB1 ; IHS/HQT/MJL - PRINT SUBROUTINES ;  [ 08/01/2001  1:06 PM ]
 ;;6.0;ADE;**9**;APRIL 1999
 ;
DDS() ;EP - Returns "1/0"
 ;AND SETS UP ARRAY ADEDNAM(DFN)="DENTIST,NAME"
 N ADEDDS,ADEJ
 S ADEDDS=""
 S ADEJ=0
 F  S ADEJ=$O(^DIC(6,ADEJ)) Q:'+ADEJ  D
 . I $D(^DIC(6,ADEJ,0)),$P(^DIC(6,ADEJ,0),U,4)]"",$D(^DIC(7,$P(^DIC(6,ADEJ,0),U,4),9999999)),+^DIC(7,$P(^DIC(6,ADEJ,0),U,4),9999999)=52 D
 . . ;I ADEDDS="" S ADEDDS=ADEJ Q
 . . ;S $P(ADEDDS,",",$L(ADEDDS,",")+1)=ADEJ
 . . Q:'$D(^DIC(16,ADEJ,0))
 . . S ADEDDS=1
 . . S ADEDNAM(ADEJ)=$P(^DIC(16,ADEJ,0),U)
 I ADEDDS="" Q 0
 ;F ADEJ=1:1:$L(ADEDDS,",") S ADEDNAM($P(ADEDDS,",",ADEJ))=$P(^DIC(16,$P(ADEDDS,",",ADEJ),0),U)
 ;S ADEDDS="1^"_ADEDDS
 Q ADEDDS
 ;
HYG() ;EP - Returns "1/0^DFN,DFN,DFN"
 ;AND SETS UP ARRAY ADEHNAM(DFN)="HYGIENIST,NAME"
 N ADEHYG,ADEJ,ADEK,ADEL
 S ADEHYG=""
 S ADEJ=0
 F  S ADEJ=$O(^DIC(6,ADEJ)) Q:'+ADEJ  D
 . I $D(^DIC(6,ADEJ,0)),$P(^DIC(6,ADEJ,0),U,4)]"",$D(^DIC(7,$P(^DIC(6,ADEJ,0),U,4),9999999)),+^DIC(7,$P(^DIC(6,ADEJ,0),U,4),9999999)=46 D
 . . Q:'$D(^DIC(16,ADEJ,0))
 . . S ADEHNAM(ADEJ)=$P(^DIC(16,ADEJ,0),U)
 . . I ADEHYG="" S ADEHYG=ADEJ Q
 . . S $P(ADEHYG,",",$L(ADEHYG,",")+1)=ADEJ Q
 I ADEHYG="" Q 0
 S ADEHYG="1^"_ADEHYG
 Q ADEHYG
 ;
DSERIES ;EP - SETS ADESER ARRAY FOR DENTIST REPORTS
 N ADEK
 F ADEK="ADEPHY-V","HYG/THER DATA ENTRY CHECK" D
 . S ADESER(ADEK)=$O(^ADEDIT("GRP","B",ADEK,0))
 . S ADESER(ADEK)=^ADEDIT("GRP",ADESER(ADEK),1)
 Q
 ;
HSERIES ;EP - SETS ADESER ARRAY FOR HYGIENIST REPORTS
 N ADEK
 F ADEK="V",0:1:4,8,9 D
 . S ADESER(ADEK)=$O(^ADEDIT("GRP","B","ADEPHY-"_ADEK,0))
 . S ADESER(ADEK)=^ADEDIT("GRP",ADESER(ADEK),1) ;MJL/HQT/IHS 8/31/01
 Q
 ;
CALC4 ;EP - $O THRU ADEREP AND SET % MINUTES OF EACH SUBTOTAL NODE
 ;FOR REPORTS WITH 4 TIME PERIODS
 N ADEJ,ADEK,ADETOTM,ADESUBM
 S ADEJ=0
 F  S ADEJ=$O(^TMP("ADEP",ADEU,ADEJ)) Q:ADEJ=""  D
 . Q:'$D(^TMP("ADEP",ADEU,ADEJ,"8. TOTAL"))
 . S ADETOTM=$P(^TMP("ADEP",ADEU,ADEJ,"8. TOTAL"),U,5)
 . S:'ADETOTM ADETOTM=1
 . S ADEK=0
 . F  S ADEK=$O(^TMP("ADEP",ADEU,ADEJ,ADEK)) Q:+ADEK=8  D
 . . Q:'$D(^TMP("ADEP",ADEU,ADEJ,ADEK,"SUBTOTAL"))
 . . S ADESUBM=$P(^TMP("ADEP",ADEU,ADEJ,ADEK,"SUBTOTAL"),U,5)
 . . S $P(^TMP("ADEP",ADEU,ADEJ,ADEK,"SUBTOTAL"),U,6)=$J((ADESUBM/ADETOTM)*100,5,1)_"%" ;^TMP is a transient working global
 K ADETOTM,ADESUBM,ADEJ,ADEK
 Q
 ;
CALC3 ;EP - FOR REPORTS WITH 3 TIME PERIODS
 N ADEJ,ADEK,ADETOTM,ADESUBM
 S ADEJ=0
 F  S ADEJ=$O(^TMP("ADEP",ADEU,ADEJ)) Q:ADEJ=""  D
 . Q:'$D(^TMP("ADEP",ADEU,ADEJ,"8. TOTAL"))
 . S ADETOTM=$P(^TMP("ADEP",ADEU,ADEJ,"8. TOTAL"),U,4)
 . S:'ADETOTM ADETOTM=1
 . S ADEK=0
 . F  S ADEK=$O(^TMP("ADEP",ADEU,ADEJ,ADEK)) Q:+ADEK=8  D
 . . Q:'$D(^TMP("ADEP",ADEU,ADEJ,ADEK,"SUBTOTAL"))
 . . S ADESUBM=$P(^TMP("ADEP",ADEU,ADEJ,ADEK,"SUBTOTAL"),U,4)
 . . S $P(^TMP("ADEP",ADEU,ADEJ,ADEK,"SUBTOTAL"),U,5)=$J((ADESUBM/ADETOTM)*100,5,1)_"%" ;^TMP is a transient working global
 K ADETOTM,ADESUBM,ADEJ,ADEK
 Q