ECSUN1 ;BIR/JLP,RHK-Category and Procedure Summary (cont'd) ; 21 Mar 96
;;2.0; EVENT CAPTURE ;**23**;8 May 96
I ECJLP D ^ECSUN1N Q
ALLU ;
S ECD=0,ECPG=1 F S ECD=$O(^ECK("AP",ECL,ECD)) Q:'ECD D SET,HEADER,CATS,PAGE:'ECOUT G:ECOUT END
END I '$D(ECFLG) W !!,"No Category and Procedure Summary (Old File) data to report.",! I $E(IOST,1,2)="C-" W !!,"Press <RET> to contine " R X:DTIME
K ECFLG
S ECPG=0
Q
S ECFLG=1
W:$Y @IOF W !!,?25,"CATEGORY AND PROCEDURE SUMMARY",!,?25,"Run Date: ",ECDATE,!,?25,"LOCATION: "_ECLN,!,?25,"SERVICE: "_ECSN,!,?25,"DSS UNIT: "_ECDN,! F I=1:1:80 W "-"
I $D(ECCN) D MORE
Q
CATS ;
S ECC=0 F S ECC=$O(^ECK("AP",ECL,ECD,ECC)) Q:'ECC S ECCN=$S($P($G(^ECP(+ECC,0)),"^")]"":$P(^(0),"^"),1:" ZZ #"_+ECC_" MISSING DATA"),ECMORE=1 W !!,?3,"Category: "_ECCN D:$Y+4>IOSL PAGE,HEADER:ECPG Q:ECOUT D PROC
S ECMORE=0 Q
PROC ;
S ECP=0 F S ECP=$O(^ECK("AP",ECL,ECD,ECC,ECP)) Q:'ECP D Q:ECOUT
.S ECPN=$S($P($G(^ECP(+ECP,0)),"^")]"":$P(^(0),"^"),1:" ZZ #"_+ECP_" MISSING DATA")
.S ECMORE=1
.W !,?5,"Procedure: ",ECPN,!,?5,"Event Code: ",ECL,"-",ECD,"-",ECC,"-",ECP,!,?5,"National Number: ",$S($P($G(^ECP(+ECP,0)),"^",2)]"":$P(^(0),"^",2),1:"NOT DEFINED"),!
.D:$Y+3>IOSL PAGE,HEADER:ECPG Q:ECOUT
S ECMORE=0 Q
PAGE ;
I $D(ECPG),$E(IOST,1,2)="C-" W !!,"Press <RET> to continue or ^ to quit " R X:DTIME I '$T!(X="^") S ECOUT=1,ECPG=0 Q
Q
MORE I ECMORE W !!,?3,"Category: "_ECCN
Q
SET ;set var
S ECNODE=$G(^ECD(+ECD,0))
S ECDN=$S($P(ECNODE,"^")]"":$P(^(0),"^"),1:" ZZ #"_ECD_" MISSING DATA")
S ECS=+$P(ECNODE,"^",2),ECSN=$S($P($G(^DIC(49,ECS,0)),"^")]"":$P(^(0),"^"),1:"UNKNOWN")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECSUN1 1671 printed Oct 16, 2024@17:59:41 Page 2
ECSUN1 ;BIR/JLP,RHK-Category and Procedure Summary (cont'd) ; 21 Mar 96
+1 ;;2.0; EVENT CAPTURE ;**23**;8 May 96
+2 IF ECJLP
DO ^ECSUN1N
QUIT
ALLU ;
+1 SET ECD=0
SET ECPG=1
FOR
SET ECD=$ORDER(^ECK("AP",ECL,ECD))
if 'ECD
QUIT
DO SET
DO HEADER
DO CATS
if 'ECOUT
DO PAGE
if ECOUT
GOTO END
END IF '$DATA(ECFLG)
WRITE !!,"No Category and Procedure Summary (Old File) data to report.",!
IF $EXTRACT(IOST,1,2)="C-"
WRITE !!,"Press <RET> to contine "
READ X:DTIME
+1 KILL ECFLG
+2 SET ECPG=0
+3 QUIT
+1 SET ECFLG=1
+2 if $Y
WRITE @IOF
WRITE !!,?25,"CATEGORY AND PROCEDURE SUMMARY",!,?25,"Run Date: ",ECDATE,!,?25,"LOCATION: "_ECLN,!,?25,"SERVICE: "_ECSN,!,?25,"DSS UNIT: "_ECDN,!
FOR I=1:1:80
WRITE "-"
+3 IF $DATA(ECCN)
DO MORE
+4 QUIT
CATS ;
+1 SET ECC=0
FOR
SET ECC=$ORDER(^ECK("AP",ECL,ECD,ECC))
if 'ECC
QUIT
SET ECCN=$SELECT($PIECE($GET(^ECP(+ECC,0)),"^")]"":$PIECE(^(0),"^"),1:" ZZ #"_+ECC_" MISSING DATA")
SET ECMORE=1
WRITE !!,?3,"Category: "_ECCN
if $Y+4>IOSL
DO PAGE
if ECPG
DO HEADER
if ECOUT
QUIT
DO PROC
+2 SET ECMORE=0
QUIT
PROC ;
+1 SET ECP=0
FOR
SET ECP=$ORDER(^ECK("AP",ECL,ECD,ECC,ECP))
if 'ECP
QUIT
Begin DoDot:1
+2 SET ECPN=$SELECT($PIECE($GET(^ECP(+ECP,0)),"^")]"":$PIECE(^(0),"^"),1:" ZZ #"_+ECP_" MISSING DATA")
+3 SET ECMORE=1
+4 WRITE !,?5,"Procedure: ",ECPN,!,?5,"Event Code: ",ECL,"-",ECD,"-",ECC,"-",ECP,!,?5,"National Number: ",$SELECT($PIECE($GET(^ECP(+ECP,0)),"^",2)]"":$PIECE(^(0),"^",2),1:"NOT DEFINED"),!
+5 if $Y+3>IOSL
DO PAGE
if ECPG
DO HEADER
if ECOUT
QUIT
End DoDot:1
if ECOUT
QUIT
+6 SET ECMORE=0
QUIT
PAGE ;
+1 IF $DATA(ECPG)
IF $EXTRACT(IOST,1,2)="C-"
WRITE !!,"Press <RET> to continue or ^ to quit "
READ X:DTIME
IF '$TEST!(X="^")
SET ECOUT=1
SET ECPG=0
QUIT
+2 QUIT
MORE IF ECMORE
WRITE !!,?3,"Category: "_ECCN
+1 QUIT
SET ;set var
+1 SET ECNODE=$GET(^ECD(+ECD,0))
+2 SET ECDN=$SELECT($PIECE(ECNODE,"^")]"":$PIECE(^(0),"^"),1:" ZZ #"_ECD_" MISSING DATA")
+3 SET ECS=+$PIECE(ECNODE,"^",2)
SET ECSN=$SELECT($PIECE($GET(^DIC(49,ECS,0)),"^")]"":$PIECE(^(0),"^"),1:"UNKNOWN")
+4 QUIT