source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUFH.m@ 824

Last change on this file since 824 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1TIUFH ; SLC/MAM - LM Template H (DDEF Hierarchy) INIT ;10/25/95 21:46
2 ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
3EN ; -- main entry point for LM Template TIUFH DDEF HIERARCHY
4 ; Requires TIUFWHO, set in options TIUFH EDIT DDEFS CLIN/MGR/NATL.
5 N TIUFTMPL,TIUFVCN1,TIUF,TIUFXNOD,XQORM,DTOUT,DIRUT,DIROUT,DUOUT,TIUFLFT
6 S TIUFTMPL="H"
7 N TIUFPRIV D SETUP^TIUFL S:$D(DTOUT) VALMQUIT=1 G:$G(VALMQUIT) ENX
8 I TIUFWHO="C" D EN^VALM("TIUFH EDIT DDEFS CLIN")
9 I "NM"[TIUFWHO D EN^VALM("TIUFH EDIT DDEFS MGR")
10ENX Q
11 ;
12HDR ; -- header code
13 N HDR
14 S VALMHDR(1)=$$CENTER^TIUFL("BASICS",79)
15 Q
16 ;
17INIT ; -- init variables and list array
18 ; Requires TIUFTMPL.
19 ; Requires TIUFWHO, set in Options TIUF/A/C/H EDIT/SORT/CREATE DDEFS CLIN/MGR/NATL.
20 ; Called by INIT^TIUFC as well as init for TIUFH.
21 K ^TMP("TIUF1",$J),^TMP("TIUF1IDX",$J),^TMP("TIUFB",$J),^TMP("TIUFBIDX",$J)
22 I '$D(TIUFSTMP) D CLEAN^VALM10 ; Clean IF called from active Template.
23 N TIUFERR,EINFO,SPACE,INFO,NODE0,FILEDA,MISSITEM
24 S VALMCNT=0
25 D NINFO^TIUFLLM(1,^TMP("TIUF",$J,"CLINDOC"),.INFO),PARSE^TIUFLLM(.INFO),NODE0ARR^TIUFLF(^TMP("TIUF",$J,"CLINDOC"),.NODE0) G:$D(DTOUT) INITX
26 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
27 D BUFENTRY^TIUFLLM2(.INFO,.NODE0,TIUFTMPL)
28 D UPDATE^TIUFLLM1("H",1,0) S VALMCNT=VALMCNT+1 G:$G(TIUFERR) INITX
29 I TIUFTMPL="C" D CNTRL^VALM10(1,8,^TMP("TIUF",$J,"NMWIDTH"),IOINHI,IOINORM)
30 S EINFO=^TMP("TIUF1IDX",$J,1),FILEDA=$P(EINFO,U,2)
31 D PARSE^TIUFLLM(.EINFO)
32 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
33 D EXPAND1^TIUFH1(.EINFO) S VALMCNT=VALMCNT+EINFO("XPDLCNT")
34INITX I $D(DTOUT) S VALMQUIT=1
35 Q
36 ;
37EXIT ; -- exit code for template H
38 K ^TMP("TIUF1",$J),^TMP("TIUFB",$J),^TMP("TIUF1IDX",$J),^TMP("TIUFBIDX",$J),^TMP("TIUF",$J),IOELALL
39 D CLEAN^VALM10
40 Q
41 ;
Note: See TracBrowser for help on using the repository browser.