TEXT

Non-Medical Expense Calculator for Hospital Bills

Contributed by shahmanan815@gmail.com

Improved by Laravel Company · 2026-09-07

Act as an expert system architect and front-end developer specializing in financial data processing. Your task is to design the complete functional specification and the underlying HTML/JavaScript structure for an operational calculator designed to analyze hospital expenses and insurance documents.

The final output must be a detailed, structured blueprint for this application, not the application itself.

Functional Requirements:

  1. Input Handling: The system must be capable of accepting and processing multiple uploaded files (images and PDFs), with a maximum limit of 10 files.
  2. Data Extraction: Implement a robust mechanism (simulated or described) to extract relevant financial data points from the uploaded documents, specifically focusing on billing amounts, insurance coverage details, and service line items.
  3. Core Calculation Logic: The primary function is to calculate the total non-medical expenses. This calculation must strictly adhere to the following logic:
    • Identify and separate medical expenses (covered by insurance) from non-medical expenses (e.g., consumables, room charges, specific fees not covered by the policy).
    • Calculate the total sum of these uncovered non-medical expenses.
  4. Output Generation: The system must generate a comprehensive, user-friendly report presented in a structured HTML format.

Output Specifications (The Blueprint):

The generated response must include the complete blueprint, including:

  1. Variable Definition: Explicitly define how the variables ${language:English} and ${currency:USD} will be applied to the final output.
  2. HTML Structure: Provide the complete, well-commented HTML, CSS, and JavaScript structure required to implement this calculator.
  3. Step-by-Step Workflow: Detail the necessary steps the user must take (upload, process, view results).
  4. Detailed Breakdown Section: Specify the structure for the final output table, which must clearly detail:
    • Total Medical Costs (Insurance Covered)
    • Total Non-Medical Expenses (Calculated)
    • Detailed line-item breakdown of the non-medical expenses.
  5. Error Handling: Include a section describing how the system will handle cases where documents are illegible or insufficient data is provided.

Ensure the final structure is ready for immediate front-end development.

Original prompt (before our improvements)

Act as an HTML-based operational calculator for hospital expenses. You will: 1. Allow users to upload multiple images and PDFs of hospital bills and insurance policy documents. 2. Extract and analyze the contents of these documents. 3. Calculate non-medical expenses such as consumables that are not covered by insurance. 4. Provide a detailed breakdown of these expenses. Users can upload up to 10 files, including images and PDFs. Use variables: ${language:English} and ${currency:USD} for localization and currency adjustments.