DINIT126 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
;;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 ^DINIT127
Q Q
;;^DD(.40141,.01,21,4,0)
;;=during the sort/print processing.
;;^DD(.40141,.01,"DT")
;;=2930201
;;^DD(.40141,1,0)
;;=NODE^F^^0;2^K:$L(X)>50!($L(X)<1) X
;;^DD(.40141,1,3)
;;=Answer must be 1-50 characters in length. This is the node from which the data is descendant.
;;^DD(.40141,1,21,0)
;;=^^1^1^2930201^
;;^DD(.40141,1,21,1,0)
;;=This field contains the node from which the multiple data is descendant.
;;^DD(.40141,1,"DT")
;;=2930201
;;^DD(.401418,0)
;;=RELATIONAL JUMP FIELD DATA SUB-FIELD^^5^6
;;^DD(.401418,0,"DT")
;;=2930201
;;^DD(.401418,0,"IX","B",.401418,.01)
;;=
;;^DD(.401418,0,"NM","RELATIONAL JUMP FIELD DATA")
;;=
;;^DD(.401418,0,"UP")
;;=.4014
;;^DD(.401418,.01,0)
;;=RELATIONAL START FILE NO.^MNJ13,5^^0;1^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
;;^DD(.401418,.01,1,0)
;;=^.1
;;^DD(.401418,.01,1,1,0)
;;=.401418^B
;;^DD(.401418,.01,1,1,1)
;;=S ^DIBT(DA(2),2,DA(1),2,"B",$E(X,1,30),DA)=""
;;^DD(.401418,.01,1,1,2)
;;=K ^DIBT(DA(2),2,DA(1),2,"B",$E(X,1,30),DA)
;;^DD(.401418,.01,3)
;;=Type a Number between 0 and 9999999.99999, 5 Decimal Digits
;;^DD(.401418,.01,21,0)
;;=^^3^3^2930201^^^^
;;^DD(.401418,.01,21,1,0)
;;=Data will appear here if sorting by a field that must be gotten to using
;;^DD(.401418,.01,21,2,0)
;;=a relational jump. This will be the file or subfile number from which
;;^DD(.401418,.01,21,3,0)
;;=the user is jumping (i.e., the starting point).
;;^DD(.401418,.01,23,0)
;;=^^1^1^2930201^
;;^DD(.401418,.01,23,1,0)
;;=Built in COLON^DIP0 during the sort/print.
;;^DD(.401418,.01,"DT")
;;=2930201
;;^DD(.401418,1,0)
;;=NEXT SUBSCRIPT^RNJ7,0^^0;2^K:+X'=X!(X>9999999)!(X<0)!(X?.E1"."1N.N) X
;;^DD(.401418,1,3)
;;=Type a Number between 0 and 9999999, 0 Decimal Digits. Subscript used in the DPP array during the sort/print option.
;;^DD(.401418,1,21,0)
;;=^^4^4^2930201^
;;^DD(.401418,1,21,1,0)
;;=This field contains a subscript used n the DPP array during the
;;^DD(.401418,1,21,2,0)
;;=sort/print. The subscript is generated by DICOMP (using the level
;;^DD(.401418,1,21,3,0)
;;=number multiplied by 100 I think). It results in building a node
;;^DD(.401418,1,21,4,0)
;;=like DPP(DJ,file/subfile no.,subscript)=data.
;;^DD(.401418,1,23,0)
;;=^^1^1^2930201^
;;^DD(.401418,1,23,1,0)
;;=Built by COLON^DIP0 routine.
;;^DD(.401418,1,"DT")
;;=2930201
;;^DD(.401418,2,0)
;;=TO FILE OR SUBFILE^NJ13,5^^0;3^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
;;^DD(.401418,2,3)
;;=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.
;;^DD(.401418,2,21,0)
;;=^^2^2^2930201^
;;^DD(.401418,2,21,1,0)
;;=This field contains the file or subfile number to which we are making
;;^DD(.401418,2,21,2,0)
;;=the relational jump (i.e., the destination file).
;;^DD(.401418,2,23,0)
;;=^^1^1^2930201^^
;;^DD(.401418,2,23,1,0)
;;=Built in COLON^DIP0 during the sort/print.
;;^DD(.401418,2,"DT")
;;=2930201
;;^DD(.401418,3,0)
;;=GLOBAL REFERENCE^F^^0;4^K:$L(X)>50!($L(X)<1) X
;;^DD(.401418,3,3)
;;=Answer must be 1-50 characters in length. Contains the global reference of the file to which we are jumping relationally.
;;^DD(.401418,3,21,0)
;;=^^2^2^2930201^
;;^DD(.401418,3,21,1,0)
;;=This field contains the global reference of the file to which we are
;;^DD(.401418,3,21,2,0)
;;=jumping relationally (i.e., the destination file).
;;^DD(.401418,3,23,0)
;;=^^1^1^2930201^
;;^DD(.401418,3,23,1,0)
;;=Built by COLON^DIP0 during the sort/print option.
;;^DD(.401418,3,"DT")
;;=2930201
;;^DD(.401418,4,0)
;;=MULTIVALUED FLAG^S^0:NOT MULTI-VALUED;1:YES, MULTI-VALUED;^0;5^Q
;;^DD(.401418,4,21,0)
;;=^^6^6^2930201^
;;^DD(.401418,4,21,1,0)
;;=This flag indicates whether the relational jump will result in going to
;;^DD(.401418,4,21,2,0)
;;=a file that has a many-to-one relationship to the starting (home) file
;;^DD(.401418,4,21,3,0)
;;=(i.e., a jump to a backwards pointer) or a one-to-one relationship (i.e.,
;;^DD(.401418,4,21,4,0)
;;=a forwards pointer jump). The flag will be set to 1 to indicate that
;;^DD(.401418,4,21,5,0)
;;=that there is a many-to-one or multi-valued relationship to the home
;;^DD(.401418,4,21,6,0)
;;=file, or to 0 if not.
;;^DD(.401418,4,23,0)
;;=^^1^1^2930201^
;;^DD(.401418,4,23,1,0)
;;=Set in COLON^DIP0 during the sort/print option.
;;^DD(.401418,4,"DT")
;;=2930201
;;^DD(.401418,5,0)
;;=RELATIONAL CODE^K^^RCOD;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.401418,5,3)
;;=This is Standard MUMPS code, used to make a relational jump.
;;^DD(.401418,5,9)
;;=@
;;^DD(.401418,5,21,0)
;;=^^2^2^2930201^
;;^DD(.401418,5,21,1,0)
;;=This is the MUMPS code needed to perform the relational jump during the
;;^DD(.401418,5,21,2,0)
;;=sort part of the sort/print option.
;;^DD(.401418,5,23,0)
;;=^^1^1^2930201^
;;^DD(.401418,5,23,1,0)
;;=Generated from COLON^DIP0 during the sort/print option.
;;^DD(.401418,5,"DT")
;;=2930201
;;^DD(.401419,0)
;;=OVERFLOW DATA SUB-FIELD^^2^3
;;^DD(.401419,0,"DT")
;;=2930201
;;^DD(.401419,0,"IX","B",.401419,.01)
;;=
;;^DD(.401419,0,"NM","OVERFLOW DATA")
;;=
;;^DD(.401419,0,"UP")
;;=.4014
;;^DD(.401419,.01,0)
;;=FIRST SUBSCRIPT FOR OVERFLOW^MF^^0;1^K:$L(X)>20!($L(X)<1) X
;;^DD(.401419,.01,1,0)
;;=^.1
;;^DD(.401419,.01,1,1,0)
;;=.401419^B
;;^DD(.401419,.01,1,1,1)
;;=S ^DIBT(DA(2),2,DA(1),3,"B",$E(X,1,30),DA)=""
;;^DD(.401419,.01,1,1,2)
;;=K ^DIBT(DA(2),2,DA(1),3,"B",$E(X,1,30),DA)
;;^DD(.401419,.01,3)
;;=Answer must be 1-20 characters in length. This multiple contains overflow code needed for sorting by relational or computed fields.
;;^DD(.401419,.01,"DT")
;;=2930201
;;^DD(.401419,1,0)
;;=SECOND SUBSCRIPT FOR OVERFLOW^NJ10,4^^0;2^K:+X'=X!(X>99999.9999)!(X<0)!(X?.E1"."5N.N) X
;;^DD(.401419,1,3)
;;=Type a Number between 0 and 99999.9999, 4 Decimal Digits
;;^DD(.401419,1,21,0)
;;=^^4^4^2930201^
;;^DD(.401419,1,21,1,0)
;;=This field contains the second subscript from the part of the DPP array
;;^DD(.401419,1,21,2,0)
;;=that contains overflow code executed when sorting by a field that is
;;^DD(.401419,1,21,3,0)
;;=gotten to relationally or a computed field. Overflow code is generated
;;^DD(.401419,1,21,4,0)
;;=when needed by DICOMP. This field will typically look something like 9.2.
;;^DD(.401419,1,23,0)
;;=^^1^1^2930201^
;;^DD(.401419,1,23,1,0)
;;=Generated by DICOMP from ^DIP0 during the sort/print option.
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINIT126 7202 printed Nov 22, 2024@18:00:39 Page 2
DINIT126 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
+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 ^DINIT127
Q QUIT
+1 ;;^DD(.40141,.01,21,4,0)
+2 ;;=during the sort/print processing.
+3 ;;^DD(.40141,.01,"DT")
+4 ;;=2930201
+5 ;;^DD(.40141,1,0)
+6 ;;=NODE^F^^0;2^K:$L(X)>50!($L(X)<1) X
+7 ;;^DD(.40141,1,3)
+8 ;;=Answer must be 1-50 characters in length. This is the node from which the data is descendant.
+9 ;;^DD(.40141,1,21,0)
+10 ;;=^^1^1^2930201^
+11 ;;^DD(.40141,1,21,1,0)
+12 ;;=This field contains the node from which the multiple data is descendant.
+13 ;;^DD(.40141,1,"DT")
+14 ;;=2930201
+15 ;;^DD(.401418,0)
+16 ;;=RELATIONAL JUMP FIELD DATA SUB-FIELD^^5^6
+17 ;;^DD(.401418,0,"DT")
+18 ;;=2930201
+19 ;;^DD(.401418,0,"IX","B",.401418,.01)
+20 ;;=
+21 ;;^DD(.401418,0,"NM","RELATIONAL JUMP FIELD DATA")
+22 ;;=
+23 ;;^DD(.401418,0,"UP")
+24 ;;=.4014
+25 ;;^DD(.401418,.01,0)
+26 ;;=RELATIONAL START FILE NO.^MNJ13,5^^0;1^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
+27 ;;^DD(.401418,.01,1,0)
+28 ;;=^.1
+29 ;;^DD(.401418,.01,1,1,0)
+30 ;;=.401418^B
+31 ;;^DD(.401418,.01,1,1,1)
+32 ;;=S ^DIBT(DA(2),2,DA(1),2,"B",$E(X,1,30),DA)=""
+33 ;;^DD(.401418,.01,1,1,2)
+34 ;;=K ^DIBT(DA(2),2,DA(1),2,"B",$E(X,1,30),DA)
+35 ;;^DD(.401418,.01,3)
+36 ;;=Type a Number between 0 and 9999999.99999, 5 Decimal Digits
+37 ;;^DD(.401418,.01,21,0)
+38 ;;=^^3^3^2930201^^^^
+39 ;;^DD(.401418,.01,21,1,0)
+40 ;;=Data will appear here if sorting by a field that must be gotten to using
+41 ;;^DD(.401418,.01,21,2,0)
+42 ;;=a relational jump. This will be the file or subfile number from which
+43 ;;^DD(.401418,.01,21,3,0)
+44 ;;=the user is jumping (i.e., the starting point).
+45 ;;^DD(.401418,.01,23,0)
+46 ;;=^^1^1^2930201^
+47 ;;^DD(.401418,.01,23,1,0)
+48 ;;=Built in COLON^DIP0 during the sort/print.
+49 ;;^DD(.401418,.01,"DT")
+50 ;;=2930201
+51 ;;^DD(.401418,1,0)
+52 ;;=NEXT SUBSCRIPT^RNJ7,0^^0;2^K:+X'=X!(X>9999999)!(X<0)!(X?.E1"."1N.N) X
+53 ;;^DD(.401418,1,3)
+54 ;;=Type a Number between 0 and 9999999, 0 Decimal Digits. Subscript used in the DPP array during the sort/print option.
+55 ;;^DD(.401418,1,21,0)
+56 ;;=^^4^4^2930201^
+57 ;;^DD(.401418,1,21,1,0)
+58 ;;=This field contains a subscript used n the DPP array during the
+59 ;;^DD(.401418,1,21,2,0)
+60 ;;=sort/print. The subscript is generated by DICOMP (using the level
+61 ;;^DD(.401418,1,21,3,0)
+62 ;;=number multiplied by 100 I think). It results in building a node
+63 ;;^DD(.401418,1,21,4,0)
+64 ;;=like DPP(DJ,file/subfile no.,subscript)=data.
+65 ;;^DD(.401418,1,23,0)
+66 ;;=^^1^1^2930201^
+67 ;;^DD(.401418,1,23,1,0)
+68 ;;=Built by COLON^DIP0 routine.
+69 ;;^DD(.401418,1,"DT")
+70 ;;=2930201
+71 ;;^DD(.401418,2,0)
+72 ;;=TO FILE OR SUBFILE^NJ13,5^^0;3^K:+X'=X!(X>9999999.99999)!(X<0)!(X?.E1"."6N.N) X
+73 ;;^DD(.401418,2,3)
+74 ;;=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.
+75 ;;^DD(.401418,2,21,0)
+76 ;;=^^2^2^2930201^
+77 ;;^DD(.401418,2,21,1,0)
+78 ;;=This field contains the file or subfile number to which we are making
+79 ;;^DD(.401418,2,21,2,0)
+80 ;;=the relational jump (i.e., the destination file).
+81 ;;^DD(.401418,2,23,0)
+82 ;;=^^1^1^2930201^^
+83 ;;^DD(.401418,2,23,1,0)
+84 ;;=Built in COLON^DIP0 during the sort/print.
+85 ;;^DD(.401418,2,"DT")
+86 ;;=2930201
+87 ;;^DD(.401418,3,0)
+88 ;;=GLOBAL REFERENCE^F^^0;4^K:$L(X)>50!($L(X)<1) X
+89 ;;^DD(.401418,3,3)
+90 ;;=Answer must be 1-50 characters in length. Contains the global reference of the file to which we are jumping relationally.
+91 ;;^DD(.401418,3,21,0)
+92 ;;=^^2^2^2930201^
+93 ;;^DD(.401418,3,21,1,0)
+94 ;;=This field contains the global reference of the file to which we are
+95 ;;^DD(.401418,3,21,2,0)
+96 ;;=jumping relationally (i.e., the destination file).
+97 ;;^DD(.401418,3,23,0)
+98 ;;=^^1^1^2930201^
+99 ;;^DD(.401418,3,23,1,0)
+100 ;;=Built by COLON^DIP0 during the sort/print option.
+101 ;;^DD(.401418,3,"DT")
+102 ;;=2930201
+103 ;;^DD(.401418,4,0)
+104 ;;=MULTIVALUED FLAG^S^0:NOT MULTI-VALUED;1:YES, MULTI-VALUED;^0;5^Q
+105 ;;^DD(.401418,4,21,0)
+106 ;;=^^6^6^2930201^
+107 ;;^DD(.401418,4,21,1,0)
+108 ;;=This flag indicates whether the relational jump will result in going to
+109 ;;^DD(.401418,4,21,2,0)
+110 ;;=a file that has a many-to-one relationship to the starting (home) file
+111 ;;^DD(.401418,4,21,3,0)
+112 ;;=(i.e., a jump to a backwards pointer) or a one-to-one relationship (i.e.,
+113 ;;^DD(.401418,4,21,4,0)
+114 ;;=a forwards pointer jump). The flag will be set to 1 to indicate that
+115 ;;^DD(.401418,4,21,5,0)
+116 ;;=that there is a many-to-one or multi-valued relationship to the home
+117 ;;^DD(.401418,4,21,6,0)
+118 ;;=file, or to 0 if not.
+119 ;;^DD(.401418,4,23,0)
+120 ;;=^^1^1^2930201^
+121 ;;^DD(.401418,4,23,1,0)
+122 ;;=Set in COLON^DIP0 during the sort/print option.
+123 ;;^DD(.401418,4,"DT")
+124 ;;=2930201
+125 ;;^DD(.401418,5,0)
+126 ;;=RELATIONAL CODE^K^^RCOD;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+127 ;;^DD(.401418,5,3)
+128 ;;=This is Standard MUMPS code, used to make a relational jump.
+129 ;;^DD(.401418,5,9)
+130 ;;=@
+131 ;;^DD(.401418,5,21,0)
+132 ;;=^^2^2^2930201^
+133 ;;^DD(.401418,5,21,1,0)
+134 ;;=This is the MUMPS code needed to perform the relational jump during the
+135 ;;^DD(.401418,5,21,2,0)
+136 ;;=sort part of the sort/print option.
+137 ;;^DD(.401418,5,23,0)
+138 ;;=^^1^1^2930201^
+139 ;;^DD(.401418,5,23,1,0)
+140 ;;=Generated from COLON^DIP0 during the sort/print option.
+141 ;;^DD(.401418,5,"DT")
+142 ;;=2930201
+143 ;;^DD(.401419,0)
+144 ;;=OVERFLOW DATA SUB-FIELD^^2^3
+145 ;;^DD(.401419,0,"DT")
+146 ;;=2930201
+147 ;;^DD(.401419,0,"IX","B",.401419,.01)
+148 ;;=
+149 ;;^DD(.401419,0,"NM","OVERFLOW DATA")
+150 ;;=
+151 ;;^DD(.401419,0,"UP")
+152 ;;=.4014
+153 ;;^DD(.401419,.01,0)
+154 ;;=FIRST SUBSCRIPT FOR OVERFLOW^MF^^0;1^K:$L(X)>20!($L(X)<1) X
+155 ;;^DD(.401419,.01,1,0)
+156 ;;=^.1
+157 ;;^DD(.401419,.01,1,1,0)
+158 ;;=.401419^B
+159 ;;^DD(.401419,.01,1,1,1)
+160 ;;=S ^DIBT(DA(2),2,DA(1),3,"B",$E(X,1,30),DA)=""
+161 ;;^DD(.401419,.01,1,1,2)
+162 ;;=K ^DIBT(DA(2),2,DA(1),3,"B",$E(X,1,30),DA)
+163 ;;^DD(.401419,.01,3)
+164 ;;=Answer must be 1-20 characters in length. This multiple contains overflow code needed for sorting by relational or computed fields.
+165 ;;^DD(.401419,.01,"DT")
+166 ;;=2930201
+167 ;;^DD(.401419,1,0)
+168 ;;=SECOND SUBSCRIPT FOR OVERFLOW^NJ10,4^^0;2^K:+X'=X!(X>99999.9999)!(X<0)!(X?.E1"."5N.N) X
+169 ;;^DD(.401419,1,3)
+170 ;;=Type a Number between 0 and 99999.9999, 4 Decimal Digits
+171 ;;^DD(.401419,1,21,0)
+172 ;;=^^4^4^2930201^
+173 ;;^DD(.401419,1,21,1,0)
+174 ;;=This field contains the second subscript from the part of the DPP array
+175 ;;^DD(.401419,1,21,2,0)
+176 ;;=that contains overflow code executed when sorting by a field that is
+177 ;;^DD(.401419,1,21,3,0)
+178 ;;=gotten to relationally or a computed field. Overflow code is generated
+179 ;;^DD(.401419,1,21,4,0)
+180 ;;=when needed by DICOMP. This field will typically look something like 9.2.
+181 ;;^DD(.401419,1,23,0)
+182 ;;=^^1^1^2930201^
+183 ;;^DD(.401419,1,23,1,0)
+184 ;;=Generated by DICOMP from ^DIP0 during the sort/print option.