Inspiration
Our team manages a large population of patients with brain tumour from initial diagnosis and counselling through surgery and post-operative care. This is a well-established pathway with clear protocols. However, the actual mechanics of checking in with patients and managing unscheduled queries from patients is unsatisfactory for patients and clinicians.
At present, there are limited resources available to check in with patients regularly, limited only to irregular outpatient appointments. This means that issues that could have been detected earlier are sometimes missed.
Enquiries from patients typically end up as emails to an administrative team which are forwarded to clinicians. Responses are frequently delayed when staff are away or busy, leading to a delay in responding, and the information provided is frequently limited making assessing urgency challenging. This often leads to a large amount of time spent clarifying issues or making unnecessary clinic appointments to ultimately reassure patients on non-urgent issues. Equally, if urgent issues are not escalated quickly these can be missed and response time delayed.
What it does
We built a system to formalise this outpatient pathway and improve the experience for patients and clinicians.
Patient accounts are created during clinic appointments. Patients receive a single-use magic link to create an account. They can then install the application on their phone as a progressive web app.
When patients log in, they are presented with a chat interface. They can chat with this when they have queries. An LLM responds to them; this walks them through a workflow to clarify the issue. This is informed by a set of knowledge documents indicating the questions to ask and "red flag" symptoms. Once the patient and LLM have collaboratively determined a clear "problem statement", the LLM repeats this back to the patient and asks them to endorse it.
If the patient does not agree with the summary, the clarification continues until they endorse it. Once they endorse, this enters the next stage of the workflow. A priority score is assigned based on the perceived urgency. For urgent issues, the workflow stops, generic safety advice is given and an alert is sent to the clinical team.
For non-urgent issues, the LLM uses our knowledge documents to present the patient with some initial advice, clarifying that this is automatically generated. It then sends the enquiry to the clinician portal.
There is also a "check-in" mechanism, where regular prompts are sent to the patient via email to prompt them to check in to catch issues early; this enters the same workflow.
On the clinician side, there is a shared enquiry queue for all clinicians on the team. Urgent queries are clearly tagged. When a query is open, the clinician can review the patient history, chat transcript, LLM-generated summary and any LLM-generated advice. For those with automatic advice, they can then endorse this, which alerts the patient that their enquiry has been reviewed, or reject it and send a follow up message to the patient to clarify the advice.
There are also workflows included for managing policy documents and the knowledge base; this can be updated as needed. All workflows are logged and auditable to identify where referrals are triaged incorrectly or incorrect advice is given to allow iterative improvement.
This allows us to formalise our patient workflow to deliver a better, faster experience for patients and clinicians.
How we built it
We interviewed our clinical team and our patients to identify issues in our workflow. We then worked with our clinical team to determine in detail the ideal workflow to implement.
We then worked with ChatGPT 5.6 Sol to flesh this out and design the underlying architecture and to formulate a detailed implementation plan.
We then used this implementation plan with codex to build it. We then deployed this on a VPS for initial testing.
Challenges we ran into
The primary issue was converging on an agreeable workflow for clinicians and patients. This took considerable time to ensure all parties agreed on how these patients should be managed.
Once we had a clear vision, we were able to work with ChatGPT 5.6 Sol to determine how to technically implement this, and from there Codex was able to do this with minimal issues.
Accomplishments that we're proud of
Generating a usable system that is agreeable to patients and clinicians in order to improve a genuine clinical service need.
What we learned
Extensive discussions about the ultimate plan and a clear vision are essential to successfully implementing a final product. The technical implementation is, in many ways, secondary to a clear vision for what we need.
What's next for Cortex
We are in the process of initial local evaluations to assess clinician experiences in using the platform with synthetic data. We will then aim to work with the hospital trust to roll out an early pilot with a small group of patients.
Built With
- chatgpt
- codex
- python
Log in or sign up for Devpost to join the conversation.