Inspiration
Indonesia has 1.09 million TB cases per year—ranked second in the world. The frustration isn't the lack of treatment, but the often late diagnosis. Community health center staff lack adequate tools, BPJS prior authorization can take days, and even more shocking: 30–50% of TB patients also have undetected diabetes. These two conditions exacerbate each other. I wanted to know can AI help detect the disease earlier, before it's too late?
What it does
TB Screening Advisor is a three-agent system that works together to assess TB risk in patients with diabetes. Doctors or community health center staff simply input patient data, either through plain text or a FHIR bundle and then the three agents immediately discuss: Agent 1 calculates a risk score from the clinical data, Agent 2 reads the X-ray report and sputum results, Agent 3 matches all of that with BPJS policy and issues a prior auth recommendation. The output is bilingual, Indonesian for staff, English for doctors and there is always a disclaimer that this is an AI recommendation, not a diagnosis.
How we built it
Everything is built on Prompt Opinion without any backend coding at all. I created three BYO Agents with a detailed prompt system, uploaded Ministry of Health and BPJS policy documents as a knowledge base, and then connected everything through SHARP context propagation—a kind of "shared memory" that flows from one agent to the next. Patient data uses the internationally standard FHIR R4 format, making it immediately compatible with any hospital system.
Challenges we ran into
The biggest challenge was ensuring the agents weren't "too smart" meaning, Agent 3 couldn't arbitrarily change the conclusions of Agent 1 or Agent 2. We had to create a strict override hierarchy so that MDR-TB sputum results always won out over low scores, not the other way around. Furthermore, our FHIR file was rejected by the platform because of a non-standard field we added for internal notes I then realized that FHIR R4 is very strict about schema and also the Gemini free tier is quite a challenge because it always runs out of token request quota every minute
Accomplishments that we're proud of
What I'm most proud of is the MDR Override scenario, where a patient with a risk score of only 30 and a normal X-ray, but because of a history of Rifampicin-Resistant TCM, the system immediately overrides all other rules and recommends the BPJS MDR-TB pathway. This isn't just a chatbot that answers questions it's a system that can reason with clinical priorities. Furthermore, this system can handle any facility, from rural community health centers to regional hospitals, with graceful degradation if data is incomplete.
What we learned
I learned that multi-agent doesn't automatically mean smarter, it's the clear division of domains between agents that makes the system trustworthy. If a single agent tries to do everything, the results will be inconsistent. Furthermore, FHIR isn't just a JSON format there are standards that must be strictly adhered to, and a small violation can result in the entire bundle being rejected.
What's next for TB Screening Advisor
The next step is a pilot at one community health center in East Java, the area with the highest rate of TB-DM comorbidities in Indonesia.
Built With
- opinion
- prompt
Log in or sign up for Devpost to join the conversation.