TIUSRVE ; SLC/JER - Get Upload Events for Display ;21-OCT-1999 10:54:57
;;1.0;TEXT INTEGRATION UTILITIES;**56,81**;Jun 20, 1997
GET(TIUDA,HUSH) ; Build ^TMP("TIUEVENT",$J,
N TIUI,TIUJ,TIUL,TIUREC,X S TIUI=0,HUSH=+$G(HUSH)
N DA,DIC,DIQ,DR,TIUNAME K ^TMP("TIUEVENT",$J)
I '$D(IOINORM) S X="IOINORM;IOIHI;IORVON;IORVOFF;IOUON;IOUOFF;IOBON;IOBOFF" D ENDR^%ZISS
S:'$D(VALMAR) VALMAR="^TMP(""TIUEVENT"",$J)"
S VALMEVL=+$G(VALMEVL)
I '$D(^TIU(8925.4,+TIUDA,0)) S VALMQUIT=1 Q
S DIC=8925.4,DIQ="TIUREC(",DA=TIUDA
S DR=".01:.08"
D EN^DIQ1
S TIUI="" F S TIUI=$O(TIUREC(8925.4,+TIUDA,TIUI)) Q:+TIUI'>0 D
. I $G(TIUREC(8925.4,+TIUDA,TIUI))']"" S TIUREC(8925.4,+TIUDA,TIUI)="None"
I $D(TIUREC)>9 D
. S ^TMP("TIUEVENT",$J,0)=$G(TIUREC(8925.4,TIUDA,.08))
. D EVENT(.TIUREC,HUSH),FIELDS(TIUDA,.VALMCNT),HEADER(TIUDA,.VALMCNT)
; The following line was Removed with TIU*1*56
;S:+$G(VALMCNT)<$G(VALM("LINES")) VALMCNT=$G(VALM("LINES"))
Q
EVENT(TIUREC,HUSH) ; Load Source Information
N OFFSET,START
S OFFSET=2,START=1
W:'+$G(HUSH) !!,"Opening "_TIUREC(8925.4,+TIUDA,.08)_" record for review..."
D SET(START,OFFSET," Event Description ",IORVON,IORVOFF)
D SET(START+1,OFFSET,$G(TIUREC(8925.4,TIUDA,.04)))
D SET(START+2,OFFSET," Event Date/time: "_$G(TIUREC(8925.4,TIUDA,.01)))
D SET(START+3,OFFSET," User Name: "_$G(TIUREC(8925.4,TIUDA,.02)))
D SET(START+4,OFFSET," Event Type: "_$G(TIUREC(8925.4,TIUDA,.08)))
D SET(START+5,OFFSET," Document Type: "_$G(TIUREC(8925.4,TIUDA,.03)))
D SET(START+6,OFFSET,"Resolution Status: "_$G(TIUREC(8925.4,TIUDA,.06)))
D SET(START+7,OFFSET," Resolution Date: "_$G(TIUREC(8925.4,TIUDA,.07)))
S VALMCNT=7
Q
FIELDS(TIUDA,TIUJ) ; Get missing fields
N TIUK,TIUFLD S TIUK=0
S TIUJ=+$G(TIUJ)+1
D BLANK(TIUJ) S TIUJ=+$G(TIUJ)+1
D SET(TIUJ,2," Missing Fields ",IORVON,IORVOFF) S TIUJ=TIUJ+1
D BLANK(TIUJ)
F S TIUK=$O(^TIU(8925.4,+TIUDA,1,TIUK)) Q:+TIUK'>0 D
. N DIC,DIQ,DA,DR S DA=TIUK,DIC="^TIU(8925.4,"_+TIUDA_",1,"
. S DR=".01:.04",DIQ="TIUFLD(" D EN^DIQ1 Q:$D(TIUFLD)'>9
. I $$FIXED^TIUPEVN1(8925,+$G(TIUFLD(8925.42,DA,.02)),+$G(TIUFLD(8925.42,DA,.03)))=1 Q ; P81, don't display fixed missing flds; moved from TIUPEVNT
. S TIUJ=+$G(TIUJ)+1
. D SET(TIUJ,2," File Number: "_$G(TIUFLD(8925.42,DA,.01)))
. D SET(TIUJ,40,"Record Number: "_$G(TIUFLD(8925.42,DA,.02)))
. S TIUJ=+$G(TIUJ)+1
. D SET(TIUJ,2," Field Number: "_$G(TIUFLD(8925.42,DA,.03)))
. D SET(TIUJ,40," Failed Value: "_$G(TIUFLD(8925.42,DA,.04)))
Q
S TIUJ=+$G(TIUJ)+1
D BLANK(TIUJ) S TIUJ=+$G(TIUJ)+1
D SET(TIUJ,2," Header Text ",IORVON,IORVOFF)
; D BLANK(TIUJ) S TIUJ=TIUJ+1
D HDRTEXT(TIUDA,.TIUJ)
Q
HDRTEXT(TIUDA,TIUJ) ; Get Header Text for filing errors
N TIUKID,TIUDADT,TIUI S TIUI=0
F S TIUI=$O(^TIU(8925.4,+TIUDA,"HEAD",TIUI)) Q:+TIUI'>0 D
. S TIUJ=+$G(TIUJ)+1
. D SET(TIUJ,2,$G(^TIU(8925.4,+TIUDA,"HEAD",+TIUI,0)))
Q
SET(LINE,COL,TEXT,ON,OFF) ; -- set display info in array
D:'$D(@VALMAR@(LINE,0)) BLANK(.LINE)
D SET^VALM10(.LINE,$$SETSTR^VALM1(.TEXT,@VALMAR@(LINE,0),.COL,$L(TEXT)))
D:$G(ON)]""!($G(OFF)]"") CNTRL^VALM10(.LINE,.COL,$L(TEXT),$G(ON),$G(OFF))
W:'(LINE#5)&'+$G(HUSH) "."
Q
;
BLANK(LINE) ; -- build blank line
D SET^VALM10(.LINE,$J("",80))
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUSRVE 3336 printed Nov 22, 2024@17:55:40 Page 2
TIUSRVE ; SLC/JER - Get Upload Events for Display ;21-OCT-1999 10:54:57
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**56,81**;Jun 20, 1997
GET(TIUDA,HUSH) ; Build ^TMP("TIUEVENT",$J,
+1 NEW TIUI,TIUJ,TIUL,TIUREC,X
SET TIUI=0
SET HUSH=+$GET(HUSH)
+2 NEW DA,DIC,DIQ,DR,TIUNAME
KILL ^TMP("TIUEVENT",$JOB)
+3 IF '$DATA(IOINORM)
SET X="IOINORM;IOIHI;IORVON;IORVOFF;IOUON;IOUOFF;IOBON;IOBOFF"
DO ENDR^%ZISS
+4 if '$DATA(VALMAR)
SET VALMAR="^TMP(""TIUEVENT"",$J)"
+5 SET VALMEVL=+$GET(VALMEVL)
+6 IF '$DATA(^TIU(8925.4,+TIUDA,0))
SET VALMQUIT=1
QUIT
+7 SET DIC=8925.4
SET DIQ="TIUREC("
SET DA=TIUDA
+8 SET DR=".01:.08"
+9 DO EN^DIQ1
+10 SET TIUI=""
FOR
SET TIUI=$ORDER(TIUREC(8925.4,+TIUDA,TIUI))
if +TIUI'>0
QUIT
Begin DoDot:1
+11 IF $GET(TIUREC(8925.4,+TIUDA,TIUI))']""
SET TIUREC(8925.4,+TIUDA,TIUI)="None"
End DoDot:1
+12 IF $DATA(TIUREC)>9
Begin DoDot:1
+13 SET ^TMP("TIUEVENT",$JOB,0)=$GET(TIUREC(8925.4,TIUDA,.08))
+14 DO EVENT(.TIUREC,HUSH)
DO FIELDS(TIUDA,.VALMCNT)
DO HEADER(TIUDA,.VALMCNT)
End DoDot:1
+15 ; The following line was Removed with TIU*1*56
+16 ;S:+$G(VALMCNT)<$G(VALM("LINES")) VALMCNT=$G(VALM("LINES"))
+17 QUIT
EVENT(TIUREC,HUSH) ; Load Source Information
+1 NEW OFFSET,START
+2 SET OFFSET=2
SET START=1
+3 if '+$GET(HUSH)
WRITE !!,"Opening "_TIUREC(8925.4,+TIUDA,.08)_" record for review..."
+4 DO SET(START,OFFSET," Event Description ",IORVON,IORVOFF)
+5 DO SET(START+1,OFFSET,$GET(TIUREC(8925.4,TIUDA,.04)))
+6 DO SET(START+2,OFFSET," Event Date/time: "_$GET(TIUREC(8925.4,TIUDA,.01)))
+7 DO SET(START+3,OFFSET," User Name: "_$GET(TIUREC(8925.4,TIUDA,.02)))
+8 DO SET(START+4,OFFSET," Event Type: "_$GET(TIUREC(8925.4,TIUDA,.08)))
+9 DO SET(START+5,OFFSET," Document Type: "_$GET(TIUREC(8925.4,TIUDA,.03)))
+10 DO SET(START+6,OFFSET,"Resolution Status: "_$GET(TIUREC(8925.4,TIUDA,.06)))
+11 DO SET(START+7,OFFSET," Resolution Date: "_$GET(TIUREC(8925.4,TIUDA,.07)))
+12 SET VALMCNT=7
+13 QUIT
FIELDS(TIUDA,TIUJ) ; Get missing fields
+1 NEW TIUK,TIUFLD
SET TIUK=0
+2 SET TIUJ=+$GET(TIUJ)+1
+3 DO BLANK(TIUJ)
SET TIUJ=+$GET(TIUJ)+1
+4 DO SET(TIUJ,2," Missing Fields ",IORVON,IORVOFF)
SET TIUJ=TIUJ+1
+5 DO BLANK(TIUJ)
+6 FOR
SET TIUK=$ORDER(^TIU(8925.4,+TIUDA,1,TIUK))
if +TIUK'>0
QUIT
Begin DoDot:1
+7 NEW DIC,DIQ,DA,DR
SET DA=TIUK
SET DIC="^TIU(8925.4,"_+TIUDA_",1,"
+8 SET DR=".01:.04"
SET DIQ="TIUFLD("
DO EN^DIQ1
if $DATA(TIUFLD)'>9
QUIT
+9 ; P81, don't display fixed missing flds; moved from TIUPEVNT
IF $$FIXED^TIUPEVN1(8925,+$GET(TIUFLD(8925.42,DA,.02)),+$GET(TIUFLD(8925.42,DA,.03)))=1
QUIT
+10 SET TIUJ=+$GET(TIUJ)+1
+11 DO SET(TIUJ,2," File Number: "_$GET(TIUFLD(8925.42,DA,.01)))
+12 DO SET(TIUJ,40,"Record Number: "_$GET(TIUFLD(8925.42,DA,.02)))
+13 SET TIUJ=+$GET(TIUJ)+1
+14 DO SET(TIUJ,2," Field Number: "_$GET(TIUFLD(8925.42,DA,.03)))
+15 DO SET(TIUJ,40," Failed Value: "_$GET(TIUFLD(8925.42,DA,.04)))
End DoDot:1
+16 QUIT
+1 SET TIUJ=+$GET(TIUJ)+1
+2 DO BLANK(TIUJ)
SET TIUJ=+$GET(TIUJ)+1
+3 DO SET(TIUJ,2," Header Text ",IORVON,IORVOFF)
+4 ; D BLANK(TIUJ) S TIUJ=TIUJ+1
+5 DO HDRTEXT(TIUDA,.TIUJ)
+6 QUIT
HDRTEXT(TIUDA,TIUJ) ; Get Header Text for filing errors
+1 NEW TIUKID,TIUDADT,TIUI
SET TIUI=0
+2 FOR
SET TIUI=$ORDER(^TIU(8925.4,+TIUDA,"HEAD",TIUI))
if +TIUI'>0
QUIT
Begin DoDot:1
+3 SET TIUJ=+$GET(TIUJ)+1
+4 DO SET(TIUJ,2,$GET(^TIU(8925.4,+TIUDA,"HEAD",+TIUI,0)))
End DoDot:1
+5 QUIT
SET(LINE,COL,TEXT,ON,OFF) ; -- set display info in array
+1 if '$DATA(@VALMAR@(LINE,0))
DO BLANK(.LINE)
+2 DO SET^VALM10(.LINE,$$SETSTR^VALM1(.TEXT,@VALMAR@(LINE,0),.COL,$LENGTH(TEXT)))
+3 if $GET(ON)]""!($GET(OFF)]"")
DO CNTRL^VALM10(.LINE,.COL,$LENGTH(TEXT),$GET(ON),$GET(OFF))
+4 if '(LINE#5)&'+$GET(HUSH)
WRITE "."
+5 QUIT
+6 ;
BLANK(LINE) ; -- build blank line
+1 DO SET^VALM10(.LINE,$JUSTIFY("",80))
+2 QUIT