Google-Health/medical-data-toolkit — reverse-engineered prompt
Reverse engineered prompt
Build me a small medical document conversion service in Python that I can run locally in Docker and call with a simple REST endpoint. I want to send the raw bytes of a PDF, JPEG, PNG, or screenshot of a medical report and get back a structured HL7 FHIR R4 bundle as JSON.
Focus on diagnostic reports and lab reports, not handwritten notes. The flow should classify the document type, extract the important clinical fields, map lab concepts to LOINC as accurately as possible, then convert the result into FHIR in a rule based way. It should support an external LLM for the extraction step, but keep the terminology mapping usable offline with a knowledge base if possible.
Please make it synchronous and optimized for smaller files, with one clear endpoint like document_to_fhir, plus whatever server code and container setup are needed to run it easily. If the ABDM FHIR profiles are already part of the expected output, follow that. Look up current docs online if you need to.
Want more depth? Deep Reverse