TIURHX ;SLC/JER - Display reassignment history ;21-MAR-2001 16:47:04
;;1.0;TEXT INTEGRATION UTILITIES;**61,100**;Jun 20, 1997
DISPLAY ; Display Reassignment History of Selected Documents
N TIUDA,TIUD,TIUDATA,TIUI,Y,DIROUT,TIUQUIT
I '$D(VALMY) D EN^VALM2(XQORNOD(0))
S TIUI=0
F S TIUI=$O(VALMY(TIUI)) Q:+TIUI'>0 D Q:$D(TIUQUIT)
. N TIUVIEW
. S TIUDATA=$G(^TMP("TIURIDX",$J,TIUI))
. D CLEAR^VALM1
. W !!,"Reviewing #",+TIUDATA
. S TIUDA=+$P(TIUDATA,U,2)
. S TIUVIEW=$$CANDO^TIULP(TIUDA,"VIEW")
. I +TIUVIEW'>0 D Q ; Exclude records user can't print
. . W !!,$C(7),$P(TIUVIEW,U,2),! ; Echo denial message
. . I $$READ^TIUU("EA","RETURN to continue...") ; pause
. . D RESTORE^TIULM(+TIUI)
. D EN
. I +$G(TIUQUIT) D FIXLSTNW^TIULM Q
. D RESTORE^VALM10(+TIUI)
K VALMY S VALMBCK="R"
Q
EN ; Option entry
K ^TMP("TIURHX",$J) N TIU
D EN^VALM("TIU DISPLAY REASSIGN HISTORY")
Q
MAIN ; Control branching
N TIUVIEW S TIUVIEW=$$CANDO^TIULP(TIUDA,"VIEW")
I +TIUVIEW'>0 D Q
. W !!,$C(7),$P(TIUVIEW,U,2),!
. S VALMQUIT=1
. I $$READ^TIUU("EA","RETURN to continue...")
D GET^TIUSRV(TIUDA,0,1)
Q
HDR ; Build Header
N TIUDTYP
; I '$D(TIUPRM0)!'$D(TIUPRM1) D SETPARM^TIULE
D:$D(TIU)'>9 GETTIU^TIULD(.TIU,+TIUDA)
S VALMHDR(1)=$$CENTER^TIULS($P($G(TIU("DOCTYP")),U,2))
S VALMHDR(2)=$$SETREC("HDR")
Q
SETREC(LINE) ; Calls $$SETSTR^VALM1 for each line of ^TMP("TIUAUDIT",$J,
N Y
I LINE="HDR" D
. S Y=$$SETSTR^VALM1($$NAME^TIULS(TIU("PNM"),"LAST,FI MI"),$G(Y),1,15)
. S Y=$$SETSTR^VALM1(TIU("SSN"),$G(Y),16,12)
. S Y=$$SETSTR^VALM1($P($G(TIU("WARD")),U,2),$G(Y),30,20)
. I +TIU("DOCTYP")=1 D
. . S Y=$$SETSTR^VALM1("Adm: "_$$DATE^TIULS(+TIU("EDT"),"MM/DD/YY"),$G(Y),51,13)
. . S Y=$$SETSTR^VALM1("Dis: "_$$DATE^TIULS(+TIU("LDT"),"MM/DD/YY"),$G(Y),66,13)
. I +TIU("DOCTYP")'=1 D
. . S Y=$$SETSTR^VALM1("Visit Date: "_$$DATE^TIULS(+TIU("EDT"),"MM/DD/YY@HR:MIN"),$G(Y),53,26)
Q Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIURHX 1955 printed Nov 22, 2024@17:55:15 Page 2
TIURHX ;SLC/JER - Display reassignment history ;21-MAR-2001 16:47:04
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**61,100**;Jun 20, 1997
DISPLAY ; Display Reassignment History of Selected Documents
+1 NEW TIUDA,TIUD,TIUDATA,TIUI,Y,DIROUT,TIUQUIT
+2 IF '$DATA(VALMY)
DO EN^VALM2(XQORNOD(0))
+3 SET TIUI=0
+4 FOR
SET TIUI=$ORDER(VALMY(TIUI))
if +TIUI'>0
QUIT
Begin DoDot:1
+5 NEW TIUVIEW
+6 SET TIUDATA=$GET(^TMP("TIURIDX",$JOB,TIUI))
+7 DO CLEAR^VALM1
+8 WRITE !!,"Reviewing #",+TIUDATA
+9 SET TIUDA=+$PIECE(TIUDATA,U,2)
+10 SET TIUVIEW=$$CANDO^TIULP(TIUDA,"VIEW")
+11 ; Exclude records user can't print
IF +TIUVIEW'>0
Begin DoDot:2
+12 ; Echo denial message
WRITE !!,$CHAR(7),$PIECE(TIUVIEW,U,2),!
+13 ; pause
IF $$READ^TIUU("EA","RETURN to continue...")
+14 DO RESTORE^TIULM(+TIUI)
End DoDot:2
QUIT
+15 DO EN
+16 IF +$GET(TIUQUIT)
DO FIXLSTNW^TIULM
QUIT
+17 DO RESTORE^VALM10(+TIUI)
End DoDot:1
if $DATA(TIUQUIT)
QUIT
+18 KILL VALMY
SET VALMBCK="R"
+19 QUIT
EN ; Option entry
+1 KILL ^TMP("TIURHX",$JOB)
NEW TIU
+2 DO EN^VALM("TIU DISPLAY REASSIGN HISTORY")
+3 QUIT
MAIN ; Control branching
+1 NEW TIUVIEW
SET TIUVIEW=$$CANDO^TIULP(TIUDA,"VIEW")
+2 IF +TIUVIEW'>0
Begin DoDot:1
+3 WRITE !!,$CHAR(7),$PIECE(TIUVIEW,U,2),!
+4 SET VALMQUIT=1
+5 IF $$READ^TIUU("EA","RETURN to continue...")
End DoDot:1
QUIT
+6 DO GET^TIUSRV(TIUDA,0,1)
+7 QUIT
HDR ; Build Header
+1 NEW TIUDTYP
+2 ; I '$D(TIUPRM0)!'$D(TIUPRM1) D SETPARM^TIULE
+3 if $DATA(TIU)'>9
DO GETTIU^TIULD(.TIU,+TIUDA)
+4 SET VALMHDR(1)=$$CENTER^TIULS($PIECE($GET(TIU("DOCTYP")),U,2))
+5 SET VALMHDR(2)=$$SETREC("HDR")
+6 QUIT
SETREC(LINE) ; Calls $$SETSTR^VALM1 for each line of ^TMP("TIUAUDIT",$J,
+1 NEW Y
+2 IF LINE="HDR"
Begin DoDot:1
+3 SET Y=$$SETSTR^VALM1($$NAME^TIULS(TIU("PNM"),"LAST,FI MI"),$GET(Y),1,15)
+4 SET Y=$$SETSTR^VALM1(TIU("SSN"),$GET(Y),16,12)
+5 SET Y=$$SETSTR^VALM1($PIECE($GET(TIU("WARD")),U,2),$GET(Y),30,20)
+6 IF +TIU("DOCTYP")=1
Begin DoDot:2
+7 SET Y=$$SETSTR^VALM1("Adm: "_$$DATE^TIULS(+TIU("EDT"),"MM/DD/YY"),$GET(Y),51,13)
+8 SET Y=$$SETSTR^VALM1("Dis: "_$$DATE^TIULS(+TIU("LDT"),"MM/DD/YY"),$GET(Y),66,13)
End DoDot:2
+9 IF +TIU("DOCTYP")'=1
Begin DoDot:2
+10 SET Y=$$SETSTR^VALM1("Visit Date: "_$$DATE^TIULS(+TIU("EDT"),"MM/DD/YY@HR:MIN"),$GET(Y),53,26)
End DoDot:2
End DoDot:1
+11 QUIT Y