source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIULM.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: 2.6 KB
Line 
1TIULM ; SLC/JER - List Manager Library: RESIZE, REMOVE Elmt, PICK List Elmt ; 3/9/01
2 ;;1.0;TEXT INTEGRATION UTILITIES;**100**;Jun 20, 1997
3RESIZE(LONG,SHORT,SHRINK) ; Resizes list area
4 N TIUBM S TIUBM=$S(VALMMENU:SHORT,+$G(SHRINK):SHORT,1:LONG)
5 I VALM("BM")'=TIUBM S VALMBCK="R" D
6 . S VALM("BM")=TIUBM,VALM("LINES")=(TIUBM-VALM("TM"))+1
7 . I +$G(VALMCC) D RESET^VALM4
8 Q
9PICK(TIUITEM) ; Highlight selected list elements, add to VALMY(ITEM) array
10 N TIUI,ITEM,LINE
11 ; **100** 4/11/00:
12 F TIUI=1:1:$L(TIUITEM,",") S ITEM=$P(TIUITEM,",",TIUI) Q:+ITEM'>0 D
13 . S LINE=+$O(@VALMAR@("PICK",+ITEM,0)) I '+LINE S LINE=ITEM
14 . I '$D(VALMY(ITEM)) D I 1
15 . . D RESTORE^VALM10(LINE),CNTRL^VALM10(LINE,6,VALM("RM"),IORVON,IORVOFF)
16 . . D WRITE^VALM10(LINE)
17 . . S VALMY(ITEM)=""
18 . . ;**100**
19 . . I $G(TIUGLINK) D
20 . . . I $L(TIUITEM,",")>2 D
21 . . . . W !!,"You are now selecting ONE interdisciplinary parent note."
22 . . . . W !,"Acting on line ",+TIUITEM
23 . . . . W " as your parent note selection." H 5
24 . . . . S TIUITEM=+TIUITEM ; only want 1 ID parent
25 . . . D LKDAD^TIUGR2(TIUGLINK)
26 . . . K VALMY
27 . E D
28 . . D RESTORE^VALM10(LINE),WRITE^VALM10(LINE)
29 . . K VALMY(ITEM)
30 ; D RE^VALM4 ; P100 took out, redundant
31 Q
32FIXLST ; Restore video attributes to entire list
33 N TIUI S TIUI=0
34 Q:'$D(VALMAR)
35 F S TIUI=$O(^TMP("TIUR",$J,TIUI)) Q:+TIUI'>0 D
36 . I TIUI=$P($G(TIUGLINK),U,2) Q ; See TIURL
37 . D RESTORE(TIUI)
38 Q
39FIXLSTNW ; Restore video attributes to entire list
40 ; New: Don't bold the list #
41 N TIUI S TIUI=0
42 Q:'$D(VALMAR)
43 F S TIUI=$O(^TMP("TIUR",$J,TIUI)) Q:+TIUI'>0 D
44 . I TIUI=$P($G(TIUGLINK),U,2) Q ; See TIURL
45 . D RESTORE^VALM10(TIUI)
46 Q
47RESTORE(ITEM) ; Restore video attributes for a single list element
48 D RESTORE^VALM10(ITEM),FLDCTRL^VALM10(ITEM,"NUMBER",IOINHI,IOINORM)
49 Q
50RESTOREG(TIUGLINK) ; Update video attributes after changing view,
51 ;for ID entry being attached, which probably moved to a different line.
52 N LINENO,NLINENO
53 Q:'$G(TIUGLINK)
54 S LINENO=$P(TIUGLINK,U,2)
55 S NLINENO=+$O(^TMP("TIUR",$J,"IEN",+TIUGLINK,0))
56 S $P(TIUGLINK,U,2)=NLINENO
57 I $D(^TMP("TIUR",$J,LINENO)) D RESTORE^VALM10(LINENO)
58 I $D(^TMP("TIUR",$J,NLINENO)) D
59 . D RESTORE^VALM10(NLINENO)
60 . D CNTRL^VALM10(NLINENO,6,VALM("RM"),IORVON,IORVOFF)
61 Q
62 ;
63REMOVE(ITEM) ; Remove an element from the list
64 ; No longer used since patch 100
65 ; Now called only by rtn TIUPPAC, an obsolete patient postings rtn.
66 N TIUREC S TIUREC=$G(^TMP("TIUR",$J,+ITEM,0))
67 S TIUREC=$$SETFLD^VALM1("deleted",TIUREC,"STATUS")
68 S ^TMP("TIUR",$J,+ITEM,0)=TIUREC
69 D RESTORE^VALM10(+ITEM),CNTRL^VALM10(+ITEM,6,VALM("RM"),IOINHI,IOINORM)
70 I $P(ITEM,U,2) D UPIDDATA^TIURL1($P(ITEM,U,2))
71 Q
Note: See TracBrowser for help on using the repository browser.