         ON (agetypeec.id = events.age_type_id)
     LEFT JOIN external_codes est_ec
         ON (est_ec.id = ppl.age_type_id)
-	LEFT JOIN participations_contacts partcon
-		ON (partcon.id = events.participations_contact_id)
-	LEFT JOIN external_codes partcon_disp_ec
-		ON (partcon.disposition_id = partcon_disp_ec.id)
-	LEFT JOIN external_codes partcon_cont_ec
-		ON (partcon.contact_type_id = partcon_cont_ec.id)
-WHERE
-	events.type = 'MorbidityEvent' AND
-	pa.type = 'Jurisdiction' AND
-	pplpart.secondary_entity_id IS NULL AND
-	pplpart.type = 'InterestedParty'
-;
+    LEFT JOIN participations_contacts partcon
+        ON (partcon.id = events.participations_contact_id)
+    LEFT JOIN external_codes partcon_disp_ec
+        ON (partcon.disposition_id = partcon_disp_ec.id)
+    LEFT JOIN external_codes partcon_cont_ec
+        ON (partcon.contact_type_id = partcon_cont_ec.id)
+WHERE
+    events.type = 'MorbidityEvent' AND
+    pa.type = 'Jurisdiction' AND
+    pplpart.secondary_entity_id IS NULL AND
+    pplpart.type = 'InterestedParty'
+;
+
+ALTER TABLE dw_morbidity_events
+    ADD CONSTRAINT pk_dw_morbidity_events PRIMARY KEY (id);
+
+CREATE INDEX dw_morbidity_events_patient_id ON dw_morbidity_events (dw_patients_id);
+CREATE INDEX dw_morbidity_events_investigating_jurisdiction
+    ON dw_morbidity_events (investigating_jurisdiction);
+CREATE INDEX dw_morbidity_events_jurisdiction_of_residence
+    ON dw_morbidity_events (jurisdiction_of_residence);
 
 CREATE TABLE dw_contact_events AS
 SELECT
-	events.id,
-	events.parent_id,               -- Reporting tool might provide a field "was_a_contact" == parent_id IS NOT NULL
-	ppl.id AS dw_patients_id,
-
-	ds.id AS disease_id,
-	ijpl.name AS investigating_jurisdiction,
+    events.id,
+    events.parent_id,               -- Reporting tool might provide a field "was_a_contact" == parent_id IS NOT NULL
+    ppl.id AS dw_patients_id,
+
+    ds.id AS disease_id,
+    ijpl.name AS investigating_jurisdiction,
     ijpl.id AS investigating_jurisdiction_id,
     jorpl.name AS jurisdiction_of_residence,
     jorpl.id AS jurisdiction_of_residence_id,
 
     events.age_at_onset AS actual_age_at_onset,
-	agetypeec.code_description AS actual_age_type,
+    agetypeec.code_description AS actual_age_type,
     ppl.approximate_age_no_birthday AS estimated_age_at_onset,
     est_ec.code_description AS estimated_age_type,
 

    prf.risk_factors AS additional_risk_factors,
    prf.risk_factors_notes AS risk_factor_details,
    prf.occupation,
	events.other_data_1,
	events.other_data_2,
	disevhosp.code_description AS disease_event_hospitalized,	-- code description?

	-- events.event_status,					-- Change this from a code to a text value?
	inv.first_name || ' ' || inv.last_name AS investigator,
	events.event_queue_id,					-- do something w/ event queues?

    pataddr.street_number,
    pataddr.street_name,

    events.type = 'EncounterEvent'
;

ALTER TABLE dw_encounters_labs
    ADD CONSTRAINT pk_dw_encounters_labs PRIMARY KEY (id);

CREATE TABLE dw_encounters_treatments AS
SELECT
    pt.id,
