GMTSUMX3 ; SLC/KER - Convert Text to Mix Case (5+) ; 07/18/2000
;;2.7;Health Summary;**30,37**;Oct 20, 1995
;;
;
5 ; 5 Characters
S:X="CAMPS" Y="cAMPS" S:X="CVIBI" Y="CviBI" S:X="DNASE" Y="DNase" S:X="ECORI" Y="EcoRI" S:X="GROEL" Y="GroEL" S:X="HAEII" Y="HaeII" S:X="HBSAG" Y="HBsAg" Q:$L($G(Y))
S:X="HINFI" Y="HinfI" S:X="HNRNP" Y="hnRNP" S:X="HPAII" Y="HpaII" S:X="HPGRF" Y="hpGRF" S:X="MBOII" Y="MboII" S:X="MELEU" Y="MeLeu" S:X="MEPHE" Y="MePhe" Q:$L($G(Y))
S:X="MEPRO" Y="MePro" S:X="NEUAC" Y="NeuAc" S:X="PTHRP" Y="PTHrP" S:X="RNASE" Y="RNase" S:X="SALGI" Y="SalGI" S:X="SNRNP" Y="snRNP" Q:$L($G(Y))
I "^APRIL^ARBOR^BARRE^BEACH^BLACK^BLUFF^BRONX^CLOUD^CREEK^DIEGO^DRIVE^FALLS^FARGO^GOISE^GRAND^HAVEN^HILLS^HINES^JUNCT^LINDA^LOUIS^LYONS^MARCH^MEADE^MIAMI^MILES^NORTH^OMAHA^PASSO^PERRY^PINES^PITTS^POINT^PUGET^RIVER^"[$$UP(X) S Y=$$MX(X) Q
I "^RIVER^SAINT^SALEM^SIOUX^SOUND^SOUTH^TAMPA^TEXAS^TOGUS^TOMAH^VEGAS^WALLA^WAYNE^WHITE^"[$$UP(X) S Y=$$MX(X) Q
I "^CALLA^CCAAT^CTLSO^DPDPE^HKAFO^IGFBP^NADPH^NIDDM^PACAP^SAIDS^SPECT^"[X S Y=$$UP(X) Q
I "^DOPAC^ZPACK^EPSDT^"[X S Y=$$UP(X) Q
I "^BELOW^FIRST^FOUND^HOURS^SIXTH^FIFTH^LOWER^MAJOR^OTHER^SITES^STATE^THIRD^THREE^UPPER^"[$$UP(X) S Y=$$LO(X) Q
I "^GIVEN^FORTH^THESE^WHERE^OFTEN^AFTER^RIGHT^WOULD^COULD^OUTER^"[X S Y=$$LO(X) Q
Q
6 ; 6 Characters
S:X="DESGLY" Y="desGly" S:X="ECORII" Y="EcoRII" S:X="GALNAC" Y="GalNAc" S:X="GLCNAC" Y="GlcNAc" S:X="GTPASE" Y="GTPase" S:X="LEFORT" Y="LeFort" S:X="MURNAC" Y="MurNAc" Q:$L($G(Y))
S:X="PTDINS" Y="PtdIns" S:X="STYLTI" Y="StyLTI" S:X="UVRABC" Y="uvrABC" Q:$L($G(Y))
I "^RETURN^ANGLES^AUGUST^BATTLE^BILOXI^BONHAM^BOSTON^BUTLER^CASTLE^CLINIC^DALLAS^DAYTON^DENVER^DUBLIN^DURHAM^FRESNO^HEALTH^HGHLND^HOWARD^HUDSON^ISLAND^JERSEY^KANSAS^LESSER^LITTLE^MANILA^MARION^MARLIN^MOINES^ORANGE^POPLAR^"[$$UP(X) S Y=$$MX(X) Q
I "^POPLAR^SPRING^TACOMA^TEMPLE^TOPEKA^TUCSON^VALLEY^WILKES^"[$$UP(X) S Y=$$MX(X) Q
I "^DMEPOS^PEPPTS^"[$$UP(X) S Y=$$UP(X) Q
I "^INSIDE^FILING^FOURTH^CLOSED^CYCLIC^DEGREE^DEVICE^DURING^EFFECT^EXCEPT^FACTOR^LENGTH^"[$$UP(X) S Y=$$LO(X) Q
I "^MOLDED^BEFORE^ITSELF^WITHIN^REGION^RETURN^SECOND^SINGLE^"[$$UP(X) S Y=$$LO(X) Q
Q
7 ; 7 Characters
I "^ALTOONA^ANTONIO^ATLANTA^AUGUSTA^BATAVIA^BECKLEY^BEDFORD^BUFFALO^CENTRAL^CHICAGO^EASTERN^FLORIDA^GEORGIA^GREATER^HAMPTON^HOUSTON^JACKSON^JANUARY^LEBANON^LINCOLN^MADISON^MEMPHIS^OCTOBER^ORLEANS^PATIENT^PHOENIX^"[$$UP(X) S Y=$$MX(X) Q
I "^PHOENIX^SAGINAW^SEATTLE^SPOKANE^SPRINGS^WESTERN^WICHITA^"[$$UP(X) S Y=$$MX(X) Q
I "^APHAKIC^"[$$UP(X) S Y=$$UP(X) Q
I "^EFFECTS^BETWEEN^ONESELF^HERSELF^HIMSELF^"[X S Y=$$LO(X) Q
I "^OUTSIDE^ANOTHER^THEREBY^WITHOUT^MENTION^"[X S Y=$$LO(X) Q
Q
8 ; 8 Characters
I "^BROCKTON^BROOKLYN^CHEYENNE^COLUMBIA^COLUMBUS^DANVILLE^DECEMBER^FAYETTVL^FEBRUARY^HARRISON^HIGHLAND^HONOLULU^JUNCTION^MARTINEZ^MARYLAND^MONTROSE^MOUNTAIN^MOUNTIAN^MUSKOGEE^NEBRASKA^NORTHERN^OKLAHOMA^PORTLAND^"[$$UP(X) S Y=$$MX(X) Q
I "^PORTLAND^PRESCOTT^RICHMOND^ROSEBURG^SHERIDAN^SOUTHERN^SYRACUSE^TUSKEGEE^VETERANS^"[$$UP(X) S Y=$$MX(X) Q
I "^ALTHOUGH^INJURING^INCLUDES^EXCLUDES^"[X S Y=$$LO(X) Q
Q
9 ; 9 Characters
I "^ASHEVILLE^BALTIMORE^CLEVELAND^FRANCISCO^KERRVILLE^KNOXVILLE^LEXINGTON^LIVERMORE^MILWAUKEE^NASHVILLE^NEWINGTON^NORTHPORT^SALISBURY^SEPTEMBER^SEPULVEDA^"[$$UP(X) S Y=$$MX(X) Q
I "^OTHERWISE^SPECIFIED^INCLUDING^EXCLUDING^"[X S Y=$$LO(X) Q
Q
M ; 10 or more Characters
10 S:X="GDPMANNOSE" Y="GDPmannose" S:X="UDPGLUCOSE" Y="UDPglucose" Q:$L($G(Y))
I "^BIRMINGHAM^CALIFORNIA^CHARLESTON^CINCINNATI^CLARKSBURG^HEALTHCARE^HUNTINGTON^LOUISVILLE^MANCHESTER^MONTGOMERY^PITTSBURGH^PROVIDENCE^SHREVEPORT^TUSCALOOSA^UNIVERSITY^WASHINGTON^WILMINGTON^"[$$UP(X) S Y=$$MX(X) Q
11 I "^CANANDAIGUA^CHILLICOTHE^COATESVILLE^CONNECTICUT^GAINESVILLE^LEAVENWORTH^MARTINSBURG^MINNEAPOLIS^NORTHAMPTON^"[$$UP(X) S Y=$$MX(X) Q
I "^UNSPECIFIED^"[X S Y=$$LO(X) Q
12 I "^INDIANAPOLIS^MURFREESBORO^PHILADELPHIA^"[$$UP(X) S Y=$$MX(X) Q
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")
LD(X) Q $TR($E(X,1),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")_$E(X,2,$L(X))
TRIM(X) S X=$G(X) F Q:$E(X,1)'=" " S X=$E(X,2,$L(X))
F Q:$E(X,$L(X))'=" " S X=$E(X,1,($L(X)-1))
Q X
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMTSUMX3 4498 printed Dec 13, 2024@02:00:37 Page 2
GMTSUMX3 ; SLC/KER - Convert Text to Mix Case (5+) ; 07/18/2000
+1 ;;2.7;Health Summary;**30,37**;Oct 20, 1995
+2 ;;
+3 ;
5 ; 5 Characters
+1 if X="CAMPS"
SET Y="cAMPS"
if X="CVIBI"
SET Y="CviBI"
if X="DNASE"
SET Y="DNase"
if X="ECORI"
SET Y="EcoRI"
if X="GROEL"
SET Y="GroEL"
if X="HAEII"
SET Y="HaeII"
if X="HBSAG"
SET Y="HBsAg"
if $LENGTH($GET(Y))
QUIT
+2 if X="HINFI"
SET Y="HinfI"
if X="HNRNP"
SET Y="hnRNP"
if X="HPAII"
SET Y="HpaII"
if X="HPGRF"
SET Y="hpGRF"
if X="MBOII"
SET Y="MboII"
if X="MELEU"
SET Y="MeLeu"
if X="MEPHE"
SET Y="MePhe"
if $LENGTH($GET(Y))
QUIT
+3 if X="MEPRO"
SET Y="MePro"
if X="NEUAC"
SET Y="NeuAc"
if X="PTHRP"
SET Y="PTHrP"
if X="RNASE"
SET Y="RNase"
if X="SALGI"
SET Y="SalGI"
if X="SNRNP"
SET Y="snRNP"
if $LENGTH($GET(Y))
QUIT
+4 IF "^APRIL^ARBOR^BARRE^BEACH^BLACK^BLUFF^BRONX^CLOUD^CREEK^DIEGO^DRIVE^FALLS^FARGO^GOISE^GRAND^HAVEN^HILLS^HINES^JUNCT^LINDA^LOUIS^LYONS^MARCH^MEADE^MIAMI^MILES^NORTH^OMAHA^PASSO^PERRY^PINES^PITTS^POINT^PUGET^RIVER^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+5 IF "^RIVER^SAINT^SALEM^SIOUX^SOUND^SOUTH^TAMPA^TEXAS^TOGUS^TOMAH^VEGAS^WALLA^WAYNE^WHITE^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+6 IF "^CALLA^CCAAT^CTLSO^DPDPE^HKAFO^IGFBP^NADPH^NIDDM^PACAP^SAIDS^SPECT^"[X
SET Y=$$UP(X)
QUIT
+7 IF "^DOPAC^ZPACK^EPSDT^"[X
SET Y=$$UP(X)
QUIT
+8 IF "^BELOW^FIRST^FOUND^HOURS^SIXTH^FIFTH^LOWER^MAJOR^OTHER^SITES^STATE^THIRD^THREE^UPPER^"[$$UP(X)
SET Y=$$LO(X)
QUIT
+9 IF "^GIVEN^FORTH^THESE^WHERE^OFTEN^AFTER^RIGHT^WOULD^COULD^OUTER^"[X
SET Y=$$LO(X)
QUIT
+10 QUIT
6 ; 6 Characters
+1 if X="DESGLY"
SET Y="desGly"
if X="ECORII"
SET Y="EcoRII"
if X="GALNAC"
SET Y="GalNAc"
if X="GLCNAC"
SET Y="GlcNAc"
if X="GTPASE"
SET Y="GTPase"
if X="LEFORT"
SET Y="LeFort"
if X="MURNAC"
SET Y="MurNAc"
if $LENGTH($GET(Y))
QUIT
+2 if X="PTDINS"
SET Y="PtdIns"
if X="STYLTI"
SET Y="StyLTI"
if X="UVRABC"
SET Y="uvrABC"
if $LENGTH($GET(Y))
QUIT
+3 IF "^RETURN^ANGLES^AUGUST^BATTLE^BILOXI^BONHAM^BOSTON^BUTLER^CASTLE^CLINIC^DALLAS^DAYTON^DENVER^DUBLIN^DURHAM^FRESNO^HEALTH^HGHLND^HOWARD^HUDSON^ISLAND^JERSEY^KANSAS^LESSER^LITTLE^MANILA^MARION^MARLIN^MOINES^ORANGE^POPLAR^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+4 IF "^POPLAR^SPRING^TACOMA^TEMPLE^TOPEKA^TUCSON^VALLEY^WILKES^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+5 IF "^DMEPOS^PEPPTS^"[$$UP(X)
SET Y=$$UP(X)
QUIT
+6 IF "^INSIDE^FILING^FOURTH^CLOSED^CYCLIC^DEGREE^DEVICE^DURING^EFFECT^EXCEPT^FACTOR^LENGTH^"[$$UP(X)
SET Y=$$LO(X)
QUIT
+7 IF "^MOLDED^BEFORE^ITSELF^WITHIN^REGION^RETURN^SECOND^SINGLE^"[$$UP(X)
SET Y=$$LO(X)
QUIT
+8 QUIT
7 ; 7 Characters
+1 IF "^ALTOONA^ANTONIO^ATLANTA^AUGUSTA^BATAVIA^BECKLEY^BEDFORD^BUFFALO^CENTRAL^CHICAGO^EASTERN^FLORIDA^GEORGIA^GREATER^HAMPTON^HOUSTON^JACKSON^JANUARY^LEBANON^LINCOLN^MADISON^MEMPHIS^OCTOBER^ORLEANS^PATIENT^PHOENIX^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+2 IF "^PHOENIX^SAGINAW^SEATTLE^SPOKANE^SPRINGS^WESTERN^WICHITA^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+3 IF "^APHAKIC^"[$$UP(X)
SET Y=$$UP(X)
QUIT
+4 IF "^EFFECTS^BETWEEN^ONESELF^HERSELF^HIMSELF^"[X
SET Y=$$LO(X)
QUIT
+5 IF "^OUTSIDE^ANOTHER^THEREBY^WITHOUT^MENTION^"[X
SET Y=$$LO(X)
QUIT
+6 QUIT
8 ; 8 Characters
+1 IF "^BROCKTON^BROOKLYN^CHEYENNE^COLUMBIA^COLUMBUS^DANVILLE^DECEMBER^FAYETTVL^FEBRUARY^HARRISON^HIGHLAND^HONOLULU^JUNCTION^MARTINEZ^MARYLAND^MONTROSE^MOUNTAIN^MOUNTIAN^MUSKOGEE^NEBRASKA^NORTHERN^OKLAHOMA^PORTLAND^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+2 IF "^PORTLAND^PRESCOTT^RICHMOND^ROSEBURG^SHERIDAN^SOUTHERN^SYRACUSE^TUSKEGEE^VETERANS^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+3 IF "^ALTHOUGH^INJURING^INCLUDES^EXCLUDES^"[X
SET Y=$$LO(X)
QUIT
+4 QUIT
9 ; 9 Characters
+1 IF "^ASHEVILLE^BALTIMORE^CLEVELAND^FRANCISCO^KERRVILLE^KNOXVILLE^LEXINGTON^LIVERMORE^MILWAUKEE^NASHVILLE^NEWINGTON^NORTHPORT^SALISBURY^SEPTEMBER^SEPULVEDA^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+2 IF "^OTHERWISE^SPECIFIED^INCLUDING^EXCLUDING^"[X
SET Y=$$LO(X)
QUIT
+3 QUIT
M ; 10 or more Characters
10 if X="GDPMANNOSE"
SET Y="GDPmannose"
if X="UDPGLUCOSE"
SET Y="UDPglucose"
if $LENGTH($GET(Y))
QUIT
+1 IF "^BIRMINGHAM^CALIFORNIA^CHARLESTON^CINCINNATI^CLARKSBURG^HEALTHCARE^HUNTINGTON^LOUISVILLE^MANCHESTER^MONTGOMERY^PITTSBURGH^PROVIDENCE^SHREVEPORT^TUSCALOOSA^UNIVERSITY^WASHINGTON^WILMINGTON^"[$$UP(X)
SET Y=$$MX(X)
QUIT
11 IF "^CANANDAIGUA^CHILLICOTHE^COATESVILLE^CONNECTICUT^GAINESVILLE^LEAVENWORTH^MARTINSBURG^MINNEAPOLIS^NORTHAMPTON^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+1 IF "^UNSPECIFIED^"[X
SET Y=$$LO(X)
QUIT
12 IF "^INDIANAPOLIS^MURFREESBORO^PHILADELPHIA^"[$$UP(X)
SET Y=$$MX(X)
QUIT
+1 QUIT
+2 QUIT
+3 ;
LO(X) QUIT $TRANSLATE(X,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
UP(X) QUIT $TRANSLATE(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
MX(X) QUIT $TRANSLATE($EXTRACT(X,1),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")_$TRANSLATE($EXTRACT(X,2,$LENGTH(X)),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
LD(X) QUIT $TRANSLATE($EXTRACT(X,1),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")_$EXTRACT(X,2,$LENGTH(X))
TRIM(X) SET X=$GET(X)
FOR
if $EXTRACT(X,1)'=" "
QUIT
SET X=$EXTRACT(X,2,$LENGTH(X))
+1 FOR
if $EXTRACT(X,$LENGTH(X))'=" "
QUIT
SET X=$EXTRACT(X,1,($LENGTH(X)-1))
+2 QUIT X