Medical Document Processing API with RAG Training