|
|
Reference Type: Controlled Subscription, Category: Name Standardization, Integration Agreement: 3066
This API updates an entry in the NAME COMPONENTS file (#20). Optionally,
the pointer in the source file that points to the name components entry is also
updated.
This API is designed to be used in the SET logic of a MUMPS
cross-reference on the name field in a source file, to keep the name field and
the associated name components in sync. For an example of its use, see the
ANAME index in the INDEX file (#.11). The ANAME index is a MUMPS
cross-reference on the .01 NAME field of the NEW PERSON file (#200). If an
entry's NAME field is edited, the ANAME cross-reference updates the associated
entry in the NAME COMPONENTS file (#20). Note that existing MUMPS
cross-references on the NAME COMPONENTS file (#20) already exist to update the
associated name field on the source file if the components are edited.
UPDCOMP^XLFNAME2(file,[.]record,field,[.]name[,ptrfield][,ptrval])
| file: |
(required) The number of the file or subfile (the "source file") that contains the name. |
|
| [.]record: |
(required) The IENS or the Internal Entry Number array (that looks like the DA array) of the record in the source file that contains the name. |
|
| field: |
(required) The number of the field in the source file that contains the name. |
|
| [.]name: |
(required) An array that contains the component parts of the name to store in the NAME COMPONENTS file (#20) entry: NAME("FAMILY) = Family Name (required) Alternatively, a name in standard format can be passed in the NAME input parameter. If the NAME input parameter has no descendents (that is, $D(NAME)=1), UPDCOMP^XLFNAME2 will make a call to the NAMECOMP^XLFNAME(): Component Parts from Standard Name API to build the NAME array for you. |
|
| ptrfield: |
(optional) The number of the pointer field in the source file that points to the NAME COMPONENTS file. Only if this parameter is passed will the value of this pointer field be updated with the entry number of the record in the NAME COMPONENTS file (#20) that was added or edited. |
|
| ptrval: |
(optional) The current value of the pointer field specified by the PTRFIELD input parameter. This parameter can be used to save processing time. If both PTRFIELD and PTRVAL are passed, the pointer field will be updated only if this value is different from the entry number of the record in the NAME COMPONENTS file (#20) that was added or edited. |
|
| returns: |
Updated entry in the NAME COMPONENTS file (#20). |
Suppose the .01 field of File #1000 contains a person's name, and the component parts of the name in entry 132 should be updated as follows:
Family (last) name: KRNUSER
Given (first) name: FIFTY HENRY
Middle
name: A.
Suffix: JR.
Field #1.1 is defined as a pointer to the NAME COMPONENTS file (#20) and has a value of 42, the IEN of a record in the NAME COMPONENTS file (#20). To update the NAME COMPONENTS file (#20) with this name, you can do the following:
>S MYNAME("FAMILY")="KRNUSER"
>S MYNAME("GIVEN")="FIFTY HENRY"
>S MYNAME("MIDDLE")="A."
>S MYNAME("SUFFIX")="JR."
>D UPDCOMP^XLFNAME2(1000,132,.01,.MYNAME,1.1,42)
If there is an entry in the NAME COMPONENTS file (#20) that corresponds
to File #1000, Field #.01, IEN #132, that entry is updated with the name
components passed in the MYNAME array. Otherwise, a new entry is added to the
name components with this information.
If the entry in the name
components that was updated or added is record #42, no change is made to the
value of the pointer field #1.1, since 42 was passed in the 6th parameter.
MUMPS cross-references on the NAME COMPONENTS file (#20) updates the name
in the Field #.01 of File #1000 to "KRNUSER,FIFTY HENRY A JR" if it doesn't
already contain that name.
|
VA (Internet) / VA (Intranet) / OI / HSD&D / Site Map / Terms of Use / VA Privacy Policy / Accessibility Reviewed/Updated:
December 14, 2005
|