source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DINIT122.m@ 1800

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

initial load of WorldVistAEHR

File size: 6.7 KB
Line 
1DINIT122 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) S @X=Y
5 G ^DINIT123
6Q Q
7 ;;^DD(.4011624,3.1,21,3,0)
8 ;;=the sort qualifiers for page breaks (#) or rankings (!).
9 ;;^DD(.4011624,3.1,21,4,0)
10 ;;=
11 ;;^DD(.4011624,3.1,21,5,0)
12 ;;=The # and/or ! are the only qualifiers that can be used. Others,
13 ;;^DD(.4011624,3.1,21,6,0)
14 ;;=such as + for subtotals, cannot be used.
15 ;;^DD(.4011624,3.1,23,0)
16 ;;=^^1^1^2960910^^
17 ;;^DD(.4011624,3.1,23,1,0)
18 ;;=Equivalent to the 1st piece of DISPAR(0,n) in the EN1^DIP call.
19 ;;^DD(.4011624,3.1,"DT")
20 ;;=2960910
21 ;;^DD(.4011624,3.2,0)
22 ;;=DISPAR(0,n) PIECE TWO^FX^^1;2^K:$L(X)>50!($L(X)<1)!'((X[";""")!(X[";L")!(X[";C")!(X[";S")) X
23 ;;^DD(.4011624,3.2,3)
24 ;;=Answer with qualifiers like ;"" or ;S2;C10;L30;"VALUE: "
25 ;;^DD(.4011624,3.2,21,0)
26 ;;=^^12^12^2960910^^^
27 ;;^DD(.4011624,3.2,21,1,0)
28 ;;=As when defining the second piece of DISPAR(0,n) in a programmer
29 ;;^DD(.4011624,3.2,21,2,0)
30 ;;=call that includes BY(0) when calling EN1^DIP, this field can hold
31 ;;^DD(.4011624,3.2,21,3,0)
32 ;;=the sort qualifiers that normally appear after a sort-by field in
33 ;;^DD(.4011624,3.2,21,4,0)
34 ;;=interactive mode. The ones that can be used are as follows:
35 ;;^DD(.4011624,3.2,21,5,0)
36 ;;=
37 ;;^DD(.4011624,3.2,21,6,0)
38 ;;= ;"" to have the subheader appear
39 ;;^DD(.4011624,3.2,21,7,0)
40 ;;= ;"caption" to give the subheader a caption
41 ;;^DD(.4011624,3.2,21,8,0)
42 ;;= ;Ln to left-justify the subheader to n characters
43 ;;^DD(.4011624,3.2,21,9,0)
44 ;;= ;Cn to start the display in the nth column
45 ;;^DD(.4011624,3.2,21,10,0)
46 ;;= ;Sn to skip n lines before each subheader
47 ;;^DD(.4011624,3.2,21,11,0)
48 ;;=
49 ;;^DD(.4011624,3.2,21,12,0)
50 ;;=If this field is null, subheaders are supressed (@ is assumed).
51 ;;^DD(.4011624,3.2,23,0)
52 ;;=^^3^3^2960910^^^
53 ;;^DD(.4011624,3.2,23,1,0)
54 ;;=Equivalent to the 2nd piece of DISPAR(0,n) in the EN1^DIP call.
55 ;;^DD(.4011624,3.2,23,2,0)
56 ;;=Note that if DISPAR(0,n) is defined, subheaders will appear even if
57 ;;^DD(.4011624,3.2,23,3,0)
58 ;;=used with a print template that normally suppresses subheaders.
59 ;;^DD(.4011624,3.2,"DT")
60 ;;=2960911
61 ;;^DD(.4011624,4,0)
62 ;;=DISPAR(0,n,OUT)^K^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
63 ;;^DD(.4011624,4,3)
64 ;;=Enter code to transform subscript. This is Standard M code.
65 ;;^DD(.4011624,4,9)
66 ;;=@
67 ;;^DD(.4011624,4,21,0)
68 ;;=^^7^7^2960829^^^^
69 ;;^DD(.4011624,4,21,1,0)
70 ;;=As when defining DISPAR(0,n,"OUT") for a call to EN1^DIP that includes
71 ;;^DD(.4011624,4,21,2,0)
72 ;;=BY(0), enter M code that will transform the sort-by value for this
73 ;;^DD(.4011624,4,21,3,0)
74 ;;=subscript (n) when it is output (e.g. printed). At the time
75 ;;^DD(.4011624,4,21,4,0)
76 ;;=the code is executed the untransformed value of the subscript will be in
77 ;;^DD(.4011624,4,21,5,0)
78 ;;=Y. The code should put the transformed value back into Y.
79 ;;^DD(.4011624,4,21,6,0)
80 ;;=
81 ;;^DD(.4011624,4,21,7,0)
82 ;;=For example, for an inverse date, S:Y Y=99999999-Y S Y=$$FMTE^XLFDT(Y)"
83 ;;^DD(.4011624,4,23,0)
84 ;;=^^2^2^2960829^^^^
85 ;;^DD(.4011624,4,23,1,0)
86 ;;=Equivalent to the DISPAR(0,n,"OUT") input variable to the programmer call
87 ;;^DD(.4011624,4,23,2,0)
88 ;;=EN1^DIP.
89 ;;^DD(.4011624,4,"DT")
90 ;;=2960829
91 ;;^DD(.4012,0)
92 ;;=DESCRIPTION SUB-FIELD^^.01^1
93 ;;^DD(.4012,0,"NM","DESCRIPTION")
94 ;;=
95 ;;^DD(.4012,0,"UP")
96 ;;=.401
97 ;;^DD(.4012,.01,0)
98 ;;=DESCRIPTION^W^^0;1^Q
99 ;;^DD(.4014,0)
100 ;;=SORT FIELD DATA SUB-FIELD^^21^27
101 ;;^DD(.4014,0,"DT")
102 ;;=2931221
103 ;;^DD(.4014,0,"IX","B",.4014,.01)
104 ;;=
105 ;;^DD(.4014,0,"NM","SORT FIELD DATA")
106 ;;=
107 ;;^DD(.4014,0,"UP")
108 ;;=.401
109 ;;^DD(.4014,.01,0)
110 ;;=FILE OR SUBFILE NO.^MRNJ13,5^^0;1^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
111 ;;^DD(.4014,.01,1,0)
112 ;;=^.1
113 ;;^DD(.4014,.01,1,1,0)
114 ;;=.4014^B
115 ;;^DD(.4014,.01,1,1,1)
116 ;;=S ^DIBT(DA(1),2,"B",$E(X,1,30),DA)=""
117 ;;^DD(.4014,.01,1,1,2)
118 ;;=K ^DIBT(DA(1),2,"B",$E(X,1,30),DA)
119 ;;^DD(.4014,.01,3)
120 ;;=Type a Number between 0 and 9999999.99999, 5 Decimal Digits. File or subfile number on which sort field resides.
121 ;;^DD(.4014,.01,21,0)
122 ;;=^^3^3^2930125^^
123 ;;^DD(.4014,.01,21,1,0)
124 ;;=This is the number of the file or subfile on which the sort field
125 ;;^DD(.4014,.01,21,2,0)
126 ;;=resides. It is created automatically during the SORT FIELDS dialogue
127 ;;^DD(.4014,.01,21,3,0)
128 ;;=with the user in the sort/print option.
129 ;;^DD(.4014,.01,23,0)
130 ;;=^^1^1^2930125^^
131 ;;^DD(.4014,.01,23,1,0)
132 ;;=This number is automatically assigned by the print routine DIP.
133 ;;^DD(.4014,.01,"DT")
134 ;;=2930125
135 ;;^DD(.4014,2,0)
136 ;;=FIELD NO.^NJ13,5^^0;2^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
137 ;;^DD(.4014,2,3)
138 ;;=Type a Number between 0 and 9999999.99999, 5 Decimal Digits. Sort field number, except for pointers, variable pointers and computed fields.
139 ;;^DD(.4014,2,21,0)
140 ;;=^^4^4^2930125^
141 ;;^DD(.4014,2,21,1,0)
142 ;;=On most sort fields, this piece will contain the field number. If sorting
143 ;;^DD(.4014,2,21,2,0)
144 ;;=on a pointer, variable pointer or computed field, the piece will be null.
145 ;;^DD(.4014,2,21,3,0)
146 ;;=If sorting on the record number (NUMBER or .001), the piece will contain
147 ;;^DD(.4014,2,21,4,0)
148 ;;=a 0.
149 ;;^DD(.4014,2,23,0)
150 ;;=^^1^1^2930125^
151 ;;^DD(.4014,2,23,1,0)
152 ;;=Created by FileMan during the print option (in the DIP* routines).
153 ;;^DD(.4014,2,"DT")
154 ;;=2930125
155 ;;^DD(.4014,3,0)
156 ;;=FIELD NAME^F^^0;3^K:$L(X)>100!($L(X)<1) X
157 ;;^DD(.4014,3,3)
158 ;;=Answer must be 1-100 characters in length.
159 ;;^DD(.4014,3,21,0)
160 ;;=^^2^2^2930125^
161 ;;^DD(.4014,3,21,1,0)
162 ;;=This piece contains the sort field name, or the user entry if sorting by
163 ;;^DD(.4014,3,21,2,0)
164 ;;=an on-the-fly computed field.
165 ;;^DD(.4014,3,23,0)
166 ;;=^^1^1^2930125^
167 ;;^DD(.4014,3,23,1,0)
168 ;;=Created by FileMan during the print option (DIP* routines).
169 ;;^DD(.4014,3,"DT")
170 ;;=2930125
171 ;;^DD(.4014,4,0)
172 ;;=SORT QUALIFIERS BEFORE FIELD^F^^0;4^K:$L(X)>20!($L(X)<1) X
173 ;;^DD(.4014,4,3)
174 ;;=Answer must be 1-20 characters in length. Sort qualifiers that normally precede the field number in the user dialogue (like !,@,#,+)
175 ;;^DD(.4014,4,21,0)
176 ;;=^^5^5^2930125^^^
177 ;;^DD(.4014,4,21,1,0)
178 ;;=This contains all of the sort qualifiers that normally precede the field
179 ;;^DD(.4014,4,21,2,0)
180 ;;=number in the user dialogue during the sort option. It includes things
181 ;;^DD(.4014,4,21,3,0)
182 ;;=like # (Page break when sort value changes), @ (suppress printing of
183 ;;^DD(.4014,4,21,4,0)
184 ;;=subheader). These qualifiers are listed out with no delimiters, as they
185 ;;^DD(.4014,4,21,5,0)
186 ;;=are found during the user dialogue. (So you might see something like #@).
Note: See TracBrowser for help on using the repository browser.