Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

$$FMNAME^XLFNAME(): Convert HL7 Formatted Name to Name

Reference Type: Supported, Category: Name Standardization, Integration Agreement: 3065

Description

This extrinsic function converts an HL7 formatted input name to a VistAformatted name.

Format

  $$FMNAME^XLFNAME([.]name[,flags][,delim])

Input Parameters

[.]name:

(required) This is the HL7 name to be converted; it can be passed by reference. If the "C" flag is used, the name components are returned in nodes descendent from this parameter (see " Output").

flags:

(optional) Flags to controls processing. Possible values are:

  • C—Return name components in the NAME array (see Output).

  • L#—Truncate the returned name to a maximum Length of # characters, where # is an integer between 1 and 256.

  • M—Return the name in Mixed case, with the first letter of each name component capitalized.

  • S—Return the name in Standardized form.
delim:

(optional) The delimiter used in the HL7 formatted name (default = "^").

Output Parameters

name:

If the FLAGS input parameter contains a "C", the component parts of the name are returned in the NAME array:

NAME("FAMILY) = Family (Last) Name
NAME("GIVEN") = Given (First) Name(s)
NAME("MIDDLE") = Middle Name(s)
NAME("SUFFIX") = Suffix(es)

Details

If the L# flag is used, and the resulting name is longer than #, the following pruning algorithm is performed to shorten the name:

  1. Truncate Middle Name from the right-most position until only the initial character is left;

  2. Drop suffix;

  3. Truncate Given Name from the right-most position until only the initial character is left;

  4. Truncate Family Name from the right-most position;

  5. Truncate the name from the right.

Example 1

Convert an HL7 formatted name to a VistA name:

>S X=$$FMNAME^XLFNAME("XUUSER^SIXTY^K.^JR^MR.^PHD")

>W X
XUUSER,SIXTY K. JR
>S X=$$FMNAME^XLFNAME("XUUSER^SIXTY^K.^JR^MR.^PHD","S")

>W X
XUUSER,SIXTY K JR
>S X=$$FMNAME^XLFNAME("XUUSER^SIXTY^K.^JR^MR.^PHD","M")

>W X
Xuuser,Sixty K. Jr
>S X=$$FMNAME^XLFNAME("XUUSER^SIXTY^K.^JR^MR.^PHD","SL12")

>W X
XUUSER,SI K

Example 2

Convert an HL7 formatted name where "~" is the delimiter to a standard name:

>S X=$$FMNAME^XLFNAME("XUUSER~SIXTY~K.~JR~MR","S","~")

>W X
XUUSER,SIXTY K JR

Example 3

Convert an HL7 formatted name to a standard name, and return the components of that name in the MYNAME array:

>S MYNAME="XUUSER^SIXTY^K.^JR^MR.^PHD"

>W $$FMNAME^XLFNAME(.MYNAME,"CS")
XUUSER,SIXTY K JR

>ZW MYNAME
MYNAME=XUUSER^SIXTY^K.^JR^MR.^PHD
MYNAME("DEGREE")=PH
MYNAME("FAMILY")=KRNUSER
MYNAME("GIVEN")=SIXTY
MYNAME("MIDDLE")=K.
MYNAME("PREFIX")=MR.
MYNAME("SUFFIX")=JR

 


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.