From 579e1e9be4ca5c72ace66c4cebc44196a6197099 Mon Sep 17 00:00:00 2001 From: hz Date: Mon, 10 Aug 2026 01:05:06 -0500 Subject: [PATCH] Refine CCS desktop shortcuts --- api/QuestionsApi.Tests/CcsCaseTests.cs | 2 + assets/ccs_cases_2/icons/medical-history.svg | 5 +++ .../icons/medical-history.svg.import | 43 +++++++++++++++++++ assets/ccs_cases_2/icons/vitals.svg | 4 ++ assets/ccs_cases_2/icons/vitals.svg.import | 43 +++++++++++++++++++ content/ccs/duodenal-ulcer-office-001.json | 2 +- scenes/ccs_cases_2/doctor_office.tscn | 28 ++++++------ tests/ccs_cases_2_ui_test.gd | 2 + 8 files changed, 112 insertions(+), 17 deletions(-) create mode 100644 assets/ccs_cases_2/icons/medical-history.svg create mode 100644 assets/ccs_cases_2/icons/medical-history.svg.import create mode 100644 assets/ccs_cases_2/icons/vitals.svg create mode 100644 assets/ccs_cases_2/icons/vitals.svg.import diff --git a/api/QuestionsApi.Tests/CcsCaseTests.cs b/api/QuestionsApi.Tests/CcsCaseTests.cs index d43f8e2..0bc3d7c 100644 --- a/api/QuestionsApi.Tests/CcsCaseTests.cs +++ b/api/QuestionsApi.Tests/CcsCaseTests.cs @@ -110,6 +110,8 @@ public sealed class CcsCaseTests Assert.All(topics.Where(value => value.Id is "relieving_factors" or "associated_gi" or "exposure_history"), value => Assert.Equal(["abdominal_character"], value.PrerequisiteTopicIds)); Assert.False(topics.Single(value => value.Id == "past_medical_history").Required); + Assert.Contains("cholesterol was high", topics.Single(value => value.Id == "past_medical_history").PatientText, + StringComparison.OrdinalIgnoreCase); Assert.Equal(2, request.Cases.Single().GraphicalPresentation.InterviewRevision); Assert.Equal("Hyperlipidemia", CcsStore.MedicalHistory(request.Cases.Single())); } diff --git a/assets/ccs_cases_2/icons/medical-history.svg b/assets/ccs_cases_2/icons/medical-history.svg new file mode 100644 index 0000000..ec8a336 --- /dev/null +++ b/assets/ccs_cases_2/icons/medical-history.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/ccs_cases_2/icons/medical-history.svg.import b/assets/ccs_cases_2/icons/medical-history.svg.import new file mode 100644 index 0000000..a859483 --- /dev/null +++ b/assets/ccs_cases_2/icons/medical-history.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cj8q5fugoyfhq" +path="res://.godot/imported/medical-history.svg-8cd75462cd9d8822133509e0f23e2799.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ccs_cases_2/icons/medical-history.svg" +dest_files=["res://.godot/imported/medical-history.svg-8cd75462cd9d8822133509e0f23e2799.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/assets/ccs_cases_2/icons/vitals.svg b/assets/ccs_cases_2/icons/vitals.svg new file mode 100644 index 0000000..643eaba --- /dev/null +++ b/assets/ccs_cases_2/icons/vitals.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/ccs_cases_2/icons/vitals.svg.import b/assets/ccs_cases_2/icons/vitals.svg.import new file mode 100644 index 0000000..6ff14b1 --- /dev/null +++ b/assets/ccs_cases_2/icons/vitals.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8juqb8k774q4" +path="res://.godot/imported/vitals.svg-aeab46849d322f67e09ecb738933ea93.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ccs_cases_2/icons/vitals.svg" +dest_files=["res://.godot/imported/vitals.svg-aeab46849d322f67e09ecb738933ea93.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/content/ccs/duodenal-ulcer-office-001.json b/content/ccs/duodenal-ulcer-office-001.json index 591eb5b..89f3f68 100644 --- a/content/ccs/duodenal-ulcer-office-001.json +++ b/content/ccs/duodenal-ulcer-office-001.json @@ -94,7 +94,7 @@ { "id": "past_medical_history", "clinicianText": "Do you have any past medical conditions?", - "patientText": "I have hyperlipidemia.", + "patientText": "A few years ago, my doctor told me my cholesterol was high. Other than that, I have not been diagnosed with any major medical problems.", "required": false, "prerequisiteTopicIds": ["chief_concern"] } diff --git a/scenes/ccs_cases_2/doctor_office.tscn b/scenes/ccs_cases_2/doctor_office.tscn index 90044cc..933fc6f 100644 --- a/scenes/ccs_cases_2/doctor_office.tscn +++ b/scenes/ccs_cases_2/doctor_office.tscn @@ -9,8 +9,8 @@ [ext_resource type="Texture2D" path="res://assets/ccs_cases_2/images/computer/computer-base.png" id="7_computer"] [ext_resource type="Texture2D" path="res://assets/icons/lucide/monitor.svg" id="8_monitor"] [ext_resource type="Texture2D" path="res://assets/icons/lucide/x.svg" id="9_close"] -[ext_resource type="Texture2D" path="res://assets/icons/lucide/heart-pulse.svg" id="10_vitals"] -[ext_resource type="Texture2D" path="res://assets/icons/lucide/clipboard-list.svg" id="11_history"] +[ext_resource type="Texture2D" path="res://assets/ccs_cases_2/icons/vitals.svg" id="10_vitals"] +[ext_resource type="Texture2D" path="res://assets/ccs_cases_2/icons/medical-history.svg" id="11_history"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_patient_fit"] shader = ExtResource("5_patient_fit") @@ -281,9 +281,8 @@ offset_top = 32.0 offset_right = 142.0 offset_bottom = 138.0 mouse_default_cursor_shape = 2 -tooltip_text = "View nurse vital signs" icon = ExtResource("10_vitals") -icon_max_width = 48 +icon_max_width = 58 expand_icon = true icon_alignment = 1 vertical_icon_alignment = 0 @@ -299,9 +298,8 @@ grow_horizontal = 2 grow_vertical = 0 mouse_filter = 2 theme_override_colors/font_color = Color(0.96, 0.98, 1, 1) -theme_override_colors/font_shadow_color = Color(0.01, 0.04, 0.07, 0.9) -theme_override_constants/shadow_offset_x = 1 -theme_override_constants/shadow_offset_y = 2 +theme_override_colors/font_outline_color = Color(0.01, 0.04, 0.07, 0.95) +theme_override_constants/outline_size = 4 theme_override_font_sizes/font_size = 17 text = "Vitals" horizontal_alignment = 1 @@ -309,14 +307,13 @@ vertical_alignment = 1 [node name="MedicalHistoryLauncher" type="Button" parent="ComputerOverlay"] layout_mode = 0 -offset_left = 158.0 -offset_top = 32.0 -offset_right = 294.0 -offset_bottom = 138.0 +offset_left = 30.0 +offset_top = 154.0 +offset_right = 166.0 +offset_bottom = 260.0 mouse_default_cursor_shape = 2 -tooltip_text = "View medical history" icon = ExtResource("11_history") -icon_max_width = 48 +icon_max_width = 58 expand_icon = true icon_alignment = 1 vertical_icon_alignment = 0 @@ -332,9 +329,8 @@ grow_horizontal = 2 grow_vertical = 0 mouse_filter = 2 theme_override_colors/font_color = Color(0.96, 0.98, 1, 1) -theme_override_colors/font_shadow_color = Color(0.01, 0.04, 0.07, 0.9) -theme_override_constants/shadow_offset_x = 1 -theme_override_constants/shadow_offset_y = 2 +theme_override_colors/font_outline_color = Color(0.01, 0.04, 0.07, 0.95) +theme_override_constants/outline_size = 4 theme_override_font_sizes/font_size = 16 text = "Medical History" horizontal_alignment = 1 diff --git a/tests/ccs_cases_2_ui_test.gd b/tests/ccs_cases_2_ui_test.gd index b0e0fd0..d647d5a 100644 --- a/tests/ccs_cases_2_ui_test.gd +++ b/tests/ccs_cases_2_ui_test.gd @@ -93,6 +93,8 @@ func _run() -> void: _assert(screen.active_scene.vitals_launcher.text.is_empty() and screen.active_scene.medical_history_launcher.text.is_empty(), "desktop shortcuts should place labels below centered icons") _assert(screen.active_scene.vitals_launcher.get_node("Label").text == "Vitals" and screen.active_scene.medical_history_launcher.get_node("Label").text == "Medical History", "desktop shortcut labels should remain readable") _assert(screen.active_scene.vitals_launcher.get_theme_stylebox("normal") is StyleBoxEmpty and screen.active_scene.medical_history_launcher.get_theme_stylebox("normal") is StyleBoxEmpty, "desktop shortcuts should not render permanent button tiles") + _assert(screen.active_scene.medical_history_launcher.position.y > screen.active_scene.vitals_launcher.get_rect().end.y, "desktop shortcuts should form a vertical icon column") + _assert(screen.active_scene.vitals_launcher.icon.get_width() >= 58 and screen.active_scene.medical_history_launcher.icon.get_width() >= 58, "desktop shortcuts should use high-resolution vector imports") screen.active_scene.vitals_launcher.pressed.emit() _assert(screen.active_scene.is_vitals_open(), "the Vitals app should open a nurse vital-sign window") _assert(screen.active_scene.vitals_header.get_node("Title").text == "Vitals", "the vital window should use the concise Vitals heading")