GMTSXQ07 ; SLC/JER - XQORM1 for Export w/Health Summary ;1/10/92 15:02
;;2.5;Health Summary;;Dec 16, 1992
XQORM1 ; SLC/KCM - Display selections & prompt ;2/20/90 09:47 ;
;;6.52;Copyright 1990, DVA;
DISP ;From: XQORM
I $E(X)="?" W ! S (DX,DY)=0 X ^%ZOSF("XY")
S T=1 S:$D(^XUTL("XQORM",XQORM,"COL")) T=^("COL") S:'T T=1 S T=IOM\T
S M=5 I $D(XQORM("M")),+XQORM("M"),XQORM("M")'>T S M=XQORM("M")
N X S L=0 F I=0:0 S I=$O(^XUTL("XQORM",XQORM,I)) Q:I'>0 I $D(^(I,0)) S X=^(0),J=($P(I,".",2)-1)*T D:$P(I,".")>L RD Q:N D:$D(XQORM("S")) SCRN W ?(J),$P(X,"^",4),?(J+M),$P(X,"^",3) S L=$P(I,".")
K L,M,N,T Q
SCRN Q:$D(XQORM("S"))[0 Q:'$L(XQORM("S")) Q:'+X D SCRN1
Q:$T S $P(X,"^",3)="("_$P(X,"^",3)_")"
Q
SCRN1 S DA=+X,DA(1)=+XQORM N I,J,L,M,T,X,Y X XQORM("S") K DA Q
PRMT ;From: XQORM
S ORUPRMT=$S($D(XQORM("A"))[0:"Select Item: ",1:XQORM("A"))
F ORU=0:0 D PRMT1 I Y D:(X'=" ")&(X?.ANP) EAT S:X="^^" DIROUT=1 D:X'?.ANP CC^XQORM4 D:$L(X)>80 LL^XQORM4 Q:($E(X)'="?")&(X?.ANP)&($L(X)'>80) D:$E(X)="?" HELP^XQORM4
K ORUPRMT Q
PRMT1 S Y=0 W:XQORM(0)'["\" ! W ORUPRMT,$S($D(XQORM("B"))'[0:XQORM("B")_"// ",1:"")
R X:$S($D(DTIME):DTIME,1:300) S:'$T DTOUT=1 S:'$L(X)&($D(XQORM("B"))'[0) X=XQORM("B")
I $D(XQORM("NO^")),X["^"!(X="") D NU^XQORM4 Q
S Y=1 Q
UP F %=1:1:$L(X) I $E(X,%)?1L S X=$E(X,1,%-1)_$C($A(X,%)-32)_$E(X,%+1,99)
Q
EAT F I=0:0 Q:$E(X)]" " Q:'$L(X) S X=$E(X,2,999)
F I=0:0 Q:$E(X,$L(X))]" " Q:'$L(X) S X=$E(X,1,$L(X)-1)
Q
RD S N=0 W ! Q:$Y<(IOSL-2) W !,"Press RETURN to continue or '^' to exit: "
N X R X:$S($D(DTIME):DTIME,1:300) S:'$T X="^" S:$E(X)="^" N=1
S (DX,DY)=0 X ^%ZOSF("XY") W !!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSXQ07 1655 printed Oct 16, 2024@18:01:56 Page 2
GMTSXQ07 ; SLC/JER - XQORM1 for Export w/Health Summary ;1/10/92 15:02
+1 ;;2.5;Health Summary;;Dec 16, 1992
XQORM1 ; SLC/KCM - Display selections & prompt ;2/20/90 09:47 ;
+1 ;;6.52;Copyright 1990, DVA;
DISP ;From: XQORM
+1 IF $EXTRACT(X)="?"
WRITE !
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
+2 SET T=1
if $DATA(^XUTL("XQORM",XQORM,"COL"))
SET T=^("COL")
if 'T
SET T=1
SET T=IOM\T
+3 SET M=5
IF $DATA(XQORM("M"))
IF +XQORM("M")
IF XQORM("M")'>T
SET M=XQORM("M")
+4 NEW X
SET L=0
FOR I=0:0
SET I=$ORDER(^XUTL("XQORM",XQORM,I))
if I'>0
QUIT
IF $DATA(^(I,0))
SET X=^(0)
SET J=($PIECE(I,".",2)-1)*T
if $PIECE(I,".")>L
DO RD
if N
QUIT
if $DATA(XQORM("S"))
DO SCRN
WRITE ?(J),$PIECE(X,"^",4),?(J+M),$PIECE(X,"^",3)
SET L=$PIECE(I,".")
+5 KILL L,M,N,T
QUIT
SCRN if $DATA(XQORM("S"))[0
QUIT
if '$LENGTH(XQORM("S"))
QUIT
if '+X
QUIT
DO SCRN1
+1 if $TEST
QUIT
SET $PIECE(X,"^",3)="("_$PIECE(X,"^",3)_")"
+2 QUIT
SCRN1 SET DA=+X
SET DA(1)=+XQORM
NEW I,J,L,M,T,X,Y
XECUTE XQORM("S")
KILL DA
QUIT
PRMT ;From: XQORM
+1 SET ORUPRMT=$SELECT($DATA(XQORM("A"))[0:"Select Item: ",1:XQORM("A"))
+2 FOR ORU=0:0
DO PRMT1
IF Y
if (X'=" ")&(X?.ANP)
DO EAT
if X="^^"
SET DIROUT=1
if X'?.ANP
DO CC^XQORM4
if $LENGTH(X)>80
DO LL^XQORM4
if ($EXTRACT(X)'="?")&(X?.ANP)&($LENGTH(X)'>80)
QUIT
if $EXTRACT(X)="?"
DO HELP^XQORM4
+3 KILL ORUPRMT
QUIT
PRMT1 SET Y=0
if XQORM(0)'["\"
WRITE !
WRITE ORUPRMT,$SELECT($DATA(XQORM("B"))'[0:XQORM("B")_"// ",1:"")
+1 READ X:$SELECT($DATA(DTIME):DTIME,1:300)
if '$TEST
SET DTOUT=1
if '$LENGTH(X)&($DATA(XQORM("B"))'[0)
SET X=XQORM("B")
+2 IF $DATA(XQORM("NO^"))
IF X["^"!(X="")
DO NU^XQORM4
QUIT
+3 SET Y=1
QUIT
UP FOR %=1:1:$LENGTH(X)
IF $EXTRACT(X,%)?1L
SET X=$EXTRACT(X,1,%-1)_$CHAR($ASCII(X,%)-32)_$EXTRACT(X,%+1,99)
+1 QUIT
EAT FOR I=0:0
if $EXTRACT(X)]" "
QUIT
if '$LENGTH(X)
QUIT
SET X=$EXTRACT(X,2,999)
+1 FOR I=0:0
if $EXTRACT(X,$LENGTH(X))]" "
QUIT
if '$LENGTH(X)
QUIT
SET X=$EXTRACT(X,1,$LENGTH(X)-1)
+2 QUIT
RD SET N=0
WRITE !
if $Y<(IOSL-2)
QUIT
WRITE !,"Press RETURN to continue or '^' to exit: "
+1 NEW X
READ X:$SELECT($DATA(DTIME):DTIME,1:300)
if '$TEST
SET X="^"
if $EXTRACT(X)="^"
SET N=1
+2 SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
WRITE !!
+3 QUIT