BTIUHELP ; IHS/ITSC/LJF - On-line help library ;
;;1.0;TEXT INTEGRATION UTILITIES;;NOV 04, 2004
;IHS/ITSC/LJF 05/07/2003 copy of TIUHELP with code fixed so actually quits when user asks to quit
;
PROTOCOL ;EP; Help for protocols
N DIRUT,DTOUT,DUOUT,TIUX,ORU,ORUPRMT,VALMDDF,VALMPGE S TIUX=X
NEW BTIUSTOP S BTIUGO=1
D FULL^VALM1
I TIUX="?"!(TIUX="??") D G PROTX
. I TIUX="??",($G(VALMAR)="^TMP(""TIUR"",$J)") D STATUS I BTIUGO=0 W ! Q
. D DISP^XQORM1 W !!,"Enter selection by typing the name, or abbreviation.",!,"Enter '??' or '???' for additional details.",!
. I TIUX="?" W:$$STOP^TIUU ""
I TIUX="???" D MENU(XQORNOD) I $D(DIROUT) S (XQORQUIT,XQORPOP)=1 Q
PROTX S VALMBCK="R"
Q
N TIUSEQ,TIUI,TIUJ D CLEAR^VALM1
Q:'$$CONTINUE W "Valid selections are:",! ;IHS/ITSC/LJF 02/26/2003
S TIUI=0 F S TIUI=$O(^ORD(101,+XQORNOD,10,TIUI)) Q:+TIUI'>0 D
. S TIUJ=+$P($G(^ORD(101,+XQORNOD,10,TIUI,0)),U,3) S:$D(TIUSEQ(TIUJ)) TIUJ=TIUJ+.1
. S TIUSEQ(TIUJ)=+$P(^ORD(101,+XQORNOD,10,TIUI,0),U)
S TIUI=0 F S TIUI=$O(TIUSEQ(TIUI)) Q:+TIUI'>0!$D(DIRUT) D
. I $D(^ORD(101,+TIUSEQ(TIUI),0)) D ITEM(+TIUSEQ(TIUI),1)
Q
ITEM(XQORNOD,TAB) ; Show descriptions of items
N TIUI
Q:$P($G(^ORD(101,+XQORNOD,0)),U,2)']""
W ?+$G(TAB),$G(IOINHI),$$UPPER^TIULS($P($G(^ORD(101,+XQORNOD,0)),U,2)),$G(IOINORM),!
S TIUI=0 F S TIUI=$O(^ORD(101,+XQORNOD,1,TIUI)) Q:+TIUI'>0 Q:'BTIUGO D
. S BTIUGO=$$CONTINUE Q:'BTIUGO W ?(TAB+2),$G(^ORD(101,+XQORNOD,1,TIUI,0)),!
S TIUI=0 F S TIUI=$O(^ORD(101,+XQORNOD,10,TIUI)) Q:+TIUI'>0 D
. D ITEM(+$G(^ORD(101,+XQORNOD,10,+TIUI,0))_";ORD(101,",3)
Q
STATUS ; Show status descriptions
W !!,"The Following Statuses are defined:"
D STATEXP Q:'BTIUGO
W !!,"The Following Indicators are defined:",!!
W " '+' to the left of the Title or Patient's name indicates that",!," a report has addenda.",!
W " '*' to the left of the Title or Patient's name indicates",!," a priority (STAT) document.",!
W " '<' to the left of the Title or Patient's name indicates an",!," interdisciplinary note, which can be expanded to show entries.",!
W " '>' to the left of the Title or Patient's name indicates",!," that the note is an entry of an interdisciplinary note.",!
S BTIUGO=$$CONTINUE
Q
CONTINUE() ; Pagination control
N Y
I $Y<(IOSL-2) S Y=1 G CONTX
S Y=$$STOP^TIUU("",1) W:+Y @IOF,!
CONTX Q Y
;
STATEXP ; Explain Statuses
N TIUI,TIUJ,TIUY S TIUI=0
D STATUS^TIUSRVL(.TIUY,"ALL",1)
S BTIUGO=$$CONTINUE Q:BTIUGO=0
F S TIUI=$O(TIUY(TIUI)) Q:+TIUI'>0 Q:'BTIUGO D
. I TIUI>1 W !
. W !,$G(IOINHI),$P(TIUY(TIUI),U,2),$G(IOINORM)
. S BTIUGO=$$CONTINUE Q:BTIUGO=0
. S TIUJ=0 F S TIUJ=$O(TIUY(TIUI,1,TIUJ)) Q:+TIUJ'>0 Q:'BTIUGO D
. . W !?2,$G(TIUY(TIUI,1,TIUJ))
. . S BTIUGO=$$CONTINUE
Q
BTIUHELP ; IHS/ITSC/LJF - On-line help library ;
+1 ;;1.0;TEXT INTEGRATION UTILITIES;;NOV 04, 2004
+2 ;IHS/ITSC/LJF 05/07/2003 copy of TIUHELP with code fixed so actually quits when user asks to quit
+3 ;
PROTOCOL ;EP; Help for protocols
+1 NEW DIRUT,DTOUT,DUOUT,TIUX,ORU,ORUPRMT,VALMDDF,VALMPGE
SET TIUX=X
+2 NEW BTIUSTOP
SET BTIUGO=1
+3 DO FULL^VALM1
+4 IF TIUX="?"!(TIUX="??")
Begin DoDot:1
+5 IF TIUX="??"
IF ($GET(VALMAR)="^TMP(""TIUR"",$J)")
DO STATUS
IF BTIUGO=0
WRITE !
QUIT
+6 DO DISP^XQORM1
WRITE !!,"Enter selection by typing the name, or abbreviation.",!,"Enter '??' or '???' for additional details.",!
+7 IF TIUX="?"
IF $$STOP^TIUU
WRITE ""
End DoDot:1
GOTO PROTX
+8 IF TIUX="???"
DO MENU(XQORNOD)
IF $DATA(DIROUT)
SET (XQORQUIT,XQORPOP)=1
QUIT
PROTX SET VALMBCK="R"
+1 QUIT
+1 NEW TIUSEQ,TIUI,TIUJ
DO CLEAR^VALM1
+2 ;IHS/ITSC/LJF 02/26/2003
IF '$$CONTINUE
QUIT
WRITE "Valid selections are:",!
+3 SET TIUI=0
FOR
SET TIUI=$ORDER(^ORD(101,+XQORNOD,10,TIUI))
IF +TIUI'>0
QUIT
Begin DoDot:1
+4 SET TIUJ=+$PIECE($GET(^ORD(101,+XQORNOD,10,TIUI,0)),U,3)
IF $DATA(TIUSEQ(TIUJ))
SET TIUJ=TIUJ+.1
+5 SET TIUSEQ(TIUJ)=+$PIECE(^ORD(101,+XQORNOD,10,TIUI,0),U)
End DoDot:1
+6 SET TIUI=0
FOR
SET TIUI=$ORDER(TIUSEQ(TIUI))
IF +TIUI'>0!$DATA(DIRUT)
QUIT
Begin DoDot:1
+7 IF $DATA(^ORD(101,+TIUSEQ(TIUI),0))
DO ITEM(+TIUSEQ(TIUI),1)
End DoDot:1
+8 QUIT
ITEM(XQORNOD,TAB) ; Show descriptions of items
+1 NEW TIUI
+2 IF $PIECE($GET(^ORD(101,+XQORNOD,0)),U,2)']""
QUIT
+3 WRITE ?+$GET(TAB),$GET(IOINHI),$$UPPER^TIULS($PIECE($GET(^ORD(101,+XQORNOD,0)),U,2)),$GET(IOINORM),!
+4 SET TIUI=0
FOR
SET TIUI=$ORDER(^ORD(101,+XQORNOD,1,TIUI))
IF +TIUI'>0
QUIT
IF 'BTIUGO
QUIT
Begin DoDot:1
+5 SET BTIUGO=$$CONTINUE
IF 'BTIUGO
QUIT
WRITE ?(TAB+2),$GET(^ORD(101,+XQORNOD,1,TIUI,0)),!
End DoDot:1
+6 SET TIUI=0
FOR
SET TIUI=$ORDER(^ORD(101,+XQORNOD,10,TIUI))
IF +TIUI'>0
QUIT
Begin DoDot:1
+7 DO ITEM(+$GET(^ORD(101,+XQORNOD,10,+TIUI,0))_";ORD(101,",3)
End DoDot:1
+8 QUIT
STATUS ; Show status descriptions
+1 WRITE !!,"The Following Statuses are defined:"
+2 DO STATEXP
IF 'BTIUGO
QUIT
+3 WRITE !!,"The Following Indicators are defined:",!!
+4 WRITE " '+' to the left of the Title or Patient's name indicates that",!," a report has addenda.",!
+5 WRITE " '*' to the left of the Title or Patient's name indicates",!," a priority (STAT) document.",!
+6 WRITE " '<' to the left of the Title or Patient's name indicates an",!," interdisciplinary note, which can be expanded to show entries.",!
+7 WRITE " '>' to the left of the Title or Patient's name indicates",!," that the note is an entry of an interdisciplinary note.",!
+8 SET BTIUGO=$$CONTINUE
+9 QUIT
CONTINUE() ; Pagination control
+1 NEW Y
+2 IF $Y<(IOSL-2)
SET Y=1
GOTO CONTX
+3 SET Y=$$STOP^TIUU("",1)
IF +Y
WRITE @IOF,!
CONTX QUIT Y
+1 ;
STATEXP ; Explain Statuses
+1 NEW TIUI,TIUJ,TIUY
SET TIUI=0
+2 DO STATUS^TIUSRVL(.TIUY,"ALL",1)
+3 SET BTIUGO=$$CONTINUE
IF BTIUGO=0
QUIT
+4 FOR
SET TIUI=$ORDER(TIUY(TIUI))
IF +TIUI'>0
QUIT
IF 'BTIUGO
QUIT
Begin DoDot:1
+5 IF TIUI>1
WRITE !
+6 WRITE !,$GET(IOINHI),$PIECE(TIUY(TIUI),U,2),$GET(IOINORM)
+7 SET BTIUGO=$$CONTINUE
IF BTIUGO=0
QUIT
+8 SET TIUJ=0
FOR
SET TIUJ=$ORDER(TIUY(TIUI,1,TIUJ))
IF +TIUJ'>0
QUIT
IF 'BTIUGO
QUIT
Begin DoDot:2
+9 WRITE !?2,$GET(TIUY(TIUI,1,TIUJ))
+10 SET BTIUGO=$$CONTINUE
End DoDot:2
End DoDot:1
+11 QUIT