TIUFH ; SLC/MAM - LM Template H (DDEF Hierarchy) INIT ;10/25/95 21:46
;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
EN ; -- main entry point for LM Template TIUFH DDEF HIERARCHY
; Requires TIUFWHO, set in options TIUFH EDIT DDEFS CLIN/MGR/NATL.
N TIUFTMPL,TIUFVCN1,TIUF,TIUFXNOD,XQORM,DTOUT,DIRUT,DIROUT,DUOUT,TIUFLFT
S TIUFTMPL="H"
N TIUFPRIV D SETUP^TIUFL S:$D(DTOUT) VALMQUIT=1 G:$G(VALMQUIT) ENX
I TIUFWHO="C" D EN^VALM("TIUFH EDIT DDEFS CLIN")
I "NM"[TIUFWHO D EN^VALM("TIUFH EDIT DDEFS MGR")
ENX Q
;
HDR ; -- header code
N HDR
S VALMHDR(1)=$$CENTER^TIUFL("BASICS",79)
Q
;
INIT ; -- init variables and list array
; Requires TIUFTMPL.
; Requires TIUFWHO, set in Options TIUF/A/C/H EDIT/SORT/CREATE DDEFS CLIN/MGR/NATL.
; Called by INIT^TIUFC as well as init for TIUFH.
K ^TMP("TIUF1",$J),^TMP("TIUF1IDX",$J),^TMP("TIUFB",$J),^TMP("TIUFBIDX",$J)
I '$D(TIUFSTMP) D CLEAN^VALM10 ; Clean IF called from active Template.
N TIUFERR,EINFO,SPACE,INFO,NODE0,FILEDA,MISSITEM
S VALMCNT=0
D NINFO^TIUFLLM(1,^TMP("TIUF",$J,"CLINDOC"),.INFO),PARSE^TIUFLLM(.INFO),NODE0ARR^TIUFLF(^TMP("TIUF",$J,"CLINDOC"),.NODE0) G:$D(DTOUT) INITX
I NODE0="" W !!," Can't Edit Document Definitions: Clinical Documents does not exist in the",!,"file! See IRM",! D PAUSE^TIUFXHLX S VALMQUIT=1 G INITX
D BUFENTRY^TIUFLLM2(.INFO,.NODE0,TIUFTMPL)
D UPDATE^TIUFLLM1("H",1,0) S VALMCNT=VALMCNT+1 G:$G(TIUFERR) INITX
I TIUFTMPL="C" D CNTRL^VALM10(1,8,^TMP("TIUF",$J,"NMWIDTH"),IOINHI,IOINORM)
S EINFO=^TMP("TIUF1IDX",$J,1),FILEDA=$P(EINFO,U,2)
D PARSE^TIUFLLM(.EINFO)
S MISSITEM=$$MISSITEM^TIUFLF4(FILEDA) I MISSITEM W !!," Can't Edit Docmt Defs: Clinical Documents Has Nonexistent Item "_MISSITEM_"; See IRM",! D PAUSE^TIUFXHLX S VALMQUIT=1 G INITX
D EXPAND1^TIUFH1(.EINFO) S VALMCNT=VALMCNT+EINFO("XPDLCNT")
INITX I $D(DTOUT) S VALMQUIT=1
Q
;
EXIT ; -- exit code for template H
K ^TMP("TIUF1",$J),^TMP("TIUFB",$J),^TMP("TIUF1IDX",$J),^TMP("TIUFBIDX",$J),^TMP("TIUF",$J),IOELALL
D CLEAN^VALM10
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUFH 2041 printed Dec 13, 2024@02:40:41 Page 2
TIUFH ; SLC/MAM - LM Template H (DDEF Hierarchy) INIT ;10/25/95 21:46
+1 ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
EN ; -- main entry point for LM Template TIUFH DDEF HIERARCHY
+1 ; Requires TIUFWHO, set in options TIUFH EDIT DDEFS CLIN/MGR/NATL.
+2 NEW TIUFTMPL,TIUFVCN1,TIUF,TIUFXNOD,XQORM,DTOUT,DIRUT,DIROUT,DUOUT,TIUFLFT
+3 SET TIUFTMPL="H"
+4 NEW TIUFPRIV
DO SETUP^TIUFL
if $DATA(DTOUT)
SET VALMQUIT=1
if $GET(VALMQUIT)
GOTO ENX
+5 IF TIUFWHO="C"
DO EN^VALM("TIUFH EDIT DDEFS CLIN")
+6 IF "NM"[TIUFWHO
DO EN^VALM("TIUFH EDIT DDEFS MGR")
ENX QUIT
+1 ;
HDR ; -- header code
+1 NEW HDR
+2 SET VALMHDR(1)=$$CENTER^TIUFL("BASICS",79)
+3 QUIT
+4 ;
INIT ; -- init variables and list array
+1 ; Requires TIUFTMPL.
+2 ; Requires TIUFWHO, set in Options TIUF/A/C/H EDIT/SORT/CREATE DDEFS CLIN/MGR/NATL.
+3 ; Called by INIT^TIUFC as well as init for TIUFH.
+4 KILL ^TMP("TIUF1",$JOB),^TMP("TIUF1IDX",$JOB),^TMP("TIUFB",$JOB),^TMP("TIUFBIDX",$JOB)
+5 ; Clean IF called from active Template.
IF '$DATA(TIUFSTMP)
DO CLEAN^VALM10
+6 NEW TIUFERR,EINFO,SPACE,INFO,NODE0,FILEDA,MISSITEM
+7 SET VALMCNT=0
+8 DO NINFO^TIUFLLM(1,^TMP("TIUF",$JOB,"CLINDOC"),.INFO)
DO PARSE^TIUFLLM(.INFO)
DO NODE0ARR^TIUFLF(^TMP("TIUF",$JOB,"CLINDOC"),.NODE0)
if $DATA(DTOUT)
GOTO INITX
+9 IF NODE0=""
WRITE !!," Can't Edit Document Definitions: Clinical Documents does not exist in the",!,"file! See IRM",!
DO PAUSE^TIUFXHLX
SET VALMQUIT=1
GOTO INITX
+10 DO BUFENTRY^TIUFLLM2(.INFO,.NODE0,TIUFTMPL)
+11 DO UPDATE^TIUFLLM1("H",1,0)
SET VALMCNT=VALMCNT+1
if $GET(TIUFERR)
GOTO INITX
+12 IF TIUFTMPL="C"
DO CNTRL^VALM10(1,8,^TMP("TIUF",$JOB,"NMWIDTH"),IOINHI,IOINORM)
+13 SET EINFO=^TMP("TIUF1IDX",$JOB,1)
SET FILEDA=$PIECE(EINFO,U,2)
+14 DO PARSE^TIUFLLM(.EINFO)
+15 SET MISSITEM=$$MISSITEM^TIUFLF4(FILEDA)
IF MISSITEM
WRITE !!," Can't Edit Docmt Defs: Clinical Documents Has Nonexistent Item "_MISSITEM_"; See IRM",!
DO PAUSE^TIUFXHLX
SET VALMQUIT=1
GOTO INITX
+16 DO EXPAND1^TIUFH1(.EINFO)
SET VALMCNT=VALMCNT+EINFO("XPDLCNT")
INITX IF $DATA(DTOUT)
SET VALMQUIT=1
+1 QUIT
+2 ;
EXIT ; -- exit code for template H
+1 KILL ^TMP("TIUF1",$JOB),^TMP("TIUFB",$JOB),^TMP("TIUF1IDX",$JOB),^TMP("TIUFBIDX",$JOB),^TMP("TIUF",$JOB),IOELALL
+2 DO CLEAN^VALM10
+3 QUIT
+4 ;