# Medical emergency call intake — companion Python lab

Context: Klyff Harlley Toledo’s 2012 work on emergency-call overload in São Paulo.
This package illustrates selected administrative-state and resource-filtering techniques.
It is not clinical triage, an emergency service, a hospital directory or medical advice.
No patient data, real hospital addresses, phone calls, dispatch or microphone input are used.

Requires Python 3.9+, standard library only. No pip packages.

    python3 medical_intake.py
    python3 medical_intake.py --speak
    python3 medical_intake.py --demo
    python3 medical_intake.py --test

Enter an example location. Say/type no to correct it, yes to confirm, or operator / 0
for immediate handoff. Every final packet retains needs_clinician=true.
Unconfirmed locations remain explicitly unconfirmed on handoff.

--speak uses an existing local say, espeak or flite executable, without installing software.
--demo uses example records DEMO A/B/C/D and an externally supplied service fixture.
It excludes closed/stale records and ranks the remaining example records by the sum
of supplied travel and handover estimates. It never interprets symptoms or selects
clinical care automatically. The values explain the calculations; the operational directory is not disclosed.

Nine software tests cover filtering, uncertainty, handoff and review gates.
They do not measure acoustic recognition, medical safety or patient outcomes.

The review object in the example is a fixture, not a security mechanism. Production
requires authenticated clinical authority, case binding, audited approval and verified
resource/transport information. Completing automation must not block human access.

Provided under the MIT License. Local voice engines have their own licenses.

This is part of a personal historical record. The article presents selected techniques available or developed at the time, not the complete implementation. People, companies, confidential information and intellectual property remain protected. Rights remain with their respective owners, including the author’s patents.
