hamyar_paygah.controllers.widgets.mission_details_tab_controller

Controller for mission details tab.

Attributes

NOT_REGISTERED_PERSIAN_TEXT

Text to show when an information is not yet registered by EMS

COLOR_WARNING

Color to use for warning values that are approaching critical thresholds.

COLOR_CRITICAL

Color to use for critical values that have exceeded safe thresholds.

RR_CRITICAL_LOW

Respiratory rate less than or equal to this value is considered critical (adult baseline).

RR_WARNING_LOW

Lower bound of warning range for respiratory rate (inclusive).

RR_NORMAL_HIGH

Upper bound of normal range for respiratory rate (inclusive).

RR_WARNING_HIGH

Upper bound of warning range for respiratory rate (inclusive).

RR_CRITICAL_HIGH

Respiratory rate greater than or equal to this value is considered critical (adult baseline).

PULSE_CRITICAL_LOW

Pulse rate strictly less than this value is considered critical (adult baseline).

PULSE_WARNING_LOW

Lower bound of warning range for pulse rate (inclusive).

PULSE_NORMAL_HIGH

Upper bound of normal range for pulse rate (inclusive).

PULSE_CRITICAL_HIGH

Pulse rate strictly greater than this value is considered critical (adult baseline).

SPO2_CRITICAL

Oxygen saturation strictly less than this value is considered critical.

SPO2_WARNING_HIGH

Upper bound of warning oxygen saturation range (inclusive).

BS_CRITICAL_LOW

Blood sugar strictly less than this value is considered critical hypoglycemia.

BS_WARNING_LOW

Lower bound of warning hypoglycemia range (inclusive).

BS_NORMAL_HIGH

Upper bound of normal glucose in blood

BS_CRITICAL_HIGH

Blood sugar strictly greater than this value is considered critical hyperglycemia.

BP_WARNING_SYS_HIGH

Systolic blood pressure greater than or equal to this value enters warning range.

BP_CRITICAL_SYS_HIGH

Systolic blood pressure greater than or equal to this value is considered critical.

BP_WARNING_DIA_HIGH

Diastolic blood pressure greater than or equal to this value enters warning range.

BP_CRITICAL_DIA_HIGH

Diastolic blood pressure greater than or equal to this value is considered critical.

BP_WARNING_SYS_LOW

Systolic blood pressure lower than or equal to this value enters warning range.

BP_CRITICAL_SYS_LOW

Systolic blood pressure lower than or equal to this value is considered critical.

BP_WARNING_DIA_LOW

Diastolic blood pressure lower than or equal to this value enters warning range.

BP_CRITICAL_DIA_LOW

Diastolic blood pressure lower than or equal to this value is considered critical.

EYE_GCS_CRITICAL

Eye GCS score less than or equal to this value is considered critical.

EYE_GCS_WARNING

Eye GCS score equal to this value is considered warning.

EYE_GCS_NORMAL

Eye GCS score equal to this value is considered normal.

VERBAL_GCS_CRITICAL

Verbal GCS score less than or equal to this value is considered critical.

VERBAL_GCS_WARNING

Verbal GCS score equal to this value is considered warning.

VERBAL_GCS_NORMAL

Verbal GCS score equal to this value is considered normal.

MOTOR_GCS_CRITICAL

Motor GCS score less than or equal to this value is considered critical.

MOTOR_GCS_WARNING

Motor GCS score equal to this value is considered warning.

MOTOR_GCS_NORMAL

Motor GCS score equal to this value is considered normal.

GCS_CRITICAL

Total GCS less than or equal to this value is considered critical (severe impairment).

GCS_WARNING_LOW

Lower bound of warning GCS range (inclusive).

GCS_WARNING_HIGH

Upper bound of warning GCS range (inclusive). A score of 15 is considered normal.

Classes

MissionsDetailsTab

Tab that enables user to retrieve details of a mission.

Module Contents

hamyar_paygah.controllers.widgets.mission_details_tab_controller.NOT_REGISTERED_PERSIAN_TEXT: str = 'ثبت نشده'

Text to show when an information is not yet registered by EMS

hamyar_paygah.controllers.widgets.mission_details_tab_controller.COLOR_WARNING

Color to use for warning values that are approaching critical thresholds.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.COLOR_CRITICAL

Color to use for critical values that have exceeded safe thresholds.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.RR_CRITICAL_LOW = 8

Respiratory rate less than or equal to this value is considered critical (adult baseline).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.RR_WARNING_LOW = 11

Lower bound of warning range for respiratory rate (inclusive). Values between RR_CRITICAL_LOW+1 and this value are considered warning.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.RR_NORMAL_HIGH = 20

Upper bound of normal range for respiratory rate (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.RR_WARNING_HIGH = 24

Upper bound of warning range for respiratory rate (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.RR_CRITICAL_HIGH = 25

Respiratory rate greater than or equal to this value is considered critical (adult baseline).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.PULSE_CRITICAL_LOW = 50

Pulse rate strictly less than this value is considered critical (adult baseline).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.PULSE_WARNING_LOW = 59

Lower bound of warning range for pulse rate (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.PULSE_NORMAL_HIGH = 100

Upper bound of normal range for pulse rate (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.PULSE_CRITICAL_HIGH = 120

Pulse rate strictly greater than this value is considered critical (adult baseline).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.SPO2_CRITICAL = 90

Oxygen saturation strictly less than this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.SPO2_WARNING_HIGH = 94

Upper bound of warning oxygen saturation range (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BS_CRITICAL_LOW = 54

Blood sugar strictly less than this value is considered critical hypoglycemia.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BS_WARNING_LOW = 69

Lower bound of warning hypoglycemia range (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BS_NORMAL_HIGH = 140

Upper bound of normal glucose in blood

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BS_CRITICAL_HIGH = 250

Blood sugar strictly greater than this value is considered critical hyperglycemia.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_WARNING_SYS_HIGH = 140

Systolic blood pressure greater than or equal to this value enters warning range.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_CRITICAL_SYS_HIGH = 180

Systolic blood pressure greater than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_WARNING_DIA_HIGH = 90

Diastolic blood pressure greater than or equal to this value enters warning range.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_CRITICAL_DIA_HIGH = 120

Diastolic blood pressure greater than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_WARNING_SYS_LOW = 90

Systolic blood pressure lower than or equal to this value enters warning range.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_CRITICAL_SYS_LOW = 70

Systolic blood pressure lower than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_WARNING_DIA_LOW = 60

Diastolic blood pressure lower than or equal to this value enters warning range.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.BP_CRITICAL_DIA_LOW = 40

Diastolic blood pressure lower than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.EYE_GCS_CRITICAL = 2

Eye GCS score less than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.EYE_GCS_WARNING = 3

Eye GCS score equal to this value is considered warning.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.EYE_GCS_NORMAL = 4

Eye GCS score equal to this value is considered normal.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.VERBAL_GCS_CRITICAL = 3

Verbal GCS score less than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.VERBAL_GCS_WARNING = 4

Verbal GCS score equal to this value is considered warning.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.VERBAL_GCS_NORMAL = 5

Verbal GCS score equal to this value is considered normal.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.MOTOR_GCS_CRITICAL = 4

Motor GCS score less than or equal to this value is considered critical.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.MOTOR_GCS_WARNING = 5

Motor GCS score equal to this value is considered warning.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.MOTOR_GCS_NORMAL = 6

Motor GCS score equal to this value is considered normal.

hamyar_paygah.controllers.widgets.mission_details_tab_controller.GCS_CRITICAL = 8

Total GCS less than or equal to this value is considered critical (severe impairment).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.GCS_WARNING_LOW = 9

Lower bound of warning GCS range (inclusive).

hamyar_paygah.controllers.widgets.mission_details_tab_controller.GCS_WARNING_HIGH = 14

Upper bound of warning GCS range (inclusive). A score of 15 is considered normal.

class hamyar_paygah.controllers.widgets.mission_details_tab_controller.MissionsDetailsTab

Bases: PySide6.QtWidgets.QWidget

Tab that enables user to retrieve details of a mission.

ui
async on_search_button_clicked()

Loads the mission details from server and populates the fields.

Return type:

None

_clear_data()

Clears all the fields and checkboxes in the UI.

Return type:

None

_populate_information_tab(mission_details)

Populates the information tab with data of the mission details model.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_times_and_distances_tab(mission_details)

Populates the times and distances tab with data from mission details model.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_location_and_emergency_tab(mission_details)

Populates the location and emergency tab with data from mission details model.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_symptoms_tab(mission_details)

Populates the symptoms tab from mission details data.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_setup_vital_signs_table()
Return type:

None

_classify_respiratory_rate(value)
Parameters:

value (int)

Return type:

str

_classify_pulse(value)
Parameters:

value (int)

Return type:

str

_classify_blood_pressure(value)
Parameters:

value (int | str)

Return type:

str

_classify_blood_sugar(value)
Parameters:

value (int)

Return type:

str

_classify_spo2(value)
Parameters:

value (int)

Return type:

str

_classify_eye_gcs(value)
Parameters:

value (int)

Return type:

str

_classify_verbal_gcs(value)
Parameters:

value (int)

Return type:

str

_classify_motor_gcs(value)
Parameters:

value (int)

Return type:

str

_classify_gcs_total(value)
Parameters:

value (int)

Return type:

str

_classify_vital_sign(row, value)

Classifies a vital sign value into normal, warning, or critical state.

Parameters:
Return type:

str

_populate_vital_signs_table(mission_details)

Populates the vital signs table from mission details data.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_medical_history_section(mission_details)

Populates the medical history section by data of mission details.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_pupils_lungs_heart_section(mission_details)

Populates the pupils, lungs and heart section by data of mission details.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_trauma_types_section(mission_details)

Populates the trauma types section by data of mission details.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_medical_actions_section(mission_details)

Populates the medical actions section by data of mission details.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_setup_drugs_list_table()

Setups the drugs list table with appropriate row labels and initial configuration.

Return type:

None

_populate_drugs_list_table(mission_details)

Populates the drugs list table from mission details data.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_consumables_list_table(mission_details)

Populates the consumables list table from mission details data.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

_populate_medical_center_section(mission_details)

Populates the medical center section by data of mission details.

Parameters:

mission_details (hamyar_paygah.models.mission_details_model.MissionDetails)

Return type:

None

Fill inputs and trigger search.

Parameters:
  • mission_id (int)

  • patient_id (int)

Return type:

None