File:  [Coherent Logic Development] / freem_fileman / USER / DINIT124.m
Revision 1.1: download - view: text, annotated - select for diffs
Mon Apr 28 14:13:20 2025 UTC (3 months ago) by snw
Branches: MAIN
CVS tags: HEAD
Restructure repository

    1: DINIT124	;SFISC/TKW - INITIALIZE V21 SORT TEMPLATE DD NODES ;6/24/94  11:16
    2: 	;;21.0;VA FileMan;;Dec 28, 1994
    3: 	;Per VHA Directive 10-93-142, this routine should not be modified.
    4: 	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
    5: Q	Q
    6: 	;;^DD(.4014,10,21,2,0)
    7: 	;;=has been selected.  The code extracts the SORT field from that record
    8: 	;;^DD(.4014,10,21,3,0)
    9: 	;;=into a local variable.
   10: 	;;^DD(.4014,10,23,0)
   11: 	;;=^^1^1^2930115^
   12: 	;;^DD(.4014,10,23,1,0)
   13: 	;;=GET CODE can be generated by a call to FileMan routine GET^DIOU.
   14: 	;;^DD(.4014,10,"DT")
   15: 	;;=2930115
   16: 	;;^DD(.4014,11,0)
   17: 	;;=QUERY CONDITION^K^^QCON;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
   18: 	;;^DD(.4014,11,3)
   19: 	;;=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).
   20: 	;;^DD(.4014,11,9)
   21: 	;;=@
   22: 	;;^DD(.4014,11,21,0)
   23: 	;;=^^5^5^2930115^
   24: 	;;^DD(.4014,11,21,1,0)
   25: 	;;=The QUERY CONDITION is MUMPS code that takes a field in a local variable,
   26: 	;;^DD(.4014,11,21,2,0)
   27: 	;;=and executes some query condition.  The results of executing the code
   28: 	;;^DD(.4014,11,21,3,0)
   29: 	;;=will return a truth value of TRUE if the field met the condition, or
   30: 	;;^DD(.4014,11,21,4,0)
   31: 	;;=FALSE if not.  It is used, for example, to see whether a SORT FIELD falls
   32: 	;;^DD(.4014,11,21,5,0)
   33: 	;;=within the FROM/TO range requested by the user.
   34: 	;;^DD(.4014,11,23,0)
   35: 	;;=^^2^2^2930115^
   36: 	;;^DD(.4014,11,23,1,0)
   37: 	;;=The QUERY CONDITION code is generated by various calls to FileMan
   38: 	;;^DD(.4014,11,23,2,0)
   39: 	;;=routines DIOC*.
   40: 	;;^DD(.4014,11,"DT")
   41: 	;;=2930115
   42: 	;;^DD(.4014,12,0)
   43: 	;;=DESCRIPTION OF SORT^F^^TXT;E1,200^K:$L(X)>200!($L(X)<1) X
   44: 	;;^DD(.4014,12,3)
   45: 	;;=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).
   46: 	;;^DD(.4014,12,21,0)
   47: 	;;=^^4^4^2930115^
   48: 	;;^DD(.4014,12,21,1,0)
   49: 	;;=This field contains a brief textual description of the SORT FIELD and
   50: 	;;^DD(.4014,12,21,2,0)
   51: 	;;=the SORT CRITERIA used on it (i.e., the from/to values).  This
   52: 	;;^DD(.4014,12,21,3,0)
   53: 	;;=description can be printed in the heading of a report, at the users
   54: 	;;^DD(.4014,12,21,4,0)
   55: 	;;=request.
   56: 	;;^DD(.4014,12,23,0)
   57: 	;;=^^2^2^2930115^
   58: 	;;^DD(.4014,12,23,1,0)
   59: 	;;=This text is build as the developer answers the FROM/TO questions
   60: 	;;^DD(.4014,12,23,2,0)
   61: 	;;=during the SORT sequence.
   62: 	;;^DD(.4014,12,"DT")
   63: 	;;=2930115
   64: 	;;^DD(.4014,13,0)
   65: 	;;=SEARCH EFFICIENCY RATING^NJ9,4^^SER;1^K:+X'=X!(X>9999.9999)!(X<0)!(X?.E1"."5N.N) X
   66: 	;;^DD(.4014,13,3)
   67: 	;;=Type a Number between 0 and 9999.9999, 4 Decimal Digits.  Search efficiency number returned by Query Optimizer Routine.
   68: 	;;^DD(.4014,13,21,0)
   69: 	;;=^^7^7^2930125^
   70: 	;;^DD(.4014,13,21,1,0)
   71: 	;;=Fields are assigned a search efficiency rating based on the number of
   72: 	;;^DD(.4014,13,21,2,0)
   73: 	;;=hits found for the query (or sort) condition.  The fewer the hits, the
   74: 	;;^DD(.4014,13,21,3,0)
   75: 	;;=higher the rating.  A high rating indicates the criteria will more quickly
   76: 	;;^DD(.4014,13,21,4,0)
   77: 	;;=cut down the number of records to be processed.  The rating will be
   78: 	;;^DD(.4014,13,21,5,0)
   79: 	;;=higher if the field has a cross-reference.  The field with the highest
   80: 	;;^DD(.4014,13,21,6,0)
   81: 	;;=rating is used to do the initial loop through the file during the sort
   82: 	;;^DD(.4014,13,21,7,0)
   83: 	;;=phase.
   84: 	;;^DD(.4014,13,23,0)
   85: 	;;=^^1^1^2930125^
   86: 	;;^DD(.4014,13,23,1,0)
   87: 	;;=Calculated in the Query Optimizer routine ^DIOQ.
   88: 	;;^DD(.4014,13,"DT")
   89: 	;;=2930125
   90: 	;;^DD(.4014,14,0)
   91: 	;;=PROBABILITY RATING^NJ9,4^^SER;2^K:+X'=X!(X>9999.9999)!(X<0)!(X?.E1"."5N.N) X
   92: 	;;^DD(.4014,14,3)
   93: 	;;=Type a Number between 0 and 9999.9999, 4 Decimal Digits.  Probability of field meeting the sort criteria--returned by Query Optimizer routine.
   94: 	;;^DD(.4014,14,21,0)
   95: 	;;=^^6^6^2930125^^
   96: 	;;^DD(.4014,14,21,1,0)
   97: 	;;=Fields are assigned a probability rating based on the number of hits
   98: 	;;^DD(.4014,14,21,2,0)
   99: 	;;=found for the query (or sort) condition.  The probability rating is used
  100: 	;;^DD(.4014,14,21,3,0)
  101: 	;;=to determine the order in which query conditions should be executed
  102: 	;;^DD(.4014,14,21,4,0)
  103: 	;;=during the sort phase.  Fields with a higher probability rating are
  104: 	;;^DD(.4014,14,21,5,0)
  105: 	;;=executed first to most quickly cut down the number of records that have
  106: 	;;^DD(.4014,14,21,6,0)
  107: 	;;=to be processed.
  108: 	;;^DD(.4014,14,23,0)
  109: 	;;=^^1^1^2930125^
  110: 	;;^DD(.4014,14,23,1,0)
  111: 	;;=Calculated by a call to the FileMan Query Optimizer routine ^DIOQ.
  112: 	;;^DD(.4014,14,"DT")
  113: 	;;=2930125
  114: 	;;^DD(.4014,15,0)
  115: 	;;=DATA TYPE FOR SORTING^P.81'^DI(.81,^0;10^Q
  116: 	;;^DD(.4014,15,21,0)
  117: 	;;=^^5^5^2930514^

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