Kulcare Docs
Test plansClinic app

Test Plan: Clinic App - Add Patient & Appointment Booking

Module: Clinic App - Add Patient & Appointment Booking URL:


⚠️ Important Note - Known Bugs

Before testing, review these known bugs to avoid duplicate reporting:

Bug #DescriptionSeverityStatus
31Federated Search - partial name works, full name doesn't🟡 HighOpen
32DOB not auto-filled when importing from Kulcare🟡 HighOpen
34No validation for patient form (Frontend + Backend)🟠 MediumOpen
34bBackend accepts empty/whitespace for last_name🟠 MediumOpen
34cBackend accepts whitespace for phone_number🟠 MediumOpen
35Patient list date range filter not working🟠 MediumOpen

Quick Reference

Test Coverage

PhaseSectionTest CasesTestedPassedFailedStatus
1Federated Patient Search6321✅ Done
1Select Patient6431✅ Done
1Create New Patient Form111174✅ Done
1Patient List & Management13221🔄 In Progress
2Appointment Booking18000🔄 Pending
2Queue Management5000🔄 Pending
3Integration Tests5000🔄 Pending
Total6420147

Key Components

ComponentFilePurpose
FederatedPatientPickerFederatedPatientPicker.tsx3-bucket patient search
AddPatientModalAddPatientModal.tsxCreate new patient
AddAppointmentModalAddAppointmentModal/index.tsx2-step booking flow
AppointmentSetupsteps/AppointmentSetup.tsxStep 1: Doctor & Time
PatientInformationsteps/PatientInformation.tsxStep 2: Patient Info

Key APIs

APIMethodPurpose
/clinical/patients/federated_searchGETSearch across Kulcare network
/clinical/patientsPOSTCreate new patient
/clinical/appointmentsPOSTCreate appointment
/clinical/facilities/{id}/queueGETGet queue
/clinical/appointments/{id}PATCHUpdate appointment

Test Data Requirements

TypeDataPurpose
Patient AExisting clinic patientTest "In this clinic" bucket
Patient BKulcare network patientTest "Elsewhere on Kulcare" bucket
Patient CNew patientTest "Add new patient" flow
Doctor 1Active, with availabilityTest appointment booking
Doctor 2Active doctorTest doctor selection
Doctor 3No availabilityTest "No slots" scenario

Phase 1: Add Patient Flow

Test Cases:

#Test CasePriorityExpectedBugStatus
FS-01Search by phone (in clinic)P0Returns patient in "In this clinic"-✅ Tested
FS-02Search by phone (in Kulcare)P0Returns patient in "Elsewhere on Kulcare"-✅ Tested
FS-03Search by phone (no match)P0Both buckets empty, "Add new patient" shown-Pending
FS-04Search by partial name ("mohit")P0Returns matching patients-✅ Tested
FS-05Search by full name ("mohit goyal")P0Should return matching patientsBug #31❌ FAIL
FS-06Search by emailP1Returns matching patients-Pending

1.2 Select Patient

#Test CasePriorityExpectedBugStatus
SP-01Select in-clinic patientP0Toast: "Patient already exists", modal closes-✅ Tested
SP-02Select in-Kulcare patientP0Form auto-fills with patient data-✅ Tested
SP-03Import in-Kulcare patient - check DOBP0DOB should auto-fillBug #32❌ FAIL
SP-04Import in-Kulcare patient - check nameP0Name auto-fills-✅ Tested
SP-05Import in-Kulcare patient - check phoneP0Phone auto-fills-✅ Tested
SP-06Import in-Kulcare patient - check genderP0Gender auto-fills-✅ Tested

1.3 Create New Patient Form

#Test CasePriorityExpectedBugStatus
CP-01Create with all required fieldsP0Patient created successfully-✅ PASS
CP-02Create with required onlyP0Patient created successfully-✅ PASS
CP-03Create with all fieldsP0Patient created with all data-✅ PASS
CP-04Empty first nameP0Error: "First name required"-✅ PASS
CP-05Empty last nameP0Error: "Last name required"Bug #34b❌ FAIL
CP-06Empty phoneP0Error: "Phone required"-✅ PASS
CP-07Invalid phone (letters)P0Error: "Invalid phone format"Bug #34❌ FAIL
CP-07bPhone with whitespaceP0Error: "Invalid phone format"Bug #34c❌ FAIL
CP-08Long name (100+ chars)P0Error: "Name too long"Bug #34❌ FAIL
CP-09Future DOBP0Error: "DOB cannot be in future"Bug #34❌ FAIL
CP-10Missing genderP0Gender is optional-✅ PASS
CP-11Invalid genderP1Error: "Invalid gender"-✅ PASS

1.4 Patient List & Management

APIs:

  • GET /clinical/patients - List patients
  • GET /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 CasePriorityExpectedBugStatus
PL-01View patient listP0Shows all patients in tenant with pagination-✅ Tested
PL-02Search patientP0Returns matching patients by name/phone-✅ Tested
PL-03View patient detailsP0Shows full patient info-Pending
PL-03aView patient details - all fieldsP0Shows name, phone, DOB, gender, address-Pending
PL-03bView patient - no accessP0Error: "Not authorized"-Pending
PL-04Edit patient - update nameP0Name updated successfully-Pending
PL-04aEdit patient - update phoneP0Phone updated successfully-Pending
PL-04bEdit patient - update DOBP0DOB updated successfully-Pending
PL-04cEdit patient - validationP0Error on invalid dataBug #34Pending
PL-05Delete patientP0Patient deleted (soft delete)-Pending
PL-05aDelete patient - verify hiddenP0Patient not visible in list-Pending
PL-06Date range filterP0Filter patients by birth dateBug #35❌ FAIL
PL-06bMulti-clinic visibilityP0Patient visible in all clinics (same tenant)-✅ PASSED

Phase 2: Appointment Booking Flow

2.1 Step 1: Doctor & Time

#Test CasePriorityExpectedStatus
AB-01Select doctorP0Doctor selectedPending
AB-02Select WALKIN typeP0Type selectedPending
AB-03Select ONCALL typeP0Type selectedPending
AB-04View available slotsP0Shows slots for selected datePending
AB-05No slots availableP0Shows "No slots" messagePending
AB-06Select time slotP0Slot selectedPending
AB-07Continue to step 2P0Advances to patient infoPending

2.2 Step 2: Patient Info

#Test CasePriorityExpectedStatus
PI-01Select existing patientP0Patient selectedPending
PI-02Add new patientP0Opens AddPatientModalPending
PI-03Search and selectP0Patient found and selectedPending
PI-04Proceed without patientP0Error: "Patient required"Pending
PI-05Submit appointmentP0Appointment createdPending

2.3 Queue Booking

#Test CasePriorityExpectedStatus
QB-01Book WALKINP0Added to queuePending
QB-02Book ONCALLP0Added to queuePending
QB-03Queue position shownP0Shows position numberPending
QB-04Queue order correctP0FIFO order maintainedPending

2.4 Queue Management

#Test CasePriorityExpectedStatus
QM-01View today's queueP0Shows all appointmentsPending
QM-02Start encounterP0Encounter startedPending
QM-03Complete appointmentP0Status updated to completedPending
QM-04Mark no-showP0Status updated to no-showPending
QM-05Cancel appointmentP0Status updated to cancelledPending

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

On this page