XLFNAME1 ;CIOFO-SF/TKW,MKO-Utilities for person name fields ;05/05/2010
Source file <XLFNAME1.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
REMDBL(X,S) | ;For each char in S, remove double chars
|
|
REMBE(X,S) | ;Remove each char in S from the beg and end of X
|
|
ROMAN(X) | ; Replace numeric suffixes to Roman Numeral equivalents
|
|
CHKSUF(X) | ;Return X if it looks like a suffix; otherwise, return null
|
|
CHKSUF1(X) | ; Return X if it looks like a suffix, but not I, V, X
|
|
PERIOD(X) | ; Change X so that there is a space after every period
|
|
PARENS(X) | ;Strip parenthetical part(s) from X
|
|
SUFEND(XUN,XUNO,XUNM,XUOUT,XUAUD) | ;Look for suffixes at end of XUN
|
|
CLEANC(XUPART,XUFLAG,XUAUD) | ; Component standardization
|
|
CLEANCX | ; Entry point from CLEANC^XLFNAME
|
|
NAMEFMT(XUNAME,XUFMT,XUFLAG,XUDLM) | ; Name formatting routine (extrinsic)
|
|
NAMEFMTX | ;
; XUNAME: Input name components array or Name Components Key fields ; XUFMT: F=Family name first,G=Given name first,H=HL7 (default G) ; XUFLAG: P=Include prefix,D=Include degree,S=Standardize components,M=Mixed case ; XUDLM: Delimiter if HL7 message (def = ^) |
|
MIX(X) | ; Return name part with only first letter upper-case
|
|
MIX2(XUN) | ; Properly capitalize suffixes, degrees
|
|
O(N) | ;O format
|
|
F(N,F) | ;F format
|
|
G(N,F) | ;G format
|
|
H(N,D) | ;H format
|
|
SPD(NAM,N,F) | ;Add Suffix, Prefix, and Degree
|
|
JOIN(S1,S2,D) | ;Return S1 joined with S2 (separate by D)
|
|
TRUNC(NC,OVR) | ;Truncate component
|