1
3.12 ms
SELECT t0 . id AS id_1 , t0 . drug_code AS drug_code_2 , t0 . updated_date AS updated_date_3 , t0 . content_update_date AS content_update_date_4 , t0 . last_updated_operation AS last_updated_operation_5 , t0 . last_updated_ip AS last_updated_ip_6 , t0 . product_categorization AS product_categorization_7 , t0 . din AS din_8 , t0 . brand_name AS brand_name_9 , t0 . brand_name_fr AS brand_name_fr_10 , t0 . descriptor AS descriptor_11 , t0 . pediatric_flag AS pediatric_flag_12 , t0 . accession_number AS accession_number_13 , t0 . number_of_ais AS number_of_ais_14 , t0 . ai_group_no AS ai_group_no_15 , t0 . en_proper_name AS en_proper_name_16 , t0 . fr_proper_name AS fr_proper_name_17 , t0 . en_common_name AS en_common_name_18 , t0 . fr_common_name AS fr_common_name_19 , t0 . parent_object_id AS parent_object_id_20 , t0 . last_updated_user_id AS last_updated_user_id_21 , t0 . company_id AS company_id_22 , t0 . class_id AS class_id_23 FROM drugs t0 WHERE t0 . id = ?
SELECT t0 . id AS id_1 , t0 . drug_code AS drug_code_2 , t0 . updated_date AS updated_date_3 , t0 . content_update_date AS content_update_date_4 , t0 . last_updated_operation AS last_updated_operation_5 , t0 . last_updated_ip AS last_updated_ip_6 , t0 . product_categorization AS product_categorization_7 , t0 . din AS din_8 , t0 . brand_name AS brand_name_9 , t0 . brand_name_fr AS brand_name_fr_10 , t0 . descriptor AS descriptor_11 , t0 . pediatric_flag AS pediatric_flag_12 , t0 . accession_number AS accession_number_13 , t0 . number_of_ais AS number_of_ais_14 , t0 . ai_group_no AS ai_group_no_15 , t0 . en_proper_name AS en_proper_name_16 , t0 . fr_proper_name AS fr_proper_name_17 , t0 . en_common_name AS en_common_name_18 , t0 . fr_common_name AS fr_common_name_19 , t0 . parent_object_id AS parent_object_id_20 , t0 . last_updated_user_id AS last_updated_user_id_21 , t0 . company_id AS company_id_22 , t0 . class_id AS class_id_23 FROM drugs t0 WHERE t0 . id = '21780' ;
Copy
2
1.85 ms
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = ? AND r0_ . drug_id = ? AND r0_ . parent_object_id IS NULL AND r0_ . draft = ? AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC LIMIT 10
Parameters :
[
2
21780
0
]
SELECT
DISTINCT r0_ . id AS id_0 ,
r0_ . number AS number_1 ,
r0_ . created_date AS created_date_2 ,
r0_ . din AS din_3 ,
r0_ . company_name AS company_name_4 ,
r0_ . atc_number AS atc_number_5 ,
r0_ . atc_description AS atc_description_6 ,
r0_ . hc_updated_date AS hc_updated_date_7 ,
r0_ . remaining_supply_date AS remaining_supply_date_8 ,
r0_ . discontinuation_date AS discontinuation_date_9 ,
r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 ,
r0_ . anticipated_start_date AS anticipated_start_date_11 ,
r0_ . estimated_end_date AS estimated_end_date_12 ,
r0_ . actual_start_date AS actual_start_date_13 ,
r0_ . actual_end_date AS actual_end_date_14 ,
r0_ . en_info_on_alternative AS en_info_on_alternative_15 ,
r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 ,
r0_ . decision_reversal AS decision_reversal_17 ,
r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 ,
r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 ,
r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 ,
r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 ,
r0_ . updated_date AS updated_date_22 ,
r0_ . last_updated_operation AS last_updated_operation_23 ,
r0_ . last_updated_ip AS last_updated_ip_24 ,
r0_ . en_product_alternative AS en_product_alternative_25 ,
r0_ . fr_product_alternative AS fr_product_alternative_26 ,
r0_ . status AS status_27 ,
r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 ,
r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 ,
r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 ,
r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 ,
r0_ . en_comments AS en_comments_32 ,
r0_ . fr_comments AS fr_comments_33 ,
r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 ,
r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 ,
r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 ,
r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 ,
r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 ,
r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 ,
r0_ . hc_en_comments AS hc_en_comments_40 ,
r0_ . hc_fr_comments AS hc_fr_comments_41 ,
r0_ . en_drug_brand_name AS en_drug_brand_name_42 ,
r0_ . en_drug_proper_name AS en_drug_proper_name_43 ,
r0_ . en_drug_common_name AS en_drug_common_name_44 ,
r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 ,
r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 ,
r0_ . fr_drug_common_name AS fr_drug_common_name_47 ,
r0_ . en_ingredients AS en_ingredients_48 ,
r0_ . fr_ingredients AS fr_ingredients_49 ,
r0_ . drug_strength AS drug_strength_50 ,
r0_ . drug_dosage_form AS drug_dosage_form_51 ,
r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 ,
r0_ . drug_route AS drug_route_53 ,
r0_ . drug_route_fr AS drug_route_fr_54 ,
r0_ . drug_package_quantity AS drug_package_quantity_55 ,
r0_ . resolved AS resolved_56 ,
r0_ . avoided AS avoided_57 ,
r0_ . advance AS advance_58 ,
r0_ . late_submission AS late_submission_59 ,
r0_ . shortage_duplicated AS shortage_duplicated_60 ,
r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 ,
r0_ . draft AS draft_62 ,
r0_ . deleted_ip_address AS deleted_ip_address_63 ,
r0_ . deleted_date AS deleted_date_64 ,
r0_ . current_form_lang AS current_form_lang_65 ,
r0_ . discontinuation_duplication AS discontinuation_duplication_66 ,
r0_ . shortage_duplication AS shortage_duplication_67 ,
r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 ,
r0_ . marker_a1 AS marker_a1_69 ,
r0_ . marker_a2 AS marker_a2_70 ,
r0_ . marker_a3 AS marker_a3_71 ,
r0_ . marker_b1 AS marker_b1_72 ,
r0_ . marker_b2 AS marker_b2_73 ,
r0_ . marker_b3 AS marker_b3_74 ,
r0_ . late_marker_disabled AS late_marker_disabled_75 ,
r0_ . tier_3 AS tier_3_76 ,
CONCAT (
u1_ . first_name , ' ' , u1_ . last_name
) AS sclr_77 ,
r0_ . drug_id AS drug_id_78 ,
r0_ . type_id AS type_id_79 ,
r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 ,
r0_ . shortage_reason_id AS shortage_reason_id_81 ,
r0_ . parent_object_id AS parent_object_id_82 ,
r0_ . last_updated_user_id AS last_updated_user_id_83 ,
r0_ . deleted_by_user_id AS deleted_by_user_id_84
FROM
reports r0_
LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id
LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id
LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id
LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id
LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id
LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id
WHERE
r2_ . id = ?
AND r0_ . drug_id = ?
AND r0_ . parent_object_id IS NULL
AND r0_ . draft = ?
AND r0_ . deleted_date IS NULL
ORDER BY
r0_ . en_drug_brand_name ASC
LIMIT
10
Copy
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = 2 AND r0_ . drug_id = 21780 AND r0_ . parent_object_id IS NULL AND r0_ . draft = 0 AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC LIMIT 10 ;
Copy
3
0.52 ms
SELECT t0 . id AS id_1 , t0 . number AS number_2 , t0 . created_date AS created_date_3 , t0 . din AS din_4 , t0 . company_name AS company_name_5 , t0 . atc_number AS atc_number_6 , t0 . atc_description AS atc_description_7 , t0 . hc_updated_date AS hc_updated_date_8 , t0 . remaining_supply_date AS remaining_supply_date_9 , t0 . discontinuation_date AS discontinuation_date_10 , t0 . anticipated_discontinuation_date AS anticipated_discontinuation_date_11 , t0 . anticipated_start_date AS anticipated_start_date_12 , t0 . estimated_end_date AS estimated_end_date_13 , t0 . actual_start_date AS actual_start_date_14 , t0 . actual_end_date AS actual_end_date_15 , t0 . en_info_on_alternative AS en_info_on_alternative_16 , t0 . fr_info_on_alternative AS fr_info_on_alternative_17 , t0 . decision_reversal AS decision_reversal_18 , t0 . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_19 , t0 . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_20 , t0 . en_discontinuation_comments AS en_discontinuation_comments_21 , t0 . fr_discontinuation_comments AS fr_discontinuation_comments_22 , t0 . updated_date AS updated_date_23 , t0 . last_updated_operation AS last_updated_operation_24 , t0 . last_updated_ip AS last_updated_ip_25 , t0 . en_product_alternative AS en_product_alternative_26 , t0 . fr_product_alternative AS fr_product_alternative_27 , t0 . status AS status_28 , t0 . en_info_for_care_provider AS en_info_for_care_provider_29 , t0 . fr_info_for_care_provider AS fr_info_for_care_provider_30 , t0 . en_mitigation_efforts AS en_mitigation_efforts_31 , t0 . fr_mitigation_efforts AS fr_mitigation_efforts_32 , t0 . en_comments AS en_comments_33 , t0 . fr_comments AS fr_comments_34 , t0 . hc_en_product_alternative AS hc_en_product_alternative_35 , t0 . hc_fr_product_alternative AS hc_fr_product_alternative_36 , t0 . hc_en_shortage_info AS hc_en_shortage_info_37 , t0 . hc_fr_shortage_info AS hc_fr_shortage_info_38 , t0 . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_39 , t0 . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_40 , t0 . hc_en_comments AS hc_en_comments_41 , t0 . hc_fr_comments AS hc_fr_comments_42 , t0 . en_drug_brand_name AS en_drug_brand_name_43 , t0 . en_drug_proper_name AS en_drug_proper_name_44 , t0 . en_drug_common_name AS en_drug_common_name_45 , t0 . fr_drug_brand_name AS fr_drug_brand_name_46 , t0 . fr_drug_proper_name AS fr_drug_proper_name_47 , t0 . fr_drug_common_name AS fr_drug_common_name_48 , t0 . en_ingredients AS en_ingredients_49 , t0 . fr_ingredients AS fr_ingredients_50 , t0 . drug_strength AS drug_strength_51 , t0 . drug_dosage_form AS drug_dosage_form_52 , t0 . drug_dosage_form_fr AS drug_dosage_form_fr_53 , t0 . drug_route AS drug_route_54 , t0 . drug_route_fr AS drug_route_fr_55 , t0 . drug_package_quantity AS drug_package_quantity_56 , t0 . resolved AS resolved_57 , t0 . avoided AS avoided_58 , t0 . advance AS advance_59 , t0 . late_submission AS late_submission_60 , t0 . shortage_duplicated AS shortage_duplicated_61 , t0 . discontinuance_duplicated AS discontinuance_duplicated_62 , t0 . draft AS draft_63 , t0 . deleted_ip_address AS deleted_ip_address_64 , t0 . deleted_date AS deleted_date_65 , t0 . current_form_lang AS current_form_lang_66 , t0 . discontinuation_duplication AS discontinuation_duplication_67 , t0 . shortage_duplication AS shortage_duplication_68 , t0 . unknown_estimated_end_date AS unknown_estimated_end_date_69 , t0 . marker_a1 AS marker_a1_70 , t0 . marker_a2 AS marker_a2_71 , t0 . marker_a3 AS marker_a3_72 , t0 . marker_b1 AS marker_b1_73 , t0 . marker_b2 AS marker_b2_74 , t0 . marker_b3 AS marker_b3_75 , t0 . late_marker_disabled AS late_marker_disabled_76 , t0 . tier_3 AS tier_3_77 , t0 . drug_id AS drug_id_78 , t0 . type_id AS type_id_79 , t0 . discontinuance_reason_id AS discontinuance_reason_id_80 , t0 . shortage_reason_id AS shortage_reason_id_81 , t0 . parent_object_id AS parent_object_id_82 , t0 . last_updated_user_id AS last_updated_user_id_83 , t0 . deleted_by_user_id AS deleted_by_user_id_84 FROM reports t0 WHERE t0 . parent_object_id = ? ORDER BY t0 . updated_date DESC , t0 . id DESC
SELECT
t0 . id AS id_1 ,
t0 . number AS number_2 ,
t0 . created_date AS created_date_3 ,
t0 . din AS din_4 ,
t0 . company_name AS company_name_5 ,
t0 . atc_number AS atc_number_6 ,
t0 . atc_description AS atc_description_7 ,
t0 . hc_updated_date AS hc_updated_date_8 ,
t0 . remaining_supply_date AS remaining_supply_date_9 ,
t0 . discontinuation_date AS discontinuation_date_10 ,
t0 . anticipated_discontinuation_date AS anticipated_discontinuation_date_11 ,
t0 . anticipated_start_date AS anticipated_start_date_12 ,
t0 . estimated_end_date AS estimated_end_date_13 ,
t0 . actual_start_date AS actual_start_date_14 ,
t0 . actual_end_date AS actual_end_date_15 ,
t0 . en_info_on_alternative AS en_info_on_alternative_16 ,
t0 . fr_info_on_alternative AS fr_info_on_alternative_17 ,
t0 . decision_reversal AS decision_reversal_18 ,
t0 . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_19 ,
t0 . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_20 ,
t0 . en_discontinuation_comments AS en_discontinuation_comments_21 ,
t0 . fr_discontinuation_comments AS fr_discontinuation_comments_22 ,
t0 . updated_date AS updated_date_23 ,
t0 . last_updated_operation AS last_updated_operation_24 ,
t0 . last_updated_ip AS last_updated_ip_25 ,
t0 . en_product_alternative AS en_product_alternative_26 ,
t0 . fr_product_alternative AS fr_product_alternative_27 ,
t0 . status AS status_28 ,
t0 . en_info_for_care_provider AS en_info_for_care_provider_29 ,
t0 . fr_info_for_care_provider AS fr_info_for_care_provider_30 ,
t0 . en_mitigation_efforts AS en_mitigation_efforts_31 ,
t0 . fr_mitigation_efforts AS fr_mitigation_efforts_32 ,
t0 . en_comments AS en_comments_33 ,
t0 . fr_comments AS fr_comments_34 ,
t0 . hc_en_product_alternative AS hc_en_product_alternative_35 ,
t0 . hc_fr_product_alternative AS hc_fr_product_alternative_36 ,
t0 . hc_en_shortage_info AS hc_en_shortage_info_37 ,
t0 . hc_fr_shortage_info AS hc_fr_shortage_info_38 ,
t0 . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_39 ,
t0 . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_40 ,
t0 . hc_en_comments AS hc_en_comments_41 ,
t0 . hc_fr_comments AS hc_fr_comments_42 ,
t0 . en_drug_brand_name AS en_drug_brand_name_43 ,
t0 . en_drug_proper_name AS en_drug_proper_name_44 ,
t0 . en_drug_common_name AS en_drug_common_name_45 ,
t0 . fr_drug_brand_name AS fr_drug_brand_name_46 ,
t0 . fr_drug_proper_name AS fr_drug_proper_name_47 ,
t0 . fr_drug_common_name AS fr_drug_common_name_48 ,
t0 . en_ingredients AS en_ingredients_49 ,
t0 . fr_ingredients AS fr_ingredients_50 ,
t0 . drug_strength AS drug_strength_51 ,
t0 . drug_dosage_form AS drug_dosage_form_52 ,
t0 . drug_dosage_form_fr AS drug_dosage_form_fr_53 ,
t0 . drug_route AS drug_route_54 ,
t0 . drug_route_fr AS drug_route_fr_55 ,
t0 . drug_package_quantity AS drug_package_quantity_56 ,
t0 . resolved AS resolved_57 ,
t0 . avoided AS avoided_58 ,
t0 . advance AS advance_59 ,
t0 . late_submission AS late_submission_60 ,
t0 . shortage_duplicated AS shortage_duplicated_61 ,
t0 . discontinuance_duplicated AS discontinuance_duplicated_62 ,
t0 . draft AS draft_63 ,
t0 . deleted_ip_address AS deleted_ip_address_64 ,
t0 . deleted_date AS deleted_date_65 ,
t0 . current_form_lang AS current_form_lang_66 ,
t0 . discontinuation_duplication AS discontinuation_duplication_67 ,
t0 . shortage_duplication AS shortage_duplication_68 ,
t0 . unknown_estimated_end_date AS unknown_estimated_end_date_69 ,
t0 . marker_a1 AS marker_a1_70 ,
t0 . marker_a2 AS marker_a2_71 ,
t0 . marker_a3 AS marker_a3_72 ,
t0 . marker_b1 AS marker_b1_73 ,
t0 . marker_b2 AS marker_b2_74 ,
t0 . marker_b3 AS marker_b3_75 ,
t0 . late_marker_disabled AS late_marker_disabled_76 ,
t0 . tier_3 AS tier_3_77 ,
t0 . drug_id AS drug_id_78 ,
t0 . type_id AS type_id_79 ,
t0 . discontinuance_reason_id AS discontinuance_reason_id_80 ,
t0 . shortage_reason_id AS shortage_reason_id_81 ,
t0 . parent_object_id AS parent_object_id_82 ,
t0 . last_updated_user_id AS last_updated_user_id_83 ,
t0 . deleted_by_user_id AS deleted_by_user_id_84
FROM
reports t0
WHERE
t0 . parent_object_id = ?
ORDER BY
t0 . updated_date DESC ,
t0 . id DESC
Copy
SELECT t0 . id AS id_1 , t0 . number AS number_2 , t0 . created_date AS created_date_3 , t0 . din AS din_4 , t0 . company_name AS company_name_5 , t0 . atc_number AS atc_number_6 , t0 . atc_description AS atc_description_7 , t0 . hc_updated_date AS hc_updated_date_8 , t0 . remaining_supply_date AS remaining_supply_date_9 , t0 . discontinuation_date AS discontinuation_date_10 , t0 . anticipated_discontinuation_date AS anticipated_discontinuation_date_11 , t0 . anticipated_start_date AS anticipated_start_date_12 , t0 . estimated_end_date AS estimated_end_date_13 , t0 . actual_start_date AS actual_start_date_14 , t0 . actual_end_date AS actual_end_date_15 , t0 . en_info_on_alternative AS en_info_on_alternative_16 , t0 . fr_info_on_alternative AS fr_info_on_alternative_17 , t0 . decision_reversal AS decision_reversal_18 , t0 . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_19 , t0 . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_20 , t0 . en_discontinuation_comments AS en_discontinuation_comments_21 , t0 . fr_discontinuation_comments AS fr_discontinuation_comments_22 , t0 . updated_date AS updated_date_23 , t0 . last_updated_operation AS last_updated_operation_24 , t0 . last_updated_ip AS last_updated_ip_25 , t0 . en_product_alternative AS en_product_alternative_26 , t0 . fr_product_alternative AS fr_product_alternative_27 , t0 . status AS status_28 , t0 . en_info_for_care_provider AS en_info_for_care_provider_29 , t0 . fr_info_for_care_provider AS fr_info_for_care_provider_30 , t0 . en_mitigation_efforts AS en_mitigation_efforts_31 , t0 . fr_mitigation_efforts AS fr_mitigation_efforts_32 , t0 . en_comments AS en_comments_33 , t0 . fr_comments AS fr_comments_34 , t0 . hc_en_product_alternative AS hc_en_product_alternative_35 , t0 . hc_fr_product_alternative AS hc_fr_product_alternative_36 , t0 . hc_en_shortage_info AS hc_en_shortage_info_37 , t0 . hc_fr_shortage_info AS hc_fr_shortage_info_38 , t0 . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_39 , t0 . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_40 , t0 . hc_en_comments AS hc_en_comments_41 , t0 . hc_fr_comments AS hc_fr_comments_42 , t0 . en_drug_brand_name AS en_drug_brand_name_43 , t0 . en_drug_proper_name AS en_drug_proper_name_44 , t0 . en_drug_common_name AS en_drug_common_name_45 , t0 . fr_drug_brand_name AS fr_drug_brand_name_46 , t0 . fr_drug_proper_name AS fr_drug_proper_name_47 , t0 . fr_drug_common_name AS fr_drug_common_name_48 , t0 . en_ingredients AS en_ingredients_49 , t0 . fr_ingredients AS fr_ingredients_50 , t0 . drug_strength AS drug_strength_51 , t0 . drug_dosage_form AS drug_dosage_form_52 , t0 . drug_dosage_form_fr AS drug_dosage_form_fr_53 , t0 . drug_route AS drug_route_54 , t0 . drug_route_fr AS drug_route_fr_55 , t0 . drug_package_quantity AS drug_package_quantity_56 , t0 . resolved AS resolved_57 , t0 . avoided AS avoided_58 , t0 . advance AS advance_59 , t0 . late_submission AS late_submission_60 , t0 . shortage_duplicated AS shortage_duplicated_61 , t0 . discontinuance_duplicated AS discontinuance_duplicated_62 , t0 . draft AS draft_63 , t0 . deleted_ip_address AS deleted_ip_address_64 , t0 . deleted_date AS deleted_date_65 , t0 . current_form_lang AS current_form_lang_66 , t0 . discontinuation_duplication AS discontinuation_duplication_67 , t0 . shortage_duplication AS shortage_duplication_68 , t0 . unknown_estimated_end_date AS unknown_estimated_end_date_69 , t0 . marker_a1 AS marker_a1_70 , t0 . marker_a2 AS marker_a2_71 , t0 . marker_a3 AS marker_a3_72 , t0 . marker_b1 AS marker_b1_73 , t0 . marker_b2 AS marker_b2_74 , t0 . marker_b3 AS marker_b3_75 , t0 . late_marker_disabled AS late_marker_disabled_76 , t0 . tier_3 AS tier_3_77 , t0 . drug_id AS drug_id_78 , t0 . type_id AS type_id_79 , t0 . discontinuance_reason_id AS discontinuance_reason_id_80 , t0 . shortage_reason_id AS shortage_reason_id_81 , t0 . parent_object_id AS parent_object_id_82 , t0 . last_updated_user_id AS last_updated_user_id_83 , t0 . deleted_by_user_id AS deleted_by_user_id_84 FROM reports t0 WHERE t0 . parent_object_id = 256149 ORDER BY t0 . updated_date DESC , t0 . id DESC ;
Copy
4
1.19 ms
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = ? AND r0_ . drug_id = ? AND r0_ . parent_object_id IS NULL AND r0_ . draft = ? AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC LIMIT 10
Parameters :
[
1
21780
0
]
SELECT
DISTINCT r0_ . id AS id_0 ,
r0_ . number AS number_1 ,
r0_ . created_date AS created_date_2 ,
r0_ . din AS din_3 ,
r0_ . company_name AS company_name_4 ,
r0_ . atc_number AS atc_number_5 ,
r0_ . atc_description AS atc_description_6 ,
r0_ . hc_updated_date AS hc_updated_date_7 ,
r0_ . remaining_supply_date AS remaining_supply_date_8 ,
r0_ . discontinuation_date AS discontinuation_date_9 ,
r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 ,
r0_ . anticipated_start_date AS anticipated_start_date_11 ,
r0_ . estimated_end_date AS estimated_end_date_12 ,
r0_ . actual_start_date AS actual_start_date_13 ,
r0_ . actual_end_date AS actual_end_date_14 ,
r0_ . en_info_on_alternative AS en_info_on_alternative_15 ,
r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 ,
r0_ . decision_reversal AS decision_reversal_17 ,
r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 ,
r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 ,
r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 ,
r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 ,
r0_ . updated_date AS updated_date_22 ,
r0_ . last_updated_operation AS last_updated_operation_23 ,
r0_ . last_updated_ip AS last_updated_ip_24 ,
r0_ . en_product_alternative AS en_product_alternative_25 ,
r0_ . fr_product_alternative AS fr_product_alternative_26 ,
r0_ . status AS status_27 ,
r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 ,
r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 ,
r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 ,
r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 ,
r0_ . en_comments AS en_comments_32 ,
r0_ . fr_comments AS fr_comments_33 ,
r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 ,
r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 ,
r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 ,
r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 ,
r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 ,
r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 ,
r0_ . hc_en_comments AS hc_en_comments_40 ,
r0_ . hc_fr_comments AS hc_fr_comments_41 ,
r0_ . en_drug_brand_name AS en_drug_brand_name_42 ,
r0_ . en_drug_proper_name AS en_drug_proper_name_43 ,
r0_ . en_drug_common_name AS en_drug_common_name_44 ,
r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 ,
r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 ,
r0_ . fr_drug_common_name AS fr_drug_common_name_47 ,
r0_ . en_ingredients AS en_ingredients_48 ,
r0_ . fr_ingredients AS fr_ingredients_49 ,
r0_ . drug_strength AS drug_strength_50 ,
r0_ . drug_dosage_form AS drug_dosage_form_51 ,
r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 ,
r0_ . drug_route AS drug_route_53 ,
r0_ . drug_route_fr AS drug_route_fr_54 ,
r0_ . drug_package_quantity AS drug_package_quantity_55 ,
r0_ . resolved AS resolved_56 ,
r0_ . avoided AS avoided_57 ,
r0_ . advance AS advance_58 ,
r0_ . late_submission AS late_submission_59 ,
r0_ . shortage_duplicated AS shortage_duplicated_60 ,
r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 ,
r0_ . draft AS draft_62 ,
r0_ . deleted_ip_address AS deleted_ip_address_63 ,
r0_ . deleted_date AS deleted_date_64 ,
r0_ . current_form_lang AS current_form_lang_65 ,
r0_ . discontinuation_duplication AS discontinuation_duplication_66 ,
r0_ . shortage_duplication AS shortage_duplication_67 ,
r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 ,
r0_ . marker_a1 AS marker_a1_69 ,
r0_ . marker_a2 AS marker_a2_70 ,
r0_ . marker_a3 AS marker_a3_71 ,
r0_ . marker_b1 AS marker_b1_72 ,
r0_ . marker_b2 AS marker_b2_73 ,
r0_ . marker_b3 AS marker_b3_74 ,
r0_ . late_marker_disabled AS late_marker_disabled_75 ,
r0_ . tier_3 AS tier_3_76 ,
CONCAT (
u1_ . first_name , ' ' , u1_ . last_name
) AS sclr_77 ,
r0_ . drug_id AS drug_id_78 ,
r0_ . type_id AS type_id_79 ,
r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 ,
r0_ . shortage_reason_id AS shortage_reason_id_81 ,
r0_ . parent_object_id AS parent_object_id_82 ,
r0_ . last_updated_user_id AS last_updated_user_id_83 ,
r0_ . deleted_by_user_id AS deleted_by_user_id_84
FROM
reports r0_
LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id
LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id
LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id
LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id
LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id
LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id
WHERE
r2_ . id = ?
AND r0_ . drug_id = ?
AND r0_ . parent_object_id IS NULL
AND r0_ . draft = ?
AND r0_ . deleted_date IS NULL
ORDER BY
r0_ . en_drug_brand_name ASC
LIMIT
10
Copy
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = 1 AND r0_ . drug_id = 21780 AND r0_ . parent_object_id IS NULL AND r0_ . draft = 0 AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC LIMIT 10 ;
Copy
5
0.71 ms
SELECT t0 . id AS id_1 , t0 . number AS number_2 , t0 . created_date AS created_date_3 , t0 . din AS din_4 , t0 . company_name AS company_name_5 , t0 . atc_number AS atc_number_6 , t0 . atc_description AS atc_description_7 , t0 . hc_updated_date AS hc_updated_date_8 , t0 . remaining_supply_date AS remaining_supply_date_9 , t0 . discontinuation_date AS discontinuation_date_10 , t0 . anticipated_discontinuation_date AS anticipated_discontinuation_date_11 , t0 . anticipated_start_date AS anticipated_start_date_12 , t0 . estimated_end_date AS estimated_end_date_13 , t0 . actual_start_date AS actual_start_date_14 , t0 . actual_end_date AS actual_end_date_15 , t0 . en_info_on_alternative AS en_info_on_alternative_16 , t0 . fr_info_on_alternative AS fr_info_on_alternative_17 , t0 . decision_reversal AS decision_reversal_18 , t0 . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_19 , t0 . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_20 , t0 . en_discontinuation_comments AS en_discontinuation_comments_21 , t0 . fr_discontinuation_comments AS fr_discontinuation_comments_22 , t0 . updated_date AS updated_date_23 , t0 . last_updated_operation AS last_updated_operation_24 , t0 . last_updated_ip AS last_updated_ip_25 , t0 . en_product_alternative AS en_product_alternative_26 , t0 . fr_product_alternative AS fr_product_alternative_27 , t0 . status AS status_28 , t0 . en_info_for_care_provider AS en_info_for_care_provider_29 , t0 . fr_info_for_care_provider AS fr_info_for_care_provider_30 , t0 . en_mitigation_efforts AS en_mitigation_efforts_31 , t0 . fr_mitigation_efforts AS fr_mitigation_efforts_32 , t0 . en_comments AS en_comments_33 , t0 . fr_comments AS fr_comments_34 , t0 . hc_en_product_alternative AS hc_en_product_alternative_35 , t0 . hc_fr_product_alternative AS hc_fr_product_alternative_36 , t0 . hc_en_shortage_info AS hc_en_shortage_info_37 , t0 . hc_fr_shortage_info AS hc_fr_shortage_info_38 , t0 . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_39 , t0 . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_40 , t0 . hc_en_comments AS hc_en_comments_41 , t0 . hc_fr_comments AS hc_fr_comments_42 , t0 . en_drug_brand_name AS en_drug_brand_name_43 , t0 . en_drug_proper_name AS en_drug_proper_name_44 , t0 . en_drug_common_name AS en_drug_common_name_45 , t0 . fr_drug_brand_name AS fr_drug_brand_name_46 , t0 . fr_drug_proper_name AS fr_drug_proper_name_47 , t0 . fr_drug_common_name AS fr_drug_common_name_48 , t0 . en_ingredients AS en_ingredients_49 , t0 . fr_ingredients AS fr_ingredients_50 , t0 . drug_strength AS drug_strength_51 , t0 . drug_dosage_form AS drug_dosage_form_52 , t0 . drug_dosage_form_fr AS drug_dosage_form_fr_53 , t0 . drug_route AS drug_route_54 , t0 . drug_route_fr AS drug_route_fr_55 , t0 . drug_package_quantity AS drug_package_quantity_56 , t0 . resolved AS resolved_57 , t0 . avoided AS avoided_58 , t0 . advance AS advance_59 , t0 . late_submission AS late_submission_60 , t0 . shortage_duplicated AS shortage_duplicated_61 , t0 . discontinuance_duplicated AS discontinuance_duplicated_62 , t0 . draft AS draft_63 , t0 . deleted_ip_address AS deleted_ip_address_64 , t0 . deleted_date AS deleted_date_65 , t0 . current_form_lang AS current_form_lang_66 , t0 . discontinuation_duplication AS discontinuation_duplication_67 , t0 . shortage_duplication AS shortage_duplication_68 , t0 . unknown_estimated_end_date AS unknown_estimated_end_date_69 , t0 . marker_a1 AS marker_a1_70 , t0 . marker_a2 AS marker_a2_71 , t0 . marker_a3 AS marker_a3_72 , t0 . marker_b1 AS marker_b1_73 , t0 . marker_b2 AS marker_b2_74 , t0 . marker_b3 AS marker_b3_75 , t0 . late_marker_disabled AS late_marker_disabled_76 , t0 . tier_3 AS tier_3_77 , t0 . drug_id AS drug_id_78 , t0 . type_id AS type_id_79 , t0 . discontinuance_reason_id AS discontinuance_reason_id_80 , t0 . shortage_reason_id AS shortage_reason_id_81 , t0 . parent_object_id AS parent_object_id_82 , t0 . last_updated_user_id AS last_updated_user_id_83 , t0 . deleted_by_user_id AS deleted_by_user_id_84 FROM reports t0 WHERE t0 . parent_object_id = ? ORDER BY t0 . updated_date DESC , t0 . id DESC
SELECT
t0 . id AS id_1 ,
t0 . number AS number_2 ,
t0 . created_date AS created_date_3 ,
t0 . din AS din_4 ,
t0 . company_name AS company_name_5 ,
t0 . atc_number AS atc_number_6 ,
t0 . atc_description AS atc_description_7 ,
t0 . hc_updated_date AS hc_updated_date_8 ,
t0 . remaining_supply_date AS remaining_supply_date_9 ,
t0 . discontinuation_date AS discontinuation_date_10 ,
t0 . anticipated_discontinuation_date AS anticipated_discontinuation_date_11 ,
t0 . anticipated_start_date AS anticipated_start_date_12 ,
t0 . estimated_end_date AS estimated_end_date_13 ,
t0 . actual_start_date AS actual_start_date_14 ,
t0 . actual_end_date AS actual_end_date_15 ,
t0 . en_info_on_alternative AS en_info_on_alternative_16 ,
t0 . fr_info_on_alternative AS fr_info_on_alternative_17 ,
t0 . decision_reversal AS decision_reversal_18 ,
t0 . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_19 ,
t0 . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_20 ,
t0 . en_discontinuation_comments AS en_discontinuation_comments_21 ,
t0 . fr_discontinuation_comments AS fr_discontinuation_comments_22 ,
t0 . updated_date AS updated_date_23 ,
t0 . last_updated_operation AS last_updated_operation_24 ,
t0 . last_updated_ip AS last_updated_ip_25 ,
t0 . en_product_alternative AS en_product_alternative_26 ,
t0 . fr_product_alternative AS fr_product_alternative_27 ,
t0 . status AS status_28 ,
t0 . en_info_for_care_provider AS en_info_for_care_provider_29 ,
t0 . fr_info_for_care_provider AS fr_info_for_care_provider_30 ,
t0 . en_mitigation_efforts AS en_mitigation_efforts_31 ,
t0 . fr_mitigation_efforts AS fr_mitigation_efforts_32 ,
t0 . en_comments AS en_comments_33 ,
t0 . fr_comments AS fr_comments_34 ,
t0 . hc_en_product_alternative AS hc_en_product_alternative_35 ,
t0 . hc_fr_product_alternative AS hc_fr_product_alternative_36 ,
t0 . hc_en_shortage_info AS hc_en_shortage_info_37 ,
t0 . hc_fr_shortage_info AS hc_fr_shortage_info_38 ,
t0 . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_39 ,
t0 . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_40 ,
t0 . hc_en_comments AS hc_en_comments_41 ,
t0 . hc_fr_comments AS hc_fr_comments_42 ,
t0 . en_drug_brand_name AS en_drug_brand_name_43 ,
t0 . en_drug_proper_name AS en_drug_proper_name_44 ,
t0 . en_drug_common_name AS en_drug_common_name_45 ,
t0 . fr_drug_brand_name AS fr_drug_brand_name_46 ,
t0 . fr_drug_proper_name AS fr_drug_proper_name_47 ,
t0 . fr_drug_common_name AS fr_drug_common_name_48 ,
t0 . en_ingredients AS en_ingredients_49 ,
t0 . fr_ingredients AS fr_ingredients_50 ,
t0 . drug_strength AS drug_strength_51 ,
t0 . drug_dosage_form AS drug_dosage_form_52 ,
t0 . drug_dosage_form_fr AS drug_dosage_form_fr_53 ,
t0 . drug_route AS drug_route_54 ,
t0 . drug_route_fr AS drug_route_fr_55 ,
t0 . drug_package_quantity AS drug_package_quantity_56 ,
t0 . resolved AS resolved_57 ,
t0 . avoided AS avoided_58 ,
t0 . advance AS advance_59 ,
t0 . late_submission AS late_submission_60 ,
t0 . shortage_duplicated AS shortage_duplicated_61 ,
t0 . discontinuance_duplicated AS discontinuance_duplicated_62 ,
t0 . draft AS draft_63 ,
t0 . deleted_ip_address AS deleted_ip_address_64 ,
t0 . deleted_date AS deleted_date_65 ,
t0 . current_form_lang AS current_form_lang_66 ,
t0 . discontinuation_duplication AS discontinuation_duplication_67 ,
t0 . shortage_duplication AS shortage_duplication_68 ,
t0 . unknown_estimated_end_date AS unknown_estimated_end_date_69 ,
t0 . marker_a1 AS marker_a1_70 ,
t0 . marker_a2 AS marker_a2_71 ,
t0 . marker_a3 AS marker_a3_72 ,
t0 . marker_b1 AS marker_b1_73 ,
t0 . marker_b2 AS marker_b2_74 ,
t0 . marker_b3 AS marker_b3_75 ,
t0 . late_marker_disabled AS late_marker_disabled_76 ,
t0 . tier_3 AS tier_3_77 ,
t0 . drug_id AS drug_id_78 ,
t0 . type_id AS type_id_79 ,
t0 . discontinuance_reason_id AS discontinuance_reason_id_80 ,
t0 . shortage_reason_id AS shortage_reason_id_81 ,
t0 . parent_object_id AS parent_object_id_82 ,
t0 . last_updated_user_id AS last_updated_user_id_83 ,
t0 . deleted_by_user_id AS deleted_by_user_id_84
FROM
reports t0
WHERE
t0 . parent_object_id = ?
ORDER BY
t0 . updated_date DESC ,
t0 . id DESC
Copy
SELECT t0 . id AS id_1 , t0 . number AS number_2 , t0 . created_date AS created_date_3 , t0 . din AS din_4 , t0 . company_name AS company_name_5 , t0 . atc_number AS atc_number_6 , t0 . atc_description AS atc_description_7 , t0 . hc_updated_date AS hc_updated_date_8 , t0 . remaining_supply_date AS remaining_supply_date_9 , t0 . discontinuation_date AS discontinuation_date_10 , t0 . anticipated_discontinuation_date AS anticipated_discontinuation_date_11 , t0 . anticipated_start_date AS anticipated_start_date_12 , t0 . estimated_end_date AS estimated_end_date_13 , t0 . actual_start_date AS actual_start_date_14 , t0 . actual_end_date AS actual_end_date_15 , t0 . en_info_on_alternative AS en_info_on_alternative_16 , t0 . fr_info_on_alternative AS fr_info_on_alternative_17 , t0 . decision_reversal AS decision_reversal_18 , t0 . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_19 , t0 . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_20 , t0 . en_discontinuation_comments AS en_discontinuation_comments_21 , t0 . fr_discontinuation_comments AS fr_discontinuation_comments_22 , t0 . updated_date AS updated_date_23 , t0 . last_updated_operation AS last_updated_operation_24 , t0 . last_updated_ip AS last_updated_ip_25 , t0 . en_product_alternative AS en_product_alternative_26 , t0 . fr_product_alternative AS fr_product_alternative_27 , t0 . status AS status_28 , t0 . en_info_for_care_provider AS en_info_for_care_provider_29 , t0 . fr_info_for_care_provider AS fr_info_for_care_provider_30 , t0 . en_mitigation_efforts AS en_mitigation_efforts_31 , t0 . fr_mitigation_efforts AS fr_mitigation_efforts_32 , t0 . en_comments AS en_comments_33 , t0 . fr_comments AS fr_comments_34 , t0 . hc_en_product_alternative AS hc_en_product_alternative_35 , t0 . hc_fr_product_alternative AS hc_fr_product_alternative_36 , t0 . hc_en_shortage_info AS hc_en_shortage_info_37 , t0 . hc_fr_shortage_info AS hc_fr_shortage_info_38 , t0 . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_39 , t0 . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_40 , t0 . hc_en_comments AS hc_en_comments_41 , t0 . hc_fr_comments AS hc_fr_comments_42 , t0 . en_drug_brand_name AS en_drug_brand_name_43 , t0 . en_drug_proper_name AS en_drug_proper_name_44 , t0 . en_drug_common_name AS en_drug_common_name_45 , t0 . fr_drug_brand_name AS fr_drug_brand_name_46 , t0 . fr_drug_proper_name AS fr_drug_proper_name_47 , t0 . fr_drug_common_name AS fr_drug_common_name_48 , t0 . en_ingredients AS en_ingredients_49 , t0 . fr_ingredients AS fr_ingredients_50 , t0 . drug_strength AS drug_strength_51 , t0 . drug_dosage_form AS drug_dosage_form_52 , t0 . drug_dosage_form_fr AS drug_dosage_form_fr_53 , t0 . drug_route AS drug_route_54 , t0 . drug_route_fr AS drug_route_fr_55 , t0 . drug_package_quantity AS drug_package_quantity_56 , t0 . resolved AS resolved_57 , t0 . avoided AS avoided_58 , t0 . advance AS advance_59 , t0 . late_submission AS late_submission_60 , t0 . shortage_duplicated AS shortage_duplicated_61 , t0 . discontinuance_duplicated AS discontinuance_duplicated_62 , t0 . draft AS draft_63 , t0 . deleted_ip_address AS deleted_ip_address_64 , t0 . deleted_date AS deleted_date_65 , t0 . current_form_lang AS current_form_lang_66 , t0 . discontinuation_duplication AS discontinuation_duplication_67 , t0 . shortage_duplication AS shortage_duplication_68 , t0 . unknown_estimated_end_date AS unknown_estimated_end_date_69 , t0 . marker_a1 AS marker_a1_70 , t0 . marker_a2 AS marker_a2_71 , t0 . marker_a3 AS marker_a3_72 , t0 . marker_b1 AS marker_b1_73 , t0 . marker_b2 AS marker_b2_74 , t0 . marker_b3 AS marker_b3_75 , t0 . late_marker_disabled AS late_marker_disabled_76 , t0 . tier_3 AS tier_3_77 , t0 . drug_id AS drug_id_78 , t0 . type_id AS type_id_79 , t0 . discontinuance_reason_id AS discontinuance_reason_id_80 , t0 . shortage_reason_id AS shortage_reason_id_81 , t0 . parent_object_id AS parent_object_id_82 , t0 . last_updated_user_id AS last_updated_user_id_83 , t0 . deleted_by_user_id AS deleted_by_user_id_84 FROM reports t0 WHERE t0 . parent_object_id = 137933 ORDER BY t0 . updated_date DESC , t0 . id DESC ;
Copy
6
1.08 ms
SELECT COUNT (* ) AS dctrn_count FROM (SELECT DISTINCT id_0 FROM (SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = ? AND r0_ . drug_id = ? AND r0_ . parent_object_id IS NULL AND r0_ . draft = ? AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC ) dctrn_result ) dctrn_table
Parameters :
[
2
21780
0
]
SELECT
COUNT (* ) AS dctrn_count
FROM
(
SELECT
DISTINCT id_0
FROM
(
SELECT
DISTINCT r0_ . id AS id_0 ,
r0_ . number AS number_1 ,
r0_ . created_date AS created_date_2 ,
r0_ . din AS din_3 ,
r0_ . company_name AS company_name_4 ,
r0_ . atc_number AS atc_number_5 ,
r0_ . atc_description AS atc_description_6 ,
r0_ . hc_updated_date AS hc_updated_date_7 ,
r0_ . remaining_supply_date AS remaining_supply_date_8 ,
r0_ . discontinuation_date AS discontinuation_date_9 ,
r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 ,
r0_ . anticipated_start_date AS anticipated_start_date_11 ,
r0_ . estimated_end_date AS estimated_end_date_12 ,
r0_ . actual_start_date AS actual_start_date_13 ,
r0_ . actual_end_date AS actual_end_date_14 ,
r0_ . en_info_on_alternative AS en_info_on_alternative_15 ,
r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 ,
r0_ . decision_reversal AS decision_reversal_17 ,
r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 ,
r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 ,
r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 ,
r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 ,
r0_ . updated_date AS updated_date_22 ,
r0_ . last_updated_operation AS last_updated_operation_23 ,
r0_ . last_updated_ip AS last_updated_ip_24 ,
r0_ . en_product_alternative AS en_product_alternative_25 ,
r0_ . fr_product_alternative AS fr_product_alternative_26 ,
r0_ . status AS status_27 ,
r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 ,
r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 ,
r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 ,
r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 ,
r0_ . en_comments AS en_comments_32 ,
r0_ . fr_comments AS fr_comments_33 ,
r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 ,
r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 ,
r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 ,
r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 ,
r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 ,
r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 ,
r0_ . hc_en_comments AS hc_en_comments_40 ,
r0_ . hc_fr_comments AS hc_fr_comments_41 ,
r0_ . en_drug_brand_name AS en_drug_brand_name_42 ,
r0_ . en_drug_proper_name AS en_drug_proper_name_43 ,
r0_ . en_drug_common_name AS en_drug_common_name_44 ,
r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 ,
r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 ,
r0_ . fr_drug_common_name AS fr_drug_common_name_47 ,
r0_ . en_ingredients AS en_ingredients_48 ,
r0_ . fr_ingredients AS fr_ingredients_49 ,
r0_ . drug_strength AS drug_strength_50 ,
r0_ . drug_dosage_form AS drug_dosage_form_51 ,
r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 ,
r0_ . drug_route AS drug_route_53 ,
r0_ . drug_route_fr AS drug_route_fr_54 ,
r0_ . drug_package_quantity AS drug_package_quantity_55 ,
r0_ . resolved AS resolved_56 ,
r0_ . avoided AS avoided_57 ,
r0_ . advance AS advance_58 ,
r0_ . late_submission AS late_submission_59 ,
r0_ . shortage_duplicated AS shortage_duplicated_60 ,
r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 ,
r0_ . draft AS draft_62 ,
r0_ . deleted_ip_address AS deleted_ip_address_63 ,
r0_ . deleted_date AS deleted_date_64 ,
r0_ . current_form_lang AS current_form_lang_65 ,
r0_ . discontinuation_duplication AS discontinuation_duplication_66 ,
r0_ . shortage_duplication AS shortage_duplication_67 ,
r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 ,
r0_ . marker_a1 AS marker_a1_69 ,
r0_ . marker_a2 AS marker_a2_70 ,
r0_ . marker_a3 AS marker_a3_71 ,
r0_ . marker_b1 AS marker_b1_72 ,
r0_ . marker_b2 AS marker_b2_73 ,
r0_ . marker_b3 AS marker_b3_74 ,
r0_ . late_marker_disabled AS late_marker_disabled_75 ,
r0_ . tier_3 AS tier_3_76 ,
CONCAT (
u1_ . first_name , ' ' , u1_ . last_name
) AS sclr_77
FROM
reports r0_
LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id
LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id
LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id
LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id
LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id
LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id
WHERE
r2_ . id = ?
AND r0_ . drug_id = ?
AND r0_ . parent_object_id IS NULL
AND r0_ . draft = ?
AND r0_ . deleted_date IS NULL
ORDER BY
r0_ . en_drug_brand_name ASC
) dctrn_result
) dctrn_table
Copy
SELECT COUNT (* ) AS dctrn_count FROM (SELECT DISTINCT id_0 FROM (SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = 2 AND r0_ . drug_id = 21780 AND r0_ . parent_object_id IS NULL AND r0_ . draft = 0 AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC ) dctrn_result ) dctrn_table ;
Copy
7
0.93 ms
SELECT COUNT (* ) AS dctrn_count FROM (SELECT DISTINCT id_0 FROM (SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = ? AND r0_ . drug_id = ? AND r0_ . parent_object_id IS NULL AND r0_ . draft = ? AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC ) dctrn_result ) dctrn_table
Parameters :
[
1
21780
0
]
SELECT
COUNT (* ) AS dctrn_count
FROM
(
SELECT
DISTINCT id_0
FROM
(
SELECT
DISTINCT r0_ . id AS id_0 ,
r0_ . number AS number_1 ,
r0_ . created_date AS created_date_2 ,
r0_ . din AS din_3 ,
r0_ . company_name AS company_name_4 ,
r0_ . atc_number AS atc_number_5 ,
r0_ . atc_description AS atc_description_6 ,
r0_ . hc_updated_date AS hc_updated_date_7 ,
r0_ . remaining_supply_date AS remaining_supply_date_8 ,
r0_ . discontinuation_date AS discontinuation_date_9 ,
r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 ,
r0_ . anticipated_start_date AS anticipated_start_date_11 ,
r0_ . estimated_end_date AS estimated_end_date_12 ,
r0_ . actual_start_date AS actual_start_date_13 ,
r0_ . actual_end_date AS actual_end_date_14 ,
r0_ . en_info_on_alternative AS en_info_on_alternative_15 ,
r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 ,
r0_ . decision_reversal AS decision_reversal_17 ,
r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 ,
r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 ,
r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 ,
r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 ,
r0_ . updated_date AS updated_date_22 ,
r0_ . last_updated_operation AS last_updated_operation_23 ,
r0_ . last_updated_ip AS last_updated_ip_24 ,
r0_ . en_product_alternative AS en_product_alternative_25 ,
r0_ . fr_product_alternative AS fr_product_alternative_26 ,
r0_ . status AS status_27 ,
r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 ,
r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 ,
r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 ,
r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 ,
r0_ . en_comments AS en_comments_32 ,
r0_ . fr_comments AS fr_comments_33 ,
r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 ,
r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 ,
r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 ,
r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 ,
r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 ,
r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 ,
r0_ . hc_en_comments AS hc_en_comments_40 ,
r0_ . hc_fr_comments AS hc_fr_comments_41 ,
r0_ . en_drug_brand_name AS en_drug_brand_name_42 ,
r0_ . en_drug_proper_name AS en_drug_proper_name_43 ,
r0_ . en_drug_common_name AS en_drug_common_name_44 ,
r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 ,
r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 ,
r0_ . fr_drug_common_name AS fr_drug_common_name_47 ,
r0_ . en_ingredients AS en_ingredients_48 ,
r0_ . fr_ingredients AS fr_ingredients_49 ,
r0_ . drug_strength AS drug_strength_50 ,
r0_ . drug_dosage_form AS drug_dosage_form_51 ,
r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 ,
r0_ . drug_route AS drug_route_53 ,
r0_ . drug_route_fr AS drug_route_fr_54 ,
r0_ . drug_package_quantity AS drug_package_quantity_55 ,
r0_ . resolved AS resolved_56 ,
r0_ . avoided AS avoided_57 ,
r0_ . advance AS advance_58 ,
r0_ . late_submission AS late_submission_59 ,
r0_ . shortage_duplicated AS shortage_duplicated_60 ,
r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 ,
r0_ . draft AS draft_62 ,
r0_ . deleted_ip_address AS deleted_ip_address_63 ,
r0_ . deleted_date AS deleted_date_64 ,
r0_ . current_form_lang AS current_form_lang_65 ,
r0_ . discontinuation_duplication AS discontinuation_duplication_66 ,
r0_ . shortage_duplication AS shortage_duplication_67 ,
r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 ,
r0_ . marker_a1 AS marker_a1_69 ,
r0_ . marker_a2 AS marker_a2_70 ,
r0_ . marker_a3 AS marker_a3_71 ,
r0_ . marker_b1 AS marker_b1_72 ,
r0_ . marker_b2 AS marker_b2_73 ,
r0_ . marker_b3 AS marker_b3_74 ,
r0_ . late_marker_disabled AS late_marker_disabled_75 ,
r0_ . tier_3 AS tier_3_76 ,
CONCAT (
u1_ . first_name , ' ' , u1_ . last_name
) AS sclr_77
FROM
reports r0_
LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id
LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id
LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id
LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id
LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id
LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id
WHERE
r2_ . id = ?
AND r0_ . drug_id = ?
AND r0_ . parent_object_id IS NULL
AND r0_ . draft = ?
AND r0_ . deleted_date IS NULL
ORDER BY
r0_ . en_drug_brand_name ASC
) dctrn_result
) dctrn_table
Copy
SELECT COUNT (* ) AS dctrn_count FROM (SELECT DISTINCT id_0 FROM (SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = 1 AND r0_ . drug_id = 21780 AND r0_ . parent_object_id IS NULL AND r0_ . draft = 0 AND r0_ . deleted_date IS NULL ORDER BY r0_ . en_drug_brand_name ASC ) dctrn_result ) dctrn_table ;
Copy
8
0.93 ms
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = ? AND r0_ . drug_id = ? AND ((r0_ . actual_start_date < ? AND r0_ . actual_end_date IS NULL ) OR (r0_ . actual_start_date < = ? AND r0_ . actual_end_date > = ? )) AND r0_ . parent_object_id IS NULL AND r0_ . draft = ? AND r0_ . deleted_date IS NULL ORDER BY r0_ . updated_date DESC LIMIT 1
Parameters :
[
1
21780
"2025-12-10 02:58:27 "
"2025-12-10 02:58:27 "
"2025-12-10 02:58:27 "
0
]
SELECT
DISTINCT r0_ . id AS id_0 ,
r0_ . number AS number_1 ,
r0_ . created_date AS created_date_2 ,
r0_ . din AS din_3 ,
r0_ . company_name AS company_name_4 ,
r0_ . atc_number AS atc_number_5 ,
r0_ . atc_description AS atc_description_6 ,
r0_ . hc_updated_date AS hc_updated_date_7 ,
r0_ . remaining_supply_date AS remaining_supply_date_8 ,
r0_ . discontinuation_date AS discontinuation_date_9 ,
r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 ,
r0_ . anticipated_start_date AS anticipated_start_date_11 ,
r0_ . estimated_end_date AS estimated_end_date_12 ,
r0_ . actual_start_date AS actual_start_date_13 ,
r0_ . actual_end_date AS actual_end_date_14 ,
r0_ . en_info_on_alternative AS en_info_on_alternative_15 ,
r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 ,
r0_ . decision_reversal AS decision_reversal_17 ,
r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 ,
r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 ,
r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 ,
r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 ,
r0_ . updated_date AS updated_date_22 ,
r0_ . last_updated_operation AS last_updated_operation_23 ,
r0_ . last_updated_ip AS last_updated_ip_24 ,
r0_ . en_product_alternative AS en_product_alternative_25 ,
r0_ . fr_product_alternative AS fr_product_alternative_26 ,
r0_ . status AS status_27 ,
r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 ,
r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 ,
r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 ,
r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 ,
r0_ . en_comments AS en_comments_32 ,
r0_ . fr_comments AS fr_comments_33 ,
r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 ,
r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 ,
r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 ,
r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 ,
r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 ,
r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 ,
r0_ . hc_en_comments AS hc_en_comments_40 ,
r0_ . hc_fr_comments AS hc_fr_comments_41 ,
r0_ . en_drug_brand_name AS en_drug_brand_name_42 ,
r0_ . en_drug_proper_name AS en_drug_proper_name_43 ,
r0_ . en_drug_common_name AS en_drug_common_name_44 ,
r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 ,
r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 ,
r0_ . fr_drug_common_name AS fr_drug_common_name_47 ,
r0_ . en_ingredients AS en_ingredients_48 ,
r0_ . fr_ingredients AS fr_ingredients_49 ,
r0_ . drug_strength AS drug_strength_50 ,
r0_ . drug_dosage_form AS drug_dosage_form_51 ,
r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 ,
r0_ . drug_route AS drug_route_53 ,
r0_ . drug_route_fr AS drug_route_fr_54 ,
r0_ . drug_package_quantity AS drug_package_quantity_55 ,
r0_ . resolved AS resolved_56 ,
r0_ . avoided AS avoided_57 ,
r0_ . advance AS advance_58 ,
r0_ . late_submission AS late_submission_59 ,
r0_ . shortage_duplicated AS shortage_duplicated_60 ,
r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 ,
r0_ . draft AS draft_62 ,
r0_ . deleted_ip_address AS deleted_ip_address_63 ,
r0_ . deleted_date AS deleted_date_64 ,
r0_ . current_form_lang AS current_form_lang_65 ,
r0_ . discontinuation_duplication AS discontinuation_duplication_66 ,
r0_ . shortage_duplication AS shortage_duplication_67 ,
r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 ,
r0_ . marker_a1 AS marker_a1_69 ,
r0_ . marker_a2 AS marker_a2_70 ,
r0_ . marker_a3 AS marker_a3_71 ,
r0_ . marker_b1 AS marker_b1_72 ,
r0_ . marker_b2 AS marker_b2_73 ,
r0_ . marker_b3 AS marker_b3_74 ,
r0_ . late_marker_disabled AS late_marker_disabled_75 ,
r0_ . tier_3 AS tier_3_76 ,
CONCAT (
u1_ . first_name , ' ' , u1_ . last_name
) AS sclr_77 ,
r0_ . drug_id AS drug_id_78 ,
r0_ . type_id AS type_id_79 ,
r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 ,
r0_ . shortage_reason_id AS shortage_reason_id_81 ,
r0_ . parent_object_id AS parent_object_id_82 ,
r0_ . last_updated_user_id AS last_updated_user_id_83 ,
r0_ . deleted_by_user_id AS deleted_by_user_id_84
FROM
reports r0_
LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id
LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id
LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id
LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id
LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id
LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id
WHERE
r2_ . id = ?
AND r0_ . drug_id = ?
AND (
(
r0_ . actual_start_date < ?
AND r0_ . actual_end_date IS NULL
)
OR (
r0_ . actual_start_date < = ?
AND r0_ . actual_end_date > = ?
)
)
AND r0_ . parent_object_id IS NULL
AND r0_ . draft = ?
AND r0_ . deleted_date IS NULL
ORDER BY
r0_ . updated_date DESC
LIMIT
1
Copy
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = 1 AND r0_ . drug_id = 21780 AND ((r0_ . actual_start_date < '2025-12-10 02:58:27' AND r0_ . actual_end_date IS NULL ) OR (r0_ . actual_start_date < = '2025-12-10 02:58:27' AND r0_ . actual_end_date > = '2025-12-10 02:58:27' )) AND r0_ . parent_object_id IS NULL AND r0_ . draft = 0 AND r0_ . deleted_date IS NULL ORDER BY r0_ . updated_date DESC LIMIT 1 ;
Copy
9
0.92 ms
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = ? AND r0_ . drug_id = ? AND r0_ . parent_object_id IS NULL AND r0_ . draft = ? AND r0_ . discontinuation_date < = ? AND r0_ . deleted_date IS NULL ORDER BY r0_ . updated_date DESC LIMIT 1
Parameters :
[
2
21780
0
"2025-12-10 02:58:27 "
]
SELECT
DISTINCT r0_ . id AS id_0 ,
r0_ . number AS number_1 ,
r0_ . created_date AS created_date_2 ,
r0_ . din AS din_3 ,
r0_ . company_name AS company_name_4 ,
r0_ . atc_number AS atc_number_5 ,
r0_ . atc_description AS atc_description_6 ,
r0_ . hc_updated_date AS hc_updated_date_7 ,
r0_ . remaining_supply_date AS remaining_supply_date_8 ,
r0_ . discontinuation_date AS discontinuation_date_9 ,
r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 ,
r0_ . anticipated_start_date AS anticipated_start_date_11 ,
r0_ . estimated_end_date AS estimated_end_date_12 ,
r0_ . actual_start_date AS actual_start_date_13 ,
r0_ . actual_end_date AS actual_end_date_14 ,
r0_ . en_info_on_alternative AS en_info_on_alternative_15 ,
r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 ,
r0_ . decision_reversal AS decision_reversal_17 ,
r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 ,
r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 ,
r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 ,
r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 ,
r0_ . updated_date AS updated_date_22 ,
r0_ . last_updated_operation AS last_updated_operation_23 ,
r0_ . last_updated_ip AS last_updated_ip_24 ,
r0_ . en_product_alternative AS en_product_alternative_25 ,
r0_ . fr_product_alternative AS fr_product_alternative_26 ,
r0_ . status AS status_27 ,
r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 ,
r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 ,
r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 ,
r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 ,
r0_ . en_comments AS en_comments_32 ,
r0_ . fr_comments AS fr_comments_33 ,
r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 ,
r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 ,
r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 ,
r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 ,
r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 ,
r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 ,
r0_ . hc_en_comments AS hc_en_comments_40 ,
r0_ . hc_fr_comments AS hc_fr_comments_41 ,
r0_ . en_drug_brand_name AS en_drug_brand_name_42 ,
r0_ . en_drug_proper_name AS en_drug_proper_name_43 ,
r0_ . en_drug_common_name AS en_drug_common_name_44 ,
r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 ,
r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 ,
r0_ . fr_drug_common_name AS fr_drug_common_name_47 ,
r0_ . en_ingredients AS en_ingredients_48 ,
r0_ . fr_ingredients AS fr_ingredients_49 ,
r0_ . drug_strength AS drug_strength_50 ,
r0_ . drug_dosage_form AS drug_dosage_form_51 ,
r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 ,
r0_ . drug_route AS drug_route_53 ,
r0_ . drug_route_fr AS drug_route_fr_54 ,
r0_ . drug_package_quantity AS drug_package_quantity_55 ,
r0_ . resolved AS resolved_56 ,
r0_ . avoided AS avoided_57 ,
r0_ . advance AS advance_58 ,
r0_ . late_submission AS late_submission_59 ,
r0_ . shortage_duplicated AS shortage_duplicated_60 ,
r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 ,
r0_ . draft AS draft_62 ,
r0_ . deleted_ip_address AS deleted_ip_address_63 ,
r0_ . deleted_date AS deleted_date_64 ,
r0_ . current_form_lang AS current_form_lang_65 ,
r0_ . discontinuation_duplication AS discontinuation_duplication_66 ,
r0_ . shortage_duplication AS shortage_duplication_67 ,
r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 ,
r0_ . marker_a1 AS marker_a1_69 ,
r0_ . marker_a2 AS marker_a2_70 ,
r0_ . marker_a3 AS marker_a3_71 ,
r0_ . marker_b1 AS marker_b1_72 ,
r0_ . marker_b2 AS marker_b2_73 ,
r0_ . marker_b3 AS marker_b3_74 ,
r0_ . late_marker_disabled AS late_marker_disabled_75 ,
r0_ . tier_3 AS tier_3_76 ,
CONCAT (
u1_ . first_name , ' ' , u1_ . last_name
) AS sclr_77 ,
r0_ . drug_id AS drug_id_78 ,
r0_ . type_id AS type_id_79 ,
r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 ,
r0_ . shortage_reason_id AS shortage_reason_id_81 ,
r0_ . parent_object_id AS parent_object_id_82 ,
r0_ . last_updated_user_id AS last_updated_user_id_83 ,
r0_ . deleted_by_user_id AS deleted_by_user_id_84
FROM
reports r0_
LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id
LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id
LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id
LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id
LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id
LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id
WHERE
r2_ . id = ?
AND r0_ . drug_id = ?
AND r0_ . parent_object_id IS NULL
AND r0_ . draft = ?
AND r0_ . discontinuation_date < = ?
AND r0_ . deleted_date IS NULL
ORDER BY
r0_ . updated_date DESC
LIMIT
1
Copy
SELECT DISTINCT r0_ . id AS id_0 , r0_ . number AS number_1 , r0_ . created_date AS created_date_2 , r0_ . din AS din_3 , r0_ . company_name AS company_name_4 , r0_ . atc_number AS atc_number_5 , r0_ . atc_description AS atc_description_6 , r0_ . hc_updated_date AS hc_updated_date_7 , r0_ . remaining_supply_date AS remaining_supply_date_8 , r0_ . discontinuation_date AS discontinuation_date_9 , r0_ . anticipated_discontinuation_date AS anticipated_discontinuation_date_10 , r0_ . anticipated_start_date AS anticipated_start_date_11 , r0_ . estimated_end_date AS estimated_end_date_12 , r0_ . actual_start_date AS actual_start_date_13 , r0_ . actual_end_date AS actual_end_date_14 , r0_ . en_info_on_alternative AS en_info_on_alternative_15 , r0_ . fr_info_on_alternative AS fr_info_on_alternative_16 , r0_ . decision_reversal AS decision_reversal_17 , r0_ . en_supply_disruption_mitigation AS en_supply_disruption_mitigation_18 , r0_ . fr_supply_disruption_mitigation AS fr_supply_disruption_mitigation_19 , r0_ . en_discontinuation_comments AS en_discontinuation_comments_20 , r0_ . fr_discontinuation_comments AS fr_discontinuation_comments_21 , r0_ . updated_date AS updated_date_22 , r0_ . last_updated_operation AS last_updated_operation_23 , r0_ . last_updated_ip AS last_updated_ip_24 , r0_ . en_product_alternative AS en_product_alternative_25 , r0_ . fr_product_alternative AS fr_product_alternative_26 , r0_ . status AS status_27 , r0_ . en_info_for_care_provider AS en_info_for_care_provider_28 , r0_ . fr_info_for_care_provider AS fr_info_for_care_provider_29 , r0_ . en_mitigation_efforts AS en_mitigation_efforts_30 , r0_ . fr_mitigation_efforts AS fr_mitigation_efforts_31 , r0_ . en_comments AS en_comments_32 , r0_ . fr_comments AS fr_comments_33 , r0_ . hc_en_product_alternative AS hc_en_product_alternative_34 , r0_ . hc_fr_product_alternative AS hc_fr_product_alternative_35 , r0_ . hc_en_shortage_info AS hc_en_shortage_info_36 , r0_ . hc_fr_shortage_info AS hc_fr_shortage_info_37 , r0_ . hc_en_mitigation_efforts AS hc_en_mitigation_efforts_38 , r0_ . hc_fr_mitigation_efforts AS hc_fr_mitigation_efforts_39 , r0_ . hc_en_comments AS hc_en_comments_40 , r0_ . hc_fr_comments AS hc_fr_comments_41 , r0_ . en_drug_brand_name AS en_drug_brand_name_42 , r0_ . en_drug_proper_name AS en_drug_proper_name_43 , r0_ . en_drug_common_name AS en_drug_common_name_44 , r0_ . fr_drug_brand_name AS fr_drug_brand_name_45 , r0_ . fr_drug_proper_name AS fr_drug_proper_name_46 , r0_ . fr_drug_common_name AS fr_drug_common_name_47 , r0_ . en_ingredients AS en_ingredients_48 , r0_ . fr_ingredients AS fr_ingredients_49 , r0_ . drug_strength AS drug_strength_50 , r0_ . drug_dosage_form AS drug_dosage_form_51 , r0_ . drug_dosage_form_fr AS drug_dosage_form_fr_52 , r0_ . drug_route AS drug_route_53 , r0_ . drug_route_fr AS drug_route_fr_54 , r0_ . drug_package_quantity AS drug_package_quantity_55 , r0_ . resolved AS resolved_56 , r0_ . avoided AS avoided_57 , r0_ . advance AS advance_58 , r0_ . late_submission AS late_submission_59 , r0_ . shortage_duplicated AS shortage_duplicated_60 , r0_ . discontinuance_duplicated AS discontinuance_duplicated_61 , r0_ . draft AS draft_62 , r0_ . deleted_ip_address AS deleted_ip_address_63 , r0_ . deleted_date AS deleted_date_64 , r0_ . current_form_lang AS current_form_lang_65 , r0_ . discontinuation_duplication AS discontinuation_duplication_66 , r0_ . shortage_duplication AS shortage_duplication_67 , r0_ . unknown_estimated_end_date AS unknown_estimated_end_date_68 , r0_ . marker_a1 AS marker_a1_69 , r0_ . marker_a2 AS marker_a2_70 , r0_ . marker_a3 AS marker_a3_71 , r0_ . marker_b1 AS marker_b1_72 , r0_ . marker_b2 AS marker_b2_73 , r0_ . marker_b3 AS marker_b3_74 , r0_ . late_marker_disabled AS late_marker_disabled_75 , r0_ . tier_3 AS tier_3_76 , CONCAT (u1_ . first_name , ' ' , u1_ . last_name ) AS sclr_77 , r0_ . drug_id AS drug_id_78 , r0_ . type_id AS type_id_79 , r0_ . discontinuance_reason_id AS discontinuance_reason_id_80 , r0_ . shortage_reason_id AS shortage_reason_id_81 , r0_ . parent_object_id AS parent_object_id_82 , r0_ . last_updated_user_id AS last_updated_user_id_83 , r0_ . deleted_by_user_id AS deleted_by_user_id_84 FROM reports r0_ LEFT JOIN reporttype r2_ ON r0_ . type_id = r2_ . id LEFT JOIN drugs d3_ ON r0_ . drug_id = d3_ . id LEFT JOIN companies c4_ ON d3_ . company_id = c4_ . id LEFT JOIN users u1_ ON r0_ . last_updated_user_id = u1_ . id LEFT JOIN drugingredients d5_ ON d3_ . id = d5_ . drug_id LEFT JOIN ingredients i6_ ON d5_ . ingredient_id = i6_ . id WHERE r2_ . id = 2 AND r0_ . drug_id = 21780 AND r0_ . parent_object_id IS NULL AND r0_ . draft = 0 AND r0_ . discontinuation_date < = '2025-12-10 02:58:27' AND r0_ . deleted_date IS NULL ORDER BY r0_ . updated_date DESC LIMIT 1 ;
Copy
10
0.26 ms
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . updated_date AS updated_date_3 , t0 . last_updated_operation AS last_updated_operation_4 , t0 . last_updated_ip AS last_updated_ip_5 , t0 . company_code AS company_code_6 , t0 . mfr_code AS mfr_code_7 , t0 . name AS name_8 , t0 . company_type AS company_type_9 , t0 . address_mailing_flag AS address_mailing_flag_10 , t0 . address_billing_flag AS address_billing_flag_11 , t0 . address_notification_flag AS address_notification_flag_12 , t0 . address_other AS address_other_13 , t0 . address_report_display AS address_report_display_14 , t0 . suite_number AS suite_number_15 , t0 . street_name AS street_name_16 , t0 . province AS province_17 , t0 . country AS country_18 , t0 . city AS city_19 , t0 . postal_code AS postal_code_20 , t0 . post_office_box AS post_office_box_21 , t0 . contact_information AS contact_information_22 , t0 . senior_official_user_id AS senior_official_user_id_23 , t0 . parent_object_id AS parent_object_id_24 , t0 . last_updated_user_id AS last_updated_user_id_25 FROM companies t0 WHERE t0 . id = ?
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . updated_date AS updated_date_3 , t0 . last_updated_operation AS last_updated_operation_4 , t0 . last_updated_ip AS last_updated_ip_5 , t0 . company_code AS company_code_6 , t0 . mfr_code AS mfr_code_7 , t0 . name AS name_8 , t0 . company_type AS company_type_9 , t0 . address_mailing_flag AS address_mailing_flag_10 , t0 . address_billing_flag AS address_billing_flag_11 , t0 . address_notification_flag AS address_notification_flag_12 , t0 . address_other AS address_other_13 , t0 . address_report_display AS address_report_display_14 , t0 . suite_number AS suite_number_15 , t0 . street_name AS street_name_16 , t0 . province AS province_17 , t0 . country AS country_18 , t0 . city AS city_19 , t0 . postal_code AS postal_code_20 , t0 . post_office_box AS post_office_box_21 , t0 . contact_information AS contact_information_22 , t0 . senior_official_user_id AS senior_official_user_id_23 , t0 . parent_object_id AS parent_object_id_24 , t0 . last_updated_user_id AS last_updated_user_id_25 FROM companies t0 WHERE t0 . id = 24 ;
Copy
11
0.32 ms
SELECT s0_ . id AS id_0 , s0_ . last_notification_date AS last_notification_date_1 , s0_ . last_updated AS last_updated_2 , s0_ . last_status AS last_status_3 , s0_ . last_number_of_results AS last_number_of_results_4 , s0_ . user_id AS user_id_5 , s0_ . drug_id AS drug_id_6 , s0_ . company_id AS company_id_7 , s0_ . ingredient_id AS ingredient_id_8 , s0_ . atc_id AS atc_id_9 FROM shortagealert s0_ LEFT JOIN users u1_ ON s0_ . user_id = u1_ . id WHERE u1_ . id = ? AND s0_ . drug_id = ? ORDER BY s0_ . last_updated DESC LIMIT 1
Parameters :
[
null
21780
]
SELECT s0_ . id AS id_0 , s0_ . last_notification_date AS last_notification_date_1 , s0_ . last_updated AS last_updated_2 , s0_ . last_status AS last_status_3 , s0_ . last_number_of_results AS last_number_of_results_4 , s0_ . user_id AS user_id_5 , s0_ . drug_id AS drug_id_6 , s0_ . company_id AS company_id_7 , s0_ . ingredient_id AS ingredient_id_8 , s0_ . atc_id AS atc_id_9 FROM shortagealert s0_ LEFT JOIN users u1_ ON s0_ . user_id = u1_ . id WHERE u1_ . id = NULL AND s0_ . drug_id = 21780 ORDER BY s0_ . last_updated DESC LIMIT 1 ;
Copy
12
0.41 ms
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
13
0.23 ms
SELECT s0_ . id AS id_0 , s0_ . last_notification_date AS last_notification_date_1 , s0_ . last_updated AS last_updated_2 , s0_ . last_status AS last_status_3 , s0_ . last_number_of_results AS last_number_of_results_4 , s0_ . user_id AS user_id_5 , s0_ . drug_id AS drug_id_6 , s0_ . company_id AS company_id_7 , s0_ . ingredient_id AS ingredient_id_8 , s0_ . atc_id AS atc_id_9 FROM shortagealert s0_ LEFT JOIN users u1_ ON s0_ . user_id = u1_ . id WHERE u1_ . id = ? AND s0_ . atc_id = ? ORDER BY s0_ . last_updated DESC LIMIT 1
Parameters :
[
null
1682
]
SELECT s0_ . id AS id_0 , s0_ . last_notification_date AS last_notification_date_1 , s0_ . last_updated AS last_updated_2 , s0_ . last_status AS last_status_3 , s0_ . last_number_of_results AS last_number_of_results_4 , s0_ . user_id AS user_id_5 , s0_ . drug_id AS drug_id_6 , s0_ . company_id AS company_id_7 , s0_ . ingredient_id AS ingredient_id_8 , s0_ . atc_id AS atc_id_9 FROM shortagealert s0_ LEFT JOIN users u1_ ON s0_ . user_id = u1_ . id WHERE u1_ . id = NULL AND s0_ . atc_id = 1682 ORDER BY s0_ . last_updated DESC LIMIT 1 ;
Copy
14
0.31 ms
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . last_updated_operation AS last_updated_operation_4 , t0 . last_updated_ip AS last_updated_ip_5 , t0 . ingredient_supplied_ind AS ingredient_supplied_ind_6 , t0 . strength AS strength_7 , t0 . strength_unit AS strength_unit_8 , t0 . strength_type AS strength_type_9 , t0 . dosage_value AS dosage_value_10 , t0 . dosage_unit AS dosage_unit_11 , t0 . base AS base_12 , t0 . notes AS notes_13 , t0 . parent_object_id AS parent_object_id_14 , t0 . last_updated_user_id AS last_updated_user_id_15 , t0 . ingredient_id AS ingredient_id_16 , t0 . drug_id AS drug_id_17 FROM drugingredients t0 WHERE ((t0 . parent_object_id IS NULL AND t0 . deleted_date IS NULL ) AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . last_updated_operation AS last_updated_operation_4 , t0 . last_updated_ip AS last_updated_ip_5 , t0 . ingredient_supplied_ind AS ingredient_supplied_ind_6 , t0 . strength AS strength_7 , t0 . strength_unit AS strength_unit_8 , t0 . strength_type AS strength_type_9 , t0 . dosage_value AS dosage_value_10 , t0 . dosage_unit AS dosage_unit_11 , t0 . base AS base_12 , t0 . notes AS notes_13 , t0 . parent_object_id AS parent_object_id_14 , t0 . last_updated_user_id AS last_updated_user_id_15 , t0 . ingredient_id AS ingredient_id_16 , t0 . drug_id AS drug_id_17 FROM drugingredients t0 WHERE ((t0 . parent_object_id IS NULL AND t0 . deleted_date IS NULL ) AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
15
0.21 ms
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . last_updated_operation AS last_updated_operation_3 , t0 . last_updated_ip AS last_updated_ip_4 , t0 . ingredient_code AS ingredient_code_5 , t0 . en_name AS en_name_6 , t0 . fr_name AS fr_name_7 , t0 . parent_object_id AS parent_object_id_8 , t0 . last_updated_user_id AS last_updated_user_id_9 FROM ingredients t0 WHERE t0 . id = ?
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . last_updated_operation AS last_updated_operation_3 , t0 . last_updated_ip AS last_updated_ip_4 , t0 . ingredient_code AS ingredient_code_5 , t0 . en_name AS en_name_6 , t0 . fr_name AS fr_name_7 , t0 . parent_object_id AS parent_object_id_8 , t0 . last_updated_user_id AS last_updated_user_id_9 FROM ingredients t0 WHERE t0 . id = 2520 ;
Copy
16
0.29 ms
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . last_updated_operation AS last_updated_operation_4 , t0 . last_updated_ip AS last_updated_ip_5 , t0 . ingredient_supplied_ind AS ingredient_supplied_ind_6 , t0 . strength AS strength_7 , t0 . strength_unit AS strength_unit_8 , t0 . strength_type AS strength_type_9 , t0 . dosage_value AS dosage_value_10 , t0 . dosage_unit AS dosage_unit_11 , t0 . base AS base_12 , t0 . notes AS notes_13 , t0 . parent_object_id AS parent_object_id_14 , t0 . last_updated_user_id AS last_updated_user_id_15 , t0 . ingredient_id AS ingredient_id_16 , t0 . drug_id AS drug_id_17 FROM drugingredients t0 WHERE ((t0 . parent_object_id IS NULL AND t0 . deleted_date IS NULL ) AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . last_updated_operation AS last_updated_operation_4 , t0 . last_updated_ip AS last_updated_ip_5 , t0 . ingredient_supplied_ind AS ingredient_supplied_ind_6 , t0 . strength AS strength_7 , t0 . strength_unit AS strength_unit_8 , t0 . strength_type AS strength_type_9 , t0 . dosage_value AS dosage_value_10 , t0 . dosage_unit AS dosage_unit_11 , t0 . base AS base_12 , t0 . notes AS notes_13 , t0 . parent_object_id AS parent_object_id_14 , t0 . last_updated_user_id AS last_updated_user_id_15 , t0 . ingredient_id AS ingredient_id_16 , t0 . drug_id AS drug_id_17 FROM drugingredients t0 WHERE ((t0 . parent_object_id IS NULL AND t0 . deleted_date IS NULL ) AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
17
0.25 ms
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
18
0.22 ms
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
19
0.29 ms
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . last_updated_operation AS last_updated_operation_3 , t0 . last_updated_ip AS last_updated_ip_4 , t0 . atc_number AS atc_number_5 , t0 . en_level_3_classification AS en_level_3_classification_6 , t0 . en_level_4_classification AS en_level_4_classification_7 , t0 . en_level_5_classification AS en_level_5_classification_8 , t0 . fr_level_3_classification AS fr_level_3_classification_9 , t0 . fr_level_4_classification AS fr_level_4_classification_10 , t0 . fr_level_5_classification AS fr_level_5_classification_11 , t0 . parent_object_id AS parent_object_id_12 , t0 . last_updated_user_id AS last_updated_user_id_13 FROM atcclassification t0 WHERE t0 . id = ?
SELECT t0 . id AS id_1 , t0 . updated_date AS updated_date_2 , t0 . last_updated_operation AS last_updated_operation_3 , t0 . last_updated_ip AS last_updated_ip_4 , t0 . atc_number AS atc_number_5 , t0 . en_level_3_classification AS en_level_3_classification_6 , t0 . en_level_4_classification AS en_level_4_classification_7 , t0 . en_level_5_classification AS en_level_5_classification_8 , t0 . fr_level_3_classification AS fr_level_3_classification_9 , t0 . fr_level_4_classification AS fr_level_4_classification_10 , t0 . fr_level_5_classification AS fr_level_5_classification_11 , t0 . parent_object_id AS parent_object_id_12 , t0 . last_updated_user_id AS last_updated_user_id_13 FROM atcclassification t0 WHERE t0 . id = 1682 ;
Copy
20
0.23 ms
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
21
0.23 ms
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . created_date AS created_date_2 , t0 . deleted_date AS deleted_date_3 , t0 . drug_id AS drug_id_4 , t0 . atc_classification_id AS atc_classification_id_5 , t0 . ahfs_information_id AS ahfs_information_id_6 FROM therapeutics t0 WHERE (t0 . deleted_date IS NULL AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
22
0.36 ms
SELECT t0 . id AS id_1 , t0 . current_status_flag AS current_status_flag_2 , t0 . status AS status_3 , t0 . history_date AS history_date_4 , t0 . created_date AS created_date_5 , t0 . deleted_date AS deleted_date_6 , t0 . drug_id AS drug_id_7 FROM statuses t0 WHERE (t0 . current_status_flag = ? AND t0 . drug_id = ? ) ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . current_status_flag AS current_status_flag_2 , t0 . status AS status_3 , t0 . history_date AS history_date_4 , t0 . created_date AS created_date_5 , t0 . deleted_date AS deleted_date_6 , t0 . drug_id AS drug_id_7 FROM statuses t0 WHERE (t0 . current_status_flag = 1 AND t0 . drug_id = 21780 ) ORDER BY t0 . id DESC ;
Copy
23
4.88 ms
SELECT t0 . id AS id_1 , t0 . gtin AS gtin_2 , t0 . package_info AS package_info_3 , t0 . created_date AS created_date_4 , t0 . updated_date AS updated_date_5 , t0 . drug_id AS drug_id_6 FROM drug_gtins t0 WHERE t0 . drug_id = ? ORDER BY t0 . id DESC
SELECT t0 . id AS id_1 , t0 . gtin AS gtin_2 , t0 . package_info AS package_info_3 , t0 . created_date AS created_date_4 , t0 . updated_date AS updated_date_5 , t0 . drug_id AS drug_id_6 FROM drug_gtins t0 WHERE t0 . drug_id = 21780 ORDER BY t0 . id DESC ;
Copy