ECSUN2N ;BIR/JLP,RHK-Category and Procedure Summary (cont'd) ;21 Mar 96
;;2.0; EVENT CAPTURE ;**23**;8 May 96
;Prints Categories and Procedures for a DSS Unit
START S ECPG=1 D HEADER,PROC
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 continue " R X:DTIME S ECPG=0
K ECFLG
Q
S ECFLG=1
W:$Y @IOF W !!,?25,"DSS UNIT AND PROCEDURE SUMMARY",!,?25,"Run Date: ",ECDATE,!,?25,"LOCATION: "_ECLN,!,?25,"SERVICE: "_ECSN,!,?25,"DSS UNIT: "_ECDN,! F I=1:1:80 W "-"
Q
PROC ;
S ECP=0 F S ECP=$O(^ECK("APP",ECL,ECD,ECP)) Q:'ECP!(ECOUT) D Q:ECOUT
.S ECPN=$S($P($G(^ECP(+ECP,0)),"^")]"":$P(^(0),"^"),1:" ZZ #"_+ECP_" MISSING DATA"),ECMORE=1
.W !,?5,"Procedure: "_ECPN,!,?5,"Event Code: ",ECL,"-",ECD,"-",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
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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECSUN2N 1088 printed Dec 13, 2024@01:59 Page 2
ECSUN2N ;BIR/JLP,RHK-Category and Procedure Summary (cont'd) ;21 Mar 96
+1 ;;2.0; EVENT CAPTURE ;**23**;8 May 96
+2 ;Prints Categories and Procedures for a DSS Unit
START SET ECPG=1
DO HEADER
DO PROC
END IF '$DATA(ECFLG)
WRITE !!,"No Category and Procedure Summary (Old File) data to report.",!
+1 IF $EXTRACT(IOST,1,2)="C-"
WRITE !!,"Press <RET> to continue "
READ X:DTIME
SET ECPG=0
+2 KILL ECFLG
+3 QUIT
+1 SET ECFLG=1
+2 if $Y
WRITE @IOF
WRITE !!,?25,"DSS UNIT AND PROCEDURE SUMMARY",!,?25,"Run Date: ",ECDATE,!,?25,"LOCATION: "_ECLN,!,?25,"SERVICE: "_ECSN,!,?25,"DSS UNIT: "_ECDN,!
FOR I=1:1:80
WRITE "-"
+3 QUIT
PROC ;
+1 SET ECP=0
FOR
SET ECP=$ORDER(^ECK("APP",ECL,ECD,ECP))
if 'ECP!(ECOUT)
QUIT
Begin DoDot:1
+2 SET ECPN=$SELECT($PIECE($GET(^ECP(+ECP,0)),"^")]"":$PIECE(^(0),"^"),1:" ZZ #"_+ECP_" MISSING DATA")
SET ECMORE=1
+3 WRITE !,?5,"Procedure: "_ECPN,!,?5,"Event Code: ",ECL,"-",ECD,"-",ECP,!,?5,"National Number: ",$SELECT($PIECE($GET(^ECP(+ECP,0)),"^",2)]"":$PIECE(^(0),"^",2),1:"NOT DEFINED"),!
+4 if $Y+3>IOSL
DO PAGE
if ECPG
DO HEADER
if ECOUT
QUIT
End DoDot:1
if ECOUT
QUIT
+5 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