FINDBYAT |
The calling routine will invoke entry point
FINDBYAT^MAGVRS42((.OUT,FILE,.ATTSARY), whose parameters are defined as
follows. Inputs: FILE
A FileMan file number between 2005 and 2006.999 inclusive. Must be
a parent file.
.ATTSARY
An array of single-valued name-value pairs consisting of the names
of main-level fields (not multiples) and the values to be searched for.
Returns: .OUT
The return array (^TMP("DILIST",$J,2)) from a call to FIND^DIC, or an
appropriate error message indicating that the file is out of range, that no
cross reference was found to search on, or that no matching entries were
found.
FINDBYAT^MAGVRS42 will validate the file against the acceptable range. If the
file does not fall into the acceptable range, an error will be returned in
OUT().
Then, each field name will be validated. If any field name provided is not
that of a top-level field on the field, an error will be returned in OUT().
Otherwise, the field will be checked against ^DD(FILE,"IX") to determine
whether it is a regular cross reference. If it is, and no regular cross
reference has yet been selected, this field and value will be used as the
cross reference field and value in the call to FIND^DIC.
If the field is not a cross reference or a cross reference has already been
selected, FINDBYAT^MAGVRS42 will obtain the global node and piece information
from the 0 node of the data dictionary definition for the field, validating
that the field is a top-level field (and returning an error in OUT() if it is
not), and will add the global node, piece and value to the MUMPS screening
logic that will be passed to FIND^DIC.
Then FIND^DIC is called, and either an appropriate error message is returned
in OUT() if an error was encountered, or the search results from
^TMP("DILIST",$J,2) are returned in OUT().
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
FILE |
Input |
A FileMan file number between 2005 and 2006.999
inclusive. Must be a parent file.
|
ATTSARY |
Input |
An array of single-valued name-value pairs consisting
of the names of main-level fields (not multiples) and the values to be
searched for.
|
OUT |
Output |
The return array (^TMP("DILIST",$J,2)) from a call to
FIND^DIC, or an appropriate error message indicating that the file is out of
range, that no cross reference was found to search on, or that no matching
entries were found.
|
|