DINIT123 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
;;22.0;VA FileMan;;Mar 30, 1999
;Per VHA Directive 10-93-142, this routine should not be modified.
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
G ^DINIT124
Q Q
;;^DD(.4014,4,23,0)
;;=^^2^2^2930125^^
;;^DD(.4014,4,23,1,0)
;;=This information is parsed from the user dialogue or from the BY
;;^DD(.4014,4,23,2,0)
;;=input variable, by the FileMan print routines DIP*.
;;^DD(.4014,4,"DT")
;;=2930125
;;^DD(.4014,4.1,0)
;;=SORT QUALIFIERS AFTER FIELD^F^^0;5^K:$L(X)>70!($L(X)<1) X
;;^DD(.4014,4.1,3)
;;=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")
;;^DD(.4014,4.1,21,0)
;;=^^6^6^2930125^
;;^DD(.4014,4.1,21,1,0)
;;=This contains all of the sort qualifiers that normally come after the
;;^DD(.4014,4.1,21,2,0)
;;=field number in the user dialogue for the sort options. It includes
;;^DD(.4014,4.1,21,3,0)
;;=things like ;Cn (specify position of subheader) and ;"literal" to
;;^DD(.4014,4.1,21,4,0)
;;=replace the caption of the subheader. These qualifiers are listed with
;;^DD(.4014,4.1,21,5,0)
;;=no delimiters, as they are found in the user dialogue. (So you might see
;;^DD(.4014,4.1,21,6,0)
;;=something like ;C10;"My Subheader").
;;^DD(.4014,4.1,23,0)
;;=^^2^2^2930125^
;;^DD(.4014,4.1,23,1,0)
;;=This information is parsed from the user dialogue or from the BY
;;^DD(.4014,4.1,23,2,0)
;;=input variable, by the FileMan print routines DIP*.
;;^DD(.4014,4.1,"DT")
;;=2930125
;;^DD(.4014,4.2,0)
;;=COMPUTED FIELD TYPE^F^^0;7^K:$L(X)>10!($L(X)<1) X
;;^DD(.4014,4.2,3)
;;=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.
;;^DD(.4014,4.2,21,0)
;;=^^4^4^2931022^
;;^DD(.4014,4.2,21,1,0)
;;=This piece will contain a "D" if on-the-fly computed field results in a
;;^DD(.4014,4.2,21,2,0)
;;=date. It will be set to something like NJ6,0 if sorting by the .001
;;^DD(.4014,4.2,21,3,0)
;;=field. (These are the only values I have been able to find for this
;;^DD(.4014,4.2,21,4,0)
;;=field.)
;;^DD(.4014,4.2,23,0)
;;=^^3^3^2931022^
;;^DD(.4014,4.2,23,1,0)
;;=Set in C^DIP0 if DICOMP tells us that an on-the-fly computed field will
;;^DD(.4014,4.2,23,2,0)
;;=result in a date, and in ^DIP is sorting by the .001 field on a file that
;;^DD(.4014,4.2,23,3,0)
;;=has one.
;;^DD(.4014,4.2,"DT")
;;=2931022
;;^DD(.4014,4.3,0)
;;=ASK FOR FROM AND TO^S^1:YES;^ASK;1^Q
;;^DD(.4014,4.3,3)
;;=Enter 1 (YES) if user is to be prompted for FROM/TO values for this SORT FIELD.
;;^DD(.4014,4.3,21,0)
;;=^^3^3^2930201^
;;^DD(.4014,4.3,21,1,0)
;;=If this node is defined: then when the PRINT Option is run, or during
;;^DD(.4014,4.3,21,2,0)
;;=a call to the programmer print EN1^DIP, the user will be prompted
;;^DD(.4014,4.3,21,3,0)
;;=for FROM and TO VALUES for this sort field.
;;^DD(.4014,4.3,23,0)
;;=^^4^4^2930201^
;;^DD(.4014,4.3,23,1,0)
;;=This field is created automatically when a template is being created or
;;^DD(.4014,4.3,23,2,0)
;;=edited, if the developer enters FROM/TO values, AND if the developer
;;^DD(.4014,4.3,23,3,0)
;;=then answers YES to the question "SHOULD TEMPLATE USER BE ASKED
;;^DD(.4014,4.3,23,4,0)
;;='FROM'-'TO' RANGE FOR field?"
;;^DD(.4014,4.3,"DT")
;;=2930201
;;^DD(.4014,5,0)
;;=FROM VALUE INTERNAL^F^^F;1^K:$L(X)>63!($L(X)<1) X
;;^DD(.4014,5,3)
;;=Answer must be 1-63 characters in length. The starting point for the sort, derived by FileMan.
;;^DD(.4014,5,21,0)
;;=^^3^3^2930119^^
;;^DD(.4014,5,21,1,0)
;;=FileMan takes the FROM value entered by the user, and finds the first
;;^DD(.4014,5,21,2,0)
;;=value that will sort just before this value in order to derive the
;;^DD(.4014,5,21,3,0)
;;=starting point for the sort.
;;^DD(.4014,5,23,0)
;;=^^1^1^2930119^^
;;^DD(.4014,5,23,1,0)
;;=Calculated by the sort routine FRV^DIP1.
;;^DD(.4014,5,"DT")
;;=2930119
;;^DD(.4014,6,0)
;;=FROM VALUE EXTERNAL^F^^F;2^K:$L(X)>63!($L(X)<1) X
;;^DD(.4014,6,3)
;;=Answer must be 1-63 characters in length. The starting point for the sort, as entered by the user.
;;^DD(.4014,6,21,0)
;;=^^1^1^2930115^
;;^DD(.4014,6,21,1,0)
;;=The FROM value for the sort, as it was entered by the user.
;;^DD(.4014,6,"DT")
;;=2930119
;;^DD(.4014,6.5,0)
;;=FROM VALUE PRINTABLE^F^^F;3^K:$L(X)>40!($L(X)<1) X
;;^DD(.4014,6.5,3)
;;=Answer must be 1-40 characters in length. Used for storing printable form of date or set values.
;;^DD(.4014,6.5,21,0)
;;=^^3^3^2930216^^
;;^DD(.4014,6.5,21,1,0)
;;=This field is used to store a printable representation of the FROM value
;;^DD(.4014,6.5,21,2,0)
;;=entered by the user during the sort/print dialogue. Used for date and
;;^DD(.4014,6.5,21,3,0)
;;=set-of-code data types.
;;^DD(.4014,6.5,23,0)
;;=^^1^1^2930216^
;;^DD(.4014,6.5,23,1,0)
;;=Built in CK^DIP12.
;;^DD(.4014,6.5,"DT")
;;=2930216
;;^DD(.4014,7,0)
;;=TO VALUE INTERNAL^F^^T;1^K:$L(X)>63!($L(X)<1) X
;;^DD(.4014,7,3)
;;=Answer must be 1-63 characters in length. The ending point for the sort, derived by FileMan.
;;^DD(.4014,7,21,0)
;;=^^3^3^2930115^
;;^DD(.4014,7,21,1,0)
;;=FileMan usually uses the TO value as entered by the user, but in the
;;^DD(.4014,7,21,2,0)
;;=case of dates and sets of codes, the internal value is used. This field
;;^DD(.4014,7,21,3,0)
;;=tells FileMan the ending point for the sort.
;;^DD(.4014,7,"DT")
;;=2930119
;;^DD(.4014,8,0)
;;=TO VALUE EXTERNAL^F^^T;2^K:$L(X)>63!($L(X)<1) X
;;^DD(.4014,8,3)
;;=Answer must be 1-63 characters in length. The ending point for the sort, as entered by the user.
;;^DD(.4014,8,21,0)
;;=^^1^1^2930115^
;;^DD(.4014,8,21,1,0)
;;=The ending value for the sort, as entered by the user.
;;^DD(.4014,8,"DT")
;;=2930119
;;^DD(.4014,8.5,0)
;;=TO VALUE PRINTABLE^F^^T;3^K:$L(X)>40!($L(X)<1) X
;;^DD(.4014,8.5,3)
;;=Answer must be 1-40 characters in length. Used for storing printable form of date and set values.
;;^DD(.4014,8.5,21,0)
;;=^^3^3^2930216^
;;^DD(.4014,8.5,21,1,0)
;;=This field is used to store a printable representation of the TO value
;;^DD(.4014,8.5,21,2,0)
;;=entered by the user during the sort/print dialogue. Used for date and
;;^DD(.4014,8.5,21,3,0)
;;=set-of-code data types.
;;^DD(.4014,8.5,23,0)
;;=^^1^1^2930216^
;;^DD(.4014,8.5,23,1,0)
;;=Created in CK^DIP12.
;;^DD(.4014,8.5,"DT")
;;=2930216
;;^DD(.4014,9,0)
;;=CROSS REFERENCE DATA^F^^IX;E1,245^K:$L(X)>245!($L(X)<1) X
DINIT123 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
+1 ;;22.0;VA FileMan;;Mar 30, 1999
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
+3 FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
SET @X=Y
+4 GOTO ^DINIT124
Q QUIT
+1 ;;^DD(.4014,4,23,0)
+2 ;;=^^2^2^2930125^^
+3 ;;^DD(.4014,4,23,1,0)
+4 ;;=This information is parsed from the user dialogue or from the BY
+5 ;;^DD(.4014,4,23,2,0)
+6 ;;=input variable, by the FileMan print routines DIP*.
+7 ;;^DD(.4014,4,"DT")
+8 ;;=2930125
+9 ;;^DD(.4014,4.1,0)
+10 ;;=SORT QUALIFIERS AFTER FIELD^F^^0;5^K:$L(X)>70!($L(X)<1) X
+11 ;;^DD(.4014,4.1,3)
+12 ;;=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")
+13 ;;^DD(.4014,4.1,21,0)
+14 ;;=^^6^6^2930125^
+15 ;;^DD(.4014,4.1,21,1,0)
+16 ;;=This contains all of the sort qualifiers that normally come after the
+17 ;;^DD(.4014,4.1,21,2,0)
+18 ;;=field number in the user dialogue for the sort options. It includes
+19 ;;^DD(.4014,4.1,21,3,0)
+20 ;;=things like ;Cn (specify position of subheader) and ;"literal" to
+21 ;;^DD(.4014,4.1,21,4,0)
+22 ;;=replace the caption of the subheader. These qualifiers are listed with
+23 ;;^DD(.4014,4.1,21,5,0)
+24 ;;=no delimiters, as they are found in the user dialogue. (So you might see
+25 ;;^DD(.4014,4.1,21,6,0)
+26 ;;=something like ;C10;"My Subheader").
+27 ;;^DD(.4014,4.1,23,0)
+28 ;;=^^2^2^2930125^
+29 ;;^DD(.4014,4.1,23,1,0)
+30 ;;=This information is parsed from the user dialogue or from the BY
+31 ;;^DD(.4014,4.1,23,2,0)
+32 ;;=input variable, by the FileMan print routines DIP*.
+33 ;;^DD(.4014,4.1,"DT")
+34 ;;=2930125
+35 ;;^DD(.4014,4.2,0)
+36 ;;=COMPUTED FIELD TYPE^F^^0;7^K:$L(X)>10!($L(X)<1) X
+37 ;;^DD(.4014,4.2,3)
+38 ;;=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.
+39 ;;^DD(.4014,4.2,21,0)
+40 ;;=^^4^4^2931022^
+41 ;;^DD(.4014,4.2,21,1,0)
+42 ;;=This piece will contain a "D" if on-the-fly computed field results in a
+43 ;;^DD(.4014,4.2,21,2,0)
+44 ;;=date. It will be set to something like NJ6,0 if sorting by the .001
+45 ;;^DD(.4014,4.2,21,3,0)
+46 ;;=field. (These are the only values I have been able to find for this
+47 ;;^DD(.4014,4.2,21,4,0)
+48 ;;=field.)
+49 ;;^DD(.4014,4.2,23,0)
+50 ;;=^^3^3^2931022^
+51 ;;^DD(.4014,4.2,23,1,0)
+52 ;;=Set in C^DIP0 if DICOMP tells us that an on-the-fly computed field will
+53 ;;^DD(.4014,4.2,23,2,0)
+54 ;;=result in a date, and in ^DIP is sorting by the .001 field on a file that
+55 ;;^DD(.4014,4.2,23,3,0)
+56 ;;=has one.
+57 ;;^DD(.4014,4.2,"DT")
+58 ;;=2931022
+59 ;;^DD(.4014,4.3,0)
+60 ;;=ASK FOR FROM AND TO^S^1:YES;^ASK;1^Q
+61 ;;^DD(.4014,4.3,3)
+62 ;;=Enter 1 (YES) if user is to be prompted for FROM/TO values for this SORT FIELD.
+63 ;;^DD(.4014,4.3,21,0)
+64 ;;=^^3^3^2930201^
+65 ;;^DD(.4014,4.3,21,1,0)
+66 ;;=If this node is defined: then when the PRINT Option is run, or during
+67 ;;^DD(.4014,4.3,21,2,0)
+68 ;;=a call to the programmer print EN1^DIP, the user will be prompted
+69 ;;^DD(.4014,4.3,21,3,0)
+70 ;;=for FROM and TO VALUES for this sort field.
+71 ;;^DD(.4014,4.3,23,0)
+72 ;;=^^4^4^2930201^
+73 ;;^DD(.4014,4.3,23,1,0)
+74 ;;=This field is created automatically when a template is being created or
+75 ;;^DD(.4014,4.3,23,2,0)
+76 ;;=edited, if the developer enters FROM/TO values, AND if the developer
+77 ;;^DD(.4014,4.3,23,3,0)
+78 ;;=then answers YES to the question "SHOULD TEMPLATE USER BE ASKED
+79 ;;^DD(.4014,4.3,23,4,0)
+80 ;;='FROM'-'TO' RANGE FOR field?"
+81 ;;^DD(.4014,4.3,"DT")
+82 ;;=2930201
+83 ;;^DD(.4014,5,0)
+84 ;;=FROM VALUE INTERNAL^F^^F;1^K:$L(X)>63!($L(X)<1) X
+85 ;;^DD(.4014,5,3)
+86 ;;=Answer must be 1-63 characters in length. The starting point for the sort, derived by FileMan.
+87 ;;^DD(.4014,5,21,0)
+88 ;;=^^3^3^2930119^^
+89 ;;^DD(.4014,5,21,1,0)
+90 ;;=FileMan takes the FROM value entered by the user, and finds the first
+91 ;;^DD(.4014,5,21,2,0)
+92 ;;=value that will sort just before this value in order to derive the
+93 ;;^DD(.4014,5,21,3,0)
+94 ;;=starting point for the sort.
+95 ;;^DD(.4014,5,23,0)
+96 ;;=^^1^1^2930119^^
+97 ;;^DD(.4014,5,23,1,0)
+98 ;;=Calculated by the sort routine FRV^DIP1.
+99 ;;^DD(.4014,5,"DT")
+100 ;;=2930119
+101 ;;^DD(.4014,6,0)
+102 ;;=FROM VALUE EXTERNAL^F^^F;2^K:$L(X)>63!($L(X)<1) X
+103 ;;^DD(.4014,6,3)
+104 ;;=Answer must be 1-63 characters in length. The starting point for the sort, as entered by the user.
+105 ;;^DD(.4014,6,21,0)
+106 ;;=^^1^1^2930115^
+107 ;;^DD(.4014,6,21,1,0)
+108 ;;=The FROM value for the sort, as it was entered by the user.
+109 ;;^DD(.4014,6,"DT")
+110 ;;=2930119
+111 ;;^DD(.4014,6.5,0)
+112 ;;=FROM VALUE PRINTABLE^F^^F;3^K:$L(X)>40!($L(X)<1) X
+113 ;;^DD(.4014,6.5,3)
+114 ;;=Answer must be 1-40 characters in length. Used for storing printable form of date or set values.
+115 ;;^DD(.4014,6.5,21,0)
+116 ;;=^^3^3^2930216^^
+117 ;;^DD(.4014,6.5,21,1,0)
+118 ;;=This field is used to store a printable representation of the FROM value
+119 ;;^DD(.4014,6.5,21,2,0)
+120 ;;=entered by the user during the sort/print dialogue. Used for date and
+121 ;;^DD(.4014,6.5,21,3,0)
+122 ;;=set-of-code data types.
+123 ;;^DD(.4014,6.5,23,0)
+124 ;;=^^1^1^2930216^
+125 ;;^DD(.4014,6.5,23,1,0)
+126 ;;=Built in CK^DIP12.
+127 ;;^DD(.4014,6.5,"DT")
+128 ;;=2930216
+129 ;;^DD(.4014,7,0)
+130 ;;=TO VALUE INTERNAL^F^^T;1^K:$L(X)>63!($L(X)<1) X
+131 ;;^DD(.4014,7,3)
+132 ;;=Answer must be 1-63 characters in length. The ending point for the sort, derived by FileMan.
+133 ;;^DD(.4014,7,21,0)
+134 ;;=^^3^3^2930115^
+135 ;;^DD(.4014,7,21,1,0)
+136 ;;=FileMan usually uses the TO value as entered by the user, but in the
+137 ;;^DD(.4014,7,21,2,0)
+138 ;;=case of dates and sets of codes, the internal value is used. This field
+139 ;;^DD(.4014,7,21,3,0)
+140 ;;=tells FileMan the ending point for the sort.
+141 ;;^DD(.4014,7,"DT")
+142 ;;=2930119
+143 ;;^DD(.4014,8,0)
+144 ;;=TO VALUE EXTERNAL^F^^T;2^K:$L(X)>63!($L(X)<1) X
+145 ;;^DD(.4014,8,3)
+146 ;;=Answer must be 1-63 characters in length. The ending point for the sort, as entered by the user.
+147 ;;^DD(.4014,8,21,0)
+148 ;;=^^1^1^2930115^
+149 ;;^DD(.4014,8,21,1,0)
+150 ;;=The ending value for the sort, as entered by the user.
+151 ;;^DD(.4014,8,"DT")
+152 ;;=2930119
+153 ;;^DD(.4014,8.5,0)
+154 ;;=TO VALUE PRINTABLE^F^^T;3^K:$L(X)>40!($L(X)<1) X
+155 ;;^DD(.4014,8.5,3)
+156 ;;=Answer must be 1-40 characters in length. Used for storing printable form of date and set values.
+157 ;;^DD(.4014,8.5,21,0)
+158 ;;=^^3^3^2930216^
+159 ;;^DD(.4014,8.5,21,1,0)
+160 ;;=This field is used to store a printable representation of the TO value
+161 ;;^DD(.4014,8.5,21,2,0)
+162 ;;=entered by the user during the sort/print dialogue. Used for date and
+163 ;;^DD(.4014,8.5,21,3,0)
+164 ;;=set-of-code data types.
+165 ;;^DD(.4014,8.5,23,0)
+166 ;;=^^1^1^2930216^
+167 ;;^DD(.4014,8.5,23,1,0)
+168 ;;=Created in CK^DIP12.
+169 ;;^DD(.4014,8.5,"DT")
+170 ;;=2930216
+171 ;;^DD(.4014,9,0)
+172 ;;=CROSS REFERENCE DATA^F^^IX;E1,245^K:$L(X)>245!($L(X)<1) X