hamyar_paygah.controllers.widgets.region_analyzer_tab_controller ================================================================ .. py:module:: hamyar_paygah.controllers.widgets.region_analyzer_tab_controller .. autoapi-nested-parse:: Controller for the region analyzer tab. Attributes ---------- .. autoapisummary:: hamyar_paygah.controllers.widgets.region_analyzer_tab_controller.COUNT_PERSIAN_TEXT Classes ------- .. autoapisummary:: hamyar_paygah.controllers.widgets.region_analyzer_tab_controller.RegionAnalyzerTab Module Contents --------------- .. py:data:: COUNT_PERSIAN_TEXT :type: str :value: 'تعداد' Persian text for the word (count) .. py:class:: RegionAnalyzerTab Bases: :py:obj:`PySide6.QtWidgets.QWidget` Tab that analyzes a region and shows its details. .. py:attribute:: ui .. py:method:: _populate_region_picker() Populates the region picker with regions dictionary. .. py:method:: on_from_date_picker_userDateChanged(new_date) Ensure from date is always equal or less than the to date. :param new_date: User input date when from date picker is changed. :type new_date: PySide6.QtCore.QDate .. py:method:: on_to_date_picker_userDateChanged(new_date) Ensure to date is always equal or more that the from date. :param new_date: User input date when to date picker is changed. :type new_date: PySide6.QtCore.QDate .. py:method:: on_load_button_clicked() :async: Dynamically load the missions list from the server and build the tabs based on it. .. py:method:: _clear_data() Clears all the fields and checkboxes in the UI. .. py:method:: _group_missions_by_ambulance_code(missions_list) Groups the missions by ambulance code. :param missions_list: List of missions to be grouped. :type missions_list: list[Mission] :returns: A dictionary where the keys are ambulance codes and the values are lists of missions. :rtype: dict[int, list[Mission]] .. py:method:: _sorted_counter(counter) .. py:method:: _process_missions(missions_list, progress_callback) :async: Process missions asynchronously with progress reporting. .. py:method:: _summarize_missions(missions_list) :async: Compute basic statistics from the missions list. .. py:method:: _build_tabs(missions_list) :async: Build dynamic tabs per ambulance and one overall tab. .. py:method:: _create_summary_widget(missions_list) :async: Create a simple summary display widget for a mission list. .. py:method:: _populate_mission_per_hospital_table(missions_per_hospital, ui) Populate the missions per hospital table with the given data. .. py:method:: _populate_mission_per_result_table(missions_per_result, ui) Populate the missions per result table with the given data. .. py:method:: _populate_consumables_table(table, consumables_list) .. py:method:: _populate_drugs_table(table, drugs_list) .. py:method:: _populate_caller_numbers_table(table, numbers_list) .. py:method:: _populate_location_types_table(table, location_types_list) .. py:method:: _populate_accident_types_table(table, accident_types_list) .. py:method:: _populate_illness_types_table(table, illness_types_list) .. py:method:: _populate_vehicle_types_table(table, vehicle_types_list) .. py:method:: _populate_injury_types_table(table, injury_types_list) .. py:method:: _populate_chief_complaints_table(table, chief_complaints_list) .. py:method:: _populate_missions_address_table(table, addresses_list)