Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: TIUFH

TIUFH.m

Go to the documentation of this file.
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
 ;