Integrate examinations into CCS interview
This commit is contained in:
@@ -81,6 +81,7 @@ func _run() -> void:
|
||||
_assert(screen.current_view == "doctor_office", "an active interactive attempt should open the doctor office")
|
||||
_assert(not screen.active_scene.is_patient_dialogue_visible(), "the opening should wait for a clinician dialogue selection")
|
||||
_assert(screen.active_scene.choice_container.get_child_count() == 1, "the scene should render server-provided dialogue choices")
|
||||
_assert(screen.active_scene.examination_launcher.visible, "Examination should be available while questions are visible")
|
||||
_assert(screen.active_scene.computer_launcher.visible, "the doctor office should expose the simulated computer launcher")
|
||||
_assert(screen.active_scene.computer_launcher.icon.resource_path.ends_with("monitor.svg"), "the computer launcher should use the monitor icon")
|
||||
screen.active_scene.computer_launcher.pressed.emit()
|
||||
@@ -103,7 +104,9 @@ func _run() -> void:
|
||||
screen.active_scene.medical_history_launcher.pressed.emit()
|
||||
_assert(screen.active_scene.is_vitals_open() and screen.active_scene.is_medical_history_open(), "both chart windows should be able to remain open")
|
||||
_assert(screen.active_scene.medical_history_text.text == "Hyperlipidemia", "Medical History should render the case-authored past medical history")
|
||||
_assert(screen.active_scene.medical_history_window.size.y <= 310.0, "Medical History should size closely to its short content (size %s, minimum %s)" % [screen.active_scene.medical_history_window.size, screen.active_scene.medical_history_window.get_combined_minimum_size()])
|
||||
_assert(screen.active_scene.medical_history_window.size.y <= 350.0, "Medical History should size closely to its tabbed content (size %s, minimum %s)" % [screen.active_scene.medical_history_window.size, screen.active_scene.medical_history_window.get_combined_minimum_size()])
|
||||
_assert(screen.active_scene.physical_exam_tab_button.text == "Physical Exam", "Medical History should include a Physical Exam tab")
|
||||
_assert(screen.active_scene.medical_history_exam_text.text == "No physical examinations have been completed.", "Physical Exam should begin with an empty state")
|
||||
_assert(screen.active_scene.vitals_window.size.y <= 410.0, "Vitals should size to its rendered measurement rows")
|
||||
_assert(screen.active_scene.medical_history_window.z_index > screen.active_scene.vitals_window.z_index, "the most recently opened chart window should come to the front")
|
||||
var original_history_position: Vector2 = screen.active_scene.medical_history_window.position
|
||||
@@ -145,6 +148,7 @@ func _run() -> void:
|
||||
screen._render_state()
|
||||
await process_frame
|
||||
_assert(screen.active_scene.is_patient_dialogue_visible(), "a selected topic should display the patient's response")
|
||||
_assert(not screen.active_scene.examination_launcher.visible, "Examination should be unavailable while the patient is speaking")
|
||||
_assert(not screen.active_scene.choice_container.visible, "the next choices should wait until the patient finishes speaking")
|
||||
_assert(screen.active_scene.dialogue_pages.size() > 1, "long patient responses should split into readable dialogue pages")
|
||||
_assert(_label_content_fits(screen.active_scene.dialogue_text), "the first patient response page should fit inside its speech bubble")
|
||||
@@ -211,16 +215,18 @@ func _run() -> void:
|
||||
_assert(not screen.active_scene.choice_pager.visible, "a single terminal action should not show paging controls")
|
||||
var terminal_choice := screen.active_scene.choice_container.get_child(0) as Control
|
||||
_assert(terminal_choice.size.x <= 360.0, "a single terminal choice should remain a compact centered card")
|
||||
_assert((terminal_choice.get_child(0) as Label).text == "Begin Physical Examination",
|
||||
_assert((terminal_choice.get_child(0) as Label).text == "Review Examinations",
|
||||
"terminal dialogue should lead into the graphical physical examination")
|
||||
screen.active_scene.interview_continue_requested.emit()
|
||||
terminal_choice.pressed.emit()
|
||||
await process_frame
|
||||
_assert(screen.current_view == "physical_examination", "the examination should remain inside CCS Cases 2")
|
||||
_assert(screen.current_view == "doctor_office", "the examination should remain inside the active interview")
|
||||
_assert(screen.active_scene.is_physical_exam_visible(), "the physical examination panel should be visible")
|
||||
_assert(screen.active_scene.physical_exam_grid.columns == 2, "exam components should use two responsive columns")
|
||||
_assert(screen.active_scene.physical_exam_grid.get_child_count() == 12, "all twelve examination components should be available")
|
||||
_assert(not screen.active_scene.physical_exam_finish_button.disabled, "Finish Case should remain available before every exam is complete")
|
||||
screen.active_scene.set_physical_exam_pending("abdomen")
|
||||
screen.pending_action = "physical_exam"
|
||||
screen.pending_exam_code = "abdomen"
|
||||
_assert(screen.active_scene.physical_exam_finish_button.disabled, "case completion should pause while an exam command is pending")
|
||||
_assert(screen.active_scene.physical_exam_buttons.values().all(func(button): return button.disabled),
|
||||
"exam controls should disable while one component is submitted")
|
||||
@@ -229,10 +235,15 @@ func _run() -> void:
|
||||
service.attempt = examined_attempt
|
||||
screen._on_attempt_changed()
|
||||
await process_frame
|
||||
_assert(screen.current_view == "physical_examination", "attempt refreshes should preserve the physical examination phase")
|
||||
_assert(screen.active_scene.physical_exam_buttons.abdomen.text.begins_with("[Done]"), "completed exams should be marked")
|
||||
_assert(screen.active_scene.physical_exam_buttons.abdomen.disabled, "completed exams should not be repeated")
|
||||
_assert(screen.current_view == "doctor_office", "attempt refreshes should preserve the interview phase")
|
||||
_assert(screen.active_scene.physical_exam_finding_text.text == "Mild epigastric tenderness.", "the returned chart finding should be displayed")
|
||||
_assert(screen.active_scene.physical_exam_result_button.visible, "a completed exam should present a focused result card")
|
||||
screen.active_scene.physical_exam_result_button.pressed.emit()
|
||||
_assert(screen.active_scene.is_physical_exam_visible(), "terminal exam results should return to the exam selector")
|
||||
screen.active_scene.open_computer()
|
||||
screen.active_scene.open_medical_history()
|
||||
screen.active_scene.physical_exam_tab_button.pressed.emit()
|
||||
_assert(screen.active_scene.medical_history_exam_text.text.contains("Mild epigastric tenderness."), "completed findings should be stored in the Physical Exam tab")
|
||||
|
||||
service.attempt = {"id": "classic-attempt", "state": "active", "openingCompleted": false, "interview": {}}
|
||||
host.shown_screen = ""
|
||||
|
||||
Reference in New Issue
Block a user