| 2 |
702.26 ms |
SELECT t0.id AS id_1, t0.name AS name_2, t0.sub_domain AS sub_domain_3, t0.organisation_id AS organisation_id_4, t0.smscredit AS smscredit_5, t0.ai_token_credit AS ai_token_credit_6, t0.last_daily_token_date AS last_daily_token_date_7, t0.ai_seconds_credit AS ai_seconds_credit_8, t0.daily_ai_token_credit AS daily_ai_token_credit_9, t0.booking_btn_name AS booking_btn_name_10, t0.booking_btn_clr AS booking_btn_clr_11, t0.booking_btn_bg_clr AS booking_btn_bg_clr_12, t0.inner_color AS inner_color_13, t0.outer_color AS outer_color_14, t0.background_img AS background_img_15, t0.profile_img AS profile_img_16, t0.meeting_price AS meeting_price_17, t0.meeting_price_type AS meeting_price_type_18, t0.show_in_public_profile AS show_in_public_profile_19, t0.patient_ref_prefix AS patient_ref_prefix_20, t0.email AS email_21, t0.verified_email AS verified_email_22, t0.web_site AS web_site_23, t0.phone AS phone_24, t0.contact_name AS contact_name_25, t0.description AS description_26, t0.widget_settings AS widget_settings_27, t0.sms_number AS sms_number_28, t0.sms_status AS sms_status_29, t0.timezone AS timezone_30, t0.reminder_header AS reminder_header_31, t0.reminder_footer AS reminder_footer_32, t0.reminder_recall_text AS reminder_recall_text_33, t0.google_token AS google_token_34, t0.google_id AS google_id_35, t0.topic_arn AS topic_arn_36, t0.pm_pin AS pm_pin_37, t0.auto_email_reply_address AS auto_email_reply_address_38, t0.pm_patient_message AS pm_patient_message_39, t0.pm_clinic_intro AS pm_clinic_intro_40, t0.auto_renew_subscription AS auto_renew_subscription_41, t0.subscription_expiry AS subscription_expiry_42, t0.email_reminder AS email_reminder_43, t0.email_new AS email_new_44, t0.sms_new AS sms_new_45, t0.sms_reminder AS sms_reminder_46, t0.when_answered_hide_where_did_you_hear_about_us AS when_answered_hide_where_did_you_hear_about_us_47, t0.calendar_start_day AS calendar_start_day_48, t0.calendar_end_day AS calendar_end_day_49, t0.appointment_default_time AS appointment_default_time_50, t0.appointment_slot_duration AS appointment_slot_duration_51, t0.appointment_default_view AS appointment_default_view_52, t0.private_mode_calendar AS private_mode_calendar_53, t0.clinic_representative AS clinic_representative_54, t0.data_protection_officer AS data_protection_officer_55, t0.company_registration_number AS company_registration_number_56, t0.email_to_withdraw AS email_to_withdraw_57, t0.period_stored_data AS period_stored_data_58, t0.survey_email_text AS survey_email_text_59, t0.post_apt_form_email_text AS post_apt_form_email_text_60, t0.export_in_progress AS export_in_progress_61, t0.vat_number AS vat_number_62, t0.enabled_vat AS enabled_vat_63, t0.patient_list_display_pair AS patient_list_display_pair_64, t0.stripe_refresh_token AS stripe_refresh_token_65, t0.stripe_publishable_key AS stripe_publishable_key_66, t0.stripe_account_id AS stripe_account_id_67, t0.shared_all_patients AS shared_all_patients_68, t0.currency AS currency_69, t0.patient_info_to_document_header AS patient_info_to_document_header_70, t0.t_and_c AS t_and_c_71, t0.declaration AS declaration_72, t0.treatment_plan_tand_c AS treatment_plan_tand_c_73, t0.traffic_light AS traffic_light_74, t0.booking_required_fields AS booking_required_fields_75, t0.double_booking AS double_booking_76, t0.required_confirmation AS required_confirmation_77, t0.fixed_discount_amount AS fixed_discount_amount_78, t0.required_questionnaires AS required_questionnaires_79, t0.patient_required_fields AS patient_required_fields_80, t0.prospect_required_fields AS prospect_required_fields_81, t0.enabled_postcode AS enabled_postcode_82, t0.enabled_chronoscan AS enabled_chronoscan_83, t0.postcode_api_key AS postcode_api_key_84, t0.enabled_prospect_web_form AS enabled_prospect_web_form_85, t0.payment_sense AS payment_sense_86, t0.xero_tenant_id AS xero_tenant_id_87, t0.reduce_stock AS reduce_stock_88, t0.patient_questionnaire AS patient_questionnaire_89, t0.xero_bank_account AS xero_bank_account_90, t0.is_new_clinic AS is_new_clinic_91, t0.marketing_expert AS marketing_expert_92, t0.clinic_survey_email_text AS clinic_survey_email_text_93, t0.trial_end_date AS trial_end_date_94, t0.shared_patient_date AS shared_patient_date_95, t0.feature_custom_website_amount AS feature_custom_website_amount_96, t0.feature_ad_amount AS feature_ad_amount_97, t0.feature_message_amount AS feature_message_amount_98, t0.feature_template_amount AS feature_template_amount_99, t0.is_template_user_only AS is_template_user_only_100, t0.new_user AS new_user_101, t0.template_subscription_end_date AS template_subscription_end_date_102, t0.onboarding_status AS onboarding_status_103, t0.patient_portal_settings AS patient_portal_settings_104, t0.address1 AS address1_105, t0.address2 AS address2_106, t0.town AS town_107, t0.state AS state_108, t0.country AS country_109, t0.postcode AS postcode_110, t0.created_at AS created_at_111, t0.updated_at AS updated_at_112, t0.logo_id AS logo_id_113, t114.id AS id_115, t114.s3key AS s3key_116, t114.name_file AS name_file_117, t114.url AS url_118, t114.type AS type_119, t114.created_at AS created_at_120, t114.updated_at AS updated_at_121, t0.background_id AS background_id_122, t123.id AS id_124, t123.s3key AS s3key_125, t123.name_file AS name_file_126, t123.url AS url_127, t123.type AS type_128, t123.created_at AS created_at_129, t123.updated_at AS updated_at_130, t131.id AS id_132, t131.creditor AS creditor_133, t131.mandate AS mandate_134, t131.customer AS customer_135, t131.customer_bank_account AS customer_bank_account_136, t131.created_at AS created_at_137, t131.updated_at AS updated_at_138, t131.clinic_id AS clinic_id_139, t140.id AS id_141, t140.sid AS sid_142, t140.token AS token_143, t140.number_from AS number_from_144, t140.clinic_id AS clinic_id_145, t0.organisation_id AS organisation_id_146, t147.id AS id_148, t147.enabled AS enabled_149, t147.time_required_for_booking AS time_required_for_booking_150, t147.time_required_for_cancellation AS time_required_for_cancellation_151, t147.take_payment_for_new_patients AS take_payment_for_new_patients_152, t147.take_payment_for_existing_patients AS take_payment_for_existing_patients_153, t147.type AS type_154, t147.hide_full_price AS hide_full_price_155, t147.terms AS terms_156, t147.clinic_id AS clinic_id_157, t158.id AS id_159, t158.server AS server_160, t158.file_location AS file_location_161, t158.username AS username_162, t158.password AS password_163, t158.email AS email_164, t158.clinic_id AS clinic_id_165, t166.id AS id_167, t166.theme AS theme_168, t166.max_embed_width AS max_embed_width_169, t166.primary_interface_colour AS primary_interface_colour_170, t166.secondary_interface_colour AS secondary_interface_colour_171, t166.primary_font_colour AS primary_font_colour_172, t166.secondary_font_colour AS secondary_font_colour_173, t166.background_colour AS background_colour_174, t166.widget_hash AS widget_hash_175, t166.created_at AS created_at_176, t166.updated_at AS updated_at_177, t166.clinic_id AS clinic_id_178, t166.custom_css_id AS custom_css_id_179, t180.id AS id_181, t180.confirmation_text AS confirmation_text_182, t180.treatment_info AS treatment_info_183, t180.clinic_id AS clinic_id_184, t185.id AS id_186, t185.api_key AS api_key_187, t185.list_id AS list_id_188, t185.sync AS sync_189, t185.sync_date AS sync_date_190, t185.pro AS pro_191, t185.created_at AS created_at_192, t185.updated_at AS updated_at_193, t185.clinic_id AS clinic_id_194, t0.promo_code_id AS promo_code_id_195, t0.price_tier_id AS price_tier_id_196, t0.xero_sync_job_id AS xero_sync_job_id_197 FROM clinics t0 LEFT JOIN media t114 ON t0.logo_id = t114.id LEFT JOIN media t123 ON t0.background_id = t123.id LEFT JOIN gocardless_customer t131 ON t131.clinic_id = t0.id LEFT JOIN twilio t140 ON t140.clinic_id = t0.id LEFT JOIN setting_online_booking t147 ON t147.clinic_id = t0.id LEFT JOIN setting_chronoscan t158 ON t158.clinic_id = t0.id LEFT JOIN widget_online_booking t166 ON t166.clinic_id = t0.id LEFT JOIN email_setting_online_booking t180 ON t180.clinic_id = t0.id LEFT JOIN mail_chimp_config t185 ON t185.clinic_id = t0.id WHERE t0.patient_ref_prefix = ? LIMIT 1
SELECT
t0.id AS id_1,
t0.name AS name_2,
t0.sub_domain AS sub_domain_3,
t0.organisation_id AS organisation_id_4,
t0.smscredit AS smscredit_5,
t0.ai_token_credit AS ai_token_credit_6,
t0.last_daily_token_date AS last_daily_token_date_7,
t0.ai_seconds_credit AS ai_seconds_credit_8,
t0.daily_ai_token_credit AS daily_ai_token_credit_9,
t0.booking_btn_name AS booking_btn_name_10,
t0.booking_btn_clr AS booking_btn_clr_11,
t0.booking_btn_bg_clr AS booking_btn_bg_clr_12,
t0.inner_color AS inner_color_13,
t0.outer_color AS outer_color_14,
t0.background_img AS background_img_15,
t0.profile_img AS profile_img_16,
t0.meeting_price AS meeting_price_17,
t0.meeting_price_type AS meeting_price_type_18,
t0.show_in_public_profile AS show_in_public_profile_19,
t0.patient_ref_prefix AS patient_ref_prefix_20,
t0.email AS email_21,
t0.verified_email AS verified_email_22,
t0.web_site AS web_site_23,
t0.phone AS phone_24,
t0.contact_name AS contact_name_25,
t0.description AS description_26,
t0.widget_settings AS widget_settings_27,
t0.sms_number AS sms_number_28,
t0.sms_status AS sms_status_29,
t0.timezone AS timezone_30,
t0.reminder_header AS reminder_header_31,
t0.reminder_footer AS reminder_footer_32,
t0.reminder_recall_text AS reminder_recall_text_33,
t0.google_token AS google_token_34,
t0.google_id AS google_id_35,
t0.topic_arn AS topic_arn_36,
t0.pm_pin AS pm_pin_37,
t0.auto_email_reply_address AS auto_email_reply_address_38,
t0.pm_patient_message AS pm_patient_message_39,
t0.pm_clinic_intro AS pm_clinic_intro_40,
t0.auto_renew_subscription AS auto_renew_subscription_41,
t0.subscription_expiry AS subscription_expiry_42,
t0.email_reminder AS email_reminder_43,
t0.email_new AS email_new_44,
t0.sms_new AS sms_new_45,
t0.sms_reminder AS sms_reminder_46,
t0.when_answered_hide_where_did_you_hear_about_us AS when_answered_hide_where_did_you_hear_about_us_47,
t0.calendar_start_day AS calendar_start_day_48,
t0.calendar_end_day AS calendar_end_day_49,
t0.appointment_default_time AS appointment_default_time_50,
t0.appointment_slot_duration AS appointment_slot_duration_51,
t0.appointment_default_view AS appointment_default_view_52,
t0.private_mode_calendar AS private_mode_calendar_53,
t0.clinic_representative AS clinic_representative_54,
t0.data_protection_officer AS data_protection_officer_55,
t0.company_registration_number AS company_registration_number_56,
t0.email_to_withdraw AS email_to_withdraw_57,
t0.period_stored_data AS period_stored_data_58,
t0.survey_email_text AS survey_email_text_59,
t0.post_apt_form_email_text AS post_apt_form_email_text_60,
t0.export_in_progress AS export_in_progress_61,
t0.vat_number AS vat_number_62,
t0.enabled_vat AS enabled_vat_63,
t0.patient_list_display_pair AS patient_list_display_pair_64,
t0.stripe_refresh_token AS stripe_refresh_token_65,
t0.stripe_publishable_key AS stripe_publishable_key_66,
t0.stripe_account_id AS stripe_account_id_67,
t0.shared_all_patients AS shared_all_patients_68,
t0.currency AS currency_69,
t0.patient_info_to_document_header AS patient_info_to_document_header_70,
t0.t_and_c AS t_and_c_71,
t0.declaration AS declaration_72,
t0.treatment_plan_tand_c AS treatment_plan_tand_c_73,
t0.traffic_light AS traffic_light_74,
t0.booking_required_fields AS booking_required_fields_75,
t0.double_booking AS double_booking_76,
t0.required_confirmation AS required_confirmation_77,
t0.fixed_discount_amount AS fixed_discount_amount_78,
t0.required_questionnaires AS required_questionnaires_79,
t0.patient_required_fields AS patient_required_fields_80,
t0.prospect_required_fields AS prospect_required_fields_81,
t0.enabled_postcode AS enabled_postcode_82,
t0.enabled_chronoscan AS enabled_chronoscan_83,
t0.postcode_api_key AS postcode_api_key_84,
t0.enabled_prospect_web_form AS enabled_prospect_web_form_85,
t0.payment_sense AS payment_sense_86,
t0.xero_tenant_id AS xero_tenant_id_87,
t0.reduce_stock AS reduce_stock_88,
t0.patient_questionnaire AS patient_questionnaire_89,
t0.xero_bank_account AS xero_bank_account_90,
t0.is_new_clinic AS is_new_clinic_91,
t0.marketing_expert AS marketing_expert_92,
t0.clinic_survey_email_text AS clinic_survey_email_text_93,
t0.trial_end_date AS trial_end_date_94,
t0.shared_patient_date AS shared_patient_date_95,
t0.feature_custom_website_amount AS feature_custom_website_amount_96,
t0.feature_ad_amount AS feature_ad_amount_97,
t0.feature_message_amount AS feature_message_amount_98,
t0.feature_template_amount AS feature_template_amount_99,
t0.is_template_user_only AS is_template_user_only_100,
t0.new_user AS new_user_101,
t0.template_subscription_end_date AS template_subscription_end_date_102,
t0.onboarding_status AS onboarding_status_103,
t0.patient_portal_settings AS patient_portal_settings_104,
t0.address1 AS address1_105,
t0.address2 AS address2_106,
t0.town AS town_107,
t0.state AS state_108,
t0.country AS country_109,
t0.postcode AS postcode_110,
t0.created_at AS created_at_111,
t0.updated_at AS updated_at_112,
t0.logo_id AS logo_id_113,
t114.id AS id_115,
t114.s3key AS s3key_116,
t114.name_file AS name_file_117,
t114.url AS url_118,
t114.type AS type_119,
t114.created_at AS created_at_120,
t114.updated_at AS updated_at_121,
t0.background_id AS background_id_122,
t123.id AS id_124,
t123.s3key AS s3key_125,
t123.name_file AS name_file_126,
t123.url AS url_127,
t123.type AS type_128,
t123.created_at AS created_at_129,
t123.updated_at AS updated_at_130,
t131.id AS id_132,
t131.creditor AS creditor_133,
t131.mandate AS mandate_134,
t131.customer AS customer_135,
t131.customer_bank_account AS customer_bank_account_136,
t131.created_at AS created_at_137,
t131.updated_at AS updated_at_138,
t131.clinic_id AS clinic_id_139,
t140.id AS id_141,
t140.sid AS sid_142,
t140.token AS token_143,
t140.number_from AS number_from_144,
t140.clinic_id AS clinic_id_145,
t0.organisation_id AS organisation_id_146,
t147.id AS id_148,
t147.enabled AS enabled_149,
t147.time_required_for_booking AS time_required_for_booking_150,
t147.time_required_for_cancellation AS time_required_for_cancellation_151,
t147.take_payment_for_new_patients AS take_payment_for_new_patients_152,
t147.take_payment_for_existing_patients AS take_payment_for_existing_patients_153,
t147.type AS type_154,
t147.hide_full_price AS hide_full_price_155,
t147.terms AS terms_156,
t147.clinic_id AS clinic_id_157,
t158.id AS id_159,
t158.server AS server_160,
t158.file_location AS file_location_161,
t158.username AS username_162,
t158.password AS password_163,
t158.email AS email_164,
t158.clinic_id AS clinic_id_165,
t166.id AS id_167,
t166.theme AS theme_168,
t166.max_embed_width AS max_embed_width_169,
t166.primary_interface_colour AS primary_interface_colour_170,
t166.secondary_interface_colour AS secondary_interface_colour_171,
t166.primary_font_colour AS primary_font_colour_172,
t166.secondary_font_colour AS secondary_font_colour_173,
t166.background_colour AS background_colour_174,
t166.widget_hash AS widget_hash_175,
t166.created_at AS created_at_176,
t166.updated_at AS updated_at_177,
t166.clinic_id AS clinic_id_178,
t166.custom_css_id AS custom_css_id_179,
t180.id AS id_181,
t180.confirmation_text AS confirmation_text_182,
t180.treatment_info AS treatment_info_183,
t180.clinic_id AS clinic_id_184,
t185.id AS id_186,
t185.api_key AS api_key_187,
t185.list_id AS list_id_188,
t185.sync AS sync_189,
t185.sync_date AS sync_date_190,
t185.pro AS pro_191,
t185.created_at AS created_at_192,
t185.updated_at AS updated_at_193,
t185.clinic_id AS clinic_id_194,
t0.promo_code_id AS promo_code_id_195,
t0.price_tier_id AS price_tier_id_196,
t0.xero_sync_job_id AS xero_sync_job_id_197
FROM
clinics t0
LEFT JOIN media t114 ON t0.logo_id = t114.id
LEFT JOIN media t123 ON t0.background_id = t123.id
LEFT JOIN gocardless_customer t131 ON t131.clinic_id = t0.id
LEFT JOIN twilio t140 ON t140.clinic_id = t0.id
LEFT JOIN setting_online_booking t147 ON t147.clinic_id = t0.id
LEFT JOIN setting_chronoscan t158 ON t158.clinic_id = t0.id
LEFT JOIN widget_online_booking t166 ON t166.clinic_id = t0.id
LEFT JOIN email_setting_online_booking t180 ON t180.clinic_id = t0.id
LEFT JOIN mail_chimp_config t185 ON t185.clinic_id = t0.id
WHERE
t0.patient_ref_prefix = ?
LIMIT
1
SELECT t0.id AS id_1, t0.name AS name_2, t0.sub_domain AS sub_domain_3, t0.organisation_id AS organisation_id_4, t0.smscredit AS smscredit_5, t0.ai_token_credit AS ai_token_credit_6, t0.last_daily_token_date AS last_daily_token_date_7, t0.ai_seconds_credit AS ai_seconds_credit_8, t0.daily_ai_token_credit AS daily_ai_token_credit_9, t0.booking_btn_name AS booking_btn_name_10, t0.booking_btn_clr AS booking_btn_clr_11, t0.booking_btn_bg_clr AS booking_btn_bg_clr_12, t0.inner_color AS inner_color_13, t0.outer_color AS outer_color_14, t0.background_img AS background_img_15, t0.profile_img AS profile_img_16, t0.meeting_price AS meeting_price_17, t0.meeting_price_type AS meeting_price_type_18, t0.show_in_public_profile AS show_in_public_profile_19, t0.patient_ref_prefix AS patient_ref_prefix_20, t0.email AS email_21, t0.verified_email AS verified_email_22, t0.web_site AS web_site_23, t0.phone AS phone_24, t0.contact_name AS contact_name_25, t0.description AS description_26, t0.widget_settings AS widget_settings_27, t0.sms_number AS sms_number_28, t0.sms_status AS sms_status_29, t0.timezone AS timezone_30, t0.reminder_header AS reminder_header_31, t0.reminder_footer AS reminder_footer_32, t0.reminder_recall_text AS reminder_recall_text_33, t0.google_token AS google_token_34, t0.google_id AS google_id_35, t0.topic_arn AS topic_arn_36, t0.pm_pin AS pm_pin_37, t0.auto_email_reply_address AS auto_email_reply_address_38, t0.pm_patient_message AS pm_patient_message_39, t0.pm_clinic_intro AS pm_clinic_intro_40, t0.auto_renew_subscription AS auto_renew_subscription_41, t0.subscription_expiry AS subscription_expiry_42, t0.email_reminder AS email_reminder_43, t0.email_new AS email_new_44, t0.sms_new AS sms_new_45, t0.sms_reminder AS sms_reminder_46, t0.when_answered_hide_where_did_you_hear_about_us AS when_answered_hide_where_did_you_hear_about_us_47, t0.calendar_start_day AS calendar_start_day_48, t0.calendar_end_day AS calendar_end_day_49, t0.appointment_default_time AS appointment_default_time_50, t0.appointment_slot_duration AS appointment_slot_duration_51, t0.appointment_default_view AS appointment_default_view_52, t0.private_mode_calendar AS private_mode_calendar_53, t0.clinic_representative AS clinic_representative_54, t0.data_protection_officer AS data_protection_officer_55, t0.company_registration_number AS company_registration_number_56, t0.email_to_withdraw AS email_to_withdraw_57, t0.period_stored_data AS period_stored_data_58, t0.survey_email_text AS survey_email_text_59, t0.post_apt_form_email_text AS post_apt_form_email_text_60, t0.export_in_progress AS export_in_progress_61, t0.vat_number AS vat_number_62, t0.enabled_vat AS enabled_vat_63, t0.patient_list_display_pair AS patient_list_display_pair_64, t0.stripe_refresh_token AS stripe_refresh_token_65, t0.stripe_publishable_key AS stripe_publishable_key_66, t0.stripe_account_id AS stripe_account_id_67, t0.shared_all_patients AS shared_all_patients_68, t0.currency AS currency_69, t0.patient_info_to_document_header AS patient_info_to_document_header_70, t0.t_and_c AS t_and_c_71, t0.declaration AS declaration_72, t0.treatment_plan_tand_c AS treatment_plan_tand_c_73, t0.traffic_light AS traffic_light_74, t0.booking_required_fields AS booking_required_fields_75, t0.double_booking AS double_booking_76, t0.required_confirmation AS required_confirmation_77, t0.fixed_discount_amount AS fixed_discount_amount_78, t0.required_questionnaires AS required_questionnaires_79, t0.patient_required_fields AS patient_required_fields_80, t0.prospect_required_fields AS prospect_required_fields_81, t0.enabled_postcode AS enabled_postcode_82, t0.enabled_chronoscan AS enabled_chronoscan_83, t0.postcode_api_key AS postcode_api_key_84, t0.enabled_prospect_web_form AS enabled_prospect_web_form_85, t0.payment_sense AS payment_sense_86, t0.xero_tenant_id AS xero_tenant_id_87, t0.reduce_stock AS reduce_stock_88, t0.patient_questionnaire AS patient_questionnaire_89, t0.xero_bank_account AS xero_bank_account_90, t0.is_new_clinic AS is_new_clinic_91, t0.marketing_expert AS marketing_expert_92, t0.clinic_survey_email_text AS clinic_survey_email_text_93, t0.trial_end_date AS trial_end_date_94, t0.shared_patient_date AS shared_patient_date_95, t0.feature_custom_website_amount AS feature_custom_website_amount_96, t0.feature_ad_amount AS feature_ad_amount_97, t0.feature_message_amount AS feature_message_amount_98, t0.feature_template_amount AS feature_template_amount_99, t0.is_template_user_only AS is_template_user_only_100, t0.new_user AS new_user_101, t0.template_subscription_end_date AS template_subscription_end_date_102, t0.onboarding_status AS onboarding_status_103, t0.patient_portal_settings AS patient_portal_settings_104, t0.address1 AS address1_105, t0.address2 AS address2_106, t0.town AS town_107, t0.state AS state_108, t0.country AS country_109, t0.postcode AS postcode_110, t0.created_at AS created_at_111, t0.updated_at AS updated_at_112, t0.logo_id AS logo_id_113, t114.id AS id_115, t114.s3key AS s3key_116, t114.name_file AS name_file_117, t114.url AS url_118, t114.type AS type_119, t114.created_at AS created_at_120, t114.updated_at AS updated_at_121, t0.background_id AS background_id_122, t123.id AS id_124, t123.s3key AS s3key_125, t123.name_file AS name_file_126, t123.url AS url_127, t123.type AS type_128, t123.created_at AS created_at_129, t123.updated_at AS updated_at_130, t131.id AS id_132, t131.creditor AS creditor_133, t131.mandate AS mandate_134, t131.customer AS customer_135, t131.customer_bank_account AS customer_bank_account_136, t131.created_at AS created_at_137, t131.updated_at AS updated_at_138, t131.clinic_id AS clinic_id_139, t140.id AS id_141, t140.sid AS sid_142, t140.token AS token_143, t140.number_from AS number_from_144, t140.clinic_id AS clinic_id_145, t0.organisation_id AS organisation_id_146, t147.id AS id_148, t147.enabled AS enabled_149, t147.time_required_for_booking AS time_required_for_booking_150, t147.time_required_for_cancellation AS time_required_for_cancellation_151, t147.take_payment_for_new_patients AS take_payment_for_new_patients_152, t147.take_payment_for_existing_patients AS take_payment_for_existing_patients_153, t147.type AS type_154, t147.hide_full_price AS hide_full_price_155, t147.terms AS terms_156, t147.clinic_id AS clinic_id_157, t158.id AS id_159, t158.server AS server_160, t158.file_location AS file_location_161, t158.username AS username_162, t158.password AS password_163, t158.email AS email_164, t158.clinic_id AS clinic_id_165, t166.id AS id_167, t166.theme AS theme_168, t166.max_embed_width AS max_embed_width_169, t166.primary_interface_colour AS primary_interface_colour_170, t166.secondary_interface_colour AS secondary_interface_colour_171, t166.primary_font_colour AS primary_font_colour_172, t166.secondary_font_colour AS secondary_font_colour_173, t166.background_colour AS background_colour_174, t166.widget_hash AS widget_hash_175, t166.created_at AS created_at_176, t166.updated_at AS updated_at_177, t166.clinic_id AS clinic_id_178, t166.custom_css_id AS custom_css_id_179, t180.id AS id_181, t180.confirmation_text AS confirmation_text_182, t180.treatment_info AS treatment_info_183, t180.clinic_id AS clinic_id_184, t185.id AS id_186, t185.api_key AS api_key_187, t185.list_id AS list_id_188, t185.sync AS sync_189, t185.sync_date AS sync_date_190, t185.pro AS pro_191, t185.created_at AS created_at_192, t185.updated_at AS updated_at_193, t185.clinic_id AS clinic_id_194, t0.promo_code_id AS promo_code_id_195, t0.price_tier_id AS price_tier_id_196, t0.xero_sync_job_id AS xero_sync_job_id_197 FROM clinics t0 LEFT JOIN media t114 ON t0.logo_id = t114.id LEFT JOIN media t123 ON t0.background_id = t123.id LEFT JOIN gocardless_customer t131 ON t131.clinic_id = t0.id LEFT JOIN twilio t140 ON t140.clinic_id = t0.id LEFT JOIN setting_online_booking t147 ON t147.clinic_id = t0.id LEFT JOIN setting_chronoscan t158 ON t158.clinic_id = t0.id LEFT JOIN widget_online_booking t166 ON t166.clinic_id = t0.id LEFT JOIN email_setting_online_booking t180 ON t180.clinic_id = t0.id LEFT JOIN mail_chimp_config t185 ON t185.clinic_id = t0.id WHERE t0.patient_ref_prefix = 'TMJ' LIMIT 1;
|
| 3 |
0.63 ms |
SELECT t0.id AS id_1, t0.name AS name_2, t0.sub_domain AS sub_domain_3, t0.organisation_id AS organisation_id_4, t0.smscredit AS smscredit_5, t0.ai_token_credit AS ai_token_credit_6, t0.last_daily_token_date AS last_daily_token_date_7, t0.ai_seconds_credit AS ai_seconds_credit_8, t0.daily_ai_token_credit AS daily_ai_token_credit_9, t0.booking_btn_name AS booking_btn_name_10, t0.booking_btn_clr AS booking_btn_clr_11, t0.booking_btn_bg_clr AS booking_btn_bg_clr_12, t0.inner_color AS inner_color_13, t0.outer_color AS outer_color_14, t0.background_img AS background_img_15, t0.profile_img AS profile_img_16, t0.meeting_price AS meeting_price_17, t0.meeting_price_type AS meeting_price_type_18, t0.show_in_public_profile AS show_in_public_profile_19, t0.patient_ref_prefix AS patient_ref_prefix_20, t0.email AS email_21, t0.verified_email AS verified_email_22, t0.web_site AS web_site_23, t0.phone AS phone_24, t0.contact_name AS contact_name_25, t0.description AS description_26, t0.widget_settings AS widget_settings_27, t0.sms_number AS sms_number_28, t0.sms_status AS sms_status_29, t0.timezone AS timezone_30, t0.reminder_header AS reminder_header_31, t0.reminder_footer AS reminder_footer_32, t0.reminder_recall_text AS reminder_recall_text_33, t0.google_token AS google_token_34, t0.google_id AS google_id_35, t0.topic_arn AS topic_arn_36, t0.pm_pin AS pm_pin_37, t0.auto_email_reply_address AS auto_email_reply_address_38, t0.pm_patient_message AS pm_patient_message_39, t0.pm_clinic_intro AS pm_clinic_intro_40, t0.auto_renew_subscription AS auto_renew_subscription_41, t0.subscription_expiry AS subscription_expiry_42, t0.email_reminder AS email_reminder_43, t0.email_new AS email_new_44, t0.sms_new AS sms_new_45, t0.sms_reminder AS sms_reminder_46, t0.when_answered_hide_where_did_you_hear_about_us AS when_answered_hide_where_did_you_hear_about_us_47, t0.calendar_start_day AS calendar_start_day_48, t0.calendar_end_day AS calendar_end_day_49, t0.appointment_default_time AS appointment_default_time_50, t0.appointment_slot_duration AS appointment_slot_duration_51, t0.appointment_default_view AS appointment_default_view_52, t0.private_mode_calendar AS private_mode_calendar_53, t0.clinic_representative AS clinic_representative_54, t0.data_protection_officer AS data_protection_officer_55, t0.company_registration_number AS company_registration_number_56, t0.email_to_withdraw AS email_to_withdraw_57, t0.period_stored_data AS period_stored_data_58, t0.survey_email_text AS survey_email_text_59, t0.post_apt_form_email_text AS post_apt_form_email_text_60, t0.export_in_progress AS export_in_progress_61, t0.vat_number AS vat_number_62, t0.enabled_vat AS enabled_vat_63, t0.patient_list_display_pair AS patient_list_display_pair_64, t0.stripe_refresh_token AS stripe_refresh_token_65, t0.stripe_publishable_key AS stripe_publishable_key_66, t0.stripe_account_id AS stripe_account_id_67, t0.shared_all_patients AS shared_all_patients_68, t0.currency AS currency_69, t0.patient_info_to_document_header AS patient_info_to_document_header_70, t0.t_and_c AS t_and_c_71, t0.declaration AS declaration_72, t0.treatment_plan_tand_c AS treatment_plan_tand_c_73, t0.traffic_light AS traffic_light_74, t0.booking_required_fields AS booking_required_fields_75, t0.double_booking AS double_booking_76, t0.required_confirmation AS required_confirmation_77, t0.fixed_discount_amount AS fixed_discount_amount_78, t0.required_questionnaires AS required_questionnaires_79, t0.patient_required_fields AS patient_required_fields_80, t0.prospect_required_fields AS prospect_required_fields_81, t0.enabled_postcode AS enabled_postcode_82, t0.enabled_chronoscan AS enabled_chronoscan_83, t0.postcode_api_key AS postcode_api_key_84, t0.enabled_prospect_web_form AS enabled_prospect_web_form_85, t0.payment_sense AS payment_sense_86, t0.xero_tenant_id AS xero_tenant_id_87, t0.reduce_stock AS reduce_stock_88, t0.patient_questionnaire AS patient_questionnaire_89, t0.xero_bank_account AS xero_bank_account_90, t0.is_new_clinic AS is_new_clinic_91, t0.marketing_expert AS marketing_expert_92, t0.clinic_survey_email_text AS clinic_survey_email_text_93, t0.trial_end_date AS trial_end_date_94, t0.shared_patient_date AS shared_patient_date_95, t0.feature_custom_website_amount AS feature_custom_website_amount_96, t0.feature_ad_amount AS feature_ad_amount_97, t0.feature_message_amount AS feature_message_amount_98, t0.feature_template_amount AS feature_template_amount_99, t0.is_template_user_only AS is_template_user_only_100, t0.new_user AS new_user_101, t0.template_subscription_end_date AS template_subscription_end_date_102, t0.onboarding_status AS onboarding_status_103, t0.patient_portal_settings AS patient_portal_settings_104, t0.address1 AS address1_105, t0.address2 AS address2_106, t0.town AS town_107, t0.state AS state_108, t0.country AS country_109, t0.postcode AS postcode_110, t0.created_at AS created_at_111, t0.updated_at AS updated_at_112, t0.logo_id AS logo_id_113, t114.id AS id_115, t114.s3key AS s3key_116, t114.name_file AS name_file_117, t114.url AS url_118, t114.type AS type_119, t114.created_at AS created_at_120, t114.updated_at AS updated_at_121, t0.background_id AS background_id_122, t123.id AS id_124, t123.s3key AS s3key_125, t123.name_file AS name_file_126, t123.url AS url_127, t123.type AS type_128, t123.created_at AS created_at_129, t123.updated_at AS updated_at_130, t131.id AS id_132, t131.creditor AS creditor_133, t131.mandate AS mandate_134, t131.customer AS customer_135, t131.customer_bank_account AS customer_bank_account_136, t131.created_at AS created_at_137, t131.updated_at AS updated_at_138, t131.clinic_id AS clinic_id_139, t140.id AS id_141, t140.sid AS sid_142, t140.token AS token_143, t140.number_from AS number_from_144, t140.clinic_id AS clinic_id_145, t0.organisation_id AS organisation_id_146, t147.id AS id_148, t147.enabled AS enabled_149, t147.time_required_for_booking AS time_required_for_booking_150, t147.time_required_for_cancellation AS time_required_for_cancellation_151, t147.take_payment_for_new_patients AS take_payment_for_new_patients_152, t147.take_payment_for_existing_patients AS take_payment_for_existing_patients_153, t147.type AS type_154, t147.hide_full_price AS hide_full_price_155, t147.terms AS terms_156, t147.clinic_id AS clinic_id_157, t158.id AS id_159, t158.server AS server_160, t158.file_location AS file_location_161, t158.username AS username_162, t158.password AS password_163, t158.email AS email_164, t158.clinic_id AS clinic_id_165, t166.id AS id_167, t166.theme AS theme_168, t166.max_embed_width AS max_embed_width_169, t166.primary_interface_colour AS primary_interface_colour_170, t166.secondary_interface_colour AS secondary_interface_colour_171, t166.primary_font_colour AS primary_font_colour_172, t166.secondary_font_colour AS secondary_font_colour_173, t166.background_colour AS background_colour_174, t166.widget_hash AS widget_hash_175, t166.created_at AS created_at_176, t166.updated_at AS updated_at_177, t166.clinic_id AS clinic_id_178, t166.custom_css_id AS custom_css_id_179, t180.id AS id_181, t180.confirmation_text AS confirmation_text_182, t180.treatment_info AS treatment_info_183, t180.clinic_id AS clinic_id_184, t185.id AS id_186, t185.api_key AS api_key_187, t185.list_id AS list_id_188, t185.sync AS sync_189, t185.sync_date AS sync_date_190, t185.pro AS pro_191, t185.created_at AS created_at_192, t185.updated_at AS updated_at_193, t185.clinic_id AS clinic_id_194, t0.promo_code_id AS promo_code_id_195, t0.price_tier_id AS price_tier_id_196, t0.xero_sync_job_id AS xero_sync_job_id_197 FROM clinics t0 LEFT JOIN media t114 ON t0.logo_id = t114.id LEFT JOIN media t123 ON t0.background_id = t123.id LEFT JOIN gocardless_customer t131 ON t131.clinic_id = t0.id LEFT JOIN twilio t140 ON t140.clinic_id = t0.id LEFT JOIN setting_online_booking t147 ON t147.clinic_id = t0.id LEFT JOIN setting_chronoscan t158 ON t158.clinic_id = t0.id LEFT JOIN widget_online_booking t166 ON t166.clinic_id = t0.id LEFT JOIN email_setting_online_booking t180 ON t180.clinic_id = t0.id LEFT JOIN mail_chimp_config t185 ON t185.clinic_id = t0.id WHERE t0.patient_ref_prefix = ? LIMIT 1
SELECT
t0.id AS id_1,
t0.name AS name_2,
t0.sub_domain AS sub_domain_3,
t0.organisation_id AS organisation_id_4,
t0.smscredit AS smscredit_5,
t0.ai_token_credit AS ai_token_credit_6,
t0.last_daily_token_date AS last_daily_token_date_7,
t0.ai_seconds_credit AS ai_seconds_credit_8,
t0.daily_ai_token_credit AS daily_ai_token_credit_9,
t0.booking_btn_name AS booking_btn_name_10,
t0.booking_btn_clr AS booking_btn_clr_11,
t0.booking_btn_bg_clr AS booking_btn_bg_clr_12,
t0.inner_color AS inner_color_13,
t0.outer_color AS outer_color_14,
t0.background_img AS background_img_15,
t0.profile_img AS profile_img_16,
t0.meeting_price AS meeting_price_17,
t0.meeting_price_type AS meeting_price_type_18,
t0.show_in_public_profile AS show_in_public_profile_19,
t0.patient_ref_prefix AS patient_ref_prefix_20,
t0.email AS email_21,
t0.verified_email AS verified_email_22,
t0.web_site AS web_site_23,
t0.phone AS phone_24,
t0.contact_name AS contact_name_25,
t0.description AS description_26,
t0.widget_settings AS widget_settings_27,
t0.sms_number AS sms_number_28,
t0.sms_status AS sms_status_29,
t0.timezone AS timezone_30,
t0.reminder_header AS reminder_header_31,
t0.reminder_footer AS reminder_footer_32,
t0.reminder_recall_text AS reminder_recall_text_33,
t0.google_token AS google_token_34,
t0.google_id AS google_id_35,
t0.topic_arn AS topic_arn_36,
t0.pm_pin AS pm_pin_37,
t0.auto_email_reply_address AS auto_email_reply_address_38,
t0.pm_patient_message AS pm_patient_message_39,
t0.pm_clinic_intro AS pm_clinic_intro_40,
t0.auto_renew_subscription AS auto_renew_subscription_41,
t0.subscription_expiry AS subscription_expiry_42,
t0.email_reminder AS email_reminder_43,
t0.email_new AS email_new_44,
t0.sms_new AS sms_new_45,
t0.sms_reminder AS sms_reminder_46,
t0.when_answered_hide_where_did_you_hear_about_us AS when_answered_hide_where_did_you_hear_about_us_47,
t0.calendar_start_day AS calendar_start_day_48,
t0.calendar_end_day AS calendar_end_day_49,
t0.appointment_default_time AS appointment_default_time_50,
t0.appointment_slot_duration AS appointment_slot_duration_51,
t0.appointment_default_view AS appointment_default_view_52,
t0.private_mode_calendar AS private_mode_calendar_53,
t0.clinic_representative AS clinic_representative_54,
t0.data_protection_officer AS data_protection_officer_55,
t0.company_registration_number AS company_registration_number_56,
t0.email_to_withdraw AS email_to_withdraw_57,
t0.period_stored_data AS period_stored_data_58,
t0.survey_email_text AS survey_email_text_59,
t0.post_apt_form_email_text AS post_apt_form_email_text_60,
t0.export_in_progress AS export_in_progress_61,
t0.vat_number AS vat_number_62,
t0.enabled_vat AS enabled_vat_63,
t0.patient_list_display_pair AS patient_list_display_pair_64,
t0.stripe_refresh_token AS stripe_refresh_token_65,
t0.stripe_publishable_key AS stripe_publishable_key_66,
t0.stripe_account_id AS stripe_account_id_67,
t0.shared_all_patients AS shared_all_patients_68,
t0.currency AS currency_69,
t0.patient_info_to_document_header AS patient_info_to_document_header_70,
t0.t_and_c AS t_and_c_71,
t0.declaration AS declaration_72,
t0.treatment_plan_tand_c AS treatment_plan_tand_c_73,
t0.traffic_light AS traffic_light_74,
t0.booking_required_fields AS booking_required_fields_75,
t0.double_booking AS double_booking_76,
t0.required_confirmation AS required_confirmation_77,
t0.fixed_discount_amount AS fixed_discount_amount_78,
t0.required_questionnaires AS required_questionnaires_79,
t0.patient_required_fields AS patient_required_fields_80,
t0.prospect_required_fields AS prospect_required_fields_81,
t0.enabled_postcode AS enabled_postcode_82,
t0.enabled_chronoscan AS enabled_chronoscan_83,
t0.postcode_api_key AS postcode_api_key_84,
t0.enabled_prospect_web_form AS enabled_prospect_web_form_85,
t0.payment_sense AS payment_sense_86,
t0.xero_tenant_id AS xero_tenant_id_87,
t0.reduce_stock AS reduce_stock_88,
t0.patient_questionnaire AS patient_questionnaire_89,
t0.xero_bank_account AS xero_bank_account_90,
t0.is_new_clinic AS is_new_clinic_91,
t0.marketing_expert AS marketing_expert_92,
t0.clinic_survey_email_text AS clinic_survey_email_text_93,
t0.trial_end_date AS trial_end_date_94,
t0.shared_patient_date AS shared_patient_date_95,
t0.feature_custom_website_amount AS feature_custom_website_amount_96,
t0.feature_ad_amount AS feature_ad_amount_97,
t0.feature_message_amount AS feature_message_amount_98,
t0.feature_template_amount AS feature_template_amount_99,
t0.is_template_user_only AS is_template_user_only_100,
t0.new_user AS new_user_101,
t0.template_subscription_end_date AS template_subscription_end_date_102,
t0.onboarding_status AS onboarding_status_103,
t0.patient_portal_settings AS patient_portal_settings_104,
t0.address1 AS address1_105,
t0.address2 AS address2_106,
t0.town AS town_107,
t0.state AS state_108,
t0.country AS country_109,
t0.postcode AS postcode_110,
t0.created_at AS created_at_111,
t0.updated_at AS updated_at_112,
t0.logo_id AS logo_id_113,
t114.id AS id_115,
t114.s3key AS s3key_116,
t114.name_file AS name_file_117,
t114.url AS url_118,
t114.type AS type_119,
t114.created_at AS created_at_120,
t114.updated_at AS updated_at_121,
t0.background_id AS background_id_122,
t123.id AS id_124,
t123.s3key AS s3key_125,
t123.name_file AS name_file_126,
t123.url AS url_127,
t123.type AS type_128,
t123.created_at AS created_at_129,
t123.updated_at AS updated_at_130,
t131.id AS id_132,
t131.creditor AS creditor_133,
t131.mandate AS mandate_134,
t131.customer AS customer_135,
t131.customer_bank_account AS customer_bank_account_136,
t131.created_at AS created_at_137,
t131.updated_at AS updated_at_138,
t131.clinic_id AS clinic_id_139,
t140.id AS id_141,
t140.sid AS sid_142,
t140.token AS token_143,
t140.number_from AS number_from_144,
t140.clinic_id AS clinic_id_145,
t0.organisation_id AS organisation_id_146,
t147.id AS id_148,
t147.enabled AS enabled_149,
t147.time_required_for_booking AS time_required_for_booking_150,
t147.time_required_for_cancellation AS time_required_for_cancellation_151,
t147.take_payment_for_new_patients AS take_payment_for_new_patients_152,
t147.take_payment_for_existing_patients AS take_payment_for_existing_patients_153,
t147.type AS type_154,
t147.hide_full_price AS hide_full_price_155,
t147.terms AS terms_156,
t147.clinic_id AS clinic_id_157,
t158.id AS id_159,
t158.server AS server_160,
t158.file_location AS file_location_161,
t158.username AS username_162,
t158.password AS password_163,
t158.email AS email_164,
t158.clinic_id AS clinic_id_165,
t166.id AS id_167,
t166.theme AS theme_168,
t166.max_embed_width AS max_embed_width_169,
t166.primary_interface_colour AS primary_interface_colour_170,
t166.secondary_interface_colour AS secondary_interface_colour_171,
t166.primary_font_colour AS primary_font_colour_172,
t166.secondary_font_colour AS secondary_font_colour_173,
t166.background_colour AS background_colour_174,
t166.widget_hash AS widget_hash_175,
t166.created_at AS created_at_176,
t166.updated_at AS updated_at_177,
t166.clinic_id AS clinic_id_178,
t166.custom_css_id AS custom_css_id_179,
t180.id AS id_181,
t180.confirmation_text AS confirmation_text_182,
t180.treatment_info AS treatment_info_183,
t180.clinic_id AS clinic_id_184,
t185.id AS id_186,
t185.api_key AS api_key_187,
t185.list_id AS list_id_188,
t185.sync AS sync_189,
t185.sync_date AS sync_date_190,
t185.pro AS pro_191,
t185.created_at AS created_at_192,
t185.updated_at AS updated_at_193,
t185.clinic_id AS clinic_id_194,
t0.promo_code_id AS promo_code_id_195,
t0.price_tier_id AS price_tier_id_196,
t0.xero_sync_job_id AS xero_sync_job_id_197
FROM
clinics t0
LEFT JOIN media t114 ON t0.logo_id = t114.id
LEFT JOIN media t123 ON t0.background_id = t123.id
LEFT JOIN gocardless_customer t131 ON t131.clinic_id = t0.id
LEFT JOIN twilio t140 ON t140.clinic_id = t0.id
LEFT JOIN setting_online_booking t147 ON t147.clinic_id = t0.id
LEFT JOIN setting_chronoscan t158 ON t158.clinic_id = t0.id
LEFT JOIN widget_online_booking t166 ON t166.clinic_id = t0.id
LEFT JOIN email_setting_online_booking t180 ON t180.clinic_id = t0.id
LEFT JOIN mail_chimp_config t185 ON t185.clinic_id = t0.id
WHERE
t0.patient_ref_prefix = ?
LIMIT
1
SELECT t0.id AS id_1, t0.name AS name_2, t0.sub_domain AS sub_domain_3, t0.organisation_id AS organisation_id_4, t0.smscredit AS smscredit_5, t0.ai_token_credit AS ai_token_credit_6, t0.last_daily_token_date AS last_daily_token_date_7, t0.ai_seconds_credit AS ai_seconds_credit_8, t0.daily_ai_token_credit AS daily_ai_token_credit_9, t0.booking_btn_name AS booking_btn_name_10, t0.booking_btn_clr AS booking_btn_clr_11, t0.booking_btn_bg_clr AS booking_btn_bg_clr_12, t0.inner_color AS inner_color_13, t0.outer_color AS outer_color_14, t0.background_img AS background_img_15, t0.profile_img AS profile_img_16, t0.meeting_price AS meeting_price_17, t0.meeting_price_type AS meeting_price_type_18, t0.show_in_public_profile AS show_in_public_profile_19, t0.patient_ref_prefix AS patient_ref_prefix_20, t0.email AS email_21, t0.verified_email AS verified_email_22, t0.web_site AS web_site_23, t0.phone AS phone_24, t0.contact_name AS contact_name_25, t0.description AS description_26, t0.widget_settings AS widget_settings_27, t0.sms_number AS sms_number_28, t0.sms_status AS sms_status_29, t0.timezone AS timezone_30, t0.reminder_header AS reminder_header_31, t0.reminder_footer AS reminder_footer_32, t0.reminder_recall_text AS reminder_recall_text_33, t0.google_token AS google_token_34, t0.google_id AS google_id_35, t0.topic_arn AS topic_arn_36, t0.pm_pin AS pm_pin_37, t0.auto_email_reply_address AS auto_email_reply_address_38, t0.pm_patient_message AS pm_patient_message_39, t0.pm_clinic_intro AS pm_clinic_intro_40, t0.auto_renew_subscription AS auto_renew_subscription_41, t0.subscription_expiry AS subscription_expiry_42, t0.email_reminder AS email_reminder_43, t0.email_new AS email_new_44, t0.sms_new AS sms_new_45, t0.sms_reminder AS sms_reminder_46, t0.when_answered_hide_where_did_you_hear_about_us AS when_answered_hide_where_did_you_hear_about_us_47, t0.calendar_start_day AS calendar_start_day_48, t0.calendar_end_day AS calendar_end_day_49, t0.appointment_default_time AS appointment_default_time_50, t0.appointment_slot_duration AS appointment_slot_duration_51, t0.appointment_default_view AS appointment_default_view_52, t0.private_mode_calendar AS private_mode_calendar_53, t0.clinic_representative AS clinic_representative_54, t0.data_protection_officer AS data_protection_officer_55, t0.company_registration_number AS company_registration_number_56, t0.email_to_withdraw AS email_to_withdraw_57, t0.period_stored_data AS period_stored_data_58, t0.survey_email_text AS survey_email_text_59, t0.post_apt_form_email_text AS post_apt_form_email_text_60, t0.export_in_progress AS export_in_progress_61, t0.vat_number AS vat_number_62, t0.enabled_vat AS enabled_vat_63, t0.patient_list_display_pair AS patient_list_display_pair_64, t0.stripe_refresh_token AS stripe_refresh_token_65, t0.stripe_publishable_key AS stripe_publishable_key_66, t0.stripe_account_id AS stripe_account_id_67, t0.shared_all_patients AS shared_all_patients_68, t0.currency AS currency_69, t0.patient_info_to_document_header AS patient_info_to_document_header_70, t0.t_and_c AS t_and_c_71, t0.declaration AS declaration_72, t0.treatment_plan_tand_c AS treatment_plan_tand_c_73, t0.traffic_light AS traffic_light_74, t0.booking_required_fields AS booking_required_fields_75, t0.double_booking AS double_booking_76, t0.required_confirmation AS required_confirmation_77, t0.fixed_discount_amount AS fixed_discount_amount_78, t0.required_questionnaires AS required_questionnaires_79, t0.patient_required_fields AS patient_required_fields_80, t0.prospect_required_fields AS prospect_required_fields_81, t0.enabled_postcode AS enabled_postcode_82, t0.enabled_chronoscan AS enabled_chronoscan_83, t0.postcode_api_key AS postcode_api_key_84, t0.enabled_prospect_web_form AS enabled_prospect_web_form_85, t0.payment_sense AS payment_sense_86, t0.xero_tenant_id AS xero_tenant_id_87, t0.reduce_stock AS reduce_stock_88, t0.patient_questionnaire AS patient_questionnaire_89, t0.xero_bank_account AS xero_bank_account_90, t0.is_new_clinic AS is_new_clinic_91, t0.marketing_expert AS marketing_expert_92, t0.clinic_survey_email_text AS clinic_survey_email_text_93, t0.trial_end_date AS trial_end_date_94, t0.shared_patient_date AS shared_patient_date_95, t0.feature_custom_website_amount AS feature_custom_website_amount_96, t0.feature_ad_amount AS feature_ad_amount_97, t0.feature_message_amount AS feature_message_amount_98, t0.feature_template_amount AS feature_template_amount_99, t0.is_template_user_only AS is_template_user_only_100, t0.new_user AS new_user_101, t0.template_subscription_end_date AS template_subscription_end_date_102, t0.onboarding_status AS onboarding_status_103, t0.patient_portal_settings AS patient_portal_settings_104, t0.address1 AS address1_105, t0.address2 AS address2_106, t0.town AS town_107, t0.state AS state_108, t0.country AS country_109, t0.postcode AS postcode_110, t0.created_at AS created_at_111, t0.updated_at AS updated_at_112, t0.logo_id AS logo_id_113, t114.id AS id_115, t114.s3key AS s3key_116, t114.name_file AS name_file_117, t114.url AS url_118, t114.type AS type_119, t114.created_at AS created_at_120, t114.updated_at AS updated_at_121, t0.background_id AS background_id_122, t123.id AS id_124, t123.s3key AS s3key_125, t123.name_file AS name_file_126, t123.url AS url_127, t123.type AS type_128, t123.created_at AS created_at_129, t123.updated_at AS updated_at_130, t131.id AS id_132, t131.creditor AS creditor_133, t131.mandate AS mandate_134, t131.customer AS customer_135, t131.customer_bank_account AS customer_bank_account_136, t131.created_at AS created_at_137, t131.updated_at AS updated_at_138, t131.clinic_id AS clinic_id_139, t140.id AS id_141, t140.sid AS sid_142, t140.token AS token_143, t140.number_from AS number_from_144, t140.clinic_id AS clinic_id_145, t0.organisation_id AS organisation_id_146, t147.id AS id_148, t147.enabled AS enabled_149, t147.time_required_for_booking AS time_required_for_booking_150, t147.time_required_for_cancellation AS time_required_for_cancellation_151, t147.take_payment_for_new_patients AS take_payment_for_new_patients_152, t147.take_payment_for_existing_patients AS take_payment_for_existing_patients_153, t147.type AS type_154, t147.hide_full_price AS hide_full_price_155, t147.terms AS terms_156, t147.clinic_id AS clinic_id_157, t158.id AS id_159, t158.server AS server_160, t158.file_location AS file_location_161, t158.username AS username_162, t158.password AS password_163, t158.email AS email_164, t158.clinic_id AS clinic_id_165, t166.id AS id_167, t166.theme AS theme_168, t166.max_embed_width AS max_embed_width_169, t166.primary_interface_colour AS primary_interface_colour_170, t166.secondary_interface_colour AS secondary_interface_colour_171, t166.primary_font_colour AS primary_font_colour_172, t166.secondary_font_colour AS secondary_font_colour_173, t166.background_colour AS background_colour_174, t166.widget_hash AS widget_hash_175, t166.created_at AS created_at_176, t166.updated_at AS updated_at_177, t166.clinic_id AS clinic_id_178, t166.custom_css_id AS custom_css_id_179, t180.id AS id_181, t180.confirmation_text AS confirmation_text_182, t180.treatment_info AS treatment_info_183, t180.clinic_id AS clinic_id_184, t185.id AS id_186, t185.api_key AS api_key_187, t185.list_id AS list_id_188, t185.sync AS sync_189, t185.sync_date AS sync_date_190, t185.pro AS pro_191, t185.created_at AS created_at_192, t185.updated_at AS updated_at_193, t185.clinic_id AS clinic_id_194, t0.promo_code_id AS promo_code_id_195, t0.price_tier_id AS price_tier_id_196, t0.xero_sync_job_id AS xero_sync_job_id_197 FROM clinics t0 LEFT JOIN media t114 ON t0.logo_id = t114.id LEFT JOIN media t123 ON t0.background_id = t123.id LEFT JOIN gocardless_customer t131 ON t131.clinic_id = t0.id LEFT JOIN twilio t140 ON t140.clinic_id = t0.id LEFT JOIN setting_online_booking t147 ON t147.clinic_id = t0.id LEFT JOIN setting_chronoscan t158 ON t158.clinic_id = t0.id LEFT JOIN widget_online_booking t166 ON t166.clinic_id = t0.id LEFT JOIN email_setting_online_booking t180 ON t180.clinic_id = t0.id LEFT JOIN mail_chimp_config t185 ON t185.clinic_id = t0.id WHERE t0.patient_ref_prefix = 'TMJ' LIMIT 1;
|