Commit Graph
187 Commits
Author SHA1 Message Date
hamed c189daa860 feat(claims): enrich claims with insurance details and item specifics 2026-06-24 04:48:11 +03:30
hamed 27840da78d feat: integrate insurance coverage management for clinic services
- Updated NewSessionPage to calculate patient share based on insurance coverage rules.
- Refactored billing calculations to utilize new patientShareOf function for service items.
- Enhanced API documentation to reflect changes in service coverage structure.
- Implemented ServiceInsuranceModal for managing insurance coverage per service.
- Added UI components for displaying and editing insurance coverage details.
- Removed obsolete toggle switch styles and adjusted CSS for new components.
- Ensured backend endpoints support both service_item_id and service_item_uuid for flexibility.
2026-06-24 04:23:50 +03:30
hamed 253414ef3e feat(subscription): add switch toggle component and update plan terminology 2026-06-24 03:32:50 +03:30
hamedandClaude Opus 4.8 15e7d92fc1 feat(subscription): gate insurance pages behind "insurance" plan feature
Wrap InsurancePricingPage and ClaimsPage in <FeatureGate feature="insurance">
so direct-URL access is blocked without an active subscription that enables
the feature. Add feature: "insurance" to the sidebar links (doctor/clinic/
secretary sections) so the menu items hide when the plan lacks it.

Make AdminSubscriptionPage feature controls dynamic: derive the plan feature
checkboxes from FEATURE_LABELS (now including "insurance") and switch the Zod
schema to z.record, so adding a feature only touches the label map.

No backend/migration change: plan.features is free-form JSON; existing plans
default to insurance:false and admins enable it per plan.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 03:21:52 +03:30
hamed fc87e4a04e feat(schedule): enhance time selection with separate hour and minute dropdowns 2026-06-24 02:43:05 +03:30
hamed fbfe25c3c6 feat(claims): add insurance_name field to claims and update API responses 2026-06-24 02:11:16 +03:30
hamed f7eb1ebd91 feat(claims): implement automatic claim creation for insurance sessions 2026-06-24 02:08:12 +03:30
hamedandClaude Opus 4.8 14c6dd6456 feat(patients): prefill visit price from free-visit price
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 01:55:19 +03:30
hamedandClaude Opus 4.8 115690d81a feat(insurance): free-visit price field on pricing page
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 22:21:25 +03:30
hamedandClaude Opus 4.8 43e8822db5 feat(patients): visit insurance options from tenant contracts + auto coverage%
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 22:17:37 +03:30
hamedandClaude Opus 4.8 0e6111f1be feat(patients): service quantity in visit session
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 22:13:51 +03:30
hamedandClaude Opus 4.8 f41314a3ad refactor(ui): unify remaining native selects (claims/sms/wallet/secretaries)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:06:45 +03:30
hamedandClaude Opus 4.8 0bc1b4a2e9 refactor(ui): unify selects via SearchableSelect (session form + contracts)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 21:00:19 +03:30
hamedandClaude Opus 4.8 c556f3a53d refactor(insurance): merge pricing into contracts (basic+supp groups)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:55:56 +03:30
hamedandClaude Opus 4.8 18ae55ac30 feat(patients): standalone new-session page with sectioned UX
Dedicated route /admin/my-patients/:recordUuid/session/new replacing the
modal: insurance & price section (auto-fill from pricing), services,
payment/notes, sticky live summary. New-visit buttons navigate to it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:41:22 +03:30
hamed 017ea2ae22 chore(caveman): remove outdated README and SKILL documentation 2026-06-23 20:32:37 +03:30
hamedandClaude Opus 4.8 d049e42ddc feat(insurance): edit tenant insurance contracts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:32:34 +03:30
hamedandClaude Opus 4.8 2ef38f082d fix(insurance): pricing section only basic insurances
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:23:35 +03:30
hamedandClaude Opus 4.8 6ff79b9998 feat(ui-kit): patient detail tab bar (info / sessions)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:09:31 +03:30
hamedandClaude Opus 4.8 06d1f1d39b feat(ui-kit): patient card tauri layout + grid/list toggle
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:05:01 +03:30
hamed 3c867d1e09 feat(caveman): add new caveman communication mode with intensity levels 2026-06-23 19:10:00 +03:30
hamedandClaude Opus 4.8 2b00443af7 feat(ui-kit): orange accent avatar on patient cards (tauri match)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 18:50:43 +03:30
hamedandClaude Opus 4.8 0cef1518d7 feat(ui-kit): tauri pastel stat cards on doctor/clinic dashboards
Exact tauri stat-card palette tokens; doctor and clinic dashboards now
render 4 pastel StatCards (amber/violet/green/pink) matching the
clinic-pro-tauri reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 17:41:18 +03:30
hamedandClaude Opus 4.8 0bd18d74b7 feat(ui-kit): design tokens + StatCard + button variants (foundation)
Add accent (orange) + pastel stat-card tokens (light/dark), button
accent/outline/lg/block variants, and a pastel StatCard primitive,
aligning the admin design system with the clinic-pro-tauri reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 17:34:34 +03:30
hamedandClaude Opus 4.8 2206f02396 feat: enrich patient record with full profile
GET /api/v1/patient/{uuid} now returns a `profile` object from UserProfile
(demographics, contact, insurance names resolved). Admin record detail shows
a "patient info" section. Empty fields render as "ثبت نشده".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 17:21:33 +03:30
hamedandClaude Opus 4.8 af881231d0 fix: store appointment address from schedule and auto-add patient to clinic
Appointments now persist address_id resolved from the weekly-schedule
session (location_id) across all booking paths (online, secretary, admin).
On confirm, the patient is added to the clinic owning that address, or to
the doctor's single clinic as fallback. Weekly-schedule create/update now
requires location_id on every active session. PatientSession exposes
doctor_uuid/doctor_name so clinic records show which doctor each visit is for.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:10:36 +03:30
hamedandClaude Opus 4.8 51d7e24e04 feat: create patient record without prior signup
Extend POST /api/v1/patient to resolve user by uuid or mobile, and
create a new ROLE_USER (name + optional national code, no password)
when no user exists. Admin modal shows a new-patient form on lookup miss.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:20:56 +03:30
hamedandClaude Opus 4.8 59fb590d65 feat: redesign new-visit modal with insurance selects and live breakdown
Sectioned layout (insurance & price / services / payment / summary),
base+supplementary insurance selects auto-filling visit price and
discount from insurance-pricing, live cost breakdown, unified تومان unit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:15:12 +03:30
hamedandClaude Opus 4.8 89191eee57 feat: insurance & medical billing system (6 phases)
Multi-tenant insurance contracts, service coverage, versioned tariffs,
invoice calculation, and insurance claims with debt reporting.

- TenantInsurance: per-tenant insurance contracts (coverage/franchise/ceiling,
  versioning, soft-deactivate) + active guard
- ServiceItem.insuranceCovered + TenantServiceCoverage per-service overrides
- Tariff: versioned yearly tariffs with fallback to ServiceItem price
- Billing domain: Money/ShareBreakdown VOs, BillingCalculator (unit-tested),
  Invoice/InvoiceItem aggregate, InvoiceService.createFromSession
- Claim/ClaimItem with state machine (pending->submitted->approved/rejected->paid),
  ClaimService, insurance-debt report
- ClaimSubmitterInterface + ManualClaimSubmitter (future insurance API ready)
- Admin UI: insurance-pricing page, claims page, service tariff modal,
  service insurance toggle; routes + sidebar entries
- Architecture doc + billing/insurance/clinic-services API docs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 15:05:24 +03:30
hamed 5b1dfe9b40 feat: add national code to patient records and user entity, update related functionality 2026-06-22 19:44:17 +03:30
hamed 3c103bc51e feat: update SMS settings review functionality
- Changed the tab name from 'post-visit-review' to 'post-visit-approved' in SmsPage.
- Introduced a new query for fetching approved post-visit texts.
- Updated the UI to display approved post-visit texts and their details.
- Enhanced the API endpoint to filter SMS settings based on status (pending/approved).
- Added entity name resolution for doctors and clinics in the SMS settings.
- Updated the SmsWalletPage to include new post-visit text variables for SMS templates.
- Improved type definitions in index.ts for better clarity and consistency.
2026-06-22 10:30:46 +03:30
hamed 8ed119e12a fix: update active doctor appointment logic to use online_booking_enabled field 2026-06-22 09:47:06 +03:30
hamed 447ffc8862 fix: adjust active doctor appointment filter to default to true unless specified 2026-06-21 18:02:03 +03:30
hamed 21b6c583c0 feat: add tag filtering to blog posts and implement JSON_CONTAINS DQL function 2026-06-21 17:34:07 +03:30
hamed 91cfb64217 fix: improve doctor search performance by optimizing query filters in findWithFilters method 2026-06-21 16:41:59 +03:30
hamed 8b9130011a feat: add export functionality for JSON data in CategoriesPage and update TabActions component 2026-06-21 15:37:24 +03:30
hamed 1f9b69c121 fix: correct refresh token handling in TokenService to return submitted token 2026-06-21 13:41:53 +03:30
hamed 57965f184d feat: add social media fields to Clinic entity and update API documentation 2026-06-21 13:26:47 +03:30
hamed 3f1b2de971 feat: add social media links field to Doctor entity and update API documentation 2026-06-21 12:35:22 +03:30
hamed 943784b64a feat: update login functionality to remove refresh token and adjust password requirements 2026-06-20 13:22:09 +03:30
hamed e2636ce743 feat: implement short-lived grant system for OTP verification and enhance rate limiting across authentication endpoints 2026-06-20 12:51:10 +03:30
hamed f9678026a8 feat: implement server-side validation for mobile numbers and national codes across multiple endpoints 2026-06-20 12:28:36 +03:30
hamed 6fc456522a feat: enhance online booking toggle UI and improve booking window controls 2026-06-19 21:16:51 +03:30
hamed 0624a08e62 feat: restrict guest doctor access in clinic context by updating role-based routing and sidebar menu 2026-06-19 21:08:32 +03:30
hamed b686cd1e7d feat: implement template editing functionality and revert approved templates to draft status 2026-06-19 20:48:44 +03:30
hamed fa332f7fa1 feat: Add tagging system for SMS logs and templates
- Introduced a `tag` field in the `SmsLog` entity to categorize SMS messages.
- Updated the `SmsService` to handle the new `tag` parameter during SMS dispatch.
- Implemented a `SmsTextResolver` service to resolve SMS message templates based on tags.
- Created a new `SmsMessageTemplate` entity for editable SMS templates with placeholders.
- Added endpoints for managing SMS message templates in the admin panel.
- Enhanced existing SMS dispatching methods across various controllers to utilize the tagging system.
- Migrated the database to include the new `tag` field and created a seeding command for default SMS templates.
- Updated admin API to filter SMS logs by tag and include tag information in responses.
2026-06-19 20:42:04 +03:30
hamed da57c554c1 feat: implement MobileInput component for standardized mobile number input and update related forms to use it 2026-06-19 15:28:40 +03:30
hamed d910a30a7e feat: fix access scoping for clinic member doctors and add representation_id handling for clinics 2026-06-19 13:42:24 +03:30
hamed aeef59fe0d feat(doctors-page): enhance doctor data mapping for representation role and improve rate handling 2026-06-19 13:27:11 +03:30
hamed fe73fa1a05 feat: add ROLE_REPRESENTATION access to admin panel for managing doctors and clinics
- Updated authStore to include 'representation' role.
- Modified DoctorFormPage and DoctorsPage to handle different endpoints based on user role.
- Created new RepresentationActionController for handling doctor and clinic creation by representatives.
- Added new API endpoints for representatives to manage doctors, clinics, and view appointments.
- Updated documentation to reflect new role and API changes.
2026-06-19 13:20:40 +03:30