From Surgery to Code: A Doctor’s Journey Building an AI‑Powered Medical Mini‑Program
Surgeon Ding Ce, frustrated by cumbersome medical calculations, leveraged Tencent Cloud’s AI code assistant CodeBuddy to create a customizable WeChat mini‑program for prostate volume, body surface area, and fetal weight formulas, expanded it to a HarmonyOS app, and shared insights on AI‑driven development, data handling, and cross‑platform deployment.
Background and Motivation
Routine medical calculations such as prostate volume, body surface area for chemotherapy dosing, and fetal weight estimation are time‑consuming and prone to error. A surgeon sought a reliable, customizable tool to automate these formulas.
AI‑assisted Development with CodeBuddy
Installed the Tencent Cloud CodeBuddy VS Code plugin.
Provided natural‑language prompts describing the desired mini‑program and the required formulas.
CodeBuddy generated a basic WeChat mini‑program page. The core prostate volume calculation used the standard ellipsoid formula:
volume = diameter1 * diameter2 * diameter3 * 0.52Through iterative dialogue, the interface was refined, automatic grading added, and additional calculations (body surface area, fetal weight) were incorporated. The developer manually edited the generated code to understand the underlying logic and improve the implementation.
Data Integration and Version Control
External data (e.g., fetal weight percentile tables) were converted from Excel to JSON. Variables were defined so the AI could ingest the data correctly.
Git was adopted for source‑code management, replacing manual folder backups and enabling proper version tracking.
Deployment and User Adoption
The mini‑program was released within the hospital’s internal WeChat ecosystem. Colleagues shared the tool in departmental groups, quickly reaching over 4,000 active users and receiving positive feedback on speed and accuracy. Optional WeChat advertising was added, generating a modest daily reward of about ¥1.
Cross‑Platform Porting to HarmonyOS
Motivated by Huawei’s HarmonyOS developer incentive program, the same codebase was converted to a HarmonyOS application using CodeBuddy’s cross‑platform conversion feature. The app was successfully published and earned a ¥5,000 bonus, demonstrating that AI‑assisted coding can lower the barrier to multi‑platform deployment.
Future Outlook
The experience suggests AI code assistants can further assist medical professionals by automating routine calculations, integrating clinical data, and eventually supporting electronic health‑record documentation (e.g., auto‑completion of patient notes). Core clinical decisions remain physician‑driven, with AI serving as a collaborative tool.
Tencent Tech
Tencent's official tech account. Delivering quality technical content to serve developers.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
