STANDARD DATA DICTIONARY #.401 -- SORT TEMPLATE FILE 3/24/25 PAGE 1 STORED IN ^DIBT( (685 ENTRIES) SITE: WWW.BMIRWIN.COM UCI: VISTA,VISTA (VERSION 22.2) DATA NAME GLOBAL DATA ELEMENT TITLE LOCATION TYPE ----------------------------------------------------------------------------------------------------------------------------------- This file stores either SORT or SEARCH criteria. For SORT criteria, the SORT DATA multiple contains the sort parameters. For SEARCH criteria, the template also contains a list of record numbers selected as the result of running the search. DD ACCESS: ^ WR ACCESS: ^ IDENTIFIED BY: "WRITE": N D,D1,D2 S D2=^(0) S:$X>30 D1(1,"F")="!" S D=$P(D2,U,2) S:D D1(2)="("_$$DATE^DIUTL(D)_")",D1(2,"F")="?30" S D=$P(D2 ,U,5) S:D D1(3)=" User #"_D,D1(3,"F")="?50" S D=$P(D2,U,4) S:D D1(4)=" File #"_D,D1(4,"F")="?59" D EN^DDIOL(.D1) "WRITE1": N D1 S D1=$S($D(^DIBT(+Y,2))!$D(^("BY0")):"SORT",$D(^("DIS")):"SEARCH",$D(^(1)):"INQ",1:"") D EN^DDIOL(D1,"","?73") "WRITED": I $G(DZ)?1"???".E N % S %=0 F S %=$O(^DIBT(Y,"%D",%)) Q:%'>0 I $D(^(%,0))#2 D EN^DDIOL(^(0),"","!?5") POINTED TO BY: SEARCH TEMPLATE field (#2) of the ARCHIVAL ACTIVITY File (#1.11) SORT TEMPLATE NAME field (#7) of the ADT TEMPLATE File (#43.7) SEARCH TEMPLATE field (#.08) of the PTF ARCHIVE/PURGE HISTORY FILE File (#45.62) SEARCH TEMPLATE field (#2) of the LAB ARCHIVAL ACTIVITY File (#95.11) CROSS REFERENCED BY: NAME(B) .401,.01 NAME 0;1 FREE TEXT INPUT TRANSFORM: K:$L(X)<2!($L(X)>30) X HELP-PROMPT: 2-30 CHARACTERS CROSS-REFERENCE: .401^B 1)= S @(DIC_"""B"",X,DA)=""""") 2)= K @(DIC_"""B"",X,DA)") CROSS-REFERENCE: ^^MUMPS 1)= X "S %=$P("_DIC_"DA,0),U,4) S:$L(%) "_DIC_"""F""_+%,X,DA)=1" 2)= X "S %=$P("_DIC_"DA,0),U,4) K:$L(%) "_DIC_"""F""_+%,X,DA)" .401,2 DATE CREATED 0;2 DATE INPUT TRANSFORM: S %DT="ET" D ^%DT S X=Y K:Y<1 X .401,3 READ ACCESS 0;3 FREE TEXT INPUT TRANSFORM: I DUZ(0)'="@" F I=1:1:$L(X) I DUZ(0)'[$E(X,I) K X Q .401,4 FILE 0;4 POINTER TO FILE FILE (#1) UNEDITABLE CROSS-REFERENCE: ^^^MUMPS 1)= X "S %=$P("_DIC_"DA,0),U,1),"_DIC_"""F""_+X,%,DA)=1" 2)= Q .401,5 USER # 0;5 NUMBER .401,6 WRITE ACCESS 0;6 FREE TEXT INPUT TRANSFORM: I DUZ(0)'="@" F I=1:1:$L(X) I DUZ(0)'[$E(X,I) K X Q .401,7 DATE LAST USED 0;7 DATE INPUT TRANSFORM: S %DT="EX" D ^%DT S X=Y K:Y<1 X .401,8 TEMPLATE TYPE 0;8 SET '1' FOR ARCHIVING SEARCH; HELP-PROMPT: Enter a 1 if this is an ARCHIVING SEARCH template (i.e., used to store lists of records to be archived) as opposed to a normal SEARCH or SORT template .401,9 SEARCH COMPLETE DATE QR;1 DATE INPUT TRANSFORM: S %DT="ESTXR" D ^%DT S X=Y K:Y<1 X LAST EDITED: NOV 24, 1992 HELP-PROMPT: Enter the date/time that this search was run to completion. DESCRIPTION: This field will be filled in automatically by the search option, but only if the search runs to completion. It will contain the date/time that the search last ran. If it was not allowed to run to completion, this field will be empty. TECHNICAL DESCR: Filled in automatically by the FileMan search option. .401,10 DESCRIPTION %D;0 WORD-PROCESSING #.4012 .401,11 TOTAL RECORDS SELECTED QR;2 NUMBER INPUT TRANSFORM: K:+X'=X!(X>9999999999)!(X<1)!(X?.E1"."1N.N) X LAST EDITED: NOV 25, 1992 HELP-PROMPT: Type a Number between 1 and 9999999999, 0 Decimal Digits DESCRIPTION: This field is filled in automatically by the FileMan search option. If the search is allowed to run to completion, the total number of records that met the search criteria is stored in this field. If the last search was not allowed to run to completion, this field will be null. TECHNICAL DESCR: Filled in automatically by the FileMan search option. .401,15 SEARCH SPECIFICATIONS O;0 WORD-PROCESSING #.4011 (NOWRAP) .401,1620 SORT FIELDS ; COMPUTED MULTIPLE MUMPS CODE: N DPP D DIBT^DIPT .401,1621 SORT FIELD DATA 2;0 Multiple #.4014 .4014,.01 FILE OR SUBFILE NO. 0;1 NUMBER (Required) (Multiply asked) INPUT TRANSFORM: K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Type a Number between 0 and 9999999.99999, 5 Decimal Digits. File or subfile number on which sort field resides. DESCRIPTION: This is the number of the file or subfile on which the sort field resides. It is created automatically during the SORT FIELDS dialogue with the user in the sort/print option. TECHNICAL DESCR: This number is automatically assigned by the print routine DIP. CROSS-REFERENCE: .4014^B 1)= S ^DIBT(DA(1),2,"B",$E(X,1,30),DA)="" 2)= K ^DIBT(DA(1),2,"B",$E(X,1,30),DA) .4014,2 FIELD NO. 0;2 NUMBER INPUT TRANSFORM: K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Type a Number between 0 and 9999999.99999, 5 Decimal Digits. Sort field number, except for pointers, variable pointers and computed fields. DESCRIPTION: On most sort fields, this piece will contain the field number. If sorting on a pointer, variable pointer or computed field, the piece will be null. If sorting on the record number (NUMBER or .001), the piece will contain a 0. TECHNICAL DESCR: Created by FileMan during the print option (in the DIP* routines). .4014,3 FIELD NAME 0;3 FREE TEXT INPUT TRANSFORM: K:$L(X)>100!($L(X)<1) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Answer must be 1-100 characters in length. DESCRIPTION: This piece contains the sort field name, or the user entry if sorting by an on-the-fly computed field. TECHNICAL DESCR: Created by FileMan during the print option (DIP* routines). .4014,4 SORT QUALIFIERS BEFORE FIELD 0;4 FREE TEXT INPUT TRANSFORM: K:$L(X)>20!($L(X)<1) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Answer must be 1-20 characters in length. Sort qualifiers that normally precede the field number in the user dialogue (like !,@,#,+) DESCRIPTION: This contains all of the sort qualifiers that normally precede the field number in the user dialogue during the sort option. It includes things like # (Page break when sort value changes), @ (suppress printing of subheader). These qualifiers are listed out with no delimiters, as they are found during the user dialogue. (So you might see something like #@). TECHNICAL DESCR: This information is parsed from the user dialogue or from the BY input variable, by the FileMan print routines DIP*. .4014,4.1 SORT QUALIFIERS AFTER FIELD 0;5 FREE TEXT INPUT TRANSFORM: K:$L(X)>70!($L(X)<1) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Answer must be 1-70 characters in length. Sort qualifiers that normally come after the field in the user dialogue (such as ;Cn, ;Ln, ;"Literal Subheader") DESCRIPTION: This contains all of the sort qualifiers that normally come after the field number in the user dialogue for the sort options. It includes things like ;Cn (specify position of subheader) and ;"literal" to replace the caption of the subheader. These qualifiers are listed with no delimiters, as they are found in the user dialogue. (So you might see something like ;C10;"My Subheader"). TECHNICAL DESCR: This information is parsed from the user dialogue or from the BY input variable, by the FileMan print routines DIP*. .4014,4.2 COMPUTED FIELD TYPE 0;7 FREE TEXT INPUT TRANSFORM: K:$L(X)>10!($L(X)<1) X LAST EDITED: OCT 22, 1993 HELP-PROMPT: Answer must be 1-10 characters in length. Set by the print routine to something that looks like second piece of 0 node of DD (data type information) for on-the-fly computed fields or .001 field. DESCRIPTION: This piece will contain a "D" if on-the-fly computed field results in a date. It will be set to something like NJ6,0 if sorting by the .001 field. (These are the only values I have been able to find for this field.) TECHNICAL DESCR: Set in C^DIP0 if DICOMP tells us that an on-the-fly computed field will result in a date, and in ^DIP is sorting by the .001 field on a file that has one. .4014,4.3 ASK FOR FROM AND TO ASK;1 SET '1' FOR YES; LAST EDITED: FEB 01, 1993 HELP-PROMPT: Enter 1 (YES) if user is to be prompted for FROM/TO values for this SORT FIELD. DESCRIPTION: If this node is defined: then when the PRINT Option is run, or during a call to the programmer print EN1^DIP, the user will be prompted for FROM and TO VALUES for this sort field. TECHNICAL DESCR: This field is created automatically when a template is being created or edited, if the developer enters FROM/TO values, AND if the developer then answers YES to the question "SHOULD TEMPLATE USER BE ASKED 'FROM'-'TO' RANGE FOR field?" .4014,5 FROM VALUE INTERNAL F;1 FREE TEXT INPUT TRANSFORM: K:$L(X)>63!($L(X)<1) X LAST EDITED: JAN 19, 1993 HELP-PROMPT: Answer must be 1-63 characters in length. The starting point for the sort, derived by FileMan. DESCRIPTION: FileMan takes the FROM value entered by the user, and finds the first value that will sort just before this value in order to derive the starting point for the sort. TECHNICAL DESCR: Calculated by the sort routine FRV^DIP1. .4014,6 FROM VALUE EXTERNAL F;2 FREE TEXT INPUT TRANSFORM: K:$L(X)>63!($L(X)<1) X LAST EDITED: JAN 19, 1993 HELP-PROMPT: Answer must be 1-63 characters in length. The starting point for the sort, as entered by the user. DESCRIPTION: The FROM value for the sort, as it was entered by the user. .4014,6.5 FROM VALUE PRINTABLE F;3 FREE TEXT INPUT TRANSFORM: K:$L(X)>40!($L(X)<1) X LAST EDITED: FEB 16, 1993 HELP-PROMPT: Answer must be 1-40 characters in length. Used for storing printable form of date or set values. DESCRIPTION: This field is used to store a printable representation of the FROM value entered by the user during the sort/print dialogue. Used for date and set-of-code data types. TECHNICAL DESCR: Built in CK^DIP12. .4014,7 TO VALUE INTERNAL T;1 FREE TEXT INPUT TRANSFORM: K:$L(X)>63!($L(X)<1) X LAST EDITED: JAN 19, 1993 HELP-PROMPT: Answer must be 1-63 characters in length. The ending point for the sort, derived by FileMan. DESCRIPTION: FileMan usually uses the TO value as entered by the user, but in the case of dates and sets of codes, the internal value is used. This field tells FileMan the ending point for the sort. .4014,8 TO VALUE EXTERNAL T;2 FREE TEXT INPUT TRANSFORM: K:$L(X)>63!($L(X)<1) X LAST EDITED: JAN 19, 1993 HELP-PROMPT: Answer must be 1-63 characters in length. The ending point for the sort, as entered by the user. DESCRIPTION: The ending value for the sort, as entered by the user. .4014,8.5 TO VALUE PRINTABLE T;3 FREE TEXT INPUT TRANSFORM: K:$L(X)>40!($L(X)<1) X LAST EDITED: FEB 16, 1993 HELP-PROMPT: Answer must be 1-40 characters in length. Used for storing printable form of date and set values. DESCRIPTION: This field is used to store a printable representation of the TO value entered by the user during the sort/print dialogue. Used for date and set-of-code data types. TECHNICAL DESCR: Created in CK^DIP12. .4014,9 CROSS REFERENCE DATA IX;E1,245 FREE TEXT INPUT TRANSFORM: K:$L(X)>245!($L(X)<1) X LAST EDITED: JAN 15, 1993 HELP-PROMPT: First ^ piece null, second piece=static part of cross-reference, third piece=global reference, 4th piece=number of variable subscripts to get to (and including) record number. DESCRIPTION: Piece 1 is always null Piece 2 is the static part of the cross-reference: ex. DIZ(662001,"B", Piece 3 is the global reference: ex. DIZ(662001, Piece 4 tells FileMan how many variable subscripts must be sorted through to get to the record number, plus 1 for the record number itself. ex. for a regular cross-reference, ^DIZ(662001,"B",X,DA), the number is 2. One for the value of the X subscript, and one for the record number itself (DA). TECHNICAL DESCR: The IX nodes are normally derived by FileMan during the entry of sort fields (in routine XR^DIP). However, they can also be passed to the print (^DIP) in the BY(0) variable to cause FileMan to either use a MUMPS type cross-reference, or a previously sorted list of record numbers. Fileman sometimes builds the IX node prior to calling the print, as in the INQUIRE option, where the user then goes on to print the records. .4014,9.5 POINT TO CROSS REFERENCE PTRIX;E1,245 FREE TEXT INPUT TRANSFORM: K:$L(X)>245!($L(X)<1) X LAST EDITED: DEC 21, 1993 HELP-PROMPT: Enter global reference for "B" index of .01 field on pointed-to file. Answer must be 1-245 characters in length. DESCRIPTION: This node will exist only if the sort field is a pointer, if the sort field has a regular cross-reference, if the .01 field on the pointed-to file has a "B" index, and if the .01 field on the pointed-to file is either a numeric, date, set-of-codes or free-text field, and does not have an output transform. If this node exists, it will be set to the static part of the global reference of the "B" index on the pointed-to file. (ex. ^DIZ(662001,"B",). .4014,10 GET CODE GET;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: JAN 15, 1993 HELP-PROMPT: This is Standard MUMPS code used to extract the sort field from a record. DESCRIPTION: The GET CODE is MUMPS code that is executed after a record (or sub-record) has been selected. The code extracts the SORT field from that record into a local variable. TECHNICAL DESCR: GET CODE can be generated by a call to FileMan routine GET^DIOU. WRITE AUTHORITY: @ .4014,11 QUERY CONDITION QCON;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: JAN 15, 1993 HELP-PROMPT: This is Standard MUMPS code used to test the field to see whether it meets the query condition (ex., whether it's within the from/to range specified by the user). DESCRIPTION: The QUERY CONDITION is MUMPS code that takes a field in a local variable, and executes some query condition. The results of executing the code will return a truth value of TRUE if the field met the condition, or FALSE if not. It is used, for example, to see whether a SORT FIELD falls within the FROM/TO range requested by the user. TECHNICAL DESCR: The QUERY CONDITION code is generated by various calls to FileMan routines DIOC*. WRITE AUTHORITY: @ .4014,12 DESCRIPTION OF SORT TXT;E1,200 FREE TEXT INPUT TRANSFORM: K:$L(X)>200!($L(X)<1) X LAST EDITED: JAN 15, 1993 HELP-PROMPT: Answer must be 1-200 characters in length. Text explaining the query condition (field name and what conditions must be met in order for the record to be selected). DESCRIPTION: This field contains a brief textual description of the SORT FIELD and the SORT CRITERIA used on it (i.e., the from/to values). This description can be printed in the heading of a report, at the users request. TECHNICAL DESCR: This text is build as the developer answers the FROM/TO questions during the SORT sequence. .4014,13 SEARCH EFFICIENCY RATING SER;1 NUMBER INPUT TRANSFORM: K:+X'=X!(X>9999.9999)!(X<0)!(X?.E1"."5N.N) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Type a Number between 0 and 9999.9999, 4 Decimal Digits. Search efficiency number returned by Query Optimizer Routine. DESCRIPTION: Fields are assigned a search efficiency rating based on the number of hits found for the query (or sort) condition. The fewer the hits, the higher the rating. A high rating indicates the criteria will more quickly cut down the number of records to be processed. The rating will be higher if the field has a cross-reference. The field with the highest rating is used to do the initial loop through the file during the sort phase. TECHNICAL DESCR: Calculated in the Query Optimizer routine ^DIOQ. .4014,14 PROBABILITY RATING SER;2 NUMBER INPUT TRANSFORM: K:+X'=X!(X>9999.9999)!(X<0)!(X?.E1"."5N.N) X LAST EDITED: JAN 25, 1993 HELP-PROMPT: Type a Number between 0 and 9999.9999, 4 Decimal Digits. Probability of field meeting the sort criteria--returned by Query Optimizer routine. DESCRIPTION: Fields are assigned a probability rating based on the number of hits found for the query (or sort) condition. The probability rating is used to determine the order in which query conditions should be executed during the sort phase. Fields with a higher probability rating are executed first to most quickly cut down the number of records that have to be processed. TECHNICAL DESCR: Calculated by a call to the FileMan Query Optimizer routine ^DIOQ. .4014,15 DATA TYPE FOR SORTING 0;10 POINTER TO DATA TYPE FILE (#.81) LAST EDITED: MAY 14, 1993 DESCRIPTION: This pointer to the FileMan DATA TYPE file is entered automatically by FileMan during the sort/print. Note that if sorting by a pointer or a variable pointer, FileMan will follow the pointer chain until it gets to one of the other data types, in order to determine how to correctly set up the sort logic. TECHNICAL DESCR: Pointer to DATA TYPE file, derived by FileMan in routine DTYP^DIP1. .4014,16 COMPUTED FIELD CODE CM;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: FEB 01, 1993 HELP-PROMPT: This is Standard MUMPS code, generated for sorting by computed fields or pointer fields. DESCRIPTION: This field contains MUMPS code used to find the actual value of a field that is computed or a pointer. The code is generated by DICOMP. This code may execute code in OVERFLOW nodes as well. TECHNICAL DESCR: Generated by DICOMP. Put into the DPP array in C^DIP0. WRITE AUTHORITY: @ .4014,17 MULTIPLE FIELD DATA 1;0 Multiple #.40141 .40141,.01 MULT.FILE OR SUBFILE NO. 0;1 NUMBER (Multiply asked) INPUT TRANSFORM: K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Type a Number between 0 and 9999999.99999, 5 Decimal Digits. This is the file/subfile number when sorting by a multiple field. DESCRIPTION: All files or subfiles needed to get back up to the top level from a multiple field will be represented by an entry in this field. The file or subfile number will be used as a subscript in the DPP array during the sort/print processing. CROSS-REFERENCE: .40141^B 1)= S ^DIBT(DA(2),2,DA(1),1,"B",$E(X,1,30),DA)="" 2)= K ^DIBT(DA(2),2,DA(1),1,"B",$E(X,1,30),DA) .40141,1 NODE 0;2 FREE TEXT INPUT TRANSFORM: K:$L(X)>50!($L(X)<1) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Answer must be 1-50 characters in length. This is the node from which the data is descendant. DESCRIPTION: This field contains the node from which the multiple data is descendant. .4014,18 RELATIONAL JUMP FIELD DATA 2;0 Multiple #.401418 .401418,.01 RELATIONAL START FILE NO. 0;1 NUMBER (Multiply asked) INPUT TRANSFORM: K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Type a Number between 0 and 9999999.99999, 5 Decimal Digits DESCRIPTION: Data will appear here if sorting by a field that must be gotten to using a relational jump. This will be the file or subfile number from which the user is jumping (i.e., the starting point). TECHNICAL DESCR: Built in COLON^DIP0 during the sort/print. CROSS-REFERENCE: .401418^B 1)= S ^DIBT(DA(2),2,DA(1),2,"B",$E(X,1,30),DA)="" 2)= K ^DIBT(DA(2),2,DA(1),2,"B",$E(X,1,30),DA) .401418,1 NEXT SUBSCRIPT 0;2 NUMBER (Required) INPUT TRANSFORM: K:+X'=X!(X>9999999)!(X<0)!(X?.E1"."1N.N) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Type a Number between 0 and 9999999, 0 Decimal Digits. Subscript used in the DPP array during the sort/print option. DESCRIPTION: This field contains a subscript used n the DPP array during the sort/print. The subscript is generated by DICOMP (using the level number multiplied by 100 I think). It results in building a node like DPP(DJ,file/subfile no.,subscript)=data. TECHNICAL DESCR: Built by COLON^DIP0 routine. .401418,2 TO FILE OR SUBFILE 0;3 NUMBER INPUT TRANSFORM: K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Type a Number between 0 and 9999999.99999, 5 Decimal Digits. The file or subfile number to which we are jumping using a relational jump. DESCRIPTION: This field contains the file or subfile number to which we are making the relational jump (i.e., the destination file). TECHNICAL DESCR: Built in COLON^DIP0 during the sort/print. .401418,3 GLOBAL REFERENCE 0;4 FREE TEXT INPUT TRANSFORM: K:$L(X)>50!($L(X)<1) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Answer must be 1-50 characters in length. Contains the global reference of the file to which we are jumping relationally. DESCRIPTION: This field contains the global reference of the file to which we are jumping relationally (i.e., the destination file). TECHNICAL DESCR: Built by COLON^DIP0 during the sort/print option. .401418,4 MULTIVALUED FLAG 0;5 SET '0' FOR NOT MULTI-VALUED; '1' FOR YES, MULTI-VALUED; LAST EDITED: FEB 01, 1993 DESCRIPTION: This flag indicates whether the relational jump will result in going to a file that has a many-to-one relationship to the starting (home) file (i.e., a jump to a backwards pointer) or a one-to-one relationship (i.e., a forwards pointer jump). The flag will be set to 1 to indicate that that there is a many-to-one or multi-valued relationship to the home file, or to 0 if not. TECHNICAL DESCR: Set in COLON^DIP0 during the sort/print option. .401418,5 RELATIONAL CODE RCOD;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: FEB 01, 1993 HELP-PROMPT: This is Standard MUMPS code, used to make a relational jump. DESCRIPTION: This is the MUMPS code needed to perform the relational jump during the sort part of the sort/print option. TECHNICAL DESCR: Generated from COLON^DIP0 during the sort/print option. WRITE AUTHORITY: @ .4014,19 OVERFLOW DATA 3;0 Multiple #.401419 LAST EDITED: FEB 01, 1993 DESCRIPTION: This field contains the first subscript from the part of the DPP array that contains overflow code executed when sorting by a field that is gotten to relationally or a computed field. Overflow code is generated when needed by DICOMP. This field will typically look something like "OVF0". TECHNICAL DESCR: Generated by DICOMP from DIP0 during the sort/print option. .401419,.01 FIRST SUBSCRIPT FOR OVERFLOW 0;1 FREE TEXT (Multiply asked) INPUT TRANSFORM: K:$L(X)>20!($L(X)<1) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Answer must be 1-20 characters in length. This multiple contains overflow code needed for sorting by relational or computed fields. CROSS-REFERENCE: .401419^B 1)= S ^DIBT(DA(2),2,DA(1),3,"B",$E(X,1,30),DA)="" 2)= K ^DIBT(DA(2),2,DA(1),3,"B",$E(X,1,30),DA) .401419,1 SECOND SUBSCRIPT FOR OVERFLOW 0;2 NUMBER INPUT TRANSFORM: K:+X'=X!(X>99999.9999)!(X<0)!(X?.E1"."5N.N) X LAST EDITED: FEB 01, 1993 HELP-PROMPT: Type a Number between 0 and 99999.9999, 4 Decimal Digits DESCRIPTION: This field contains the second subscript from the part of the DPP array that contains overflow code executed when sorting by a field that is gotten to relationally or a computed field. Overflow code is generated when needed by DICOMP. This field will typically look something like 9.2. TECHNICAL DESCR: Generated by DICOMP from ^DIP0 during the sort/print option. .401419,2 OVERFLOW CODE OVF0;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: FEB 01, 1993 HELP-PROMPT: This is Standard MUMPS code. DESCRIPTION: This is MUMPS code generated when needed by DICOMP, when sorting by a field that must be gotten to relationally, or a computed field. This will only be used if DICOMP generates overflow code in the X array. TECHNICAL DESCR: Generated by DICOMP from ^DIP0 during the sort/print option. WRITE AUTHORITY: @ .4014,20 SUBHEADER OUTPUT TRANSFORM OUT;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: FEB 04, 1993 HELP-PROMPT: This is Standard MUMPS code. This is used only when sorting by a user-specified cross-reference in input variable BY(0). DESCRIPTION: Defined only when using the BY(0) input variable to the FileMan print, EN1^DIP, which allows the user to specify a cross-reference to sort on. The user is allowed to specify MUMPS code that can be used as an output transform for any of the subheaders (i.e., subscripts in the cross-reference) in the S input array. This output transform code is stored in this field. TECHNICAL DESCR: Stores output transform code from the third piece of S(0,N) where N is the sort level. This is an input array used in conjunction with BY(0) when user specifies a specific cross-reference to use for the sort, in in the FileMan print routine EN1^DIP. WRITE AUTHORITY: @ .4014,21 TEXT SORT FLAG SRTTXT;1 SET 'SORT' FOR SORT LIKE TEXT; 'RANGE' FOR TREAT RANGE LIKE TEXT; LAST EDITED: DEC 21, 1993 DESCRIPTION: This flag will be set in one of two cases. 1) If the user entered the ;TXT qualifier, the flag will be set to "SORT", and will cause a space to be inserted at the beginning of each sort value, causing even numeric fields to be sorted as if they were text. 2) If the user entered a FROM or TO value that is a non-canonic number, the flag will be set to RANGE, and will cause sort values that are numeric to be treated as if they were text, when seeing whether they fall within the from/to range. However, they will still sort like numbers (MUMPS sort sequence). The flag is set automatically when the user is entering the sort fields in ^DIP, and the from/to values in ^DIP1. .4014,21401 FROM VALUE COMPUTATION FCOMPUTED;E1,245 FREE TEXT INPUT TRANSFORM: D ^DIM HELP-PROMPT: Enter valid MUMPS code. DESCRIPTION: MUMPS code indicating the start of the sort. .4014,21402 TO VALUE COMPUTATION TCOMPUTED;E1,245 FREE TEXT INPUT TRANSFORM: D ^DIM HELP-PROMPT: Enter valid MUMPS code. DESCRIPTION: MUMPS code indicating the end of the sort. .401,1622 BY(0) BY0;1 FREE TEXT INPUT TRANSFORM: K:$L(X)>30!($L(X)<3)!'(X?1.ANP1"(".ANP) X LAST EDITED: SEP 24, 1996 HELP-PROMPT: Enter the static part of a global. The leading up-arrow can be omitted. DESCRIPTION: Enter the static, unchanging part of an open global reference for either a global or a cross-reference that contains the list of record numbers to sort through on the first pass. The leading up-arrow can be omitted. For example: DIZ(662001,"A", or TMP("NMSP",$J, TECHNICAL DESCR: Equivalent to the BY(0) input variable to programmer call EN1^DIP. NOTES: XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER .401,1623 L(0) BY0;2 NUMBER INPUT TRANSFORM: K:+X'=X!(X>8)!(X<1)!(X?.E1"."1N.N) X LAST EDITED: AUG 28, 1996 HELP-PROMPT: Type a Number between 1 and 8, 0 Decimal Digits DESCRIPTION: Enter the total number of subscripts that must be sorted through on the global referenced by BY(0), including 1 for the record number. Ex., to sort through the "B" x-ref, we sort through the cross-referenced value itself, then the record number, so L(0)=2. TECHNICAL DESCR: Equivalent to the L(0) input variable to programmer call EN1^DIP. .401,1624 SORT RANGE DATA FOR BY(0) BY0D;0 Multiple #.4011624 .4011624,.01 SUBSCRIPT LEVEL 0;1 NUMBER (Multiply asked) INPUT TRANSFORM: K:+X'=X!(X>7)!(X<1)!(X?.E1"."1N.N) X LAST EDITED: AUG 28, 1996 HELP-PROMPT: Enter a number, 1 or more. L(0)-1 is the upper limit. DESCRIPTION: This field corresponds to a subscript in, and contains sort from/to ranges and/or subheader information for, any of the variable subscripts in the BY(0) global. Any number here should never be greater than L(0)-1. This can represent a sparse array. TECHNICAL DESCR: Corresponds to subscript levels in the BY(0) global, and will be used to put sort from/to and subheader information into the DPP array when the sort data is being built. CROSS-REFERENCE: .4011624^B 1)= S ^DIBT(DA(1),"BY0D","B",$E(X,1,30),DA)="" 2)= K ^DIBT(DA(1),"BY0D","B",$E(X,1,30),DA) .4011624,1 FR(0,n) 0;2 FREE TEXT INPUT TRANSFORM: K:$L(X)>62!($L(X)<1) X LAST EDITED: AUG 28, 1996 HELP-PROMPT: Starting value for the sort on this subscript. Answer must be 1-62 characters in length. DESCRIPTION: Use this field to define the FR(0,n) variable as you would in a call to EN1^DIP that included BY(0). If defined, the value will be used as the starting point as FileMan sequences through the global array referenced by BY(0) at this subscript level (n). Values are not transformed, so enter the internal form just as it is stored in the global array. A date, for example, would be 2960829, not Aug 29, 1996. Don't attempt to use the at-sign (@) to include records with null values (as can be done in ordinary sorts). Only use values that can be compared with actual data in this subscript of the global array referenced by BY(0). (The only records that can be selected are ones that exist in this global array. A record with a null value for this subscript would exist in the data file but not in this array and thus can't be selected.) TECHNICAL DESCR: Equivalent to the FR(0,n) input variable to the programmer call EN1^DIP. .4011624,2 TO(0,n) 0;3 FREE TEXT INPUT TRANSFORM: K:$L(X)>62!($L(X)<1) X LAST EDITED: AUG 28, 1996 HELP-PROMPT: Ending value for sort on this subscript. Answer must be 1-62 characters in length. DESCRIPTION: Use this field to define the TO(0,n) variable as you would in a call to EN1^DIP that included BY(0). If defined, the value will be used as the ending point as FileMan sequences through the global array referenced by BY(0) at this subscript level (n). Values are not transformed, so enter the internal form just as it is stored in the global array. An inverse date, for example, would be 7039268, not 7/31/96. Do not attempt to use @ to select records with null values for this subscript. TECHNICAL DESCR: Equivalent to the TO(0,n) input variable to the programmer call EN1^DIP. .4011624,3.1 DISPAR(0,n) PIECE ONE 1;1 FREE TEXT INPUT TRANSFORM: K:$L(X)>10!($L(X)<1)!("#!#"'[X) X LAST EDITED: SEP 10, 1996 HELP-PROMPT: Answer with #, !, #!, or null. DESCRIPTION: Just as when setting the first piece of DISPAR(0,n) in a programmer call that includes BY(0) when calling EN1^DIP, this field can hold the sort qualifiers for page breaks (#) or rankings (!). The # and/or ! are the only qualifiers that can be used. Others, such as + for subtotals, cannot be used. TECHNICAL DESCR: Equivalent to the 1st piece of DISPAR(0,n) in the EN1^DIP call. NOTES: XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER .4011624,3.2 DISPAR(0,n) PIECE TWO 1;2 FREE TEXT INPUT TRANSFORM: K:$L(X)>50!($L(X)<1)!'((X[";""")!(X[";L")!(X[";C")!(X[";S")) X LAST EDITED: SEP 11, 1996 HELP-PROMPT: Answer with qualifiers like ;"" or ;S2;C10;L30;"VALUE: " DESCRIPTION: As when defining the second piece of DISPAR(0,n) in a programmer call that includes BY(0) when calling EN1^DIP, this field can hold the sort qualifiers that normally appear after a sort-by field in interactive mode. The ones that can be used are as follows: ;"" to have the subheader appear ;"caption" to give the subheader a caption ;Ln to left-justify the subheader to n characters ;Cn to start the display in the nth column ;Sn to skip n lines before each subheader If this field is null, subheaders are supressed (@ is assumed). TECHNICAL DESCR: Equivalent to the 2nd piece of DISPAR(0,n) in the EN1^DIP call. Note that if DISPAR(0,n) is defined, subheaders will appear even if used with a print template that normally suppresses subheaders. NOTES: XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER .4011624,4 DISPAR(0,n,OUT) 2;E1,245 MUMPS INPUT TRANSFORM: K:$L(X)>245 X D:$D(X) ^DIM LAST EDITED: AUG 29, 1996 HELP-PROMPT: Enter code to transform subscript. This is Standard M code. DESCRIPTION: As when defining DISPAR(0,n,"OUT") for a call to EN1^DIP that includes BY(0), enter M code that will transform the sort-by value for this subscript (n) when it is output (e.g. printed). At the time the code is executed the untransformed value of the subscript will be in Y. The code should put the transformed value back into Y. For example, for an inverse date, S:Y Y=99999999-Y S Y=$$FMTE^XLFDT(Y)" TECHNICAL DESCR: Equivalent to the DISPAR(0,n,"OUT") input variable to the programmer call EN1^DIP. WRITE AUTHORITY: @ .401,1815 ROUTINE INVOKED ROU;E1,13 FREE TEXT INPUT TRANSFORM: K:$L(X)>5!($L(X)<5) X LAST EDITED: APR 16, 1993 HELP-PROMPT: Answer must be 5 characters in length.Must contain '^DISZ'. DESCRIPTION: If this sort template is compiled, the first characters of the name of that compiled routine will appear on this node. Compiled sort routines are re-created each time the sort/print runs. These characters are concatenated with the next available number from the COMPILED ROUTINE file to create the routine name. If this node is present, a new compiled sort routine will be created during the FileMan sort/print. TECHNICAL DESCR: A routine beginning with these characters is created during the FileMan sort/print. The routine is then called from DIO2 to do the sort, rather than executing code from the local DY, DZ and P arrays. .401,1816 PREVIOUS ROUTINE INVOKED ROUOLD;E1,13 FREE TEXT INPUT TRANSFORM: K:$L(X)>4!($L(X)<4)!'(X?1"DISZ") X LAST EDITED: APR 16, 1993 HELP-PROMPT: Entry must be 'DISZ'. DESCRIPTION: This node is present only to be consistant with other sort templates. It's presence will indicate that at some time the SORT template was compiled and will contain the beginning characters used to create the name of the compiled routine. .401,1819 COMPILED ; COMPUTED MUMPS CODE: S X=$S($G(^DIBT(D0,"ROU"))]"":"YES",1:"NO") ALGORITHM: S X=$S($G(^DIBT(D0,"ROU"))]"":"YES",1:"NO") .401,6666 ENTRIES ; COMPUTED MULTIPLE MUMPS CODE: N FILE,DINAME,D S FILE=$P($G(^DIBT(D0,0)),U,4) I $D(^(1)) S DINAME=$G(^DIC(FILE,0,"GL"))_"D,0)" I D INAME[U F D=0:0 S D=$O(^DIBT(D0,1,D)) Q:'D I $D(@DINAME) S X=$$GET1^DIQ(FILE,D,.01) X DICMX Q:'$D( D) DESCRIPTION: For SEARCH Templates, the list of the entries found and stored when the Template was created is accessed. The value of the .01 Field for each entry is displayed. .401,21400 BUILD(S) ; COMPUTED MULTIPLE POINTER TO BUILD FILE (#9.6) MUMPS CODE: N DIBTNAME,D S DIBTNAME=$P($G(^DIBT(D0,0)),U)_" FILE #"_$P($G(^(0)),U,4) F D=0:0 S D=$O(^XPD(9.6 ,D)) Q:'D I $D(^(D,"KRN",.401,"NM","B",DIBTNAME)) N D0 S D0=D,X=$P(^XPD(9.6,D,0),U) X DICMX Q:'$D( D) DESCRIPTION: The Build File (#9.6) is searched for Builds containing the Sort Template. A list of the identified Builds is created for display. Multiple Builds will be shown if appropriate. .401,21409 CANONIC FOR THIS FILE CANONIC;1 SET '1' FOR YES; DESCRIPTION: The Sort Template identified as CANONIC will always be presented to the user for selection at the Sort By: prompt. EXECUTABLE HELP: D HELP^DIUCANON CROSS-REFERENCE: ^^^MUMPS 1)= N F S F=$P(^DIBT(DA,0),U,4) I F S ^DIBT("CANONIC",F,DA)="" 2)= N F S F=$P(^DIBT(DA,0),U,4) I F K ^DIBT("CANONIC",F,DA) This cross-reference is used to identify files that have a Canonic Sort Template assigned. The structure of the cross-reference is: ^DIBT("CANONIC", File#, IEN) where File# identifies the file which has a Canonic Sort Template and IEN is the internal entry number of the Canonic Sort Template assigned to that file. .401,491620 PRINT TEMPLATE DIPT;1 FREE TEXT INPUT TRANSFORM: K:'$D(^DIPT("B",X)) X EXECUTABLE HELP: N D1 S D1(1)="If this Sort Template should always be used with a particular",D1(2)="Print Template, enter the name of that Print Template.",D1(3)="" D EN^DDIOL(.D1) FILES POINTED TO FIELDS BUILD (#9.6) BUILD(S) (#21400) DATA TYPE (#.81) SORT FIELD DATA:DATA TYPE FOR SORTING (#15) FILE (#1) FILE (#4) INPUT TEMPLATE(S): PRINT TEMPLATE(S): ONCOLOGY SORT TEMPLATE LIST MAY 27, 1992@17:01 USER #0 ONCOLOGY SORT TEMPLATE LIST RT SORT TEMPLATES NOV 18, 1986 USER #0 Record Tracking Sort Templates SORT TEMPLATE(S): ONCOLOGY SORT TEMPLATE LIST MAY 28, 1992@19:04 USER #0 'ONCOLOGY SORT TEMPLATE LIST' Print Template always used SORT BY: NAME// From 'ONCO' To 'ONCOZ^ONCOZ' RT SORT TEMPLATES NOV 18, 1986 USER #0 SORT BY: FILE// From '190' To '195.99' WITHIN FILE, SORT BY: NAME// FORM(S)/BLOCK(S): DIBTED SEP 04, 1998@13:57 USER #0 DIBTED DD #.401 DIBTED2 DD #.401