Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DINIT120

DINIT120.m

Go to the documentation of this file.
  1. DINIT120 ;SFISC/MKO-SORT TEMPLATE FILE ;1:13 PM 13 Nov 1998
  1. ;;22.0;VA FileMan;;Mar 30, 1999
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. 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
  1. G ^DINIT121
  1. Q Q
  1. ;;^DIC(.401,0,"GL")
  1. ;;=^DIBT(
  1. ;;^DIC("B","SORT TEMPLATE",.401)
  1. ;;=
  1. ;;^DIC(.401,"%D",0)
  1. ;;=^^4^4^2940908^^
  1. ;;^DIC(.401,"%D",1,0)
  1. ;;=This file stores either SORT or SEARCH criteria. For SORT criteria, the
  1. ;;^DIC(.401,"%D",2,0)
  1. ;;=SORT DATA multiple contains the sort parameters. For SEARCH criteria, the
  1. ;;^DIC(.401,"%D",3,0)
  1. ;;=template also contains a list of record numbers selected as the result of
  1. ;;^DIC(.401,"%D",4,0)
  1. ;;=running the search.
  1. ;;^DD(.401,0)
  1. ;;=FIELD^^491620^21
  1. ;;^DD(.401,0,"DDA")
  1. ;;=N
  1. ;;^DD(.401,0,"DI")
  1. ;;=^
  1. ;;^DD(.401,0,"DT")
  1. ;;=2960910
  1. ;;^DD(.401,0,"ID","WRITE")
  1. ;;=N D,D1,D2 S D2=^(0) S:$X>30 D1(1,"F")="!" S D=$P(D2,U,2) S:D D1(2)="("_$$FMTE^DILIBF(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)
  1. ;;^DD(.401,0,"ID","WRITE1")
  1. ;;=N D1 S D1=$S($D(^DIBT(+Y,2)):"SORT",$D(^("DIS")):"SEARCH",$D(^(1)):"INQ",1:"") D EN^DDIOL(D1,"","?73")
  1. ;;^DD(.401,0,"ID","WRITED")
  1. ;;=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")
  1. ;;^DD(.401,0,"IX","B",.401,.01)
  1. ;;=
  1. ;;^DD(.401,0,"NM","SORT TEMPLATE")
  1. ;;=
  1. ;;^DD(.401,0,"PT",1.11,2)
  1. ;;=
  1. ;;^DD(.401,.01,0)
  1. ;;=NAME^F^^0;1^K:$L(X)<2!($L(X)>30) X
  1. ;;^DD(.401,.01,1,0)
  1. ;;=^.1^2^2
  1. ;;^DD(.401,.01,1,1,0)
  1. ;;=.401^B
  1. ;;^DD(.401,.01,1,1,1)
  1. ;;=S @(DIC_"""B"",X,DA)=""""")
  1. ;;^DD(.401,.01,1,1,2)
  1. ;;=K @(DIC_"""B"",X,DA)")
  1. ;;^DD(.401,.01,1,2,0)
  1. ;;=^^MUMPS
  1. ;;^DD(.401,.01,1,2,1)
  1. ;;=X "S %=$P("_DIC_"DA,0),U,4) S:$L(%) "_DIC_"""F""_+%,X,DA)=1"
  1. ;;^DD(.401,.01,1,2,2)
  1. ;;=X "S %=$P("_DIC_"DA,0),U,4) K:$L(%) "_DIC_"""F""_+%,X,DA)"
  1. ;;^DD(.401,.01,3)
  1. ;;=2-30 CHARACTERS
  1. ;;^DD(.401,2,0)
  1. ;;=DATE CREATED^D^^0;2^S %DT="ET" D ^%DT S X=Y K:Y<1 X
  1. ;;^DD(.401,3,0)
  1. ;;=READ ACCESS^F^^0;3^I DUZ(0)'="@" F I=1:1:$L(X) I DUZ(0)'[$E(X,I) K X Q
  1. ;;^DD(.401,4,0)
  1. ;;=FILE^P1'I^DIC(^0;4^Q
  1. ;;^DD(.401,4,1,0)
  1. ;;=^.1^1^1
  1. ;;^DD(.401,4,1,1,0)
  1. ;;=^^^MUMPS
  1. ;;^DD(.401,4,1,1,1)
  1. ;;=X "S %=$P("_DIC_"DA,0),U,1),"_DIC_"""F""_+X,%,DA)=1"
  1. ;;^DD(.401,4,1,1,2)
  1. ;;=Q
  1. ;;^DD(.401,5,0)
  1. ;;=USER #^N^^0;5^Q
  1. ;;^DD(.401,6,0)
  1. ;;=WRITE ACCESS^F^^0;6^I DUZ(0)'="@" F I=1:1:$L(X) I DUZ(0)'[$E(X,I) K X Q
  1. ;;^DD(.401,7,0)
  1. ;;=DATE LAST USED^D^^0;7^S %DT="EX" D ^%DT S X=Y K:Y<1 X
  1. ;;^DD(.401,8,0)
  1. ;;=TEMPLATE TYPE^S^1:ARCHIVING SEARCH;^0;8^Q
  1. ;;^DD(.401,8,3)
  1. ;;=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
  1. ;;^DD(.401,9,0)
  1. ;;=SEARCH COMPLETE DATE^D^^QR;1^S %DT="ESTXR" D ^%DT S X=Y K:Y<1 X
  1. ;;^DD(.401,9,3)
  1. ;;=Enter the date/time that this search was run to completion.
  1. ;;^DD(.401,9,21,0)
  1. ;;=^^4^4^2921124^
  1. ;;^DD(.401,9,21,1,0)
  1. ;;= This field will be filled in automatically by the search option, but
  1. ;;^DD(.401,9,21,2,0)
  1. ;;=only if the search runs to completion. It will contain the date/time
  1. ;;^DD(.401,9,21,3,0)
  1. ;;=that the search last ran. If it was not allowed to run to completion,
  1. ;;^DD(.401,9,21,4,0)
  1. ;;=this field will be empty.
  1. ;;^DD(.401,9,23,0)
  1. ;;=^^1^1^2921124^^
  1. ;;^DD(.401,9,23,1,0)
  1. ;;=Filled in automatically by the FileMan search option.
  1. ;;^DD(.401,9,"DT")
  1. ;;=2921124
  1. ;;^DD(.401,10,0)
  1. ;;=DESCRIPTION^.4012^^%D;0
  1. ;;^DD(.401,11,0)
  1. ;;=TOTAL RECORDS SELECTED^NJ10,0^^QR;2^K:+X'=X!(X>9999999999)!(X<1)!(X?.E1"."1N.N) X
  1. ;;^DD(.401,11,3)
  1. ;;=Type a Number between 1 and 9999999999, 0 Decimal Digits
  1. ;;^DD(.401,11,21,0)
  1. ;;=^^5^5^2921125^^
  1. ;;^DD(.401,11,21,1,0)
  1. ;;= This field is filled in automatically by the FileMan search option.
  1. ;;^DD(.401,11,21,2,0)
  1. ;;=If the search is allowed to run to completion, the total number of
  1. ;;^DD(.401,11,21,3,0)
  1. ;;=records that met the search criteria is stored in this field. If the
  1. ;;^DD(.401,11,21,4,0)
  1. ;;=last search was not allowed to run to completion, this field will be
  1. ;;^DD(.401,11,21,5,0)
  1. ;;=null.
  1. ;;^DD(.401,11,23,0)
  1. ;;=^^1^1^2921124^
  1. ;;^DD(.401,11,23,1,0)
  1. ;;=Filled in automatically by the FileMan search option.
  1. ;;^DD(.401,11,"DT")
  1. ;;=2921125
  1. ;;^DD(.401,15,0)
  1. ;;=SEARCH SPECIFICATIONS^.4011^^O;0
  1. ;;^DD(.401,1620,0)
  1. ;;=SORT FIELDS^CmJ50^^ ; ^N DPP D DIBT^DIPT
  1. ;;^DD(.401,1621,0)
  1. ;;=SORT FIELD DATA^.4014^^2;0
  1. ;;^DD(.401,1622,0)
  1. ;;=BY(0)^FX^^BY0;1^K:$L(X)>30!($L(X)<3)!'(X?1.ANP1"(".ANP) X
  1. ;;^DD(.401,1622,3)
  1. ;;=Enter the static part of a global. The leading up-arrow can be omitted.
  1. ;;^DD(.401,1622,21,0)
  1. ;;=^^4^4^2960911^^
  1. ;;^DD(.401,1622,21,1,0)
  1. ;;=Enter the static, unchanging part of an open global reference for either a
  1. ;;^DD(.401,1622,21,2,0)
  1. ;;=global or a cross-reference that contains the list of record numbers to
  1. ;;^DD(.401,1622,21,3,0)
  1. ;;=sort through on the first pass. The leading up-arrow can be omitted.
  1. ;;^DD(.401,1622,21,4,0)
  1. ;;=For example: DIZ(662001,"A", or TMP("NMSP",$J,
  1. ;;^DD(.401,1622,23,0)
  1. ;;=^^1^1^2960911^^^^
  1. ;;^DD(.401,1622,23,1,0)
  1. ;;=Equivalent to the BY(0) input variable to programmer call EN1^DIP.
  1. ;;^DD(.401,1622,"DT")
  1. ;;=2960924
  1. ;;^DD(.401,1623,0)
  1. ;;=L(0)^NJ1,0^^BY0;2^K:+X'=X!(X>8)!(X<1)!(X?.E1"."1N.N) X
  1. ;;^DD(.401,1623,3)
  1. ;;=Type a Number between 1 and 8, 0 Decimal Digits
  1. ;;^DD(.401,1623,21,0)
  1. ;;=^^4^4^2960911^^^
  1. ;;^DD(.401,1623,21,1,0)
  1. ;;=Enter the total number of subscripts that must be sorted through on the
  1. ;;^DD(.401,1623,21,2,0)
  1. ;;=global referenced by BY(0), including 1 for the record number. Ex., to
  1. ;;^DD(.401,1623,21,3,0)
  1. ;;=sort through the "B" x-ref, we sort through the cross-referenced value
  1. ;;^DD(.401,1623,21,4,0)
  1. ;;=itself, then the record number, so L(0)=2.
  1. ;;^DD(.401,1623,23,0)
  1. ;;=^^1^1^2960911^^^
  1. ;;^DD(.401,1623,23,1,0)
  1. ;;=Equivalent to the L(0) input variable to programmer call EN1^DIP.
  1. ;;^DD(.401,1623,"DT")
  1. ;;=2960828
  1. ;;^DD(.401,1624,0)
  1. ;;=SORT RANGE DATA FOR BY(0)^.4011624^^BY0D;0
  1. ;;^DD(.401,1815,0)
  1. ;;=ROUTINE INVOKED^F^^ROU;E1,13^K:$L(X)>5!($L(X)<5) X
  1. ;;^DD(.401,1815,3)
  1. ;;=Answer must be 5 characters in length.Must contain '^DISZ'.
  1. ;;^DD(.401,1815,21,0)
  1. ;;=^^7^7^2930331^^^
  1. ;;^DD(.401,1815,21,1,0)
  1. ;;= If this sort template is compiled, the first characters of the name
  1. ;;^DD(.401,1815,21,2,0)
  1. ;;=of that compiled routine will appear on this node. Compiled sort
  1. ;;^DD(.401,1815,21,3,0)
  1. ;;=routines are re-created each time the sort/print runs. These characters
  1. ;;^DD(.401,1815,21,4,0)
  1. ;;=are concatenated with the next available number from the COMPILED ROUTINE