Expand CCS patient history

This commit is contained in:
hz
2026-08-09 23:59:28 -05:00
parent d349998d12
commit 33b55753cb
8 changed files with 306 additions and 75 deletions
+9 -15
View File
@@ -5,10 +5,7 @@ const Style := preload("res://scripts/ui/ui_style.gd")
const DOCTOR_SCENE := preload("res://scenes/ccs_cases_2/doctor_office.tscn")
const DESIGN_SIZE := Vector2(1600.0, 900.0)
const FOCUSED_INTERVIEW_CASE_ID := "ccs-gastro-duodenal-ulcer-office-001"
const RETIRED_INTERVIEW_TOPIC_IDS := [
"abdominal_symptoms", "bleeding_alarm_features", "medications",
"medical_history", "social_history", "additional_review"
]
const FOCUSED_INTERVIEW_REVISION := 2
var main
var stage_root: Control
@@ -235,7 +232,8 @@ func _show_doctor_office(node: Dictionary, attempt: Dictionary = {}) -> void:
attempt.get("graphicalPresentation", {}),
str(attempt.get("simulatedStartUtc", "")),
int(attempt.get("simulatedMinute", 0)),
attempt.get("vitals", {}))
attempt.get("vitals", {}),
str(attempt.get("medicalHistory", "")))
active_scene.configure_interview(node)
active_scene.set_choices_pending(not pending_action.is_empty())
@@ -270,7 +268,8 @@ func _render_debrief(attempt: Dictionary) -> void:
attempt.get("graphicalPresentation", {}),
str(attempt.get("simulatedStartUtc", "")),
int(attempt.get("simulatedMinute", 0)),
attempt.get("vitals", {}))
attempt.get("vitals", {}),
str(attempt.get("medicalHistory", "")))
active_scene.show_debrief(attempt.get("interviewDebrief", {}), attempt.get("score", {}))
current_view = "interview_debrief"
@@ -289,16 +288,11 @@ func _repeat_interview() -> void:
CCSService.create_attempt(case_external_id, "timed")
func _is_retired_interview_revision(attempt: Dictionary, node: Dictionary) -> bool:
func _is_retired_interview_revision(attempt: Dictionary, _node: Dictionary) -> bool:
if str(attempt.get("caseExternalId", "")) != FOCUSED_INTERVIEW_CASE_ID:
return false
if str(node.get("id", "")) in RETIRED_INTERVIEW_TOPIC_IDS:
return true
for raw_choice in node.get("choices", []):
if str(raw_choice.get("id", "")) in RETIRED_INTERVIEW_TOPIC_IDS:
return true
var patient_text := str(node.get("patientText", "")).to_lower()
return patient_text.contains("stomach bothers me") or patient_text.contains("gnawing ache")
var presentation: Dictionary = attempt.get("graphicalPresentation", {})
return int(presentation.get("interviewRevision", 0)) < FOCUSED_INTERVIEW_REVISION
func _restart_with_current_interview(attempt: Dictionary) -> void:
@@ -306,7 +300,7 @@ func _restart_with_current_interview(attempt: Dictionary) -> void:
return
restart_case_external_id = str(attempt.get("caseExternalId", ""))
pending_action = "refreshing_interview"
_show_selection("Updating this interview to its latest dizziness and fatigue dialogue...")
_show_selection("Updating this interview to its latest patient history dialogue...")
CCSService.abandon()