source: WorldVistAEHR/trunk/r/VICTORY_PROGRAMMING_ENVIRONMENT-ZVEM/ZVEMSF2.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: 3.9 KB
Line 
1ZVEMSF2 ;DJB,VSHL**DIC [8/3/97 1:29pm]
2 ;;12;VPE;;COPYRIGHT David Bolduc @1993
3 ;
4DIC ;;;
5 ;;; D I C Look-up/Add New Entries
6 ;;;
7 ;;; 1. ENTRY POINT: ^DIC
8 ;;;
9 ;;; 2. INPUT VARIABLES
10 ;;; DIC.....File number or global root ("^GLOBAL(" or "^GLOBAL(X,Y,").
11 ;;; DIC(0)....A Ask entry
12 ;;; C Cross reference suppression is turned off
13 ;;; E Echo back information
14 ;;; F Forget look-up value
15 ;;; I Ignore special look-up program
16 ;;; L LAYGO allowed
17 ;;; M Multiple-index look-up allowed
18 ;;; N Internal Number look-up allowed
19 ;;; O Only find one entry if it matches exactly
20 ;;; Q Question erroneous input
21 ;;; S Suppress display of .01
22 ;;; X EXact match required
23 ;;; Z Zero node returned in Y(0) and external form in Y(0,0)
24 ;;; X........If DIC(0) doesn't contain A, set X=Value you want to look up.
25 ;;; DIC("A")...Prompt.
26 ;;; DIC("B")...Default answer.
27 ;;; DIC("S")...Screen. When screen is executed Y=Internal number, and naked.
28 ;;; indicator is at zero node.
29 ;;; DIC("W")...Command string executed when DIC displays each of the entries
30 ;;; that match user's input. Y and naked ref is same as DIC("S").
31 ;;; Overrides identifiers. DIC("W")="" will suppress identifiers.
32 ;;; DIC("DR")..Fields that will be asked if LAYGO and you add new entry.
33 ;;; DIC("P")...Needed to successfully add FIRST subentry to a multiple field.
34 ;;; Set it to 2nd piece of zero node of multiple field's
35 ;;; definition in ^DD. Ex: S DIC("P")=$P(^DD(2,9,0),"^",2)
36 ;;; DTIME......Number of seconds for time-out.
37 ;;; DLAYGO.....If set equal to file number, user may add a new entry.
38 ;;; DINUM......Identifies subscript at which data is to be stored.
39 ;;;
40 ;;; 3. OUTPUT VARIABLES
41 ;;; Y........Y=-1 Look-up unsuccessful.
42 ;;; Y=N^S N is the internal number, S is the .01 field.
43 ;;; Y=N^S^1 1 indicates entry has just been added.
44 ;;; Y(0).....Set to zero node if DIC(0) contains Z.
45 ;;; Y(0,0)...External form of .01 field if DIC(0) contains Z.
46 ;;; X........If DIC(0) contains A, X will store users look-up value.
47 ;;; DTOUT....Time-out occurred.
48 ;;; DUOUT....User entered "^".
49 ;;;
50 ;;; Sample code where file ^DIZ(16 has multiple field 9 at node 4.
51 ;;; S DIC="^DIZ(16,",DIC(0)="QEAL" D ^DIC ;Get entry
52 ;;; S DA(1)=+Y,DIC=DIC_DA(1)_",4," ;Root of subfile
53 ;;; S DIC(0)="QEAL",DIC("P")=$P(^DD(16,9,0),"^",2)
54 ;;; D ^DIC ;Get subentry
55 ;;; S DIE=DIC KILL DIC S DA=+Y,DR="1;2" D ^DIE ;Edit multiples directly
56 ;;;
57 ;;; 1. ENTRY POINT: IX^DIC
58 ;;;
59 ;;; 2. INPUT VARIABLES
60 ;;; DIC......Global root
61 ;;; DIC(0)...Same as ^DIC
62 ;;; D........The cross reference in which to start looking. If DIC(0) contains
63 ;;; M, then DIC will continue with further cross references. If it
64 ;;; does not, then the look-up is only on the single cross reference.
65 ;;; X........If DIC(0) does not contain an A, then X must equal look-up value.
66 ;;;
67 ;;; 3. OUTPUT VARIABLES
68 ;;; Y........Y=-1 Look-up unsuccessful.
69 ;;; Y=N^S N is the internal number, S is the .01 field.
70 ;;; Y=N^S^1 1 indicates entry has just been added.
71 ;;; Y(0).....Set to zero node if DIC(0) contains Z.
72 ;;; Y(0,0)...External form of .01 field if DIC(0) contains Z.
73 ;;; X........If DIC(0) contains A, X will store users look-up value.
74 ;;; DTOUT....Time-out occurred.
75 ;;; DUOUT....User entered "^".
76 ;;;
77 ;;; 1. ENTRY POINT: MIX^DIC1
78 ;;;
79 ;;; 2. INPUT VARIABLES
80 ;;; Same as IX^DIC except variable D can contain a list of xrefs
81 ;;; separated by up-arrow. If DIC(0) does not contain M, only the
82 ;;; first xref in D will be used for the look-up.
83 ;;;
84 ;;; 3. OUTPUT VARIABLES
85 ;;; Same as IX^DIC.
86 ;;;***
Note: See TracBrowser for help on using the repository browser.