source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUFHA.m@ 839

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

initial load of WorldVistAEHR

File size: 4.4 KB
Line 
1TIUFHA ; SLC/MAM - LM Templates H, A, and C Action Detailed Display, Action Boilerplate Text ;6/5/97 22:57
2 ;;1.0;TEXT INTEGRATION UTILITIES;**64**;Jun 20, 1997
3 ;
4EDVIEW ; Templates H, A, C, and J Action Detailed Display if XQORNOD(0)["Detailed; Action Boilerplate Text if XQORNOD(0)["Boil".
5 ; Requires TIUFTMPL.
6 ; Requires TIUFWHO, set in Options TIUF/A/C/H/J EDIT/SORT/CREATE CLIN/MGR/NATL.
7 ; For Detailed Display Sets TIUFSTMP = D
8 ; For Boilerplate Text Sets TIUFSTMP = X.
9 ; Sets TIUFACT where TIUFACT is a letter: C for Clinician, M for Manager, V for View.
10 ; Sets Array TIUFINFO, Array TIUFNOD0.
11 N TIUFINFO,TIUFXNOD,TIUFACT,TIUFXSTA,TIUFXBT,DTOUT,DIRUT,DIROUT,DUOUT
12 N TIUFNOD0,TIUFVCN1,TIUFSTMP,QUIT,TIUFERR,OLDSNO,EXPAND,TIUFBG1
13 N USROWNS,TIUFBLIN,TIUFILIN,TIUFTLIN,TIUFRLIN,TIUFULIN,TIUFPLIN,TIUFELIN
14 N NOPTYPE,TIUFIXED,MISSITEM,MSG,SHARED,FILEDA
15 N TIUPRM0,TIUPRM1,PFILEDA ;Set by [TIUF UPLOAD FIELD EDIT]
16 S VALMBCK="",TIUFXNOD=$G(XQORNOD(0))
17 D EN^VALM2(TIUFXNOD,"SO") G:'$O(VALMY(0)) EDVIX S TIUFINFO=$G(^TMP("TIUF1IDX",$J,$O(VALMY(0)))) I 'TIUFINFO W !!," Missing List Manager Data; See IRM",! D PAUSE^TIUFXHLX S VALMBCK="Q" G EDVIX
18 S FILEDA=$P(TIUFINFO,U,2),MISSITEM=$$MISSITEM^TIUFLF4(FILEDA) I MISSITEM W !!," Sorry; File Entry "_FILEDA_" has Nonexistent Item "_MISSITEM_"; See IRM.",! D PAUSE^TIUFXHLX S VALMBCK="" G EDVIX
19 D PARSE^TIUFLLM(.TIUFINFO)
20 D NODE0ARR^TIUFLF(TIUFINFO("FILEDA"),.TIUFNOD0) G:$D(DTOUT) EDVIX
21 I TIUFXNOD["Detailed" S TIUFSTMP="D"
22 I TIUFXNOD["Boil" S TIUFSTMP="X"
23 I TIUFSTMP="X",FILEDA=81 W !!," Addendum title does not have its own Boilerplate Text",! D PAUSE^TIUFXHLX S VALMBCK="" G EDVIX ;P64
24 I TIUFSTMP="X",TIUFNOD0("TYPE")'="TITLE",TIUFNOD0("TYPE")'="COMPONENT" W !!," Only Titles and Components have Boilerplate Text",! D PAUSE^TIUFXHLX S VALMBCK="" G EDVIX
25 S SHARED=$P(TIUFNOD0,U,10),TIUFACT=TIUFWHO
26 S PFILEDA="",NOPTYPE=0
27 F S PFILEDA=$O(^TIU(8925.1,"AD",TIUFINFO("FILEDA"),PFILEDA)) Q:'PFILEDA D Q:NOPTYPE
28 . I $P(^TIU(8925.1,PFILEDA,0),U,4)="" S NOPTYPE=1
29 D:TIUFXNOD["Detailed"
30 . I FILEDA=81!(FILEDA=512) S TIUFACT="V",MSG=" Addendum; View Only" Q ;P64
31 . I $P(TIUFNOD0,U,13),TIUFWHO'="N",TIUFXNOD["Detailed" S MSG=" Entry is National; Limited Actions" ;P64 set msg only for Detailed Display, not Btext
32 S USROWNS=$$PERSOWNS^TIUFLF2(TIUFINFO("FILEDA"),DUZ)
33 I TIUFSTMP="X" S TIUFXSTA=TIUFNOD0("STATUS"),TIUFXBT=TIUFNOD0("BOILPT")
34 D
35 . I TIUFWHO="C",TIUFNOD0("TYPE")="OBJECT" S TIUFACT="V" S:TIUFTMPL'="J" MSG=" Object; View Only" Q
36 . I TIUFWHO="C",USROWNS="" S TIUFACT="V",MSG=" Entry has no Owner; View Only" Q
37 . I TIUFWHO="C",SHARED S TIUFACT="V",MSG=" Entry is Shared Component; View Only" Q
38 . I TIUFWHO="C",USROWNS=0 S TIUFACT="V",MSG=" Non-Owner; View Only" Q
39 . I SHARED,USROWNS=0 S TIUFACT="V",MSG="Shared Components can be edited only by the Owner; View Only" Q
40 . I SHARED,TIUFTMPL'="A" S TIUFACT="V",MSG="Shared Components can be edited only through the SORT option; View Only" Q
41 I $D(MSG) W !!,MSG,! D PAUSE^TIUFXHLX G:$D(DUOUT)!$D(DTOUT) EDVIX
42 ; If entry is expanded, collapse entry and reexpand to items only when return. Too hard to update otherwise.
43 S EXPAND=TIUFINFO("XPDLCNT")
44 I "HC"[TIUFTMPL,EXPAND D COLLAPSE^TIUFH1(.TIUFINFO) S VALMCNT=VALMCNT-EXPAND
45 S TIUFVCN1=VALMCNT,TIUFBG1=VALMBG,TIUFIXED=VALM("FIXED")
46 N TIUFREDO,TIUREC
47 S TIUFREDO=0
48 I TIUFXNOD["Detailed" D
49 . I $P(TIUFNOD0,U,4)'="O" D EN^VALM("TIUFD DISPLAY CLIN"):(TIUFACT="C"),EN^VALM("TIUFD DISPLAY MGR"):("NM"[TIUFACT),EN^VALM("TIUFD DISPLAY VIEW"):TIUFACT="V" Q
50 . D EN^VALM("TIUFDJ DISPLAY OBJECT MGR"):("NM"[TIUFACT),EN^VALM("TIUFD DISPLAY VIEW"):TIUFACT="V"
51 I TIUFXNOD["Boil" D EN^VALM("TIUFX BOILERPLATE TEXT"):("NMC"[TIUFACT),EN^VALM("TIUFX BOILERPLATE TEXT VIEW"):(TIUFACT="V")
52 S VALMCNT=TIUFVCN1,VALMBG=TIUFBG1
53 K ^TMP("TIUFEMBED",$J)
54 I TIUFTMPL="H" D
55 . S TIUREC=^TMP("TIUF1",$J,+TIUFINFO,0)
56 . S TIUREC=$$PLUSUP^TIUFLLM(.TIUFINFO,TIUREC)
57 . S ^TMP("TIUF1",$J,+TIUFINFO,0)=TIUREC
58 . Q
59 I "HC"[TIUFTMPL,EXPAND D EXPAND1^TIUFH1(.TIUFINFO) S VALMCNT=VALMCNT+$P(TIUFINFO,U,3)
60 ; Templates A,J have been updated with each change to Template D(J); just redisplay.
61 I TIUFTMPL="A" D
62 . I VALMLFT=81!(VALMLFT=113) D CHGCAP^VALM("NAME1","Name Type")
63 . I VALM("FIXED")=20 D CHGCAP^VALM("NAME1","Name Type")
64 I TIUFTMPL="A"!(TIUFTMPL="J"),TIUFREDO D INIT^TIUFA
65 S VALMBCK="R"
66EDVIX I $D(DTOUT) S VALMBCK="Q"
67 Q
68 ;
69EXIT ; -- exit code for LM Template D, X
70 K ^TMP("TIUF3",$J),^TMP("TIUFB",$J),^TMP("TIUF3IDX",$J),^TMP("TIUFBIDX",$J)
71 Q
Note: See TracBrowser for help on using the repository browser.