Skip to content

Commit a2889cd

Browse files
committed
add new requested feats
1 parent bb21f93 commit a2889cd

11 files changed

Lines changed: 158 additions & 1 deletion

docs_content/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Welcome to the Sellrise platform documentation. Use the navigation to browse thr
1414
| **CRM** | Lead management PRDs (creation, inbox, pipeline, scoring, etc.) |
1515
| **Implementation** | Event logging and implementation audit details |
1616
| **Testing** | Integration testing guides (English & Indonesian) |
17-
| **New Features** | Upcoming features like the AI Scenario Generator |
17+
| **Phase 1 – Post-MVP** | Post-MVP feature requests such as the AI Scenario Generator |
18+
| **Phase 2 – Plasthic Additions** | Plasthic-specific PRDs covering patient service, webhook pipeline, photo management, CRM dashboard, compliance, onboarding, dashboard journey, reviews, and rewards |
19+
| **Phase 2 – Pre-Consultation Engagement** | Consultation funnel enhancements such as chatbot photo collection |
1820

1921

2022
Addendum: Scope of Work Addition
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# PRD 1: Phlastic Patient Service (Core Engine)
2+
3+
## Goal
4+
Build a standalone, AU-compliant microservice to manage patient PII and medical data, ensuring complete isolation from the Sellrise CRM.
5+
6+
## Key Features
7+
- **Database Schema**: Implement `patients`, `patient_events`, `photos`, and `consent_records` tables.
8+
- **Compliance Layer**:
9+
- Encryption at rest (AES-256).
10+
- TLS 1.2+ for all API traffic.
11+
- Audit logging for every read/write operation.
12+
- **API Foundation**:
13+
- RESTful CRUD endpoints for patient management.
14+
- API Key authentication (min 32 chars, one per workspace).
15+
16+
## Success Metrics
17+
- Service health check (`/health`) returns `{"status":"ok","db":"connected"}`.
18+
- Audit logs correctly record all patient data interactions.
19+
- Data is successfully encrypted in the database.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# PRD 2: Webhook & Data Pipeline
2+
3+
## Goal
4+
Integrate Sellrise (System 1) with Phlastic Patient Service (System 2) to ensure seamless data flow while maintaining PII isolation.
5+
6+
## Key Features
7+
- **Webhook Handler**:
8+
- Receive data from Sellrise chatbot.
9+
- Map chatbot answers to patient profile fields.
10+
- Store mandatory consent records (timestamp + IP + version).
11+
- **Upsert Logic**:
12+
- Merge data if patient (email + workspace) already exists.
13+
- Create `patient_updated` event on merge.
14+
- **Reference Mapping**:
15+
- Store `external_patient_id` in Sellrise.
16+
- Store `sellrise_lead_id` in Phlastic.
17+
18+
## Success Metrics
19+
- Lead data from chatbot successfully populates Phlastic DB.
20+
- `consent_given=true` is verified before any storage.
21+
- `external_patient_id` is correctly updated in Sellrise lead record.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PRD 3: Secure Photo Management
2+
3+
## Goal
4+
Implement a secure, encrypted photo upload and retrieval pipeline for patient medical photos.
5+
6+
## Key Features
7+
- **Direct Upload**: Upload photo directly from browser to Phlastic API (bypassing Sellrise).
8+
- **Storage Rules**:
9+
- Files stored in non-web-accessible directory.
10+
- UUID-based filenames (no PII in paths).
11+
- **Access Control**:
12+
- Authenticated API-only access.
13+
- No public URLs.
14+
15+
## Success Metrics
16+
- Photo successfully uploaded and stored in encrypted path.
17+
- Photo binary can only be downloaded by authenticated staff.
18+
- Photo metadata (type, consent) is correctly stored in `photos` table.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# PRD 4: CRM Unified View & Staff Dashboard
2+
3+
## Goal
4+
Provide a unified view of patient data within the Sellrise CRM while keeping PII in the Phlastic service.
5+
6+
## Key Features
7+
- **Unified View**: Fetch data from Phlastic API when staff views lead details in Sellrise.
8+
- **Pipeline Management**: Sync pipeline stages (`new``lost`) between Sellrise and Phlastic.
9+
- **Staff Actions**:
10+
- Add notes (`/patients/:id/notes`).
11+
- Update patient info directly from CRM.
12+
13+
## Success Metrics
14+
- Sellrise CRM displays Sellrise data + Phlastic patient data seamlessly.
15+
- Pipeline stage changes are reflected in both systems.
16+
- Staff can add notes and update info without latency issues.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PRD 5: Compliance & Data Lifecycle
2+
3+
## Goal
4+
Ensure full compliance with the Australian Privacy Act 1988 (APP) through robust data lifecycle management.
5+
6+
## Key Features
7+
- **Data Export**: Endpoint to export all patient data as JSON.
8+
- **Hard-Delete**: Permanently remove all patient data + photos.
9+
- **Soft-Delete**: Anonymize PII in Sellrise, keep `lead_id` + "deleted" status.
10+
- **Audit Logging**: Log every read/write operation for each patient.
11+
12+
## Success Metrics
13+
- Hard-delete successfully wipes all data from DB and disk.
14+
- Soft-delete successfully anonymizes PII in Sellrise.
15+
- Audit log is accessible for specific patient IDs.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PRD 6: Patient Cabinet Authentication & Onboarding
2+
3+
## Goal
4+
Implement secure patient access to the Phlastic Cabinet and a guided 7-step onboarding wizard.
5+
6+
## Key Features
7+
- **Auth Flow**: Invite-based account creation, password hashing, and auto-login.
8+
- **Onboarding Wizard**: 7-step data collection process.
9+
- **State Management**: Track `onboarding_completed` and `onboarding_step` in `patients` table.
10+
11+
## Success Metrics
12+
- Patients can successfully create accounts via invite links.
13+
- Onboarding progress is saved at each step.
14+
- Wizard completion triggers `onboarding_completed` event in `patient_events`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PRD 7: Patient Dashboard & Journey Tracking
2+
3+
## Goal
4+
Provide a personalized dashboard for patients to view their medical journey, upcoming services, and profile.
5+
6+
## Key Features
7+
- **Dashboard**: Overview of service status, points balance, and next steps.
8+
- **Journey Tracking**: Timeline of `journey_entries` (e.g., "Consultation Booked", "Photos Uploaded").
9+
- **Profile Management**: View/edit personal info, avatar, and medical notes.
10+
11+
## Success Metrics
12+
- Dashboard loads patient-specific data via Phlastic API.
13+
- Journey timeline accurately reflects `patient_events`.
14+
- Profile updates sync correctly to the Phlastic DB.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PRD 8: Staff, Services, & Reviews
2+
3+
## Goal
4+
Manage medical staff, track patient procedures, and collect patient feedback.
5+
6+
## Key Features
7+
- **Staff Management**: CRUD for doctors, nurses, and tour operators.
8+
- **Service Tracking**: Track procedure status (`planned`, `scheduled`, `completed`).
9+
- **Review System**: Patient-submitted reviews (1-5 stars) with approval workflow.
10+
11+
## Success Metrics
12+
- Staff profiles are visible to patients.
13+
- Service status updates trigger `patient_events`.
14+
- Reviews are submitted, moderated, and displayed if `is_public=true`.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PRD 9: Reward System & Community
2+
3+
## Goal
4+
Drive patient engagement through a points-based reward system and community interaction.
5+
6+
## Key Features
7+
- **Reward Engine**: Award points for onboarding, reviews, referrals, and services.
8+
- **Community Groups**: Discussion forums for patients.
9+
- **Moderation**: Ability to approve/reject community posts.
10+
11+
## Success Metrics
12+
- Points balance updates correctly in the dashboard.
13+
- Community posts are visible and moderated.
14+
- Reward history is logged in `rewards` table.

0 commit comments

Comments
 (0)