| 1 |
2.41 ms |
SELECT t0.id AS id_1, t0.legal_last_name AS legal_last_name_2, t0.legal_first_name AS legal_first_name_3, t0.middle_name AS middle_name_4, t0.preferred_name AS preferred_name_5, t0.sex_at_birth AS sex_at_birth_6, t0.gender AS gender_7, t0.pronouns AS pronouns_8, t0.date_of_birth AS date_of_birth_9, t0.height AS height_10, t0.weight AS weight_11, t0.eye_colour AS eye_colour_12, t0.hair_colour AS hair_colour_13, t0.hair_style AS hair_style_14, t0.complexion AS complexion_15, t0.scars AS scars_16, t0.tattoos AS tattoos_17, t0.glasses AS glasses_18, t0.ethnicity AS ethnicity_19, t0.other_ethnicity AS other_ethnicity_20, t0.birthplace AS birthplace_21, t0.provincial_health_number AS provincial_health_number_22, t0.status_number AS status_number_23, t0.status_number_expiry AS status_number_expiry_24, t0.nihb_number AS nihb_number_25, t0.child_welfare_status AS child_welfare_status_26, t0.legal_status_expiry AS legal_status_expiry_27, t0.english_first_language AS english_first_language_28, t0.non_english_language AS non_english_language_29, t0.other_languages AS other_languages_30, t0.previous_referral AS previous_referral_31, t0.submitted_at AS submitted_at_32, t0.preferred_placement AS preferred_placement_33, t0.created_at AS created_at_34, t0.created_by AS created_by_35, t0.updated_at AS updated_at_36, t0.updated_by AS updated_by_37, t38.id AS id_39, t38.enrolled_in_mys AS enrolled_in_mys_40, t38.created_at AS created_at_41, t38.created_by AS created_by_42, t38.updated_at AS updated_at_43, t38.updated_by AS updated_by_44, t38.application_id AS application_id_45, t46.id AS id_47, t46.name AS name_48, t46.address AS address_49, t46.city AS city_50, t46.province AS province_51, t46.postal_code AS postal_code_52, t46.primary_contact_name AS primary_contact_name_53, t46.primary_contact_phone AS primary_contact_phone_54, t46.primary_contact_email AS primary_contact_email_55, t46.primary_contact_method AS primary_contact_method_56, t46.supervisor_name AS supervisor_name_57, t46.supervisor_phone AS supervisor_phone_58, t46.supervisor_email AS supervisor_email_59, t46.supervisor_method AS supervisor_method_60, t46.skic_supervision_applied AS skic_supervision_applied_61, t46.additional_info AS additional_info_62, t46.created_at AS created_at_63, t46.created_by AS created_by_64, t46.updated_at AS updated_at_65, t46.updated_by AS updated_by_66, t46.application_id AS application_id_67, t68.id AS id_69, t68.funding_approved AS funding_approved_70, t68.funding_explanation AS funding_explanation_71, t68.invoice_referral_agency AS invoice_referral_agency_72, t68.agency_name AS agency_name_73, t68.jordans_principle AS jordans_principle_74, t68.isc_number AS isc_number_75, t68.isc_expiry AS isc_expiry_76, t68.agency_address AS agency_address_77, t68.agency_city AS agency_city_78, t68.agency_province AS agency_province_79, t68.agency_postal_code AS agency_postal_code_80, t68.agency_email AS agency_email_81, t68.agency_phone AS agency_phone_82, t68.invoice_office AS invoice_office_83, t68.invoice_office_address AS invoice_office_address_84, t68.invoice_office_city AS invoice_office_city_85, t68.invoice_office_province AS invoice_office_province_86, t68.invoice_office_postal_code AS invoice_office_postal_code_87, t68.invoice_office_email AS invoice_office_email_88, t68.invoice_office_phone AS invoice_office_phone_89, t68.created_at AS created_at_90, t68.created_by AS created_by_91, t68.updated_at AS updated_at_92, t68.updated_by AS updated_by_93, t68.application_id AS application_id_94, t95.id AS id_96, t95.school AS school_97, t95.grade AS grade_98, t95.last_attended AS last_attended_99, t95.school_location AS school_location_100, t95.in_specialized_program AS in_specialized_program_101, t95.specialized_program_description AS specialized_program_description_102, t95.psychoeducational_assessment_completed AS psychoeducational_assessment_completed_103, t95.occupational_therapist_assessment_completed AS occupational_therapist_assessment_completed_104, t95.speech_language_assessment_completed AS speech_language_assessment_completed_105, t95.school_attitude_description AS school_attitude_description_106, t95.created_at AS created_at_107, t95.created_by AS created_by_108, t95.updated_at AS updated_at_109, t95.updated_by AS updated_by_110, t95.application_id AS application_id_111, t112.id AS id_113, t112.cultural_identity AS cultural_identity_114, t112.strengths_and_interests AS strengths_and_interests_115, t112.social_connections AS social_connections_116, t112.spiritual_connections AS spiritual_connections_117, t112.created_at AS created_at_118, t112.created_by AS created_by_119, t112.updated_at AS updated_at_120, t112.updated_by AS updated_by_121, t112.application_id AS application_id_122, t123.id AS id_124, t123.created_at AS created_at_125, t123.created_by AS created_by_126, t123.updated_at AS updated_at_127, t123.updated_by AS updated_by_128, t123.application_id AS application_id_129, t123.verbal_aggression_id AS verbal_aggression_id_130, t123.physical_aggression_id AS physical_aggression_id_131, t123.property_damage_id AS property_damage_id_132, t123.running_away_id AS running_away_id_133, t123.animal_cruelty_id AS animal_cruelty_id_134, t123.arson_id AS arson_id_135, t123.sexually_problematic_id AS sexually_problematic_id_136, t123.sexually_exploited_id AS sexually_exploited_id_137, t123.gang_involvement_id AS gang_involvement_id_138, t123.substance_use_id AS substance_use_id_139, t123.anxiety_id AS anxiety_id_140, t123.depression_id AS depression_id_141, t123.suicide_ideation_id AS suicide_ideation_id_142, t123.suicide_attempts_id AS suicide_attempts_id_143, t123.self_harm_id AS self_harm_id_144, t145.id AS id_146, t145.created_at AS created_at_147, t145.created_by AS created_by_148, t145.updated_at AS updated_at_149, t145.updated_by AS updated_by_150, t145.application_id AS application_id_151, t145.emotional_abuse_id AS emotional_abuse_id_152, t145.physical_abuse_id AS physical_abuse_id_153, t145.sexual_abuse_id AS sexual_abuse_id_154, t145.emotional_neglect_id AS emotional_neglect_id_155, t145.physical_neglect_id AS physical_neglect_id_156, t145.parental_separation_id AS parental_separation_id_157, t145.household_physical_violence_id AS household_physical_violence_id_158, t145.household_substance_abuse_id AS household_substance_abuse_id_159, t145.household_mental_illness_id AS household_mental_illness_id_160, t145.incarcerated_household_members_id AS incarcerated_household_members_id_161, t145.medical_trauma_id AS medical_trauma_id_162, t145.natural_disaster_id AS natural_disaster_id_163, t145.grief_loss_id AS grief_loss_id_164, t145.community_violence_id AS community_violence_id_165, t166.id AS id_167, t166.biological_mother_known AS biological_mother_known_168, t166.biological_father_known AS biological_father_known_169, t166.primary_caregiver_different AS primary_caregiver_different_170, t166.secondary_caregiver_different AS secondary_caregiver_different_171, t166.family_in_ranch_program AS family_in_ranch_program_172, t166.no_contact_people AS no_contact_people_173, t166.created_at AS created_at_174, t166.created_by AS created_by_175, t166.updated_at AS updated_at_176, t166.updated_by AS updated_by_177, t166.application_id AS application_id_178, t166.biological_mother_id AS biological_mother_id_179, t166.biological_father_id AS biological_father_id_180, t166.primary_caregiver_id AS primary_caregiver_id_181, t166.secondary_caregiver_id AS secondary_caregiver_id_182, t183.id AS id_184, t183.involved_illegal AS involved_illegal_185, t183.has_charges AS has_charges_186, t183.illegal_details AS illegal_details_187, t183.created_at AS created_at_188, t183.created_by AS created_by_189, t183.updated_at AS updated_at_190, t183.updated_by AS updated_by_191, t183.application_id AS application_id_192, t193.id AS id_194, t193.has_physician AS has_physician_195, t193.has_dentist AS has_dentist_196, t193.has_optometrist AS has_optometrist_197, t193.has_psychiatrist AS has_psychiatrist_198, t193.has_other AS has_other_199, t193.created_at AS created_at_200, t193.created_by AS created_by_201, t193.updated_at AS updated_at_202, t193.updated_by AS updated_by_203, t193.application_id AS application_id_204, t193.physician_id AS physician_id_205, t193.dentist_id AS dentist_id_206, t193.optometrist_id AS optometrist_id_207, t193.psychiatrist_id AS psychiatrist_id_208, t193.other_id AS other_id_209, t210.id AS id_211, t210.mental_health_disorders AS mental_health_disorders_212, t210.medical_conditions AS medical_conditions_213, t210.paranoia_hallucinations AS paranoia_hallucinations_214, t210.allergies AS allergies_215, t210.dental_optical_concerns AS dental_optical_concerns_216, t210.learning_disabilities AS learning_disabilities_217, t210.eating_sleeping_concerns AS eating_sleeping_concerns_218, t210.recent_hospitalizations AS recent_hospitalizations_219, t210.communication_mobility_needs AS communication_mobility_needs_220, t210.adaptive_functioning AS adaptive_functioning_221, t210.immunizations AS immunizations_222, t210.diagnosed_intellectual_disability AS diagnosed_intellectual_disability_223, t210.intellectual_disability_assessment_date AS intellectual_disability_assessment_date_224, t210.intellectual_disability_diagnosis AS intellectual_disability_diagnosis_225, t210.created_at AS created_at_226, t210.created_by AS created_by_227, t210.updated_at AS updated_at_228, t210.updated_by AS updated_by_229, t210.application_id AS application_id_230, t231.id AS id_232, t231.reason AS reason_233, t231.outcome_one AS outcome_one_234, t231.outcome_two AS outcome_two_235, t231.outcome_three AS outcome_three_236, t231.participant_engagement AS participant_engagement_237, t231.caregiver_support AS caregiver_support_238, t231.period_of_treatment AS period_of_treatment_239, t231.discharge_plan AS discharge_plan_240, t231.created_at AS created_at_241, t231.created_by AS created_by_242, t231.updated_at AS updated_at_243, t231.updated_by AS updated_by_244, t231.application_id AS application_id_245, t0.gls_user_id AS gls_user_id_246 FROM gls_application t0 LEFT JOIN gls_application_placement_info t38 ON t38.application_id = t0.id LEFT JOIN gls_application_referral_agency t46 ON t46.application_id = t0.id LEFT JOIN gls_application_funding t68 ON t68.application_id = t0.id LEFT JOIN gls_application_education t95 ON t95.application_id = t0.id LEFT JOIN gls_application_background t112 ON t112.application_id = t0.id LEFT JOIN gls_application_behaviours t123 ON t123.application_id = t0.id LEFT JOIN gls_application_trauma_exposures t145 ON t145.application_id = t0.id LEFT JOIN gls_application_family t166 ON t166.application_id = t0.id LEFT JOIN gls_application_legal t183 ON t183.application_id = t0.id LEFT JOIN gls_application_medical t193 ON t193.application_id = t0.id LEFT JOIN gls_application_medical_history t210 ON t210.application_id = t0.id LEFT JOIN gls_application_case_planning t231 ON t231.application_id = t0.id WHERE t0.id = ?
SELECT
t0.id AS id_1,
t0.legal_last_name AS legal_last_name_2,
t0.legal_first_name AS legal_first_name_3,
t0.middle_name AS middle_name_4,
t0.preferred_name AS preferred_name_5,
t0.sex_at_birth AS sex_at_birth_6,
t0.gender AS gender_7,
t0.pronouns AS pronouns_8,
t0.date_of_birth AS date_of_birth_9,
t0.height AS height_10,
t0.weight AS weight_11,
t0.eye_colour AS eye_colour_12,
t0.hair_colour AS hair_colour_13,
t0.hair_style AS hair_style_14,
t0.complexion AS complexion_15,
t0.scars AS scars_16,
t0.tattoos AS tattoos_17,
t0.glasses AS glasses_18,
t0.ethnicity AS ethnicity_19,
t0.other_ethnicity AS other_ethnicity_20,
t0.birthplace AS birthplace_21,
t0.provincial_health_number AS provincial_health_number_22,
t0.status_number AS status_number_23,
t0.status_number_expiry AS status_number_expiry_24,
t0.nihb_number AS nihb_number_25,
t0.child_welfare_status AS child_welfare_status_26,
t0.legal_status_expiry AS legal_status_expiry_27,
t0.english_first_language AS english_first_language_28,
t0.non_english_language AS non_english_language_29,
t0.other_languages AS other_languages_30,
t0.previous_referral AS previous_referral_31,
t0.submitted_at AS submitted_at_32,
t0.preferred_placement AS preferred_placement_33,
t0.created_at AS created_at_34,
t0.created_by AS created_by_35,
t0.updated_at AS updated_at_36,
t0.updated_by AS updated_by_37,
t38.id AS id_39,
t38.enrolled_in_mys AS enrolled_in_mys_40,
t38.created_at AS created_at_41,
t38.created_by AS created_by_42,
t38.updated_at AS updated_at_43,
t38.updated_by AS updated_by_44,
t38.application_id AS application_id_45,
t46.id AS id_47,
t46.name AS name_48,
t46.address AS address_49,
t46.city AS city_50,
t46.province AS province_51,
t46.postal_code AS postal_code_52,
t46.primary_contact_name AS primary_contact_name_53,
t46.primary_contact_phone AS primary_contact_phone_54,
t46.primary_contact_email AS primary_contact_email_55,
t46.primary_contact_method AS primary_contact_method_56,
t46.supervisor_name AS supervisor_name_57,
t46.supervisor_phone AS supervisor_phone_58,
t46.supervisor_email AS supervisor_email_59,
t46.supervisor_method AS supervisor_method_60,
t46.skic_supervision_applied AS skic_supervision_applied_61,
t46.additional_info AS additional_info_62,
t46.created_at AS created_at_63,
t46.created_by AS created_by_64,
t46.updated_at AS updated_at_65,
t46.updated_by AS updated_by_66,
t46.application_id AS application_id_67,
t68.id AS id_69,
t68.funding_approved AS funding_approved_70,
t68.funding_explanation AS funding_explanation_71,
t68.invoice_referral_agency AS invoice_referral_agency_72,
t68.agency_name AS agency_name_73,
t68.jordans_principle AS jordans_principle_74,
t68.isc_number AS isc_number_75,
t68.isc_expiry AS isc_expiry_76,
t68.agency_address AS agency_address_77,
t68.agency_city AS agency_city_78,
t68.agency_province AS agency_province_79,
t68.agency_postal_code AS agency_postal_code_80,
t68.agency_email AS agency_email_81,
t68.agency_phone AS agency_phone_82,
t68.invoice_office AS invoice_office_83,
t68.invoice_office_address AS invoice_office_address_84,
t68.invoice_office_city AS invoice_office_city_85,
t68.invoice_office_province AS invoice_office_province_86,
t68.invoice_office_postal_code AS invoice_office_postal_code_87,
t68.invoice_office_email AS invoice_office_email_88,
t68.invoice_office_phone AS invoice_office_phone_89,
t68.created_at AS created_at_90,
t68.created_by AS created_by_91,
t68.updated_at AS updated_at_92,
t68.updated_by AS updated_by_93,
t68.application_id AS application_id_94,
t95.id AS id_96,
t95.school AS school_97,
t95.grade AS grade_98,
t95.last_attended AS last_attended_99,
t95.school_location AS school_location_100,
t95.in_specialized_program AS in_specialized_program_101,
t95.specialized_program_description AS specialized_program_description_102,
t95.psychoeducational_assessment_completed AS psychoeducational_assessment_completed_103,
t95.occupational_therapist_assessment_completed AS occupational_therapist_assessment_completed_104,
t95.speech_language_assessment_completed AS speech_language_assessment_completed_105,
t95.school_attitude_description AS school_attitude_description_106,
t95.created_at AS created_at_107,
t95.created_by AS created_by_108,
t95.updated_at AS updated_at_109,
t95.updated_by AS updated_by_110,
t95.application_id AS application_id_111,
t112.id AS id_113,
t112.cultural_identity AS cultural_identity_114,
t112.strengths_and_interests AS strengths_and_interests_115,
t112.social_connections AS social_connections_116,
t112.spiritual_connections AS spiritual_connections_117,
t112.created_at AS created_at_118,
t112.created_by AS created_by_119,
t112.updated_at AS updated_at_120,
t112.updated_by AS updated_by_121,
t112.application_id AS application_id_122,
t123.id AS id_124,
t123.created_at AS created_at_125,
t123.created_by AS created_by_126,
t123.updated_at AS updated_at_127,
t123.updated_by AS updated_by_128,
t123.application_id AS application_id_129,
t123.verbal_aggression_id AS verbal_aggression_id_130,
t123.physical_aggression_id AS physical_aggression_id_131,
t123.property_damage_id AS property_damage_id_132,
t123.running_away_id AS running_away_id_133,
t123.animal_cruelty_id AS animal_cruelty_id_134,
t123.arson_id AS arson_id_135,
t123.sexually_problematic_id AS sexually_problematic_id_136,
t123.sexually_exploited_id AS sexually_exploited_id_137,
t123.gang_involvement_id AS gang_involvement_id_138,
t123.substance_use_id AS substance_use_id_139,
t123.anxiety_id AS anxiety_id_140,
t123.depression_id AS depression_id_141,
t123.suicide_ideation_id AS suicide_ideation_id_142,
t123.suicide_attempts_id AS suicide_attempts_id_143,
t123.self_harm_id AS self_harm_id_144,
t145.id AS id_146,
t145.created_at AS created_at_147,
t145.created_by AS created_by_148,
t145.updated_at AS updated_at_149,
t145.updated_by AS updated_by_150,
t145.application_id AS application_id_151,
t145.emotional_abuse_id AS emotional_abuse_id_152,
t145.physical_abuse_id AS physical_abuse_id_153,
t145.sexual_abuse_id AS sexual_abuse_id_154,
t145.emotional_neglect_id AS emotional_neglect_id_155,
t145.physical_neglect_id AS physical_neglect_id_156,
t145.parental_separation_id AS parental_separation_id_157,
t145.household_physical_violence_id AS household_physical_violence_id_158,
t145.household_substance_abuse_id AS household_substance_abuse_id_159,
t145.household_mental_illness_id AS household_mental_illness_id_160,
t145.incarcerated_household_members_id AS incarcerated_household_members_id_161,
t145.medical_trauma_id AS medical_trauma_id_162,
t145.natural_disaster_id AS natural_disaster_id_163,
t145.grief_loss_id AS grief_loss_id_164,
t145.community_violence_id AS community_violence_id_165,
t166.id AS id_167,
t166.biological_mother_known AS biological_mother_known_168,
t166.biological_father_known AS biological_father_known_169,
t166.primary_caregiver_different AS primary_caregiver_different_170,
t166.secondary_caregiver_different AS secondary_caregiver_different_171,
t166.family_in_ranch_program AS family_in_ranch_program_172,
t166.no_contact_people AS no_contact_people_173,
t166.created_at AS created_at_174,
t166.created_by AS created_by_175,
t166.updated_at AS updated_at_176,
t166.updated_by AS updated_by_177,
t166.application_id AS application_id_178,
t166.biological_mother_id AS biological_mother_id_179,
t166.biological_father_id AS biological_father_id_180,
t166.primary_caregiver_id AS primary_caregiver_id_181,
t166.secondary_caregiver_id AS secondary_caregiver_id_182,
t183.id AS id_184,
t183.involved_illegal AS involved_illegal_185,
t183.has_charges AS has_charges_186,
t183.illegal_details AS illegal_details_187,
t183.created_at AS created_at_188,
t183.created_by AS created_by_189,
t183.updated_at AS updated_at_190,
t183.updated_by AS updated_by_191,
t183.application_id AS application_id_192,
t193.id AS id_194,
t193.has_physician AS has_physician_195,
t193.has_dentist AS has_dentist_196,
t193.has_optometrist AS has_optometrist_197,
t193.has_psychiatrist AS has_psychiatrist_198,
t193.has_other AS has_other_199,
t193.created_at AS created_at_200,
t193.created_by AS created_by_201,
t193.updated_at AS updated_at_202,
t193.updated_by AS updated_by_203,
t193.application_id AS application_id_204,
t193.physician_id AS physician_id_205,
t193.dentist_id AS dentist_id_206,
t193.optometrist_id AS optometrist_id_207,
t193.psychiatrist_id AS psychiatrist_id_208,
t193.other_id AS other_id_209,
t210.id AS id_211,
t210.mental_health_disorders AS mental_health_disorders_212,
t210.medical_conditions AS medical_conditions_213,
t210.paranoia_hallucinations AS paranoia_hallucinations_214,
t210.allergies AS allergies_215,
t210.dental_optical_concerns AS dental_optical_concerns_216,
t210.learning_disabilities AS learning_disabilities_217,
t210.eating_sleeping_concerns AS eating_sleeping_concerns_218,
t210.recent_hospitalizations AS recent_hospitalizations_219,
t210.communication_mobility_needs AS communication_mobility_needs_220,
t210.adaptive_functioning AS adaptive_functioning_221,
t210.immunizations AS immunizations_222,
t210.diagnosed_intellectual_disability AS diagnosed_intellectual_disability_223,
t210.intellectual_disability_assessment_date AS intellectual_disability_assessment_date_224,
t210.intellectual_disability_diagnosis AS intellectual_disability_diagnosis_225,
t210.created_at AS created_at_226,
t210.created_by AS created_by_227,
t210.updated_at AS updated_at_228,
t210.updated_by AS updated_by_229,
t210.application_id AS application_id_230,
t231.id AS id_232,
t231.reason AS reason_233,
t231.outcome_one AS outcome_one_234,
t231.outcome_two AS outcome_two_235,
t231.outcome_three AS outcome_three_236,
t231.participant_engagement AS participant_engagement_237,
t231.caregiver_support AS caregiver_support_238,
t231.period_of_treatment AS period_of_treatment_239,
t231.discharge_plan AS discharge_plan_240,
t231.created_at AS created_at_241,
t231.created_by AS created_by_242,
t231.updated_at AS updated_at_243,
t231.updated_by AS updated_by_244,
t231.application_id AS application_id_245,
t0.gls_user_id AS gls_user_id_246
FROM
gls_application t0
LEFT JOIN gls_application_placement_info t38 ON t38.application_id = t0.id
LEFT JOIN gls_application_referral_agency t46 ON t46.application_id = t0.id
LEFT JOIN gls_application_funding t68 ON t68.application_id = t0.id
LEFT JOIN gls_application_education t95 ON t95.application_id = t0.id
LEFT JOIN gls_application_background t112 ON t112.application_id = t0.id
LEFT JOIN gls_application_behaviours t123 ON t123.application_id = t0.id
LEFT JOIN gls_application_trauma_exposures t145 ON t145.application_id = t0.id
LEFT JOIN gls_application_family t166 ON t166.application_id = t0.id
LEFT JOIN gls_application_legal t183 ON t183.application_id = t0.id
LEFT JOIN gls_application_medical t193 ON t193.application_id = t0.id
LEFT JOIN gls_application_medical_history t210 ON t210.application_id = t0.id
LEFT JOIN gls_application_case_planning t231 ON t231.application_id = t0.id
WHERE
t0.id = ?
SELECT t0.id AS id_1, t0.legal_last_name AS legal_last_name_2, t0.legal_first_name AS legal_first_name_3, t0.middle_name AS middle_name_4, t0.preferred_name AS preferred_name_5, t0.sex_at_birth AS sex_at_birth_6, t0.gender AS gender_7, t0.pronouns AS pronouns_8, t0.date_of_birth AS date_of_birth_9, t0.height AS height_10, t0.weight AS weight_11, t0.eye_colour AS eye_colour_12, t0.hair_colour AS hair_colour_13, t0.hair_style AS hair_style_14, t0.complexion AS complexion_15, t0.scars AS scars_16, t0.tattoos AS tattoos_17, t0.glasses AS glasses_18, t0.ethnicity AS ethnicity_19, t0.other_ethnicity AS other_ethnicity_20, t0.birthplace AS birthplace_21, t0.provincial_health_number AS provincial_health_number_22, t0.status_number AS status_number_23, t0.status_number_expiry AS status_number_expiry_24, t0.nihb_number AS nihb_number_25, t0.child_welfare_status AS child_welfare_status_26, t0.legal_status_expiry AS legal_status_expiry_27, t0.english_first_language AS english_first_language_28, t0.non_english_language AS non_english_language_29, t0.other_languages AS other_languages_30, t0.previous_referral AS previous_referral_31, t0.submitted_at AS submitted_at_32, t0.preferred_placement AS preferred_placement_33, t0.created_at AS created_at_34, t0.created_by AS created_by_35, t0.updated_at AS updated_at_36, t0.updated_by AS updated_by_37, t38.id AS id_39, t38.enrolled_in_mys AS enrolled_in_mys_40, t38.created_at AS created_at_41, t38.created_by AS created_by_42, t38.updated_at AS updated_at_43, t38.updated_by AS updated_by_44, t38.application_id AS application_id_45, t46.id AS id_47, t46.name AS name_48, t46.address AS address_49, t46.city AS city_50, t46.province AS province_51, t46.postal_code AS postal_code_52, t46.primary_contact_name AS primary_contact_name_53, t46.primary_contact_phone AS primary_contact_phone_54, t46.primary_contact_email AS primary_contact_email_55, t46.primary_contact_method AS primary_contact_method_56, t46.supervisor_name AS supervisor_name_57, t46.supervisor_phone AS supervisor_phone_58, t46.supervisor_email AS supervisor_email_59, t46.supervisor_method AS supervisor_method_60, t46.skic_supervision_applied AS skic_supervision_applied_61, t46.additional_info AS additional_info_62, t46.created_at AS created_at_63, t46.created_by AS created_by_64, t46.updated_at AS updated_at_65, t46.updated_by AS updated_by_66, t46.application_id AS application_id_67, t68.id AS id_69, t68.funding_approved AS funding_approved_70, t68.funding_explanation AS funding_explanation_71, t68.invoice_referral_agency AS invoice_referral_agency_72, t68.agency_name AS agency_name_73, t68.jordans_principle AS jordans_principle_74, t68.isc_number AS isc_number_75, t68.isc_expiry AS isc_expiry_76, t68.agency_address AS agency_address_77, t68.agency_city AS agency_city_78, t68.agency_province AS agency_province_79, t68.agency_postal_code AS agency_postal_code_80, t68.agency_email AS agency_email_81, t68.agency_phone AS agency_phone_82, t68.invoice_office AS invoice_office_83, t68.invoice_office_address AS invoice_office_address_84, t68.invoice_office_city AS invoice_office_city_85, t68.invoice_office_province AS invoice_office_province_86, t68.invoice_office_postal_code AS invoice_office_postal_code_87, t68.invoice_office_email AS invoice_office_email_88, t68.invoice_office_phone AS invoice_office_phone_89, t68.created_at AS created_at_90, t68.created_by AS created_by_91, t68.updated_at AS updated_at_92, t68.updated_by AS updated_by_93, t68.application_id AS application_id_94, t95.id AS id_96, t95.school AS school_97, t95.grade AS grade_98, t95.last_attended AS last_attended_99, t95.school_location AS school_location_100, t95.in_specialized_program AS in_specialized_program_101, t95.specialized_program_description AS specialized_program_description_102, t95.psychoeducational_assessment_completed AS psychoeducational_assessment_completed_103, t95.occupational_therapist_assessment_completed AS occupational_therapist_assessment_completed_104, t95.speech_language_assessment_completed AS speech_language_assessment_completed_105, t95.school_attitude_description AS school_attitude_description_106, t95.created_at AS created_at_107, t95.created_by AS created_by_108, t95.updated_at AS updated_at_109, t95.updated_by AS updated_by_110, t95.application_id AS application_id_111, t112.id AS id_113, t112.cultural_identity AS cultural_identity_114, t112.strengths_and_interests AS strengths_and_interests_115, t112.social_connections AS social_connections_116, t112.spiritual_connections AS spiritual_connections_117, t112.created_at AS created_at_118, t112.created_by AS created_by_119, t112.updated_at AS updated_at_120, t112.updated_by AS updated_by_121, t112.application_id AS application_id_122, t123.id AS id_124, t123.created_at AS created_at_125, t123.created_by AS created_by_126, t123.updated_at AS updated_at_127, t123.updated_by AS updated_by_128, t123.application_id AS application_id_129, t123.verbal_aggression_id AS verbal_aggression_id_130, t123.physical_aggression_id AS physical_aggression_id_131, t123.property_damage_id AS property_damage_id_132, t123.running_away_id AS running_away_id_133, t123.animal_cruelty_id AS animal_cruelty_id_134, t123.arson_id AS arson_id_135, t123.sexually_problematic_id AS sexually_problematic_id_136, t123.sexually_exploited_id AS sexually_exploited_id_137, t123.gang_involvement_id AS gang_involvement_id_138, t123.substance_use_id AS substance_use_id_139, t123.anxiety_id AS anxiety_id_140, t123.depression_id AS depression_id_141, t123.suicide_ideation_id AS suicide_ideation_id_142, t123.suicide_attempts_id AS suicide_attempts_id_143, t123.self_harm_id AS self_harm_id_144, t145.id AS id_146, t145.created_at AS created_at_147, t145.created_by AS created_by_148, t145.updated_at AS updated_at_149, t145.updated_by AS updated_by_150, t145.application_id AS application_id_151, t145.emotional_abuse_id AS emotional_abuse_id_152, t145.physical_abuse_id AS physical_abuse_id_153, t145.sexual_abuse_id AS sexual_abuse_id_154, t145.emotional_neglect_id AS emotional_neglect_id_155, t145.physical_neglect_id AS physical_neglect_id_156, t145.parental_separation_id AS parental_separation_id_157, t145.household_physical_violence_id AS household_physical_violence_id_158, t145.household_substance_abuse_id AS household_substance_abuse_id_159, t145.household_mental_illness_id AS household_mental_illness_id_160, t145.incarcerated_household_members_id AS incarcerated_household_members_id_161, t145.medical_trauma_id AS medical_trauma_id_162, t145.natural_disaster_id AS natural_disaster_id_163, t145.grief_loss_id AS grief_loss_id_164, t145.community_violence_id AS community_violence_id_165, t166.id AS id_167, t166.biological_mother_known AS biological_mother_known_168, t166.biological_father_known AS biological_father_known_169, t166.primary_caregiver_different AS primary_caregiver_different_170, t166.secondary_caregiver_different AS secondary_caregiver_different_171, t166.family_in_ranch_program AS family_in_ranch_program_172, t166.no_contact_people AS no_contact_people_173, t166.created_at AS created_at_174, t166.created_by AS created_by_175, t166.updated_at AS updated_at_176, t166.updated_by AS updated_by_177, t166.application_id AS application_id_178, t166.biological_mother_id AS biological_mother_id_179, t166.biological_father_id AS biological_father_id_180, t166.primary_caregiver_id AS primary_caregiver_id_181, t166.secondary_caregiver_id AS secondary_caregiver_id_182, t183.id AS id_184, t183.involved_illegal AS involved_illegal_185, t183.has_charges AS has_charges_186, t183.illegal_details AS illegal_details_187, t183.created_at AS created_at_188, t183.created_by AS created_by_189, t183.updated_at AS updated_at_190, t183.updated_by AS updated_by_191, t183.application_id AS application_id_192, t193.id AS id_194, t193.has_physician AS has_physician_195, t193.has_dentist AS has_dentist_196, t193.has_optometrist AS has_optometrist_197, t193.has_psychiatrist AS has_psychiatrist_198, t193.has_other AS has_other_199, t193.created_at AS created_at_200, t193.created_by AS created_by_201, t193.updated_at AS updated_at_202, t193.updated_by AS updated_by_203, t193.application_id AS application_id_204, t193.physician_id AS physician_id_205, t193.dentist_id AS dentist_id_206, t193.optometrist_id AS optometrist_id_207, t193.psychiatrist_id AS psychiatrist_id_208, t193.other_id AS other_id_209, t210.id AS id_211, t210.mental_health_disorders AS mental_health_disorders_212, t210.medical_conditions AS medical_conditions_213, t210.paranoia_hallucinations AS paranoia_hallucinations_214, t210.allergies AS allergies_215, t210.dental_optical_concerns AS dental_optical_concerns_216, t210.learning_disabilities AS learning_disabilities_217, t210.eating_sleeping_concerns AS eating_sleeping_concerns_218, t210.recent_hospitalizations AS recent_hospitalizations_219, t210.communication_mobility_needs AS communication_mobility_needs_220, t210.adaptive_functioning AS adaptive_functioning_221, t210.immunizations AS immunizations_222, t210.diagnosed_intellectual_disability AS diagnosed_intellectual_disability_223, t210.intellectual_disability_assessment_date AS intellectual_disability_assessment_date_224, t210.intellectual_disability_diagnosis AS intellectual_disability_diagnosis_225, t210.created_at AS created_at_226, t210.created_by AS created_by_227, t210.updated_at AS updated_at_228, t210.updated_by AS updated_by_229, t210.application_id AS application_id_230, t231.id AS id_232, t231.reason AS reason_233, t231.outcome_one AS outcome_one_234, t231.outcome_two AS outcome_two_235, t231.outcome_three AS outcome_three_236, t231.participant_engagement AS participant_engagement_237, t231.caregiver_support AS caregiver_support_238, t231.period_of_treatment AS period_of_treatment_239, t231.discharge_plan AS discharge_plan_240, t231.created_at AS created_at_241, t231.created_by AS created_by_242, t231.updated_at AS updated_at_243, t231.updated_by AS updated_by_244, t231.application_id AS application_id_245, t0.gls_user_id AS gls_user_id_246 FROM gls_application t0 LEFT JOIN gls_application_placement_info t38 ON t38.application_id = t0.id LEFT JOIN gls_application_referral_agency t46 ON t46.application_id = t0.id LEFT JOIN gls_application_funding t68 ON t68.application_id = t0.id LEFT JOIN gls_application_education t95 ON t95.application_id = t0.id LEFT JOIN gls_application_background t112 ON t112.application_id = t0.id LEFT JOIN gls_application_behaviours t123 ON t123.application_id = t0.id LEFT JOIN gls_application_trauma_exposures t145 ON t145.application_id = t0.id LEFT JOIN gls_application_family t166 ON t166.application_id = t0.id LEFT JOIN gls_application_legal t183 ON t183.application_id = t0.id LEFT JOIN gls_application_medical t193 ON t193.application_id = t0.id LEFT JOIN gls_application_medical_history t210 ON t210.application_id = t0.id LEFT JOIN gls_application_case_planning t231 ON t231.application_id = t0.id WHERE t0.id = '2';
|