How saiprashanth897/heathcare1 works
Project Components
• User Interface (Frontend) – This is evident from the large number of HTML files (e.g., landing page, login, doctor dashboard, patient dashboard, various reports, and trend pages) and associated CSS and JavaScript files. The “hackthon” directory consolidates these pages and static resources.
• Backend Services – Although there is no separate backend code repository, the README clearly explains that Firebase Firestore and Firebase Authentication serve as your backend, storing user details, patient records, rounds data, prescriptions, and ADR alerts.
• External Integrations – The project makes extensive use of third-party services:
• Chart.js for rendering data insights and trends.
• OpenAI API and the RxNav Interaction Checker for drug interaction and ADR detection.
• html2pdf.js for generating PDF reports.
• Data Storage – Firebase Firestore is used with specific collections such as users, patients, rounds, prescriptions, and adrAlerts.
• Authentication Module – Firebase Authentication manages secure access for doctors and patients, with additional workflows (e.g., admin approval for doctors).
• Frontend (Browser-based Application)
• Pages: Landing page, Login, Signup, Doctor Dashboard, Patient Dashboard, Reports, etc.
• Assets: HTML, CSS (found under multiple style folders), JavaScript files (organized in ‘js’ and ‘scripts’ directories).
• Interaction flows: Users perform authentication, access dashboards, view data insights (via Chart.js), and trigger ADR detection.
• Backend (Firebase Ecosystem)
• Authentication: Firebase Authentication handles the sign-in/up process.
• Database: Firestore collections storing user data, patients, rounds, prescriptions, and ADR alerts.
• Data Flow: The UI captures interactions (e.g., note additions and prescription updates) that create or update Firestore records.
• External Services
• ADR Detection: Integration with OpenAI API and RxNav API to check drug interactions, with JavaScript scripts (like adr.js) performing the logic.
• PDF Generation: html2pdf.js is used to convert end-of-day reports (likely rendered on a designated HTML page) into downloadable PDF documents.
Architectural Patterns and Design Principles
• Separation of Concerns: The structure separates static UI pages and assets from backend functionality, even though the backend is largely managed via Firebase.
• Modular Components: Use of distinct directories for JS scripts, CSS styles, and HTML ensures that the UI codebase remains modular.
• API-Driven Integration: The application leverages multiple APIs to provide value-added features (ADR detection, charts, PDF generation).
• Client-Side Focused: Although the data and authentication layers are handled by Firebase, the majority of the logic appears to run client-side.