Test plansClinic app
Test Plan: Clinic App - Add Patient & Appointment Booking
Module: Clinic App - Add Patient & Appointment Booking URL:
- Add Patient: https://practice-stg-new.kulcare.com/cms/patients
- Appointment Booking: https://practice-stg-new.kulcare.com/cms/queue Status: 🔄 In Progress
⚠️ Important Note - Known Bugs
Before testing, review these known bugs to avoid duplicate reporting:
| Bug # | Description | Severity | Status |
|---|---|---|---|
| 31 | Federated Search - partial name works, full name doesn't | 🟡 High | Open |
| 32 | DOB not auto-filled when importing from Kulcare | 🟡 High | Open |
| 34 | No validation for patient form (Frontend + Backend) | 🟠 Medium | Open |
| 34b | Backend accepts empty/whitespace for last_name | 🟠 Medium | Open |
| 34c | Backend accepts whitespace for phone_number | 🟠 Medium | Open |
| 35 | Patient list date range filter not working | 🟠 Medium | Open |
Quick Reference
Test Coverage
| Phase | Section | Test Cases | Tested | Passed | Failed | Status |
|---|---|---|---|---|---|---|
| 1 | Federated Patient Search | 6 | 3 | 2 | 1 | ✅ Done |
| 1 | Select Patient | 6 | 4 | 3 | 1 | ✅ Done |
| 1 | Create New Patient Form | 11 | 11 | 7 | 4 | ✅ Done |
| 1 | Patient List & Management | 13 | 2 | 2 | 1 | 🔄 In Progress |
| 2 | Appointment Booking | 18 | 0 | 0 | 0 | 🔄 Pending |
| 2 | Queue Management | 5 | 0 | 0 | 0 | 🔄 Pending |
| 3 | Integration Tests | 5 | 0 | 0 | 0 | 🔄 Pending |
| Total | 64 | 20 | 14 | 7 |
Key Components
| Component | File | Purpose |
|---|---|---|
| FederatedPatientPicker | FederatedPatientPicker.tsx | 3-bucket patient search |
| AddPatientModal | AddPatientModal.tsx | Create new patient |
| AddAppointmentModal | AddAppointmentModal/index.tsx | 2-step booking flow |
| AppointmentSetup | steps/AppointmentSetup.tsx | Step 1: Doctor & Time |
| PatientInformation | steps/PatientInformation.tsx | Step 2: Patient Info |
Key APIs
| API | Method | Purpose |
|---|---|---|
/clinical/patients/federated_search | GET | Search across Kulcare network |
/clinical/patients | POST | Create new patient |
/clinical/appointments | POST | Create appointment |
/clinical/facilities/{id}/queue | GET | Get queue |
/clinical/appointments/{id} | PATCH | Update appointment |
Test Data Requirements
| Type | Data | Purpose |
|---|---|---|
| Patient A | Existing clinic patient | Test "In this clinic" bucket |
| Patient B | Kulcare network patient | Test "Elsewhere on Kulcare" bucket |
| Patient C | New patient | Test "Add new patient" flow |
| Doctor 1 | Active, with availability | Test appointment booking |
| Doctor 2 | Active doctor | Test doctor selection |
| Doctor 3 | No availability | Test "No slots" scenario |
Phase 1: Add Patient Flow
1.1 Federated Patient Search
Test Cases:
| # | Test Case | Priority | Expected | Bug | Status |
|---|---|---|---|---|---|
| FS-01 | Search by phone (in clinic) | P0 | Returns patient in "In this clinic" | - | ✅ Tested |
| FS-02 | Search by phone (in Kulcare) | P0 | Returns patient in "Elsewhere on Kulcare" | - | ✅ Tested |
| FS-03 | Search by phone (no match) | P0 | Both buckets empty, "Add new patient" shown | - | Pending |
| FS-04 | Search by partial name ("mohit") | P0 | Returns matching patients | - | ✅ Tested |
| FS-05 | Search by full name ("mohit goyal") | P0 | Should return matching patients | Bug #31 | ❌ FAIL |
| FS-06 | Search by email | P1 | Returns matching patients | - | Pending |
1.2 Select Patient
| # | Test Case | Priority | Expected | Bug | Status |
|---|---|---|---|---|---|
| SP-01 | Select in-clinic patient | P0 | Toast: "Patient already exists", modal closes | - | ✅ Tested |
| SP-02 | Select in-Kulcare patient | P0 | Form auto-fills with patient data | - | ✅ Tested |
| SP-03 | Import in-Kulcare patient - check DOB | P0 | DOB should auto-fill | Bug #32 | ❌ FAIL |
| SP-04 | Import in-Kulcare patient - check name | P0 | Name auto-fills | - | ✅ Tested |
| SP-05 | Import in-Kulcare patient - check phone | P0 | Phone auto-fills | - | ✅ Tested |
| SP-06 | Import in-Kulcare patient - check gender | P0 | Gender auto-fills | - | ✅ Tested |
1.3 Create New Patient Form
| # | Test Case | Priority | Expected | Bug | Status |
|---|---|---|---|---|---|
| CP-01 | Create with all required fields | P0 | Patient created successfully | - | ✅ PASS |
| CP-02 | Create with required only | P0 | Patient created successfully | - | ✅ PASS |
| CP-03 | Create with all fields | P0 | Patient created with all data | - | ✅ PASS |
| CP-04 | Empty first name | P0 | Error: "First name required" | - | ✅ PASS |
| CP-05 | Empty last name | P0 | Error: "Last name required" | Bug #34b | ❌ FAIL |
| CP-06 | Empty phone | P0 | Error: "Phone required" | - | ✅ PASS |
| CP-07 | Invalid phone (letters) | P0 | Error: "Invalid phone format" | Bug #34 | ❌ FAIL |
| CP-07b | Phone with whitespace | P0 | Error: "Invalid phone format" | Bug #34c | ❌ FAIL |
| CP-08 | Long name (100+ chars) | P0 | Error: "Name too long" | Bug #34 | ❌ FAIL |
| CP-09 | Future DOB | P0 | Error: "DOB cannot be in future" | Bug #34 | ❌ FAIL |
| CP-10 | Missing gender | P0 | Gender is optional | - | ✅ PASS |
| CP-11 | Invalid gender | P1 | Error: "Invalid gender" | - | ✅ PASS |
1.4 Patient List & Management
APIs:
GET /clinical/patients- List patientsGET /clinical/patients/:id- View patient details (PL-03)PATCH /clinical/patients/:id- Update patient (PL-04)DELETE /clinical/patients/:id- Delete patient (PL-05)
| # | Test Case | Priority | Expected | Bug | Status |
|---|---|---|---|---|---|
| PL-01 | View patient list | P0 | Shows all patients in tenant with pagination | - | ✅ Tested |
| PL-02 | Search patient | P0 | Returns matching patients by name/phone | - | ✅ Tested |
| PL-03 | View patient details | P0 | Shows full patient info | - | Pending |
| PL-03a | View patient details - all fields | P0 | Shows name, phone, DOB, gender, address | - | Pending |
| PL-03b | View patient - no access | P0 | Error: "Not authorized" | - | Pending |
| PL-04 | Edit patient - update name | P0 | Name updated successfully | - | Pending |
| PL-04a | Edit patient - update phone | P0 | Phone updated successfully | - | Pending |
| PL-04b | Edit patient - update DOB | P0 | DOB updated successfully | - | Pending |
| PL-04c | Edit patient - validation | P0 | Error on invalid data | Bug #34 | Pending |
| PL-05 | Delete patient | P0 | Patient deleted (soft delete) | - | Pending |
| PL-05a | Delete patient - verify hidden | P0 | Patient not visible in list | - | Pending |
| PL-06 | Date range filter | P0 | Filter patients by birth date | Bug #35 | ❌ FAIL |
| PL-06b | Multi-clinic visibility | P0 | Patient visible in all clinics (same tenant) | - | ✅ PASSED |
Phase 2: Appointment Booking Flow
2.1 Step 1: Doctor & Time
| # | Test Case | Priority | Expected | Status |
|---|---|---|---|---|
| AB-01 | Select doctor | P0 | Doctor selected | Pending |
| AB-02 | Select WALKIN type | P0 | Type selected | Pending |
| AB-03 | Select ONCALL type | P0 | Type selected | Pending |
| AB-04 | View available slots | P0 | Shows slots for selected date | Pending |
| AB-05 | No slots available | P0 | Shows "No slots" message | Pending |
| AB-06 | Select time slot | P0 | Slot selected | Pending |
| AB-07 | Continue to step 2 | P0 | Advances to patient info | Pending |
2.2 Step 2: Patient Info
| # | Test Case | Priority | Expected | Status |
|---|---|---|---|---|
| PI-01 | Select existing patient | P0 | Patient selected | Pending |
| PI-02 | Add new patient | P0 | Opens AddPatientModal | Pending |
| PI-03 | Search and select | P0 | Patient found and selected | Pending |
| PI-04 | Proceed without patient | P0 | Error: "Patient required" | Pending |
| PI-05 | Submit appointment | P0 | Appointment created | Pending |
2.3 Queue Booking
| # | Test Case | Priority | Expected | Status |
|---|---|---|---|---|
| QB-01 | Book WALKIN | P0 | Added to queue | Pending |
| QB-02 | Book ONCALL | P0 | Added to queue | Pending |
| QB-03 | Queue position shown | P0 | Shows position number | Pending |
| QB-04 | Queue order correct | P0 | FIFO order maintained | Pending |
2.4 Queue Management
| # | Test Case | Priority | Expected | Status |
|---|---|---|---|---|
| QM-01 | View today's queue | P0 | Shows all appointments | Pending |
| QM-02 | Start encounter | P0 | Encounter started | Pending |
| QM-03 | Complete appointment | P0 | Status updated to completed | Pending |
| QM-04 | Mark no-show | P0 | Status updated to no-show | Pending |
| QM-05 | Cancel appointment | P0 | Status updated to cancelled | Pending |
Bug Reporting Template
When reporting a new bug, use this template:
### Bug #[N]: [Short Description]
**Severity**: 🔴 Critical | 🟡 High | 🟠 Medium | 🟢 Low
**Status**: Open
**Description**:
[Clear description of the issue]
**Steps to Reproduce**:
1. [Step 1]
2. [Step 2]
3. [Step 3]
**Expected**: [What should happen]
**Actual**: [What actually happens]
**API Evidence** (if applicable):
```bash
[curl command]Impact: [Business impact]
---
## Test Execution Checklist
**Pre-Flight**
- [x] Test accounts: 2 doctors, 2 staff
- [x] Test data: Patient A (in clinic), Patient B (in Kulcare), Patient C (new)
- [x] Test data: Doctor 1 (with availability), Doctor 2, Doctor 3 (no availability)
- [x] Staging environment accessible
**Phase 1: Add Patient Flow**
- [x] 1.1 Federated Patient Search (FS-01 to FS-06)
- [x] 1.2 Select Patient (SP-01 to SP-06)
- [x] 1.3 Create New Patient Form (CP-01 to CP-11)
- [ ] 1.4 Patient List & Management (PL-01 to PL-06)
**Phase 2: Appointment Booking Flow**
- [ ] 2.1 Step 1: Doctor & Time (AB-01 to AB-07)
- [ ] 2.2 Step 2: Patient Info (PI-01 to PI-05)
- [ ] 2.3 Queue Booking (QB-01 to QB-04)
- [ ] 2.4 Queue Management (QM-01 to QM-05)
**Integration Tests**
- [ ] INT-01 to INT-05
---
**Test Plan Status**: 🔄 In Progress
**Total Test Cases**: 57
**Tested**: 19 | **Passed**: 13 | **Failed**: 6
**Last Updated**: 2026-06-11