Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMTSUMX2

GMTSUMX2.m

Go to the documentation of this file.
GMTSUMX2 ; SLC/KER - Convert Text to Mix Case (1-4) ; 08/27/2002
 ;;2.7;Health Summary;**30,37,56**;Oct 20, 1995
 ;         
1 I "^B^C^D^E^F^G^H^I^J^K^M^N^O^P^Q^S^T^U^V^X^Y^Z^"[X S Y=$$UP(X) Q
 I "^W^L^R^"[X S Y=$$LO(X) Q
 I "^MM^CM^IN^FT^CM^CC^"[X S Y=$$LO(X) Q
 Q
2 ; 2 Characters
 S J=$G(J)
 I J'="",J'=" ","^OR^"[X S Y=$$UP(X) Q
 S:X="DA" Y="dA" S:X="DC" Y="dC" S:X="DG" Y="dG" S:X="DT" Y="dT" S:X="DU" Y="dU" S:X="GB" Y="gB" S:X="GC" Y="gC" S:X="GH" Y="gH" S:X="KB" Y="kB" Q:$L($G(Y))
 S:X="KD" Y="kD" S:X="PH" Y="pH" S:X="PX" Y="pX" Q:$L($G(Y))
 I "^WO^W/^IN^IS^IT^AT^OR^TO^OF^ON^BE^BY^"[X S Y=$$LO(X) Q
 I "^ST^"[X S Y=$$MX(X) Q
 I "^DG^DI^DS^EC^EN^ES^FB^ID^FH^HL^IB^LA^LR^MD^MC^NS^OR^PX^RA^RG^RT^SD^SR^SW^VA^WV^XH^XM^XT^XU^YS^"[X S Y=$$UP(X) Q
 I "^BA^BT^CD^CH^CM^CN^CP^CR^CY^BW^7S^OL^CA^MC^EP^II^RO^ZP^ZY^SH^ES^MF^GP^"[X S Y=$$UP(X) Q
 I "^CW^DD^DI^DS^EM^HF^IM^LH^LO^OD^OE^PN^RI^RP^RS^SP^SR^ST^SW^TP^TR^TS^VS^"[X S Y=$$UP(X) Q
 I "^EP^AA^AB^AC^AD^AF^AG^AH^AP^AR^AV^BA^BB^BC^BE^BG^BH^BK^BL^BM^BP^BR^BS^BW^CA^CB^CD^CE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^URO^USF^UTP^VII^VIP^VLA^VSG^VZV^WBC^WGA^WHO^XII^"[X S Y=$$UP(X) Q
 I "^MAA^MPP^NEC^NOS^ZTA^CPD^R/O^MDA^3MC^ACP^SFN^URR^SNF^SLC^ISC^III^ATP^CMP^AAF^APV^LSD^PCP^HTP^RNA^DNA^ISC^NLM^IMP^"[X S Y=$$UP(X) Q
 I "^ONE^TWO^SIX^TEN^AND^ANY^BIS^BUT^CIS^DES^DUE^FOR^LPM^NON^NOT^OXO^PER^PRE^PRO^PSI^THE^USE^"[X S Y=$$LO(X) Q
 Q
4 ; 4 Characters
 S:X="APOA" Y="ApoA" S:X="BBVI" Y="BbvI" S:X="BPTH" Y="bPTH" S:X="BSUE" Y="BsuE" S:X="CAMP" Y="cAMP" S:X="CGMP" Y="cGMP" S:X="COTE" Y="CotE" S:X="DATP" Y="dATP" Q:$L($G(Y))
 S:X="DCMP" Y="dCMP" S:X="DCTP" Y="dCTP" S:X="DGMP" Y="dGMP" S:X="DGTP" Y="dGTP" S:X="DSBA" Y="dsbA" S:X="DTDP" Y="dTDP" S:X="DTTP" Y="dTTP" S:X="DUMP" Y="dUMP" Q:$L($G(Y))
 S:X="DURD" Y="dUrd" S:X="DUTP" Y="dUTP" S:X="ECAI" Y="EcaI" S:X="ECOK" Y="EcoK" S:X="ERBB" Y="erbB" S:X="FELV" Y="FeLV" S:X="FMET" Y="fMet" S:X="GNRH" Y="GnRH" Q:$L($G(Y))
 S:X="GPII" Y="gpII" S:X="HARG" Y="hArg" S:X="HELA" Y="HeLa" S:X="HGRF" Y="hGRF" S:X="HHAI" Y="HhaI" S:X="HPAI" Y="HpaI" S:X="HPTH" Y="hPTH" S:X="IIIA" Y="IIIa" Q:$L($G(Y))
 S:X="KPNI" Y="KpnI" S:X="MCRB" Y="McrB" S:X="MESH" Y="MeSH" S:X="MRNA" Y="mRNA" S:X="NHET" Y="NHEt" S:X="NHME" Y="NHMe" S:X="OBZL" Y="OBzl" S:X="OTBU" Y="OtBu"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^TATA^TCDD^TENS^TIMP^TLSO^UDPG^VIII^VLDL^WHFO^XIII^"[X S Y=$$UP(X) Q
 I "^USED^EACH^DTMN,FOUR^FIVE^NINE^HOUR^INTO^LESS^LIKE^MORE^ONLY^OPEN^OVER^PART^SITE^THAN^TYPE^WITH^"[X S Y=$$LO(X) Q
 I "^BEST^IT'S^LATE^SITE^FROM^SOME^WITH^UPON^THEY^THEN^INTO^MORE^THAN^THAT^THIS^THUS^HAVE^BEEN^NOTE^DONE^MUST^MERE^SURE^KIND^WHEN^WHAT^"[X S Y=$$LO(X) Q
 I "^LOST^LIKE^OURS^ALSO^EACH^ONLY^HERE^SUCH^SEEN^SAME^LESS^AREA^MANY^EVEN^LEFT^MOST^"[X S Y=$$LO(X) Q
 Q
 ;          
LO(X) Q $TR(X,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
UP(X) Q $TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
MX(X) Q $TR($E(X,1),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")_$TR($E(X,2,$L(X)),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")