CREATE USER who IDENTIFIED BY "PASSWD_GOES_HERE" 
DEFAULT TABLESPACE "ENCRYPTED_DATA" 
TEMPORARY TABLESPACE "TEMP_TS1";
GRANT CONNECT to who;
GRANT CREATE TABLE to who;
ALTER USER who QUOTA UNLIMITED ON ENC_DATA;


CREATE TABLE "WHO"."MORPH2"
(
  "CODE"  VARCHAR2(20) NOT NULL,
  "LABEL" VARCHAR2(120),
  "NOTES" VARCHAR2(120),
  CONSTRAINT "MORPH2_PK" PRIMARY KEY ("CODE")
);

CREATE TABLE "WHO"."MORPH3"
(
  "CODE"  VARCHAR2(20) NOT NULL,
  "LABEL" VARCHAR2(120),
  "NOTES" VARCHAR2(120)
);

CREATE TABLE "WHO"."TOPO"
(
  "KODE"  VARCHAR2(20) NOT NULL,
  "LVL"   VARCHAR2(20) NOT NULL,
  "TITLE" VARCHAR2(80)
);

/** Load Data

Download the WHO ICD-O classification files
ICD-O-3_CSV-metadata.zip
ICD-O-2_CSV.zip

From here (must create account first)
http://apps.who.int/classifications/apps/icd/ClassificationDownload/DLArea/Download.aspx

Unzip and manually imported (as text, delimited, etc)
Topoenglish.txt = TOPO (import as text or delimited)
icd-o-3-morph.csv = MORPH2 (convert to unix file endings $tr '\r' '\n' <in >out
Morphenglish.txt = MORPH3 (skip struct columns, only rows with 'title')

Rename .txt files to .csv (no formatting changes necessary)
Strip/add quotes as needed
Duplicate key error, cat/grep > to get only the 'title' rows from Morphenglish.txt


Verify counts:
select count(*) from who.morph2; -- 880 
select count(*) from who.morph2 where notes is not null; -- 5
select count(*) from who.morph3; -- 1032
select count(*) from who.topo; -- 1341

*/
