ChronoCure lab report metadata rule: CBC child tests such as WBC count and platelet count must preserve and display the default units and reference ranges from the matching lab order/report metadata in lab dashboard entry, getMedicalRecord responses, and generated lab report PDFs.
ChronoCure front desk billing rule: discharge/final bill discount type must support Amount and Percentage. When Percentage is selected, convert it to the absolute discount amount before calling the existing saveAtCounterPayment API so the backend contract remains unchanged.
ChronoCure nurse alert rule: nurse dashboard must not auto-open the default lab report popup on page load or refresh. Abnormal lab result alerts must route the Check Report action to the matching lab report popup, with OP and IP patient status handled separately.
ChronoCure hospital management reporting rule: admin/user management reports include a monthly AI API token usage PDF for a selected hospital and month. Report URLs returned to the UI must be signed S3 URLs, not raw private S3 object URLs.
ChronoCure IP/OP billing lifecycle rule: all hospitals, including hospital 52 and future hospitals, must follow hospital 45 billing semantics. Hospital-specific IP lists must not leak hospital 45 rows. IP advance bills close automatically, appear only in IP closed bills, are excluded from OP bill lists, and count as previous/self-paid amount only on discharge bills.
ChronoCure report tally rule: hospital manager and pharmacy revenue reports must use consistent hospital/date/payment filters. End dates should include records through 23:59:59, discharge discount reports filter by discharge date, lab due/registration rows must avoid duplicate totals, and INSURANCE cash payments are excluded from revenue reports only.
ChronoCure search rule: searchPatient must return new OP/IP patients by name, mobile, and last four MR digits for every hospital, including hospital 52 and future hospitals. Last-four MR search must preserve multiple matching patients instead of collapsing to one row.
ChronoCure patient-role access rule: patient-facing calls may access only their own MR scoped records for checkAllPatients, getHospitalManagerNursingNotesReview, and getAdmissionSlipPdfUrls while preserving staff/manager behavior.
ChronoCure bed allocation rule: allocation date/time for an existing current bed allocation are read-only. Transfers start after the previous bed release timestamp. fetchHospitalBeds returns only unoccupied beds plus the current patient matching MR current bed.
ChronoCure payment gateway rule: hospital manager supports hospital-level UPI/card gateway config for BharatPe, Axis Bank, and generic providers. The common hospitalPaymentGatewayWebhook reconciles callbacks by ChronoCure order number and marks matching OP/IP/pharmacy payments paid; if no config exists, existing hospital 45 behavior is unchanged.
ChronoCure surgical instrument audit rule: nurse dashboard can upload pre-surgery and post-sterilization tray images for a selected inpatient, call ai.mintbagg.com for instrument counts, show nurse-friendly counts and missing items, and notify nurse plus hospital manager when post count differs from pre count.
ChronoCure admissions/admission slip rule: new inpatients must appear in both getPatientsForBilling and listHandwrittenPatients without duplicates by MR/current admission. Admission slip links should resolve to signed PDF URLs where the slip exists, including IP list views.
ChronoCure pharmacy/GST rule: OP, IP, and retail pharmacy bills and related revenue reports for hospital 52 and future hospitals should match hospital 45 behavior and must not apply an extra GST layer on generated PDFs or report totals.
Always anchor ChronoCure fixes to the exact live API, hospital id, patient identity shape, and bill/admission context supplied by the user. Verify endpoint output after code or DB changes.
When the user says do not impact anything else, prefer a route-specific or hospital-scoped fix over broad shared query rewrites. Preserve hospital 45 behavior unless explicitly changing it.
Do not store raw id tokens, phone numbers, or private patient data in public memory reports. Long-term memory should keep API route names, business rules, repo paths, and sanitized examples.
Production APIGW deploys use the local mintbagg-api-gateway working tree as source, build the WAR, checksum upload to EC2, backup Tomcat webapps, swap apigw.war, restart Tomcat, and smoke-test public endpoints.
Nuxt deploys are separate from APIGW deploys unless requested together. Build/generate the current mintbagg-customer-nuxt tree and deploy the static bundle to the configured web root with backups.
Agentic AI should read Google Doc requirements, retrieve this memory context, inspect matching repos and live logs, demo deploy first, and require approval before production-sensitive changes.