source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XLFNAME6.m@ 1111

Last change on this file since 1111 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 817 bytes
Line 
1XLFNAME6 ;CIOFO-SF/TKW,MKO-Utilities for person name fields ;11:41 AM 14 Mar 2000
2 ;;8.0;KERNEL;**134**;Jul 10, 1995
3 ;
4FMNAME(XUNAME,XUFLAG,XUDLM) ; Convert HL7 format name to regular name
5 ; XUNAME - HL7 string to be converted
6 ; XUDLM - Delimiter (defaults to "^")
7 ; XUFLAG [ C : Returns name components
8 ; L# : Truncate to length of #
9 ; M : Mixed case
10 ; S : Standardize name
11F N I,N,S,XUF
12 Q:$G(XUNAME)="" ""
13 S:$G(XUDLM)="" XUDLM="^"
14 S XUFLAG=$G(XUFLAG)
15 I XUFLAG'["C" N X S X=XUNAME N XUNAME S XUNAME=X
16 ;
17 S I=0 F S="FAMILY","GIVEN","MIDDLE","SUFFIX" S I=I+1 D
18 . S XUNAME(S)="",N=$P(XUNAME,XUDLM,I) Q:N=""""""
19 . S XUNAME(S)=N Q
20 ;
21 S XUF="C"_$E("M",XUFLAG["M")_$E("S",XUFLAG["S")
22 S:XUFLAG["L" XUF=XUF_"L"_+$P(XUFLAG,"L",2)
23 Q $$NAMEFMT^XLFNAME(.XUNAME,"F",XUF)
Note: See TracBrowser for help on using the repository browser.