TIUROR1 ;SLC/JER - New PATIENT Review screen ; 12/3/00
;;1.0;TEXT INTEGRATION UTILITIES;**100**;Jun 20, 1997
; New, created 11/27/00 by splitting TIUROR
;
ASKCTXT() ; Ask user for new context
N TIUY,DIR,Y
; newed Y 9/21
S DIR(0)="SAO^1:SIGNED;2:UNSIGNED;3:UNCOSIGNED;4:AUTHOR;5:DATES"
S DIR("A")="Select context: ",DIR("A",1)="Valid selections are:"
S DIR("A",2)=" 1 - signed notes (all) 2 - unsigned notes 3 - uncosigned notes"
S DIR("A",3)=" 4 - signed notes/author 5 - signed notes/dates",DIR("A",4)=" "
S DIR("?",1)="To change which notes are displayed, select the number"
S DIR("?")="of the context you wish to work within.",DIR("B")="1"
W ! D ^DIR
Q +Y
;
SAVE ; -- Set aside original list
K ^TMP("TIURSAVE",$J)
M ^TMP("TIURSAVE",$J)=^TMP("TIUR",$J)
M ^TMP("TIURSAVIDX",$J)=^TMP("TIURIDX",$J)
Q
;
RESTORE ; -- restore original All Signed list
I '$D(^TMP("TIURSAVE",$J)) D Q
. D INIT^TIUROR(+$G(^TMP("TIUR",$J,"CLASS")),1,+$G(^("DFN")),9999999)
. S VALMBCK="R",VALMBG=1,VALMCNT=+$G(^TMP("TIUR",$J,0))
K ^TMP("TIUR",$J)
M ^TMP("TIUR",$J)=^TMP("TIURSAVE",$J)
M ^TMP("TIURIDX",$J)=^TMP("TIURSAVIDX",$J)
S VALMBCK="R",VALMBG=1,VALMCNT=+$G(^TMP("TIUR",$J,0))
Q
;
BREATHE(ONCE) ; -- Collapse/Re-expand in reverse order to avoid collisions
N TIUI
S TIUI=""
F S TIUI=$O(^TMP("TIUR",$J,"EXPAND",TIUI),-1) Q:+TIUI'>0 D
. D EC1^TIURECL(TIUI,1) ; Inhale
. D:'+$D(ONCE) EC1^TIURECL(TIUI,1) ; Exhale
. W "."
Q
;
RELOAD(TIUEXP) ; Reload ^TMP("TIUR",$J,"EXPAND") w IFNs to expand, gotten
;from previous user expansions. (Line numbers have changed.)
N TIUI S TIUI=0
F S TIUI=$O(TIUEXP(TIUI)) Q:+TIUI'>0 D
. N TIUDA,TIUJ
. S TIUDA=$G(TIUEXP(TIUI)),TIUJ=$O(^TMP("TIUR",$J,"IEN",TIUDA,0)) Q:+TIUJ'>0
. S ^TMP("TIUR",$J,"EXPAND",TIUJ)=TIUDA_U_1
Q
;
LOAD(TIUXCTXT,TIUXCTX2) ; Load ^TMP("TIUR",$J,"EXPAND") w IFNs to expand,
;gotten from doing CONTEXT^TIUSRVLL
; These are parent records that must be expanded to display ID kids or
;addenda under them that fall within search criteria.
N TIUDA,LINENO
S TIUDA=0
F S TIUDA=$O(TIUXCTXT(TIUDA)) Q:'TIUDA D
. S LINENO=$O(^TMP("TIUR",$J,"IEN",TIUDA,0))
. I 'LINENO S TIUXCTX2(TIUDA)="" Q
. S ^TMP("TIUR",$J,"EXPAND",LINENO)=TIUDA_U_1
Q
TIUROR1 ;SLC/JER - New PATIENT Review screen ; 12/3/00
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**100**;Jun 20, 1997
+2 ; New, created 11/27/00 by splitting TIUROR
+3 ;
ASKCTXT() ; Ask user for new context
+1 NEW TIUY,DIR,Y
+2 ; newed Y 9/21
+3 SET DIR(0)="SAO^1:SIGNED;2:UNSIGNED;3:UNCOSIGNED;4:AUTHOR;5:DATES"
+4 SET DIR("A")="Select context: "
SET DIR("A",1)="Valid selections are:"
+5 SET DIR("A",2)=" 1 - signed notes (all) 2 - unsigned notes 3 - uncosigned notes"
+6 SET DIR("A",3)=" 4 - signed notes/author 5 - signed notes/dates"
SET DIR("A",4)=" "
+7 SET DIR("?",1)="To change which notes are displayed, select the number"
+8 SET DIR("?")="of the context you wish to work within."
SET DIR("B")="1"
+9 WRITE !
DO ^DIR
+10 QUIT +Y
+11 ;
SAVE ; -- Set aside original list
+1 KILL ^TMP("TIURSAVE",$JOB)
+2 MERGE ^TMP("TIURSAVE",$JOB)=^TMP("TIUR",$JOB)
+3 MERGE ^TMP("TIURSAVIDX",$JOB)=^TMP("TIURIDX",$JOB)
+4 QUIT
+5 ;
RESTORE ; -- restore original All Signed list
+1 IF '$DATA(^TMP("TIURSAVE",$JOB))
Begin DoDot:1
+2 DO INIT^TIUROR(+$GET(^TMP("TIUR",$JOB,"CLASS")),1,+$GET(^("DFN")),9999999)
+3 SET VALMBCK="R"
SET VALMBG=1
SET VALMCNT=+$GET(^TMP("TIUR",$JOB,0))
End DoDot:1
QUIT
+4 KILL ^TMP("TIUR",$JOB)
+5 MERGE ^TMP("TIUR",$JOB)=^TMP("TIURSAVE",$JOB)
+6 MERGE ^TMP("TIURIDX",$JOB)=^TMP("TIURSAVIDX",$JOB)
+7 SET VALMBCK="R"
SET VALMBG=1
SET VALMCNT=+$GET(^TMP("TIUR",$JOB,0))
+8 QUIT
+9 ;
BREATHE(ONCE) ; -- Collapse/Re-expand in reverse order to avoid collisions
+1 NEW TIUI
+2 SET TIUI=""
+3 FOR
SET TIUI=$ORDER(^TMP("TIUR",$JOB,"EXPAND",TIUI),-1)
IF +TIUI'>0
QUIT
Begin DoDot:1
+4 ; Inhale
DO EC1^TIURECL(TIUI,1)
+5 ; Exhale
IF '+$DATA(ONCE)
DO EC1^TIURECL(TIUI,1)
+6 WRITE "."
End DoDot:1
+7 QUIT
+8 ;
RELOAD(TIUEXP) ; Reload ^TMP("TIUR",$J,"EXPAND") w IFNs to expand, gotten
+1 ;from previous user expansions. (Line numbers have changed.)
+2 NEW TIUI
SET TIUI=0
+3 FOR
SET TIUI=$ORDER(TIUEXP(TIUI))
IF +TIUI'>0
QUIT
Begin DoDot:1
+4 NEW TIUDA,TIUJ
+5 SET TIUDA=$GET(TIUEXP(TIUI))
SET TIUJ=$ORDER(^TMP("TIUR",$JOB,"IEN",TIUDA,0))
IF +TIUJ'>0
QUIT
+6 SET ^TMP("TIUR",$JOB,"EXPAND",TIUJ)=TIUDA_U_1
End DoDot:1
+7 QUIT
+8 ;
LOAD(TIUXCTXT,TIUXCTX2) ; Load ^TMP("TIUR",$J,"EXPAND") w IFNs to expand,
+1 ;gotten from doing CONTEXT^TIUSRVLL
+2 ; These are parent records that must be expanded to display ID kids or
+3 ;addenda under them that fall within search criteria.
+4 NEW TIUDA,LINENO
+5 SET TIUDA=0
+6 FOR
SET TIUDA=$ORDER(TIUXCTXT(TIUDA))
IF 'TIUDA
QUIT
Begin DoDot:1
+7 SET LINENO=$ORDER(^TMP("TIUR",$JOB,"IEN",TIUDA,0))
+8 IF 'LINENO
SET TIUXCTX2(TIUDA)=""
QUIT
+9 SET ^TMP("TIUR",$JOB,"EXPAND",LINENO)=TIUDA_U_1
End DoDot:1
+10 QUIT