DINIT123 ;SFISC/MKO-SORT TEMPLATE FILE ;23NOV2105
;;22.2;VA FileMan;;Jan 05, 2016;Build 42
;;Per VA Directive 6402, this routine should not be modified.
;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
;;Licensed under the terms of the Apache License, Version 2.0.
;
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^^21401
;;^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,21401,0)
;;=FROM VALUE COMPUTATION^F^^FCOMPUTED;E1,245^D ^DIM
;;^DD(.4014,21401,3)
;;=Enter valid MUMPS code.
;;^DD(.4014,21401,21,0)
;;=^^1^1^3151109^
;;^DD(.4014,21401,21,1,0)
;;=MUMPS code indicating the start of the sort.
;;^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,21402,0)
;;=TO VALUE COMPUTATION^F^^TCOMPUTED;E1,245^D ^DIM
;;^DD(.4014,21402,3)
;;=Enter valid MUMPS code.
;;^DD(.4014,21402,21,0)
;;=^^1^1^3151109^
;;^DD(.4014,21402,21,1,0)
;;=MUMPS code indicating the end of the sort.
;;^DD(.4014,9,0)
;;=CROSS REFERENCE DATA^F^^IX;E1,245^K:$L(X)>245!($L(X)<1) X
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINIT123 7555 printed Nov 22, 2024@18:00:36 Page 2
DINIT123 ;SFISC/MKO-SORT TEMPLATE FILE ;23NOV2105
+1 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
+4 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
+5 ;;Licensed under the terms of the Apache License, Version 2.0.
+6 ;
+7 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
+8 GOTO ^DINIT124
Q QUIT
+1 ;;^DD(.4014,4,23,0)
+2 ;;=^^2^2^2930125^^21401
+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,21401,0)
+128 ;;=FROM VALUE COMPUTATION^F^^FCOMPUTED;E1,245^D ^DIM
+129 ;;^DD(.4014,21401,3)
+130 ;;=Enter valid MUMPS code.
+131 ;;^DD(.4014,21401,21,0)
+132 ;;=^^1^1^3151109^
+133 ;;^DD(.4014,21401,21,1,0)
+134 ;;=MUMPS code indicating the start of the sort.
+135 ;;^DD(.4014,7,0)
+136 ;;=TO VALUE INTERNAL^F^^T;1^K:$L(X)>63!($L(X)<1) X
+137 ;;^DD(.4014,7,3)
+138 ;;=Answer must be 1-63 characters in length. The ending point for the sort, derived by FileMan.
+139 ;;^DD(.4014,7,21,0)
+140 ;;=^^3^3^2930115^
+141 ;;^DD(.4014,7,21,1,0)
+142 ;;=FileMan usually uses the TO value as entered by the user, but in the
+143 ;;^DD(.4014,7,21,2,0)
+144 ;;=case of dates and sets of codes, the internal value is used. This field
+145 ;;^DD(.4014,7,21,3,0)
+146 ;;=tells FileMan the ending point for the sort.
+147 ;;^DD(.4014,7,"DT")
+148 ;;=2930119
+149 ;;^DD(.4014,8,0)
+150 ;;=TO VALUE EXTERNAL^F^^T;2^K:$L(X)>63!($L(X)<1) X
+151 ;;^DD(.4014,8,3)
+152 ;;=Answer must be 1-63 characters in length. The ending point for the sort, as entered by the user.
+153 ;;^DD(.4014,8,21,0)
+154 ;;=^^1^1^2930115^
+155 ;;^DD(.4014,8,21,1,0)
+156 ;;=The ending value for the sort, as entered by the user.
+157 ;;^DD(.4014,8,"DT")
+158 ;;=2930119
+159 ;;^DD(.4014,8.5,0)
+160 ;;=TO VALUE PRINTABLE^F^^T;3^K:$L(X)>40!($L(X)<1) X
+161 ;;^DD(.4014,8.5,3)
+162 ;;=Answer must be 1-40 characters in length. Used for storing printable form of date and set values.
+163 ;;^DD(.4014,8.5,21,0)
+164 ;;=^^3^3^2930216^
+165 ;;^DD(.4014,8.5,21,1,0)
+166 ;;=This field is used to store a printable representation of the TO value
+167 ;;^DD(.4014,8.5,21,2,0)
+168 ;;=entered by the user during the sort/print dialogue. Used for date and
+169 ;;^DD(.4014,8.5,21,3,0)
+170 ;;=set-of-code data types.
+171 ;;^DD(.4014,8.5,23,0)
+172 ;;=^^1^1^2930216^
+173 ;;^DD(.4014,8.5,23,1,0)
+174 ;;=Created in CK^DIP12.
+175 ;;^DD(.4014,21402,0)
+176 ;;=TO VALUE COMPUTATION^F^^TCOMPUTED;E1,245^D ^DIM
+177 ;;^DD(.4014,21402,3)
+178 ;;=Enter valid MUMPS code.
+179 ;;^DD(.4014,21402,21,0)
+180 ;;=^^1^1^3151109^
+181 ;;^DD(.4014,21402,21,1,0)
+182 ;;=MUMPS code indicating the end of the sort.
+183 ;;^DD(.4014,9,0)
+184 ;;=CROSS REFERENCE DATA^F^^IX;E1,245^K:$L(X)>245!($L(X)<1) X