File:  [Coherent Logic Development] / freem_fileman / Attic / DINIT124.m
Revision 1.1: download - view: text, annotated - select for diffs
Mon Apr 28 14:10:44 2025 UTC (5 weeks, 5 days ago) by snw
Branches: MAIN
CVS tags: HEAD
Initial revision

DINIT124	;SFISC/TKW - INITIALIZE V21 SORT TEMPLATE DD NODES ;6/24/94  11:16
	;;21.0;VA FileMan;;Dec 28, 1994
	;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
Q	Q
	;;^DD(.4014,10,21,2,0)
	;;=has been selected.  The code extracts the SORT field from that record
	;;^DD(.4014,10,21,3,0)
	;;=into a local variable.
	;;^DD(.4014,10,23,0)
	;;=^^1^1^2930115^
	;;^DD(.4014,10,23,1,0)
	;;=GET CODE can be generated by a call to FileMan routine GET^DIOU.
	;;^DD(.4014,10,"DT")
	;;=2930115
	;;^DD(.4014,11,0)
	;;=QUERY CONDITION^K^^QCON;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
	;;^DD(.4014,11,3)
	;;=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).
	;;^DD(.4014,11,9)
	;;=@
	;;^DD(.4014,11,21,0)
	;;=^^5^5^2930115^
	;;^DD(.4014,11,21,1,0)
	;;=The QUERY CONDITION is MUMPS code that takes a field in a local variable,
	;;^DD(.4014,11,21,2,0)
	;;=and executes some query condition.  The results of executing the code
	;;^DD(.4014,11,21,3,0)
	;;=will return a truth value of TRUE if the field met the condition, or
	;;^DD(.4014,11,21,4,0)
	;;=FALSE if not.  It is used, for example, to see whether a SORT FIELD falls
	;;^DD(.4014,11,21,5,0)
	;;=within the FROM/TO range requested by the user.
	;;^DD(.4014,11,23,0)
	;;=^^2^2^2930115^
	;;^DD(.4014,11,23,1,0)
	;;=The QUERY CONDITION code is generated by various calls to FileMan
	;;^DD(.4014,11,23,2,0)
	;;=routines DIOC*.
	;;^DD(.4014,11,"DT")
	;;=2930115
	;;^DD(.4014,12,0)
	;;=DESCRIPTION OF SORT^F^^TXT;E1,200^K:$L(X)>200!($L(X)<1) X
	;;^DD(.4014,12,3)
	;;=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).
	;;^DD(.4014,12,21,0)
	;;=^^4^4^2930115^
	;;^DD(.4014,12,21,1,0)
	;;=This field contains a brief textual description of the SORT FIELD and
	;;^DD(.4014,12,21,2,0)
	;;=the SORT CRITERIA used on it (i.e., the from/to values).  This
	;;^DD(.4014,12,21,3,0)
	;;=description can be printed in the heading of a report, at the users
	;;^DD(.4014,12,21,4,0)
	;;=request.
	;;^DD(.4014,12,23,0)
	;;=^^2^2^2930115^
	;;^DD(.4014,12,23,1,0)
	;;=This text is build as the developer answers the FROM/TO questions
	;;^DD(.4014,12,23,2,0)
	;;=during the SORT sequence.
	;;^DD(.4014,12,"DT")
	;;=2930115
	;;^DD(.4014,13,0)
	;;=SEARCH EFFICIENCY RATING^NJ9,4^^SER;1^K:+X'=X!(X>9999.9999)!(X<0)!(X?.E1"."5N.N) X
	;;^DD(.4014,13,3)
	;;=Type a Number between 0 and 9999.9999, 4 Decimal Digits.  Search efficiency number returned by Query Optimizer Routine.
	;;^DD(.4014,13,21,0)
	;;=^^7^7^2930125^
	;;^DD(.4014,13,21,1,0)
	;;=Fields are assigned a search efficiency rating based on the number of
	;;^DD(.4014,13,21,2,0)
	;;=hits found for the query (or sort) condition.  The fewer the hits, the
	;;^DD(.4014,13,21,3,0)
	;;=higher the rating.  A high rating indicates the criteria will more quickly
	;;^DD(.4014,13,21,4,0)
	;;=cut down the number of records to be processed.  The rating will be
	;;^DD(.4014,13,21,5,0)
	;;=higher if the field has a cross-reference.  The field with the highest
	;;^DD(.4014,13,21,6,0)
	;;=rating is used to do the initial loop through the file during the sort
	;;^DD(.4014,13,21,7,0)
	;;=phase.
	;;^DD(.4014,13,23,0)
	;;=^^1^1^2930125^
	;;^DD(.4014,13,23,1,0)
	;;=Calculated in the Query Optimizer routine ^DIOQ.
	;;^DD(.4014,13,"DT")
	;;=2930125
	;;^DD(.4014,14,0)
	;;=PROBABILITY RATING^NJ9,4^^SER;2^K:+X'=X!(X>9999.9999)!(X<0)!(X?.E1"."5N.N) X
	;;^DD(.4014,14,3)
	;;=Type a Number between 0 and 9999.9999, 4 Decimal Digits.  Probability of field meeting the sort criteria--returned by Query Optimizer routine.
	;;^DD(.4014,14,21,0)
	;;=^^6^6^2930125^^
	;;^DD(.4014,14,21,1,0)
	;;=Fields are assigned a probability rating based on the number of hits
	;;^DD(.4014,14,21,2,0)
	;;=found for the query (or sort) condition.  The probability rating is used
	;;^DD(.4014,14,21,3,0)
	;;=to determine the order in which query conditions should be executed
	;;^DD(.4014,14,21,4,0)
	;;=during the sort phase.  Fields with a higher probability rating are
	;;^DD(.4014,14,21,5,0)
	;;=executed first to most quickly cut down the number of records that have
	;;^DD(.4014,14,21,6,0)
	;;=to be processed.
	;;^DD(.4014,14,23,0)
	;;=^^1^1^2930125^
	;;^DD(.4014,14,23,1,0)
	;;=Calculated by a call to the FileMan Query Optimizer routine ^DIOQ.
	;;^DD(.4014,14,"DT")
	;;=2930125
	;;^DD(.4014,15,0)
	;;=DATA TYPE FOR SORTING^P.81'^DI(.81,^0;10^Q
	;;^DD(.4014,15,21,0)
	;;=^^5^5^2930514^

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>