DENTARA ;ISC2/HAG-RELEASE ALL SERVICE REPORT ; 11/3/88 6:19 PM ;
;;1.2;DENTAL;**1,9,24**;JAN 26, 1989
W !! K ^UTILITY($J,"DENTERR"),^UTILITY($J,"DENTV"),^UTILITY($J,"DENTR"),^UTILITY($J,"DENTP") S Z5="",Z1=0 G W:'$D(^DENT(225,0)) F Z3=0:1:2 S Z1=$O(^(Z1)) Q:Z1'>0 S Z2=Z1
G:Z3=0 W I Z3>1 S DIC="^DENT(225,",DIC(0)="AEMNQZ",DIC("A")="Select STATION.DIVISION: " S:$D(DENTSTA) DIC("B")=$S(DENTSTA[" ":+DENTSTA,1:DENTSTA) D ^DIC Q:Y<0 K DIC("A"),DIC("B")
S Z1=$S(Z3=1:Z2,1:+Y) S (DENTSTA,Z3)=$P(^DENT(225,Z1,0),U,1),DENTZ1=Z3 I DENTSTA="" D W S Y=-1 Q
S:$L(DENTSTA)=3 DENTSTA=DENTSTA_" "
D1 W !!,"Enter the starting and ending dates you wish to release. ",!
S %DT("A")="STARTING DATE: ",%DT="AEPX" D ^%DT K %DT("A") G EXIT:Y<0 S DENTSD=Y,(TD,SD)=DENTSD-.0001 X ^DD("DD") S H1=Y
D2 S %DT("A")="ENDING DATE: ",%DT="AEPX" D ^%DT K %DT("A") G EXIT:Y<0 S DENTED=Y+.24 X ^DD("DD") S H2=Y
I DENTED<SD W *7,!!,"End date before Start Date?" G D1
CLASS ;CLASS I-VI
W @IOF,!!,?10,"Processing Class I-VI report",! R F1:2
F F1=0:0 S X3=223,SD=$O(^DENT(223,"B",SD)) Q:SD>DENTED!(SD'>0) S DENT1=$O(^(+SD,0)) Q:DENT1'>0 S D2=$P(^DENT(223,DENT1,0),"^",29) I $S(D2'=DENTZ1:0,'$D(^(.1)):1,'$P(^(.1),"^",2):1,1:0) D S,^DENTAR3,EN1^DENTAR S F1=1
I 'F1 W !,"There is no Class I-IV data to release for the timeframe you specified",*7 R X:3
PERS ;PERSONAL REPORT
W @IOF,!!,?10,"Processing Adminstrative Personnel report",! R F1:3 S SD=TD
F F1=0:0 S X3=224,SD=$O(^DENT(224,"B",SD)) Q:SD>DENTED!(SD'>0) S DENT1=$O(^(+SD,0)) Q:DENT1'>0 S D2=$P(^DENT(224,DENT1,0),"^",10) I $S(D2'=DENTZ1:0,'$D(^(.1)):1,'$P(^(.1),"^",2):1,1:0) D S,^DENTAR4 I '$D(DENTF) D EN1^DENTAR S F1=1
I 'F1 W !,"There is no personnel data to release for the timeframe you specified",*7 R X:3
K DENTF
FEE ;FEE BASIS REPORT
W @IOF,!!,?10,"Processing Applications and Dental Fee report",! R F1:2 S SD=TD
F F1=0:0 S X3=222,SD=$O(^DENT(222,"B",SD)) Q:SD>DENTED!(SD'>0) S DENT1=$O(^(+SD,0)) Q:DENT1'>0 S D2=$P(^DENT(222,DENT1,0),"^",28) I $S(D2'=DENTZ1:0,'$D(^(.1)):1,'$P(^(.1),"^",2):1,1:0) D S,^DENTAR5,EN1^DENTAR S F1=1
I 'F1 W !,"There is no applications and dental fee data to release for the time frame",!,"you specified",*7 R X:3
TREAT ;TREATMENT REPORT
W @IOF,!!,?10,"Processing Treatment data report",! R F1:2 S Z3=DENTZ1
D NOREV^DENTAR16 D:'$D(DENTF1) EN1^DENTAR1
G EXIT
S S (DENTY0,Y(0))=^DENT(X3,DENT1,0),Z2=DENTZ1,(DENT,Z)=$P(Y(0),"^"),Z1=1700+$E(Z,1,3),Z=+$E(Z,4,5)+2,Z=$P($T(DATE),";",Z),Z1=Z_" "_Z1,Z3="STATION NUMBER: "_Z2 Q
DATE ;;JANUARY;FEBRUARY;MARCH;APRIL;MAY;JUNE;JULY;AUGUST;SEPTEMBER;OCTOBER;NOVEMBER;DECEMBER
W W !!,"Stations have not been entered in the Dental Site Parameter file.",!,"You must enter a station before you can use this option" G EXIT
EXIT K %,A,D2,DENT,DENTZ1,DENT1,DENT2,DENTF,DENTF1,DIC,F1,I,S,SD,TD,J,O,K,X,XX,X1,X2,X3,X4,Y,Z,Z1,Z2,Z3 Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDENTARA 2878 printed Oct 16, 2024@17:46:54 Page 2
DENTARA ;ISC2/HAG-RELEASE ALL SERVICE REPORT ; 11/3/88 6:19 PM ;
+1 ;;1.2;DENTAL;**1,9,24**;JAN 26, 1989
+2 WRITE !!
KILL ^UTILITY($JOB,"DENTERR"),^UTILITY($JOB,"DENTV"),^UTILITY($JOB,"DENTR"),^UTILITY($JOB,"DENTP")
SET Z5=""
SET Z1=0
if '$DATA(^DENT(225,0))
GOTO W
FOR Z3=0:1:2
SET Z1=$ORDER(^(Z1))
if Z1'>0
QUIT
SET Z2=Z1
+3 if Z3=0
GOTO W
IF Z3>1
SET DIC="^DENT(225,"
SET DIC(0)="AEMNQZ"
SET DIC("A")="Select STATION.DIVISION: "
if $DATA(DENTSTA)
SET DIC("B")=$SELECT(DENTSTA[" ":+DENTSTA,1:DENTSTA)
DO ^DIC
if Y<0
QUIT
KILL DIC("A"),DIC("B")
+4 SET Z1=$SELECT(Z3=1:Z2,1:+Y)
SET (DENTSTA,Z3)=$PIECE(^DENT(225,Z1,0),U,1)
SET DENTZ1=Z3
IF DENTSTA=""
DO W
SET Y=-1
QUIT
+5 if $LENGTH(DENTSTA)=3
SET DENTSTA=DENTSTA_" "
D1 WRITE !!,"Enter the starting and ending dates you wish to release. ",!
+1 SET %DT("A")="STARTING DATE: "
SET %DT="AEPX"
DO ^%DT
KILL %DT("A")
if Y<0
GOTO EXIT
SET DENTSD=Y
SET (TD,SD)=DENTSD-.0001
XECUTE ^DD("DD")
SET H1=Y
D2 SET %DT("A")="ENDING DATE: "
SET %DT="AEPX"
DO ^%DT
KILL %DT("A")
if Y<0
GOTO EXIT
SET DENTED=Y+.24
XECUTE ^DD("DD")
SET H2=Y
+1 IF DENTED<SD
WRITE *7,!!,"End date before Start Date?"
GOTO D1
CLASS ;CLASS I-VI
+1 WRITE @IOF,!!,?10,"Processing Class I-VI report",!
READ F1:2
+2 FOR F1=0:0
SET X3=223
SET SD=$ORDER(^DENT(223,"B",SD))
if SD>DENTED!(SD'>0)
QUIT
SET DENT1=$ORDER(^(+SD,0))
if DENT1'>0
QUIT
SET D2=$PIECE(^DENT(223,DENT1,0),"^",29)
IF $SELECT(D2'=DENTZ1:0,'$DATA(^(.1)):1,'$PIECE(^(.1),"^",2):1,1:0)
DO S
DO ^DENTAR3
DO EN1^DENTAR
SET F1=1
+3 IF 'F1
WRITE !,"There is no Class I-IV data to release for the timeframe you specified",*7
READ X:3
PERS ;PERSONAL REPORT
+1 WRITE @IOF,!!,?10,"Processing Adminstrative Personnel report",!
READ F1:3
SET SD=TD
+2 FOR F1=0:0
SET X3=224
SET SD=$ORDER(^DENT(224,"B",SD))
if SD>DENTED!(SD'>0)
QUIT
SET DENT1=$ORDER(^(+SD,0))
if DENT1'>0
QUIT
SET D2=$PIECE(^DENT(224,DENT1,0),"^",10)
IF $SELECT(D2'=DENTZ1:0,'$DATA(^(.1)):1,'$PIECE(^(.1),"^",2):1,1:0)
DO S
DO ^DENTAR4
IF '$DATA(DENTF)
DO EN1^DENTAR
SET F1=1
+3 IF 'F1
WRITE !,"There is no personnel data to release for the timeframe you specified",*7
READ X:3
+4 KILL DENTF
FEE ;FEE BASIS REPORT
+1 WRITE @IOF,!!,?10,"Processing Applications and Dental Fee report",!
READ F1:2
SET SD=TD
+2 FOR F1=0:0
SET X3=222
SET SD=$ORDER(^DENT(222,"B",SD))
if SD>DENTED!(SD'>0)
QUIT
SET DENT1=$ORDER(^(+SD,0))
if DENT1'>0
QUIT
SET D2=$PIECE(^DENT(222,DENT1,0),"^",28)
IF $SELECT(D2'=DENTZ1:0,'$DATA(^(.1)):1,'$PIECE(^(.1),"^",2):1,1:0)
DO S
DO ^DENTAR5
DO EN1^DENTAR
SET F1=1
+3 IF 'F1
WRITE !,"There is no applications and dental fee data to release for the time frame",!,"you specified",*7
READ X:3
TREAT ;TREATMENT REPORT
+1 WRITE @IOF,!!,?10,"Processing Treatment data report",!
READ F1:2
SET Z3=DENTZ1
+2 DO NOREV^DENTAR16
if '$DATA(DENTF1)
DO EN1^DENTAR1
+3 GOTO EXIT
S SET (DENTY0,Y(0))=^DENT(X3,DENT1,0)
SET Z2=DENTZ1
SET (DENT,Z)=$PIECE(Y(0),"^")
SET Z1=1700+$EXTRACT(Z,1,3)
SET Z=+$EXTRACT(Z,4,5)+2
SET Z=$PIECE($TEXT(DATE),";",Z)
SET Z1=Z_" "_Z1
SET Z3="STATION NUMBER: "_Z2
QUIT
DATE ;;JANUARY;FEBRUARY;MARCH;APRIL;MAY;JUNE;JULY;AUGUST;SEPTEMBER;OCTOBER;NOVEMBER;DECEMBER
W WRITE !!,"Stations have not been entered in the Dental Site Parameter file.",!,"You must enter a station before you can use this option"
GOTO EXIT
EXIT KILL %,A,D2,DENT,DENTZ1,DENT1,DENT2,DENTF,DENTF1,DIC,F1,I,S,SD,TD,J,O,K,X,XX,X1,X2,X3,X4,Y,Z,Z1,Z2,Z3
QUIT