https://staging-hospital.7mantra.in/cases/view/ZxY1GvuAgW5aDavkP4PH5TMno20

Query Metrics

21 Database Queries
21 Different statements
34.11 ms Query time
0 Invalid entities

Grouped Statements

Show all queries

default connection

Time Count Info
7.63 ms
(22.37%)
1
SELECT t0.id AS id_1, t0.mrd_id AS mrd_id_2, t0.patient_category AS patient_category_3, t0.family_history AS family_history_4, t0.medical_history AS medical_history_5, t0.medicine_history AS medicine_history_6, t0.abha_number AS abha_number_7, t0.current_disease_history AS current_disease_history_8, t0.is_lab AS is_lab_9, t0.confirmed_diagnosis AS confirmed_diagnosis_10, t0.temparature AS temparature_11, t0.cns AS cns_12, t0.endrocine AS endrocine_13, t0.excretory AS excretory_14, t0.pulse AS pulse_15, t0.bp_upper AS bp_upper_16, t0.bp_lower AS bp_lower_17, t0.respiration AS respiration_18, t0.auscultation AS auscultation_19, t0.local_examination AS local_examination_20, t0.is_medicine AS is_medicine_21, t0.is_ward AS is_ward_22, t0.follow_up_date AS follow_up_date_23, t0.is_pm_done AS is_pm_done_24, t0.is_death_cert_gen AS is_death_cert_gen_25, t0.is_birth_cert_gen AS is_birth_cert_gen_26, t0.is_closed AS is_closed_27, t0.is_reopened AS is_reopened_28, t0.is_opinion AS is_opinion_29, t0.is_referral AS is_referral_30, t0.emergency_staff_notes AS emergency_staff_notes_31, t0.pharmacy_staff_notes AS pharmacy_staff_notes_32, t0.ward_staff_notes AS ward_staff_notes_33, t0.pharmacy_patient_notes AS pharmacy_patient_notes_34, t0.closure_reason AS closure_reason_35, t0.created_at AS created_at_36, t0.updated_at AS updated_at_37, t0.lab_test_status AS lab_test_status_38, t0.case_medicine_status AS case_medicine_status_39, t0.ward_medicine_status AS ward_medicine_status_40, t0.hospital_id AS hospital_id_41, t0.patient_id AS patient_id_42, t0.doctor_id AS doctor_id_43, t0.prev_case_id AS prev_case_id_44, t0.disease_category_id AS disease_category_id_45, t0.icd10_cause_group_id AS icd10_cause_group_id_46, t0.icd10_cause_sub_group_id AS icd10_cause_sub_group_id_47, t0.icd10_disease_id AS icd10_disease_id_48, t49.id AS id_50, t49.is_surgery_advised AS is_surgery_advised_51, t49.is_complications AS is_complications_52, t49.status AS status_53, t49.discharge_reason AS discharge_reason_54, t49.is_for_pm AS is_for_pm_55, t49.discharge_note AS discharge_note_56, t49.created_at AS created_at_57, t49.updated_at AS updated_at_58, t49.case_id AS case_id_59, t49.ward_id AS ward_id_60, t0.created_by AS created_by_61, t0.updated_by AS updated_by_62, t63.id AS id_64, t63.baby_gender AS baby_gender_65, t63.is_abortion AS is_abortion_66, t63.bp_systolic AS bp_systolic_67, t63.bp_diastolic AS bp_diastolic_68, t63.baby_temp AS baby_temp_69, t63.uterus_pos AS uterus_pos_70, t63.nipple_pos AS nipple_pos_71, t63.delivery_type AS delivery_type_72, t63.baby_status AS baby_status_73, t63.baby_weight AS baby_weight_74, t63.is_cried_after_birth AS is_cried_after_birth_75, t63.is_passed_stool AS is_passed_stool_76, t63.is_diarrhea AS is_diarrhea_77, t63.is_pnemonia AS is_pnemonia_78, t63.is_preterm AS is_preterm_79, t63.is_asphaxia AS is_asphaxia_80, t63.is_malaria AS is_malaria_81, t63.is_congenital_detected AS is_congenital_detected_82, t63.is_injury AS is_injury_83, t63.is_mr AS is_mr_84, t63.is_ncd AS is_ncd_85, t63.is_vomitting AS is_vomitting_86, t63.is_activeness AS is_activeness_87, t63.respiration AS respiration_88, t63.is_diptheria AS is_diptheria_89, t63.is_tetanus AS is_tetanus_90, t63.is_pertusis AS is_pertusis_91, t63.is_meningitis AS is_meningitis_92, t63.is_aids AS is_aids_93, t63.is_convulsions AS is_convulsions_94, t63.is_breast_suckling AS is_breast_suckling_95, t63.is_chest_in_side AS is_chest_in_side_96, t63.is_jaundice AS is_jaundice_97, t63.umbilical_cord AS umbilical_cord_98, t63.is_sepsis AS is_sepsis_99, t63.other_complications AS other_complications_100, t63.is_bath_after_birth AS is_bath_after_birth_101, t63.remarks AS remarks_102, t63.created_at AS created_at_103, t63.case_id AS case_id_104, t63.ward_bed_id AS ward_bed_id_105, t63.danger_sign_id AS danger_sign_id_106, t63.child_id AS child_id_107, t63.child_case_id AS child_case_id_108, t109.id AS id_110, t109.brought_by AS brought_by_111, t109.office_letter_ref AS office_letter_ref_112, t109.date_brought AS date_brought_113, t109.examined_at AS examined_at_114, t109.id_mark1 AS id_mark1_115, t109.id_mark2 AS id_mark2_116, t109.created_at AS created_at_117, t109.case_id AS case_id_118, t119.id AS id_120, t119.corpse_sender AS corpse_sender_121, t119.place_corpse_sent AS place_corpse_sent_122, t119.place_corpse_sent_distance AS place_corpse_sent_distance_123, t119.corpse_bringer AS corpse_bringer_124, t119.corpse_identifier AS corpse_identifier_125, t119.exam_begun_at AS exam_begun_at_126, t119.exam_ended_at AS exam_ended_at_127, t119.accompany_report_substance AS accompany_report_substance_128, t119.place_examined AS place_examined_129, t119.distance_from_place AS distance_from_place_130, t119.why_not_sent_to_hospital AS why_not_sent_to_hospital_131, t119.sex_apparent_age_race_caste AS sex_apparent_age_race_caste_132, t119.desc_cloth_ornam AS desc_cloth_ornam_133, t119.cond_cloth AS cond_cloth_134, t119.special_marks_on_skin AS special_marks_on_skin_135, t119.newly_born_infant_details AS newly_born_infant_details_136, t119.body_condition AS body_condition_137, t119.regar_mortis AS regar_mortis_138, t119.decomp_signs_extents AS decomp_signs_extents_139, t119.features AS features_140, t119.skin_cond AS skin_cond_141, t119.external_genitals_injuries AS external_genitals_injuries_142, t119.limb_position AS limb_position_143, t119.surface_wounds_injuries AS surface_wounds_injuries_144, t119.cond_subcutaneous_tissues AS cond_subcutaneous_tissues_145, t119.other_injuries AS other_injuries_146, t119.sure_ante_mortem AS sure_ante_mortem_147, t119.head_injuries_under_scalp AS head_injuries_under_scalp_148, t119.skull_vault_base AS skull_vault_base_149, t119.brain_details AS brain_details_150, t119.thorax_walls_ribs_cartilages AS thorax_walls_ribs_cartilages_151, t119.pleura AS pleura_152, t119.larynx_trachea_bronchi AS larynx_trachea_bronchi_153, t119.right_lung AS right_lung_154, t119.left_lung AS left_lung_155, t119.pericardium AS pericardium_156, t119.heart AS heart_157, t119.large_vessels AS large_vessels_158, t119.heart_additional_remarks AS heart_additional_remarks_159, t119.abdomen_walls AS abdomen_walls_160, t119.peritoneum AS peritoneum_161, t119.cavity AS cavity_162, t119.bucal_cavity_teeth_tongue_pharynx AS bucal_cavity_teeth_tongue_pharynx_163, t119.desophagus AS desophagus_164, t119.stomach AS stomach_165, t119.small_intestine AS small_intestine_166, t119.large_intestine AS large_intestine_167, t119.liver_gall_bladder AS liver_gall_bladder_168, t119.pancreas_suprarenals AS pancreas_suprarenals_169, t119.spleen AS spleen_170, t119.kidneys AS kidneys_171, t119.bladder AS bladder_172, t119.generations_organs AS generations_organs_173, t119.stomach_additional_remarks AS stomach_additional_remarks_174, t119.retained_viscera_details AS retained_viscera_details_175, t119.spine_spinal_cord AS spine_spinal_cord_176, t119.death_cause_opinion AS death_cause_opinion_177, t119.created_at AS created_at_178, t119.updated_at AS updated_at_179, t119.case_id AS case_id_180, t119.created_by_id AS created_by_id_181, t119.updated_by_id AS updated_by_id_182, t183.id AS id_184, t183.immediate_cause AS immediate_cause_185, t183.antecedent_cause_b AS antecedent_cause_b_186, t183.antecedent_cause_c AS antecedent_cause_c_187, t183.other_significant_conditions AS other_significant_conditions_188, t183.on_set_interval AS on_set_interval_189, t183.how_injury_occurred AS how_injury_occurred_190, t183.manner_of_death AS manner_of_death_191, t183.is_pregnancy_death AS is_pregnancy_death_192, t183.is_delivery AS is_delivery_193, t183.died_at AS died_at_194, t183.created_at AS created_at_195, t183.updated_at AS updated_at_196, t183.case_id AS case_id_197, t183.created_by_id AS created_by_id_198, t183.updated_by_id AS updated_by_id_199, t200.id AS id_201, t200.reg_num AS reg_num_202, t200.created_at AS created_at_203, t200.updated_at AS updated_at_204, t200.case_id AS case_id_205, t200.created_by_id AS created_by_id_206, t200.updated_by_id AS updated_by_id_207 FROM cases t0 LEFT JOIN ward_beds t49 ON t49.case_id = t0.id LEFT JOIN delivery_details t63 ON t63.case_id = t0.id LEFT JOIN injured_info t109 ON t109.case_id = t0.id LEFT JOIN post_mortem_reports t119 ON t119.case_id = t0.id LEFT JOIN death_certificates t183 ON t183.case_id = t0.id LEFT JOIN birth_certificates t200 ON t200.case_id = t0.id WHERE t0.id = ?
Parameters:
[
  "2118"
]
4.25 ms
(12.47%)
1
SELECT l.name, tm.name method, l.normal_range, s.number, l.is_general, cl.result, cl.file_url FROM lab_tests l
			LEFT JOIN case_lab_tests cl ON cl.lab_test_id = l.id
			LEFT JOIN test_methods tm ON cl.method_id = tm.id
			LEFT JOIN samples s ON s.id = cl.sample_id
			LEFT JOIN cases c ON cl.case_id = c.id
			WHERE c.id = ?
Parameters:
[
  2118
]
2.97 ms
(8.72%)
1
SELECT s.name FROM symptoms s
			INNER JOIN case_symptoms cs ON cs.symptom_id = s.id
			WHERE cs.case_id = ?
Parameters:
[
  2118
]
2.30 ms
(6.73%)
1
SELECT pe.name FROM provisional_examinations pe
			INNER JOIN case_provisional_examinations cpe ON cpe.provisional_examination_id = pe.id
			WHERE cpe.case_id = ?
Parameters:
[
  2118
]
2.05 ms
(6.01%)
1
SELECT pd.name FROM provisional_diagnoses pd
			INNER JOIN case_provisional_diagnoses cpd ON cpd.provisional_diagnosis_id = pd.id
			WHERE cpd.case_id = ?
Parameters:
[
  2118
]
2.01 ms
(5.88%)
1
SELECT cm.id, cm.medicine_id, cm.medicine_type, cm.dose, cm.frequency, cm.num_days, cm.notes, CONCAT(ed.code, ' - ', ed.product_name) name, cm.is_referral, cm.is_opinion, cm.is_rejected FROM case_medicines cm
			INNER JOIN essential_drugs ed ON cm.medicine_id = ed.id
			WHERE cm.case_id = ? AND cm.is_of_ward = 0
Parameters:
[
  2118
]
1.94 ms
(5.69%)
1
SELECT n.name FROM non_comm_diseases n
			INNER JOIN case_ncds cn ON cn.ncd_id = n.id
			WHERE cn.case_id = ?
Parameters:
[
  2118
]
1.76 ms
(5.17%)
1
SELECT t0.id AS id_1, t0.uh_id AS uh_id_2, t0.first_name AS first_name_3, t0.middle_name AS middle_name_4, t0.last_name AS last_name_5, t0.father_husband_name AS father_husband_name_6, t0.photo AS photo_7, t0.gender AS gender_8, t0.marital_status AS marital_status_9, t0.dob AS dob_10, t0.house_plot_no AS house_plot_no_11, t0.address AS address_12, t0.pincode AS pincode_13, t0.mobile AS mobile_14, t0.email AS email_15, t0.adhar_num AS adhar_num_16, t0.bpl_num AS bpl_num_17, t0.health_id_number AS health_id_number_18, t0.health_address AS health_address_19, t0.abpm_jay AS abpm_jay_20, t0.occupation AS occupation_21, t0.family_income AS family_income_22, t0.is_active AS is_active_23, t0.bank_name AS bank_name_24, t0.bank_branch AS bank_branch_25, t0.bank_branch_address AS bank_branch_address_26, t0.bank_account AS bank_account_27, t0.bank_ifs_code AS bank_ifs_code_28, t0.created_at AS created_at_29, t0.updated_at AS updated_at_30, t0.member_code AS member_code_31, t0.is_alive AS is_alive_32, t0.expired_at AS expired_at_33, t0.hospital_id AS hospital_id_34, t0.village_id AS village_id_35, t0.death_cause_id AS death_cause_id_36, t0.created_by AS created_by_37, t0.updated_by AS updated_by_38 FROM patients t0 WHERE t0.id = ?
Parameters:
[
  1855
]
1.53 ms
(4.49%)
1
SELECT cp.name FROM clinical_patterns cp
			INNER JOIN case_clinical_patterns ccp ON ccp.clinical_pattern_id = cp.id
			WHERE ccp.case_id = ?
Parameters:
[
  2118
]
1.12 ms
(3.29%)
1
SELECT * FROM case_histories WHERE case_id = ? ORDER BY id DESC
Parameters:
[
  2118
]
1.09 ms
(3.20%)
1
SELECT t0.id AS id_1, t0.name AS name_2 FROM disease_categories t0 WHERE t0.id = ?
Parameters:
[
  1
]
1.05 ms
(3.07%)
1
SELECT CONCAT(sp.first_name, ' ', sp.last_name) doctor, h.name hospital, d.name department, cr.expert_opinion, cr.updated_at FROM case_referrals cr
			INNER JOIN users u ON cr.doctor_id = u.id
			INNER JOIN staff_profiles sp ON u.profile_id = sp.id
			INNER JOIN hospitals h ON cr.hospital_id = h.id
			INNER JOIN doctor_categories d ON sp.doctor_category_id = d.id
			WHERE cr.case_id = ? AND cr.is_opinion = 1
Parameters:
[
  2118
]
0.97 ms
(2.86%)
1
SELECT t0.id AS id_1, t0.username AS username_2, t0.password AS password_3, t0.password_old1 AS password_old1_4, t0.password_old2 AS password_old2_5, t0.password_md5 AS password_md5_6, t0.is_active AS is_active_7, t0.token AS token_8, t0.roles AS roles_9, t0.last_login AS last_login_10, t0.auth_code AS auth_code_11, t0.created_at AS created_at_12, t0.updated_at AS updated_at_13, t0.profile_id AS profile_id_14 FROM users t0 WHERE t0.id = ?
Parameters:
[
  40
]
0.93 ms
(2.71%)
1
SELECT w.name FROM wards w
			INNER JOIN ward_beds wb ON wb.ward_id = w.id
			WHERE wb.case_id = ? LIMIT 1
Parameters:
[
  2118
]
0.69 ms
(2.03%)
1
SELECT t0.id AS id_1, t0.first_name AS first_name_2, t0.last_name AS last_name_3, t0.father_name AS father_name_4, t0.mother_name AS mother_name_5, t0.gender AS gender_6, t0.photo AS photo_7, t0.local_address AS local_address_8, t0.permanent_address AS permanent_address_9, t0.dob AS dob_10, t0.dor AS dor_11, t0.email_otp_verify AS email_otp_verify_12, t0.mobile_otp_verify AS mobile_otp_verify_13, t0.adhar_num AS adhar_num_14, t0.pan_num AS pan_num_15, t0.email AS email_16, t0.temp_email AS temp_email_17, t0.temp_mobile_no AS temp_mobile_no_18, t0.email_otp AS email_otp_19, t0.mobile AS mobile_20, t0.mobile_otp AS mobile_otp_21, t0.emp_sen_num AS emp_sen_num_22, t0.gpf_cpf_num AS gpf_cpf_num_23, t0.contract_num AS contract_num_24, t0.is_update AS is_update_25, t0.quota_type AS quota_type_26, t0.job_type AS job_type_27, t0.bank_name AS bank_name_28, t0.bank_branch AS bank_branch_29, t0.bank_branch_address AS bank_branch_address_30, t0.bank_account AS bank_account_31, t0.bank_ifs_code AS bank_ifs_code_32, t0.reg_num AS reg_num_33, t0.created_at AS created_at_34, t0.updated_at AS updated_at_35, t36.id AS id_37, t36.username AS username_38, t36.password AS password_39, t36.password_old1 AS password_old1_40, t36.password_old2 AS password_old2_41, t36.password_md5 AS password_md5_42, t36.is_active AS is_active_43, t36.token AS token_44, t36.roles AS roles_45, t36.last_login AS last_login_46, t36.auth_code AS auth_code_47, t36.created_at AS created_at_48, t36.updated_at AS updated_at_49, t36.profile_id AS profile_id_50, t0.hospital_id AS hospital_id_51, t0.doctor_category_id AS doctor_category_id_52, t0.ward_id AS ward_id_53, t0.designation_setting_id AS designation_setting_id_54 FROM staff_profiles t0 LEFT JOIN users t36 ON t36.profile_id = t0.id WHERE t0.id = ?
Parameters:
[
  40
]
0.53 ms
(1.57%)
1
SELECT t0.id AS id_1, t0.type AS type_2, t0.message AS message_3, t0.is_read AS is_read_4, t0.created_at AS created_at_5, t0.user_id AS user_id_6 FROM notifications t0 WHERE t0.user_id = ? AND t0.is_read = ? ORDER BY t0.created_at DESC LIMIT 5
Parameters:
[
  40
  0
]
0.49 ms
(1.45%)
1
SELECT t0.id AS id_1, t0.h_num AS h_num_2, t0.reg_num AS reg_num_3, t0.abha_num AS abha_num_4, t0.reg_date AS reg_date_5, t0.abha_date AS abha_date_6, t0.hip_id AS hip_id_7, t0.hip_name AS hip_name_8, t0.hiu_id AS hiu_id_9, t0.hiu_name AS hiu_name_10, t0.name AS name_11, t0.type AS type_12, t0.level AS level_13, t0.code AS code_14, t0.is_active AS is_active_15, t0.address AS address_16, t0.pincode AS pincode_17, t0.phone AS phone_18, t0.email AS email_19, t0.latitude AS latitude_20, t0.longitude AS longitude_21, t0.created_at AS created_at_22, t0.updated_at AS updated_at_23, t0.district_id AS district_id_24, t0.taluka_id AS taluka_id_25, t0.village_id AS village_id_26 FROM hospitals t0 WHERE t0.id = ?
Parameters:
[
  5
]
0.28 ms
(0.82%)
1
SELECT cr.id, CONCAT(sp.first_name, ' ', sp.last_name) doctor, h.name hospital, cr.notes, cr.updated_at FROM case_referrals cr
			INNER JOIN users u ON cr.doctor_id = u.id
			INNER JOIN staff_profiles sp ON u.profile_id = sp.id
			INNER JOIN hospitals h ON cr.hospital_id = h.id
			WHERE cr.case_id = ? AND cr.is_opinion = 0 AND cr.is_other = 1
Parameters:
[
  2118
]
0.23 ms
(0.68%)
1
SELECT cm.id, cm.medicine_id, cm.medicine_type, cm.dose, cm.frequency, cm.num_days, cm.notes, CONCAT(ed.code, ' - ', ed.product_name) name, cm.is_emergency FROM case_medicines cm
			INNER JOIN essential_drugs ed ON cm.medicine_id = ed.id
			INNER JOIN ward_beds wb ON cm.case_id = wb.case_id
			WHERE cm.case_id = ? AND wb.status = 'Admitted' AND cm.is_of_ward = 1
Parameters:
[
  2118
]
0.15 ms
(0.43%)
1
SELECT id FROM ward_beds WHERE case_id = ? LIMIT 1
Parameters:
[
  2118
]
0.12 ms
(0.36%)
1
SELECT discharge_note FROM ward_beds WHERE case_id = ? LIMIT 1
Parameters:
[
  2118
]

cnmgts connection

No database queries were performed.

Database Connections

Name Service
default doctrine.dbal.default_connection
cnmgts doctrine.dbal.cnmgts_connection

Entity Managers

Name Service
default doctrine.orm.default_entity_manager

Second Level Cache

Second Level Cache is not enabled.

Entities Mapping

Class Mapping errors
App\Entity\User No errors.
App\Entity\StaffProfile No errors.
App\Entity\UserLoginHistory No errors.
App\Entity\Cases No errors.
App\Entity\Hospital No errors.
App\Entity\Patient No errors.
App\Entity\DiseaseCategory No errors.
App\Entity\Icd10CauseGroup No errors.
App\Entity\Icd10CauseSubGroup No errors.
App\Entity\Icd10Disease No errors.
App\Entity\WardBed No errors.
App\Entity\Ward No errors.
App\Entity\DeliveryDetail No errors.
App\Entity\PncHighRisk No errors.
App\Entity\InjuredInfo No errors.
App\Entity\PostMortemReport No errors.
App\Entity\DeathCertificate No errors.
App\Entity\BirthCertificate No errors.
App\Entity\CaseClinicalPattern No errors.
App\Entity\CaseProvisionalExamination No errors.
App\Entity\CaseProvisionalDiagnosis No errors.
App\Entity\CaseSymptom No errors.
App\Entity\CaseNcd No errors.
App\Entity\CaseReferral No errors.
App\Entity\CaseLaboratory No errors.
App\Entity\DoctorCategory No errors.
App\Entity\DesignationSetting No errors.
App\Entity\StaffServiceOrder No errors.
App\Entity\StaffEducation No errors.
App\Entity\StaffFamilyMember No errors.
App\Entity\StaffWorkExperience No errors.
App\Entity\StaffTraining No errors.
App\Entity\StaffSalaryHistory No errors.
App\Entity\StaffDeputation No errors.
App\Entity\StaffComplaint No errors.
App\Entity\StaffLeaveAllotment No errors.
App\Entity\Notification No errors.
App\Entity\District No errors.
App\Entity\Taluka No errors.
App\Entity\Village No errors.
App\Entity\DeathCause No errors.
App\Entity\Symptom No errors.
App\Entity\WardType No errors.
App\Entity\InjuryDetail No errors.
App\Entity\ClinicalPattern No errors.
App\Entity\ProvisionalExamination No errors.
App\Entity\ProvisionalDiagnosis No errors.
App\Entity\Ncd No errors.
App\Entity\LabTest No errors.
App\Entity\Sample No errors.
App\Entity\TestMethod No errors.
App\Entity\State No errors.
App\Entity\IphsBedStrength No errors.
App\Entity\LabTestMethod No errors.