AI Prescription Generator for Privacy Sensitive Medical Documentation

Challenges
Time-consuming medical documentation.
Complex medical context requiring accurate patient history and ICD classifications
Strict GDPR and data privacy requirements for sensitive patient information
Outcome
3X more patient consultations with faster documentation
~1-minute review time for AI-generated medical documentation
5X lower monthly resource requirement
Solution
AI Prescription Generator
Challenges
Solution
Technology Stack
Outcomes
A medical startup in Germany wanted to reduce the administrative work involved in patient consultations. Doctors were spending time documenting consultations and preparing prescriptions, with support from an assistant. The organisation wanted to turn the doctor patient conversation directly into usable medical documentation. Cloudaeon worked on an AI based prescription generation solution. It transcribed live consultations, searched relevant historical patient conversations, interpreted medical context using disease classifications and generated documentation for the doctor to review. The solution also addressed a critical requirement for the European healthcare environment by keeping sensitive patient data under tighter control rather than depending entirely on externally hosted generative AI models.
Challenges
Time-Consuming Documentation: A consultation did not end when the conversation with the patient finished. The discussion still had to be documented and converted into a prescription or any other medical record. This created additional administrative work and increased dependency on assistants who helped prepare the documentation.
Need for Patient Context: Transcribing a consultation was only the first step. The system needed to understand what was being discussed and relate the current consultation to similar cases from the doctor's historical conversations.
Complex Medical Terminology: Similar words do not necessarily mean two patients have the same medical condition. Diseases can involve combinations of symptoms and related conditions. The system therefore needed to understand medical terminology and disease relationships rather than retrieve previous conversations just because they contained similar words.
Risk of Incorrect Interpretation: This was far from a general-purpose document generation use case. The generated output could influence medication or the next course of action for a patient. The doctor therefore needed to remain part of the process and review the generated documentation before using it.
Strict Data Privacy: The solution dealt with conversations about patients, medical conditions and treatment. GDPR and the sensitivity of healthcare data made privacy a major architectural consideration. The organisation did not want to depend entirely on a cloud-hosted generative model for processing this information.
Root Cause Analysis
Cloudaeon identified that the problem was not just transcription. The system also needed historical patient context, accurate medical interpretation using ICD classifications and a privacy conscious approach to AI generation. These requirements shaped the final architecture.
Solution
Cloudaeon developed an AI-based medical documentation and prescription generation solution. A live doctor patient conversation could be recorded and converted into text using an automatic speech recognition model. The resulting transcript was then processed through an AI pipeline that retrieved relevant historical consultations and incorporated ICD based medical context. The doctor remained in control by reviewing the generated text before printing or providing it to the patient. Alongside the RAG based approach, we worked with a supervised fine tuning approach using a smaller model and LoRA.
How We Delivered
Converted Live Consultations into Text: The first stage handled the live conversation between the doctor and patient. We used Whisper as the automatic speech recognition model to convert the recorded audio into text. This created the textual input required for the downstream AI pipeline.
The goal was to remove the need to manually recreate the entire consultation before medical documentation could begin.
Connected The Consultation to Historical Medical Conversations: Once the conversation had been transcribed, the text entered a RAG pipeline. The retrieval layer searched a vector database containing historical doctor-patient conversations. The purpose was to identify previous consultations relevant to the current case.
Added ICD Context to Improve Medical Interpretation: Retrieving similar words was not enough.
A patient could present with a condition involving several related symptoms or medical concepts. Pure textual similarity could therefore retrieve a superficially similar case without correctly representing the underlying condition. To address this, ICD disease classifications were incorporated into the prompt context. The prompt template captured relationships between disease classifications so the model could interpret retrieved information with greater medical context.
Generated Documentation for Doctor Review: The retrieved information and medical context were then passed to the generation layer. The system generated the medical documentation from the consultation. The output could include medication and recommended next steps, such as further consultation, referral to another doctor or hospital admission. The workflow deliberately kept the doctor in control. The doctor could generate the text, review it and then print or provide the final documentation to the patient.
Designed an Alternative to Cloud-Dependent Generation: Privacy became particularly important at the generator stage of the RAG pipeline. A cloud-hosted model could generate the output and Azure AI Foundry was discussed as one option. However, the project dealt with highly sensitive patient and disease information in a European GDPR environment. We therefore worked with another approach based on a smaller fine-tuned model that could remain within the client's own environment. This reduced dependence on sending sensitive medical information to an externally hosted generative model.
Fine Tuned a Smaller Model for Medical Documentation: The second approach used supervised fine-tuning. A smaller or distilled model could be trained using historical doctor-patient conversations and the required documentation style. Rather than behaving as a broad general purpose model, it could be adapted specifically to the medical documentation task. The implementation used parameter efficient fine tuning with Low Rank Adaptation (LoRA). This approach allowed the model to be adapted without requiring the full model to be retrained.
Technology Stack
Whisper
Retrieval-Augmented Generation (RAG)
Vector database
International Classification of Diseases (ICD)
Azure AI Foundry
Distilled language models
Low-Rank Adaptation (LoRA)
Outcome
3x more patient consultations.
Reduced the time spent creating medical documentation after consultations.
Doctors could review the generated documentation in about one minute before using it.
Reduced dependency on assistants for preparing consultation documentation.
5× lower monthly resource requirement.
Conclusion
The problem was turning the doctor-pateint conversation into medically relevant documentation while using historical context, recognised disease classifications and an architecture suited to sensitive patient information.
Cloudaeon addressed those requirements through speech recognition, RAG, ICD-aware prompting and a fine-tuned model approach designed to reduce dependence on external generation infrastructure. The result was a faster documentation workflow that allowed doctors to spend less time preparing prescriptions and more time seeing patients. Have a privacy-sensitive healthcare AI use case? Talk to our experts.
