DIX ;SFISC/GFT,NHRC/DRH-STATISTICS ;4/18/91 9:40 AM
;;22.0;VA FileMan;;Mar 30, 1999
;Per VHA Directive 10-93-142, this routine should not be modified.
S DIK="^DOPT(""DIX"","
G F:$D(^DOPT("DIX",3)) S ^(0)="STATISTICAL ROUTINE^1.01^" F I=1:1:3 S ^DOPT("DIX",I,0)=$E($T(F+I),4,99)
D IXALL^DIK
F S DIC=DIK,DIC(0)="AEQZ" D ^DIC Q:Y<0 D @($P(Y(0),U,2,3)) W !! G DIX
;;DESCRIPTIVE STATISTICS^D^DIXC
;;SCATTERGRAM^^DIG
;;HISTOGRAM^^DIH
;;ESTIMATED LINEAR CORRELATION COEFFICIENTS^C^DIX2
;;COEFFICIENTS OF DETERMINATION^D^DIX2
;;RANDOM SAMPLE - DESCRIPTIVE STATISTICS^RS^DIX3
;;GENERATE RANDOM NUMBERS (WITH REPLACEMENT)^R^DIX3
DHDR ;
S:$D(^%ZTSK) %ZIS="Q" D ^%ZIS Q:POP!$D(IO("Q"))
DQ U IO S:+DHDR'=0 DIXMM=+DHDR S:'$D(DHDR) DHDR="" I DHDR="" G HDR
I $E(IOST)="C" S DIFF=1
SITE W:$D(DIFF)&($Y) @IOF S DIFF=1 W:$D(^DD("SITE"))&(DHDR["S") !,"(",^("SITE"),")"
I $D(DIC) I DHDR["F",@("$D("_DIC_"0))") W " ",$P(^(0),U,1)," FILE"
I $D(DUZ)#2,DHDR["U",$S($D(^VA(200,+DUZ,0)):1,1:$D(^DIC(3,+DUZ,0))) W " USER: ",$P(^(0),U,1)," "
W ?(DIXMM-(DHDR["T"*10)-($D(PG)*10)-8) I DHDR["T" D INT W %TIM W " " K %TIM
I '$D(DT) S X="T" D ^%DT S DT=Y
W $E(DT,4,5),"/",DT#100,"/",$E(DT,2,3) I $D(PG) W " PAGE ",PG S PG=PG+1
HDR F J=1:1 Q:'$D(DHDR(J)) W !?(DHDR["C"*(DIXMM-$L(DHDR(J))\2)),$E(DHDR(J),1,DIXMM)
W ! Q:DHDR'["L"
LINE F %=1:1:DIXMM W "-"
W ! Q
INT S %M=$P($H,",",2)\60
20 S %N=" AM" S:%M'<720 %M=%M-720,%N=" PM" S:%M<60 %M=%M+720
25 S %I=%M\600 S:'%I %I=" " S %TIM=%I_(%M\60#10)_":"_(%M#60\10)_(%M#10)_%N
30 K %M,%N,%I
DIX ;SFISC/GFT,NHRC/DRH-STATISTICS ;4/18/91 9:40 AM
+1 ;;22.0;VA FileMan;;Mar 30, 1999
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
+3 SET DIK="^DOPT(""DIX"","
+4 IF $DATA(^DOPT("DIX",3))
GOTO F
SET ^(0)="STATISTICAL ROUTINE^1.01^"
FOR I=1:1:3
SET ^DOPT("DIX",I,0)=$EXTRACT($TEXT(F+I),4,99)
+5 DO IXALL^DIK
F SET DIC=DIK
SET DIC(0)="AEQZ"
DO ^DIC
IF Y<0
QUIT
DO @($PIECE(Y(0),U,2,3))
WRITE !!
GOTO DIX
+1 ;;DESCRIPTIVE STATISTICS^D^DIXC
+2 ;;SCATTERGRAM^^DIG
+3 ;;HISTOGRAM^^DIH
+4 ;;ESTIMATED LINEAR CORRELATION COEFFICIENTS^C^DIX2
+5 ;;COEFFICIENTS OF DETERMINATION^D^DIX2
+6 ;;RANDOM SAMPLE - DESCRIPTIVE STATISTICS^RS^DIX3
+7 ;;GENERATE RANDOM NUMBERS (WITH REPLACEMENT)^R^DIX3
DHDR ;
+1 IF $DATA(^%ZTSK)
SET %ZIS="Q"
DO ^%ZIS
IF POP!$DATA(IO("Q"))
QUIT
DQ USE IO
IF +DHDR'=0
SET DIXMM=+DHDR
IF '$DATA(DHDR)
SET DHDR=""
IF DHDR=""
GOTO HDR
+1 IF $EXTRACT(IOST)="C"
SET DIFF=1
SITE IF $DATA(DIFF)&($Y)
WRITE @IOF
SET DIFF=1
IF $DATA(^DD("SITE"))&(DHDR["S")
WRITE !,"(",^("SITE"),")"
+1 IF $DATA(DIC)
IF DHDR["F"
IF @("$D("_DIC_"0))")
WRITE " ",$PIECE(^(0),U,1)," FILE"
+2 IF $DATA(DUZ)#2
IF DHDR["U"
IF $SELECT($DATA(^VA(200,+DUZ,0)):1,1:$DATA(^DIC(3,+DUZ,0)))
WRITE " USER: ",$PIECE(^(0),U,1)," "
+3 WRITE ?(DIXMM-(DHDR["T"*10)-($DATA(PG)*10)-8)
IF DHDR["T"
DO INT
WRITE %TIM
WRITE " "
KILL %TIM
+4 IF '$DATA(DT)
SET X="T"
DO ^%DT
SET DT=Y
+5 WRITE $EXTRACT(DT,4,5),"/",DT#100,"/",$EXTRACT(DT,2,3)
IF $DATA(PG)
WRITE " PAGE ",PG
SET PG=PG+1
HDR FOR J=1:1
IF '$DATA(DHDR(J))
QUIT
WRITE !?(DHDR["C"*(DIXMM-$LENGTH(DHDR(J))\2)),$EXTRACT(DHDR(J),1,DIXMM)
+1 WRITE !
IF DHDR'["L"
QUIT
LINE FOR %=1:1:DIXMM
WRITE "-"
+1 WRITE !
QUIT
INT SET %M=$PIECE($HOROLOG,",",2)\60
20 SET %N=" AM"
IF %M'<720
SET %M=%M-720
SET %N=" PM"
IF %M<60
SET %M=%M+720
25 SET %I=%M\600
IF '%I
SET %I=" "
SET %TIM=%I_(%M\60#10)_":"_(%M#60\10)_(%M#10)_%N
30 KILL %M,%N,%I