 
 TRUNCATE TABLE SIMPLE_NAME;
 
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName","Svc_v\\d+_\\d+$","");
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName","^(caBIO)\\d+$","$1");
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName","^camod$","caMOD");
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName","^Washu-CaTissueSuite$","caTissue Suite");
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName","^EVSGridService\d+$","EVS");
 
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,HIDE) VALUES ("ServiceName","^AuthenticationService$",1);
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,HIDE) VALUES ("ServiceName","^CredentialDelegationService$",1);
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,HIDE) VALUES ("ServiceName","^GTS$",1);
-INSERT INTO SIMPLE_NAME (TYPE,PATTERN,HIDE) VALUES ("ServiceName","^Dorian$",1);
+-- %% RULES FOR HIDING SERVICES %%
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME,HIDE) VALUES ("ServiceName",
+"^(AuthenticationService)$","$1",1);
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME,HIDE) VALUES ("ServiceName",
+"^(CredentialDelegationService)$","$1",1);
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME,HIDE) VALUES ("ServiceName",
+"^(GTS)$","$1",1);
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME,HIDE) VALUES ("ServiceName",
+"^(Dorian)$","$1",1);
+
+
+-- %% RULES FOR HIDING HOSTS %%
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME,HIDE) VALUES ("HostName",
+"^(bdarc)$","$1",1);
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME,HIDE) VALUES ("HostName",
+"^(QA)$","$1",1);
+
+
+
+-- %% RULES FOR SERVICE NAMES %%
+
+-- Remove "service" from service name
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName",
+"(Grid|Data|Analytical)?(Service|Svc)(_v\\d+_\\d+|\\d+)?$","");
+
+-- Lowercase "ca" prefix
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName",
+"^Ca([A-Z])","ca$1");
+
+-- caBIO43 -> caBIO
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName",
+"^(caBIO)\\d+$","$1");
+
+-- camod -> caMOD
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName",
+"^camod$","caMOD");
+
+-- Washu-CaTissueSuite -> caTissue Suite
+
+INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("ServiceName",
+"^Washu-CaTissueSuite$","caTissue Suite");
+
+
+-- %% RULES FOR HOST NAMES %%
 
 -- Remove trailing whitespace
 
 INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("HostName",
-"(.*?)\\w+$","$1");
+"(.*?)\\s+$","$1");
 
 -- Remove quotes
 

INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("HostName",
"^nntc$","National NeuroAIDS Tissue Consortium");

-- bdarc

INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("HostName",
"^bda(rc)?$","Build and Deployment Automation");


-- Are these still used?


-- caNanoLab-GTEM

INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("HostName",
"^(.*?)-GTEM$","GTEM");

-- caNanoLab-NCICBIIT
-- CBIIT
-- NCI CBIIT
-- NCI CBITT (misspelling)
-- NCICBIIT

INSERT INTO SIMPLE_NAME (TYPE,PATTERN,SIMPLE_NAME) VALUES ("HostName",
"^.*?(NCI\\s?)?CBI(I|T)T.*?$","NCI Center for Biomedical Informatics and Information Technology");

-- Center for Biomedical Informatics and Information Technology

