Inspiration

I recently underwent an eye surgery as a result of years of eye issue brought on by a condition known as Keratoconus. A diagnosis I was only able to get after I was referred to a Corneal Specialist, who was able to quickly diagnose and come up with a treatment plan. This stressed in me the importance of that referral step. In a bid to simplify this process, I built ReferralBot to help doctors quickly do for others what my initial doctor was able to d for me.

What it does

ReferralBot aids General Practitioners(GP) make patient referrals by analysing patient records, extracting relevant information, and using it to filter and rank medical specialists. Once ranking is done, the GP is presented with the top 3 recommendations for patient referrals along with their details and reasoning behind the recommendations.

How we built it

The agent was built entirely on top of the Prompt Opinion(PO) platform via the BYO Agent flow. This included configuring agent settings such as system prompts, data sources, FHIR interactions among others.

For the data sources, the agent needed information on specialities in the medical field along with available specialists. These datapoints were gathered from public data sources in Kenya along with scrapping of relevant sites. For the scrapping, I built out scrappers with the help of AI tools. All the collected data was then loaded into PDFs and saved to a PO collection; which was then connected to the agent.

Challenges we ran into

Since this was my first time building for the medical field, there was a large knowledge gap when it came to medical workflows and standards such as FHIR. I was able to overcome these issues by leveraging research as well as the PO Agents Assemble Discord community.

Accomplishments that we're proud of

I built my first public AI agent to tackle an area of social good.

What we learned

I learnt about how AI agents and MCP servers work. I also learnt about the FHIR standard and how it promotes system inter-operability in medicine.

What's next for ReferralBot

  1. Add more tools to smoothen the referral process. Such tools will enable:
    • Automatically sending referral info to patient via either email or sms
    • Recommendation of free or affordable medical camps to relevant patients
  2. Add an MCP server to ensure list of specialists can be easily updated without reuploading fresh datasets every time
  3. Add a means for post-referral follow ups with the referring GP.

Built With

Share this project:

Updates