source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORLSTVIZ.m@ 1753

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1ORLSTVIZ ; SLC/WAT - Editing Team List Visibility ;9/14/06 14:00
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
3 ;
4 ;PROMPT THE USER FOR A LIST OR LISTS FOR WHICH TO SET VISIBILITY
5 ;SHOW THE POSSIBLE OPTIONS FOR VISIBILITY:
6 ; '0' = NOBODY
7 ; '1' = ALLUSERS
8 ;DIC,DIR,DIE - FileMan call
9 ; DA - input variable to ^DIE - internal entry number of the file entry to be edited
10 ; DR - input variable to ^DIE - as used here it's the field number in file stuffed with user-chosen VISBILITY value
11 ; DTOUT - output from ^DIC-only defined when DIC times out
12 ; DUOUT - output from ^DIC-only defined when user enters carat
13 ; DIRUT - output from ^DIR-defined when user enters carat, presses Return/Enter, or times out
14 ; Y - Returned from FM call-returns "-1" is lookup was unsuccessful
15 ; Y(0) - Returned from ^DIC-hold external value of chosen VISIBILITY by user
16 ; IEN - IEN of list from 100.21
17 ; VIS - VISIBILITY value from 100.21
18 ; CNT - counter/array index position
19 ; LIST - NAME value from 100.21
20 ; VIS - VISIBILITY value from 100.21
21 N DIC,DIR,DIE,DA,DR,DTOUT,DUOUT,DIRUT,Y,LIST,VIS,CNT,IEN,VAL
22 K ^TMP("ORLST",$J)
23 S DIC="^OR(100.21,",DIC(0)="AEQZ",CNT=0
24 W !,"You may set the VISIBILITY for one or more lists."
25 W !,"Please enter your selection(s) below."
26LKUP F D ^DIC Q:$D(DTOUT)!($D(DUOUT))!(Y=-1) I Y>0 S ^TMP("ORLST",$J,CNT)=$P(Y,U,1) S ^TMP("ORLST",$J,CNT,CNT+1)=$P(Y,U,2) S ^TMP("ORLST",$J,CNT,CNT+1,CNT+2)=$$GET1^DIQ(100.21,^TMP("ORLST",$J,0),11) S CNT=CNT+1
27 Q:$D(DTOUT)!($D(DUOUT))
28 Q:'$D(^TMP("ORLST",$J,0))
29 ;*********For each selected list(s), display current NAME and VISIBILITY*******
30 W !!,"You have chosen to update the following list(s):"
31 S (IEN,LIST,VIS)=""
32 F S IEN=$O(^TMP("ORLST",$J,IEN)) Q:IEN="" D
33 . S LIST=$O(^TMP("ORLST",$J,IEN,LIST)) Q:LIST="" W !?5,^TMP("ORLST",$J,IEN,LIST) D
34 . .S VIS=$O(^TMP("ORLST",$J,IEN,LIST,VIS)) Q:VIS="" W ?37,"Current value: "_^TMP("ORLST",$J,IEN,LIST,VIS)
35 W !!,""
36 ;
37READER S DIR(0)="100.21,11",DIR("B")="ALLUSERS"
38 D ^DIR Q:$D(DIRUT)
39 ;
40 S VAL=Y(0) ;capture user-selected VISIBILTY value
41EDIT S IEN="",DIE=DIC,DR="11///^S X=VAL" ; 11 is VISIBILITY field in 100.21
42 F S IEN=$O(^TMP("ORLST",$J,IEN)) Q:IEN="" D
43 .S DA=^TMP("ORLST",$J,IEN)
44 .D ^DIE
45 K ^TMP("ORLST",$J)
46 W @IOF
47 W !!,"Update Complete"
48 Q
Note: See TracBrowser for help on using the repository browser.