Here's a detailed system description for the management software of the "Al Basma Scan Center" that you can provide to the developer for implementation.

---

## **System Overview:**
The **"Al Basma Scan Center Management System"** is designed to manage patient records, services, billing, inventory, and administrative tasks for a dental imaging and digital dentistry center. The system will be implemented using **HTML, CSS, JavaScript** for the front-end and **Node.js/Express** for the back-end. **MySQL/PostgreSQL** will be used for relational data storage, while **MongoDB** can be used for dynamic data such as logs or patient notes. The system must be accessible across multiple devices on the same local network, with potential for future cloud deployment.

---

### **System Components:**

1. **User Roles & Authentication:**
   - **User Roles:** 
     - **Administrator**
     - **Receptionist**
     - **Radiologist**
     - **Dentist**
     - **Technician**
   - **Login System:** 
     - Users must authenticate via login. The system will check user credentials from the database and assign permissions based on roles.
     - A login page with error handling for incorrect credentials.

---

2. **Dashboard (Main Page):**
   - After login, users will be directed to a **Dashboard** that provides:
     - **Quick Stats:** Total number of patients, services provided, revenue, and pending bills.
     - **Navigation Panel:** To access patient management, billing, inventory, reports, and administrative sections.
   - **User-Specific Dashboards:**
     - Administrators will have full access to all data.
     - Receptionists can manage patient data and billing.
     - Radiologists and technicians can manage reports and images.
     - Dentists can access patient records and service history.

---

3. **Patient Management:**
   - **Add New Patient:**
     - A form to enter patient details such as name, age, gender, address, phone number, and other contact information.
     - Automatic patient ID generation.
   - **Edit Patient Information:**
     - Ability to update patient details if necessary.
   - **Patient History:**
     - View a list of all past services provided (Panorama, CBCT, etc.).
     - Access uploaded scans and reports from services.

---

4. **Services & Imaging Reports:**
   - **Service Selection:**
     - Users can choose from a list of available services (Panorama, CBCT, Periapical, Cephalometric, etc.) when adding a service to a patient's record.
   - **Upload & Store Imaging Files:**
     - Radiology images and reports will be uploaded via a file manager.
     - Integrate with **Google Drive API** to store large imaging files and store their access links in the database.
   - **Generate & View Reports:**
     - Users can generate detailed reports based on patient services and export them as PDF or view them online.

---

5. **Billing Management:**
   - **Create Invoice:**
     - Select patient and services to automatically generate a bill.
     - Prices for each service will be predefined but editable during billing.
     - System will calculate the total amount and allow adding multiple services per invoice.
   - **Installment Payments:**
     - The system will allow splitting the bill into multiple payments. Users can track partial payments and outstanding balances.
   - **Email/WhatsApp Invoice:**
     - After the invoice is created, it can be sent to the patient via **WhatsApp API** or email directly from the system.

---

6. **Inventory Management:**
   - **Add and Track Inventory Items:**
     - Users can add items (e.g., gloves, alcohol, paper, etc.) and update the available quantities.
   - **Low Stock Alerts:**
     - The system will notify users if an item in the inventory is below the predefined threshold.
   - **Track Purchases & Restocking:**
     - Users can log restocking details and record incoming inventory.

---

7. **Subscription & Monthly Bills Management:**
   - **Add Regular Bills:**
     - Input fields for managing monthly bills (e.g., electricity, internet, water, etc.).
   - **View & Track Monthly Payments:**
     - Administrators can view which bills are due or paid and track ongoing subscriptions.

---

8. **Staff & Attendance Management:**
   - **Employee Database:**
     - Add and store staff details (name, role, contact info, etc.).
   - **Attendance:**
     - Log daily attendance for staff and generate reports.
   - **Expense & Payroll:**
     - Track staff-related expenses, such as salaries, and calculate total expenditures.

---

9. **Reports & Analytics:**
   - **Service Reports:**
     - Generate detailed reports on how many services were provided over a specific period.
     - Filter services based on patient, type, or date.
   - **Revenue Reports:**
     - View a breakdown of income generated from each type of service.
   - **Inventory Reports:**
     - Report on the status of stock, including items running low and recently restocked.

---

10. **System Architecture:**
   - **Front-End:**
     - **HTML/CSS**: Create the structure and styling of all user interfaces.
     - **JavaScript**: Handle client-side logic (validations, form submissions, dynamic updates).
   - **Back-End:**
     - **Node.js/Express**: Will handle server-side processing, user requests, and data management.
     - **Database**: 
       - **MySQL/PostgreSQL** for relational data (patients, services, billing).
       - **MongoDB** for storing unstructured data like imaging logs or notes.
   - **APIs:**
     - **Google Drive API**: To upload and manage large imaging files.
     - **WhatsApp API**: To send invoices, reminders, or reports to patients/doctors.

---

### **System Flow Chart:**

1. **User Login:**
   - User opens the system and inputs their login credentials.
   - The system checks against the user database and assigns role-based access.
   - Successful login redirects to the dashboard.

2. **Dashboard:**
   - Shows quick stats and links to the patient, billing, and inventory management.
   - Users can navigate based on their role.

3. **Patient Management:**
   - From the dashboard, users can access the patient management section.
   - Add a new patient, update patient info, or view the service history.
   - Upload and access imaging files using Google Drive integration.

4. **Billing:**
   - User selects the patient and the services provided.
   - System calculates the total and generates an invoice.
   - Invoices can be split into installments and sent via WhatsApp or email.

5. **Inventory:**
   - User adds or updates stock items and sets low-stock alerts.
   - System tracks incoming stock and generates inventory reports.

6. **Reports:**
   - Users can generate reports on services, billing, and inventory.

---

### **Technology Stack:**
- **Front-End:** HTML, CSS, JavaScript (React.js optional for a dynamic front-end).
- **Back-End:** Node.js, Express.js.
- **Database:** MySQL/PostgreSQL for structured data, MongoDB for unstructured data.
- **APIs:** Google Drive API, WhatsApp API.
- **Version Control:** Git for collaboration.
- **Deployment:** Should run on multiple devices across a local network, with a possibility of cloud-based deployment in the future.

---

This system will allow seamless management of patient data, services, billing, and inventory. It will also enhance productivity and reduce human error by digitizing manual processes in the Al Basma Scan Center.