![]() ![]() |
Reference Type: Supported, Category: Name Standardization, ICR#: 3065
The $$FMNAME^XLFNAME extrinsic function converts an HL7 formatted input name to a VistA formatted name.
$$FMNAME^XLFNAME([.]name[,flags][,delim])
[.]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:
|
delim: |
(optional) The delimiter used in the HL7 formatted name (default = ^). |
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 |
If the L# flag is used, and the resulting name is longer than #, the following pruning algorithm is performed to shorten the name:
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 |
Convert an HL7 formatted name where the tilde character (~) is the delimiter to a standard name:
>S X=$$FMNAME^XLFNAME("XUUSER~SIXTY~K.~JR~MR","S","~") >W X XUUSER,SIXTY K JR |
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")=PHD MYNAME("FAMILY")=XUUSER MYNAME("GIVEN")=SIXTY MYNAME("MIDDLE")=K. MYNAME("PREFIX")=MR. MYNAME("SUFFIX")=JR |