Head2On/Patient-management-system ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple patient management API for a clinic.

I want it to let me create a patient, get one patient by their public patient number, list all active patients with pagination, search by name, phone, or patient number, update patient details, soft delete a patient, and reactivate them later. Please make sure patient numbers are generated automatically and that nothing is permanently deleted. Include validation for the usual fields like name, phone, date of birth, gender, address, chief complaint, and optional Aadhaar.

Use FastAPI with PostgreSQL, SQLAlchemy, and Alembic migrations, and keep the app clean and easy to run locally with environment variables. Add the API routes, models, schemas, and service logic, plus a few tests for the main flows. I’d like Swagger docs to work out of the box, and if you need to check the latest docs for anything, feel free to look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab