All pastes #48381 Raw Edit

nihilis

public text v1 · immutable
#48381 ·published 2006-04-06 18:04 UTC
rendered paste body
SELECT incident.*, 
		 apparent_outcome.APPARENT_OUTCOME_E_DESC, 
		 apparent_outcome.APPARENT_OUTCOME_F_DESC, 
		 cause_analysis_status.CAUSE_ANALYSIS_STATUS_E_DESC,
		 cause_analysis_status.CAUSE_ANALYSIS_STATUS_F_DESC,
		 sub_hso.HSO_NAME, source_hso.HSO_NAME,
		 incident_status.INCIDENT_STATUS_E_DESC,
		 incident_status.INCIDENT_STATUS_F_DESC,
		 grp_incident.NO_YES_IND_E_DESC as grp_incident_no_yes_ind_e_desc,
		 grp_incident.NO_YES_IND_F_DESC as grp_incident_no_yes_ind_f_desc,
		 unplanned_admission.NO_YES_IND_E_DESC as ua_no_yes_ind_e_desc,
		 unplanned_admission.NO_YES_IND_F_DESC as ua_no_yes_ind_f_desc,
		 potential_severity.NO_YES_IND_F_DESC as ps_no_yes_ind_e_desc,
		 potential_severity.NO_YES_IND_F_DESC as ps_no_yes_ind_f_desc,
		 patient_informed.PATIENT_INFORMED_E_DESC,
		 recurrence_likelihood.RECURRENCE_LIKELIHOOD_E_DESC,
		 specific_location.SPECIFIC_LOCATION_DESC,
		 icd_tp.TIME_PERIOD_E_DESC,
		 icd_tp.TIME_PERIOD_F_DESC,
		 detected_tp.TIME_PERIOD_E_DESC,
		 detected_tp.TIME_PERIOD_F_DESC,
		 dwd.WEEK_DAY_E_DESC as dwd_week_day_e_desc, 
		 dwd.WEEK_DAY_F_DESC as dwd_week_day_f_desc, 
		 iwd.WEEK_DAY_E_DESC as iwd_week_day_e_desc,
		 iwd.WEEK_DAY_F_DESC as iwd_week_day_f_desc 
FROM incident, apparent_outcome, cause_analysis_status, hso sub_hso, hso source_hso, 
	  incident_status, no_yes_ind grp_incident, no_yes_ind unplanned_admission, 
	  no_yes_ind potential_severity, patient_informed, recurrence_likelihood, specific_location,
	  time_period icd_tp, time_period detected_tp, week_day dwd, week_day iwd 
WHERE 
		incident.APPARENT_OUTCOME_ID = apparent_outcome.APPARENT_OUTCOME_ID(+)
		AND incident.CAUSE_ANALYSIS_STATUS_ID = cause_analysis_status.CAUSE_ANALYSIS_STATUS_ID(+)
		AND incident.SUBMITTING_HSO_ID = sub_hso.HSO_ID(+)
		AND incident.SOURCE_HSO_ID = source_hso.HSO_ID(+)
		AND incident.INCIDENT_STATUS_ID = incident_status.INCIDENT_STATUS_ID(+)
		AND incident.GROUP_INCIDENT_IND_ID = grp_incident.NO_YES_IND_ID(+)
		AND incident.PATIENT_INFORMED_ID = patient_informed.PATIENT_INFORMED_ID(+)
		AND incident.RECURRENCE_LIKELIHOOD_ID = recurrence_likelihood.RECURRENCE_LIKELIHOOD_ID(+)
		AND incident.SPECIFIC_LOCATION_ID = specific_location.SPECIFIC_LOCATION_ID(+)
		AND incident.INCIDENT_TIME_PERIOD_ID = icd_tp.TIME_PERIOD_ID(+)
		AND incident.DETECTED_TIME_PERIOD_ID = detected_tp.TIME_PERIOD_ID(+)
		AND incident.DETECTED_WEEK_DAY_ID = dwd.WEEK_DAY_ID(+) 
		AND incident.INCIDENT_WEEK_DAY_ID = iwd.WEEK_DAY_ID(+)