|
|
Reference Type: Supported, Category: Name Standardization, Integration Agreement: 3065
This extrinsic function takes the component parts of a name and returns the name, truncated if necessary, in the following format:
Family_name,Given_name<space>Middle_name<space>Suffix(es)
$$BLDNAME^XLFNAME(.name[,max])
| .name: |
(required) The component parts of the name: NAME("FAMILY") = Family (Last) Name Alternatively, this array can contain the file number, IENS, and field number of the field that contains the name. If the name has a corresponding entry in the NAME COMPONENTS file (#20), then the name components are obtained from that entry. Otherwise, the name is obtained directly from the file, record, and field specified, and the name components are obtained by making a call to the STDNAME^XLFNAME API. NAME("FILE") = Source file number (required) |
|
| max: |
(optional) The maximum length of the Name to be returned (default = 256). See the following section named "Details" for a description of the pruning algorithm. |
|
| returns: |
Returns the name, truncated if necessary, in the following format: Family_name,Given_name<space>Middle_name<space> Suffix(es) |
If the MAX input parameter is used, and the resulting name is longer than MAX, the following pruning algorithm is performed to shorten the name:
Suppose the MYNAME array contains the following elements:
MYNAME("FAMILY")="KRNUSER"
MYNAME("GIVEN")="SIXTY"
MYNAME("MIDDLE")="K."
MYNAME("SUFFIX")="JR"
Calls to $$BLDNAME^XLFNAME will return the name as follows:
>S X=$$BLDNAME^XLFNAME(.MYNAME) >W X KRNUSER,SIXTY K JR
"Pruning" the name to 12 characters total:
>S X =$$BLDNAME^XLFNAME(.MYNAME,12) >W X KRNUSER,SI K
If an entry in the NAME COMPONENTS file (#20) stores the components of a name stored in the NAME field (#.01) of record number 32 in the NEW PERSON file (#200), and the data in the corresponding record in the NAME COMPONENT file (#20) is:
FILE=200 FIELD=.01 IENS="32," GIVEN NAME="SIXTY" MIDDLE NAME="K." FAMILY NAME="KRNUSER" SUFFIX="JR"
you can set:
MYNAME("FILE")=200
MYNAME("FIELD")=.01
MYNAME("IENS")="32,"
and call $$BLDNAME^XLFNAME as in Example 1:
>S X=$$BLDNAME^XLFNAME(.MYNAME) >W X KRNUSER,SIXTY K JR
"Pruning" the name to 12 characters total:
>S X=$$BLDNAME^XLFNAME(.MYNAME,12) >W X KRNUSER,SI K
|
VA (Internet) / VA (Intranet) / OI / HSD&D / Site Map / Terms of Use / VA Privacy Policy / Accessibility Reviewed/Updated:
December 14, 2005
|