source: FOIAVistA/trunk/r/AUTHORIZATION_SUBSCRIPTION-USR/USRRUL1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1USRRUL1 ; SLC/JER - Rule Browser subroutines & functions ; 05/13/1998
2 ;;1.0;AUTHORIZATION/SUBSCRIPTION;**7**;Jun 20, 1997
3UPDATE(ITEM) ; Updates list following edit
4 N USRDA,USRULE,USRPAD
5 S $P(USRPAD," ",6-$L(+ITEM))=""
6 S USRDA=$P(ITEM,U,2)
7 D XLATE^USRAEDT(.USRULE,USRDA)
8 D SET^VALM10(+ITEM,+ITEM_USRPAD_$P(USRULE,"|"),USRDA)
9 D RESTORE^VALM10(+ITEM),CNTRL^VALM10(+ITEM,1,VALM("RM"),IOINHI,IOINORM)
10 Q
11RESIZE(LONG,SHORT,SHRINK) ; Resizes list area
12 N USRBM S USRBM=$S(VALMMENU:SHORT,+$G(SHRINK):SHORT,1:LONG)
13 I VALM("BM")'=USRBM S VALMBCK="R" D
14 . S VALM("BM")=USRBM,VALM("LINES")=(USRBM-VALM("TM"))+1
15 . I +$G(VALMCC) D RESET^VALM4
16 Q
17PICK(USRITEM) ; Highlight selected list elements, add to VALMY(ITEM) array
18 N I,ITEM,LINE,MRSI
19 F I=1:1:$L(USRITEM,",") S ITEM=$P(USRITEM,",",I) Q:+ITEM'>0 D
20 . S LINE=+$O(@VALMAR@("IDX",+ITEM,0))
21 . I '+LINE S LINE=ITEM
22 .;Keep track of the most recently selected item.
23 . S MRSI=ITEM
24 . I '$D(VALMY(ITEM)) D I 1
25 . . D RESTORE^VALM10(LINE),CNTRL^VALM10(LINE,6,VALM("RM"),IORVON,IORVOFF)
26 . . D WRITE^VALM10(LINE)
27 . . S VALMY(ITEM)=""
28 . E D
29 . . D RESTORE(LINE),WRITE^VALM10(LINE)
30 . . K VALMY(ITEM)
31 ;Move the display to 5 lines before the MRSI
32 S VALMBG=$$MAX^XLFMTH(1,(MRSI-5))
33 D RE^VALM4
34 Q
35FIXLST ; Restore video attributes to entire list
36 N USRI S USRI=0
37 Q:'$D(VALMAR)
38 F S USRI=$O(@VALMAR@(USRI)) Q:+USRI'>0 D
39 . D RESTORE^VALM10(USRI)
40 Q
41RESTORE(ITEM) ; Restore video attributes for a single list element
42 D RESTORE^VALM10(ITEM)
43 Q
44REMOVE(ITEM) ; Remove an element from the list
45 N USRULE,USRPAD
46 S $P(USRPAD," ",6-$L(USRCNT))=""
47 S USRULE="<Business Rule DELETED>"
48 D SET^VALM10(+ITEM,+ITEM_USRPAD_USRULE,+$P(ITEM,U,2))
49 D RESTORE^VALM10(+ITEM),CNTRL^VALM10(+ITEM,6,VALM("RM"),IOINHI,IOINORM)
50 Q
Note: See TracBrowser for help on using the repository browser.