Bahmni Product Regression Test suite

Bahmni Product Regression Test suite

Automation repo link https://github.com/Bahmni/bahmni-ui-test-automation

Sl No

Module

Test Scenario

Test Case

Test Steps

Jira ID

Spec File

Sl No

Module

Test Scenario

Test Case

Test Steps

Jira ID

Spec File

1

Registration

Patient registration tests

Register and verify patient demographic details

  1. Login as Admin

  2. Navigate to Registration module

  3. Create new patient with all details (name, gender, DOB, phone, email)

  4. Upload patient photo

  5. Fill address information

  6. Save patient

  7. Search and open patient by ID

  8. Verify basic, contact and address information

BAH-4252, BAH-4244, BAH-4275

registerSearch.spec.ts

2

Registration

Patient registration tests

Verify patient relationship

  1. Login as Admin

  2. Create first patient and save

  3. Create second patient

  4. Add Father/Son relationship to second patient linking first patient

  5. Save second patient

  6. Verify relationship on second patient

  7. Navigate to first patient

  8. Verify reciprocal relationship (Son) on first patient

BAH-4253, BAH-4389

registerSearch.spec.ts

3

Clinical

Clinical Consultation Tests

Add allergy with severity and reaction in consultation

  1. Navigate to clinical module

  2. Add allergy (allergen, severity, reaction) in consultation

  3. Save and verify allergy displayed in patient summary

BAH-4449

consultation.spec.ts

4

Clinical

Clinical Consultation Tests

Order investigation and procedure in consultation

  1. Navigate to clinical module

  2. Add investigations (single test, panel, radiology) and a procedure in consultation

  3. Save and verify each displayed under Lab Investigations, Radiology Investigations, and Procedures sections

BAH-4449

consultation.spec.ts

5

Clinical

Clinical Consultation Tests

Add condition and diagnosis in consultation

  1. Navigate to clinical module

  2. Add condition and diagnosis in consultation

  3. Save and verify condition displayed

  4. Verify diagnosis displayed

BAH-4449

consultation.spec.ts

6

Clinical

Clinical Consultation Tests

Add medication in consultation

  1. Navigate to clinical module

  2. Add medication (drug, dosage, frequency, duration, route) in consultation

  3. Save and verify medication displayed

BAH-4449

consultation.spec.ts

7

Clinical

Clinical Consultation Tests

Add vaccination in consultation

  1. Navigate to clinical module

  2. Add vaccination in consultation

  3. Reload page

  4. Verify vaccination displayed

BAH-4405, BAH-4393

consultation.spec.ts

8

Clinical

Clinical Consultation Tests

Add vitals observation form in consultation

  1. Navigate to clinical module

  2. Fill and save vitals form

  3. Verify vitals in observations section

  4. Verify vitals flowsheet

  5. Open vitals form modal and verify data

BAH-4449

consultation.spec.ts

9

Clinical

Duplicate Medication Tests

Adding an active medication in different dosage in a new consultation shows duplicate error

  1. Navigate to clinical module

  2. Add first medication and save consultation

  3. Verify first medication displayed

  4. In new consultation, search for same drug with different dosage

  5. Verify duplicate medication error shown

  6. Cancel consultation

 

duplicateMedication.spec.ts

10

Lab

Lab Orders

Validate lab orders - order anemia panel and absolute atypical lymphocyte count and verify results

  1. Navigate to clinical module

  2. Order Anemia Panel and Atypical Lymphocyte Count investigations

  3. Save consultation

  4. Post lab results via FHIR API (anemia + atypical lymph reports)

  5. Reload page

  6. Verify anemia lab results displayed

  7. Verify atypical lymphocyte lab results displayed

BAH-4412, BAH-4385

labOrders.spec.ts

11

Observation Forms

Observation Form Tests

Add admission letter observation form in consultation

  1. Navigate to clinical module

  2. Fill and save Admission Letter form

  3. Open Admission Letter form from observations

  4. Verify form data

  5. Close modal

BAH-4449, BAH-4280, BAH-4285, BAH-4382

observationForms.spec.ts

12

Observation Forms

Observation Form Tests

Add vitals observation form in consultation

  1. Navigate to clinical module

  2. Fill and save Vitals form

  3. Verify vitals in observations section

  4. Verify vitals flowsheet

  5. Open Vitals form modal and verify data

  6. Close modal

BAH-4449, BAH-4280, BAH-4285, BAH-4382

observationForms.spec.ts

13

Observation Forms

Observation Form Tests

Add death note observation form in consultation

  1. Navigate to clinical module

  2. Fill and save Death Note form

  3. Open Death Note form from observations

  4. Verify form data

  5. Close modal

BAH-4449, BAH-4280, BAH-4285, BAH-4382

observationForms.spec.ts

14

Observation Forms

Observation Form Tests

Add diabetes progress observation form in consultation

  1. Navigate to clinical module

  2. Fill and save Diabetes Progress form

  3. Open Diabetes Progress form from observations

  4. Verify form data

  5. Close modal

BAH-4449, BAH-4280, BAH-4285, BAH-4382

observationForms.spec.ts

15

Observation Forms

Observation Form Tests

Add malaria observation form in consultation

  1. Navigate to clinical module

  2. Fill and save Malaria form

  3. Open Malaria form from observations

  4. Verify form data

  5. Close modal

BAH-4449, BAH-4280, BAH-4285, BAH-4382

observationForms.spec.ts

16

E2E

End-to-End Patient Flow with different user roles

E2E patient flow

  1. Login as Front Desk — Register patient — Start OPD visit

  2. Logout

  3. Login as Doctor — Navigate to patient clinical

  4. Add allergy, condition/diagnosis, and medication in consultation

  5. Logout

  6. Login as Clinical Read user — Navigate to patient clinical

  7. Verify allergy, diagnosis, and medication displayed

  8. Logout

Privilege

e2ePatientFlow.spec.ts

17

Registration

Edit patient registration tests

Edit patient and verify

  1. Login as Admin

  2. Register a new patient with name, gender, DOB, phone, email, address and save

  3. Edit patient details with new data

  4. Save updated patient

  5. Search and open patient by updated name

  6. Verify updated basic, contact and address information

 

editRegistration.spec.ts

18

Clinical

Appointments Display Tests

Upcoming appointments sorted ASC and past appointments sorted DESC

  1. Set up patient with 2 upcoming (10:00 AM, 2:00 PM) and 2 past (10:00 AM, 2:00 PM) appointments via API

  2. Navigate to clinical module

  3. Verify Upcoming tab is active with 2 Scheduled appointments

  4. Verify upcoming appointments are sorted in ascending order by time

  5. Click Past tab

  6. Verify 2 Completed appointments are sorted in descending order by time

 

appointments.spec.ts

19

Clinical

Patient Document Tests

View uploaded patient documents in clinical dashboard

  1. Upload patient documents via API

  2. Navigate to clinical module

  3. Verify document is displayed by identifier and document type

  4. Open attachment

  5. Verify all attachments are displayed

 

patientDocuments.spec.ts

20

Lab

Radiology Investigations

Validate radiology report - order echocardiogram and verify report results

  1. Navigate to clinical module

  2. Order Echocardiogram investigation in consultation

  3. Save consultation

  4. Post echocardiogram report via FHIR API

  5. Reload page

  6. Verify echocardiogram report results displayed

 

investigations.spec.ts

21

Registration (API)

Patient Registration E2E API Tests

Create patient with demographics, verify details, start OPD visit and confirm visit is active

  1. POST /patientprofile — create patient with name, gender, DOB, phone, email, address; verify 200 and patient UUID

  2. GET /patientprofile — verify stored demographics match payload

  3. GET /visit — confirm no active visit exists yet

  4. POST /visit — start OPD visit; verify 201 and visitType contains OPD

  5. GET /visit — confirm visit is active and stopDatetime is null

 

registration.spec.ts, patient.spec.ts

22

Registration (API)

Patient Registration Edge Cases

Identifier auto-generation, jump detection, and birthdate handling

  1. POST /patientprofile without specifying identifier — verify identifier auto-generated with configured prefix

  2. POST /patientprofile with manually-entered identifier that jumps ahead of sequence — verify 412 returned

  3. POST /patientprofile with exact birthdate (birthdateEstimated=false) — verify exact date stored and flag is false

  4. POST /patientprofile with estimated birthdate (birthdateEstimated=true) — verify flag stored as true

 

patientRegistrationEdgeCases.spec.ts

23

Registration (API)

Patient Registration Edge Cases

Name length validation and patient relationships

  1. POST /patientprofile with givenName exceeding 50 characters — verify 400 returned

  2. POST /patientprofile with familyName exceeding 50 characters — verify 400 returned

  3. POST /patientprofile with a relationship to another patient — verify patient and relationship created

  4. GET /relationship — verify relationship is retrievable

  5. POST /patientprofile with empty personB.uuid — verify relationship is not persisted

 

patientRegistrationEdgeCases.spec.ts

24

Registration (API)

FHIR Patient Resource Mapping

GET /fhir2/R4/Patient maps OpenMRS person fields to FHIR Patient resource

  1. POST /patientprofile to create a patient

  2. GET /fhir2/R4/Patient/{uuid} — verify resourceType is Patient

  3. Verify identifier value, name (given + family), gender and birthDate map correctly from OpenMRS person fields

 

fhirPatient.spec.ts

25

Clinical (API)

Patient Data Isolation

FHIR queries return only the queried patient's data

  1. Create two patients (A and B) each with a different allergy (penicillin / aspirin) via ConsultationBundle

  2. GET /fhir2/R4/AllergyIntolerance?patient={A} — verify only A's allergy returned; B's allergy absent; all patient references contain A's UUID

  3. GET /fhir2/R4/AllergyIntolerance?patient={B} — verify only B's allergy returned; A's allergy absent

  4. GET /fhir2/R4/Encounter?subject:Patient={A} — verify all returned encounters belong to patient A only

 

dataIsolation.spec.ts

26

Clinical (API)

Clinical Dashboard Privilege Checks

Role-based access control for FHIR clinical resources

  1. GET /fhir2/R4/AllergyIntolerance without authentication — verify 401 returned

  2. GET AllergyIntolerance, Condition, MedicationRequest, ServiceRequest, Observation as doctor role — verify 200

  3. GET same resources as nurse role — verify 200

  4. GET same resources as clinicalRead role — verify 200

  5. POST /fhir2/R4/ConsultationBundle as doctor role — verify 200 or 201

 

clinicalDashboardPrivileges.spec.ts

27

Clinical (API)

AllergyIntolerance via ConsultationBundle

Save allergy, verify FHIR fields, and validate error cases

  1. POST /fhir2/R4/ConsultationBundle with allergy entry

  2. GET /fhir2/R4/AllergyIntolerance — verify allergy appears with correct patient reference, valid category, allergen code, reaction severity and manifestation code

  3. POST duplicate allergen for same patient — verify 400 returned

  4. POST bundle with invalid patient reference — verify 400 returned

  5. GET with _count=1 — verify 1 entry returned; GET with _count=2 — verify 2 entries returned

 

allergy.spec.ts

28

Clinical (API)

Conditions via ConsultationBundle

Save encounter-diagnosis and problem-list-item; verify category isolation

  1. POST ConsultationBundle with encounter-diagnosis — verify Condition saved with correct code, category, subject, encounter reference and recorder

  2. POST ConsultationBundle with problem-list-item — verify Condition saved with correct code, clinicalStatus active, onsetDateTime; no encounter reference

  3. GET /fhir2/R4/Condition?category=problem-list-item — verify encounter-diagnosis does not appear

  4. GET /fhir2/R4/Condition?category=encounter-diagnosis — verify problem-list-item does not appear

 

conditions.spec.ts

29

Clinical (API)

Observation Forms via ConsultationBundle

Submit Vitals and Obstetrics and Gynaecology observation forms and verify

  1. POST /fhir2/R4/ConsultationBundle with Vitals and Obstetrics and Gynaecology observations — verify response echoes all submitted observations with matching values, notes, interpretation and form-namespace extension

  2. GET /bahmnicore/patient/{uuid}/forms?numberOfVisits=10 — verify both Vitals and Obstetrics and Gynaecology forms appear for the encounter

  3. GET /fhir2/R4/Observation/$fetch-all?encounter={uuid} — verify all submitted observations returned with values preserved

 

observationForms.spec.ts

30

Clinical (API)

Appointments via API

Create single and recurring appointments and verify via FHIR

  1. POST /appointment — create single appointment; verify status Scheduled, patient, service, provider, location and datetime

  2. POST /recurring-appointments with DAY frequency, period=1, frequency=3 — verify 3 instances created sharing one booking identifier

  3. GET /fhir2/R4/Appointment?patient={uuid} — verify 1 regular + 3 recurring instances returned with correct service, dates and practitioner

 

appointments.spec.ts

31

Lab (API)

Lab Orders via ConsultationBundle

Order single lab test, panel, radiology and procedure; verify ServiceRequest fields

  1. POST ConsultationBundle with single lab test — GET ServiceRequest; verify status active, category lab, requester, note and urgency extension

  2. POST ConsultationBundle with panel lab test — verify ServiceRequest reuses same encounter

  3. POST ConsultationBundle with radiology order — verify ServiceRequest with radiology category

  4. POST ConsultationBundle with procedure order — verify ServiceRequest with procedure category

 

labOrder.spec.ts

32

Lab (API)

Lab Orders — Visit Filtering

GET ServiceRequest with numberOfVisits limits orders to N most recent visits

  1. Create patient with lab and radiology orders across two separate visits

  2. GET lab ServiceRequests with numberOfVisits=1 — verify only orders from most recent visit returned

  3. GET lab ServiceRequests with numberOfVisits=2 — verify orders from both visits returned

  4. GET radiology ServiceRequests with numberOfVisits=1 — verify only most recent visit orders returned

  5. GET radiology ServiceRequests with numberOfVisits=2 — verify orders from both visits returned

 

labOrder.spec.ts

33

Lab (API)

DiagnosticReport — Lab Results

Submit DiagnosticReport with various observation types and verify via $fetch-bundle

  1. POST DiagnosticReport/$submit-bundle with single numeric observation — verify final status and valueQuantity

  2. POST with panel (numeric x6) — verify 6 result references and observation values

  3. POST with coded observation and 1 attachment — verify presentedForm and valueCodeableConcept

  4. POST with mixed observations (numeric + text + coded) and 3 attachments — verify all types

  5. POST with text observation — verify valueString

  6. POST with boolean observation — verify valueBoolean

 

labOrder.spec.ts

34

Lab (API)

DiagnosticReport — Radiology Results

Submit radiology DiagnosticReports and verify echocardiogram and X-ray results

  1. Order Echocardiogram and X-ray Arm via ConsultationBundle

  2. POST DiagnosticReport/$submit-bundle for Echocardiogram — GET $fetch-bundle; verify 15 mixed observations including ejection fraction (valueQuantity), LV function (valueCodeableConcept) and summary (valueString)

  3. POST DiagnosticReport/$submit-bundle for X-ray Arm — GET $fetch-bundle; verify 8 observations including summary text, swelling coded value and arm length numeric value

 

labOrder.spec.ts

35

Clinical (API)

Patient Documents via FHIR

Register patient documents and verify via DocumentReference

  1. Upload PNG via document upload API

  2. POST /fhir2/R4/DocumentReference with single attachment — verify 201, patient reference, masterIdentifier, content URL and author

  3. Upload PNG and PDF; POST DocumentReference with multiple attachments — verify 2 content entries with correct URLs

  4. GET /fhir2/R4/DocumentReference?patient={uuid} sorted by _lastUpdated DESC — verify both docs returned sorted newest first with attachment counts and practitioner preserved

 

patientDocuments.spec.ts

36

Clinical (API)

Medication Orders via ConsultationBundle

Order medications across all supported routes and verify MedicationRequest fields

  1. POST ConsultationBundle for each route; verify MedicationRequest status active, route code, dose value/unit, frequency, duration and total dispense quantity

  2. Routes: Oral (Acetaminophen Tablet), Intravenous (Acetaminophen Injection), Intramuscular (Anti-rabies vaccine), Sub Cutaneous (Insulin), Inhalation PRN (Isoflurane)

  3. Routes: Sub Lingual (Nitroglycerin), Nasogastric (ORS Powder), Per Rectum (Acetaminophen Suppository), Nasal (Xylometazoline), Topical (Lidocaine Gel)

  4. Routes: Per Vaginal (Clotrimazole Pessary), Intradermal (Thiopental), Intraperitoneal (Amoxicillin), Intrathecal (Diltiazem), Intraosseous (Epinephrine)

 

medication.spec.ts

37

Clinical (API)

Medication Search

Search medications by name and verify _count limiting

  1. GET /fhir2/R4/Medication?name=par with _count=20 — verify matching medications returned with display containing search term

  2. GET /fhir2/R4/Medication?name=p — verify results returned for single-character search

  3. GET /fhir2/R4/Medication?name=a with _count=5 — verify at most 5 results returned

 

medication.spec.ts

38

Clinical (API)

ConsultationBundle Server-Enforced Validation

Validate encounter datetime constraints and bundle transaction atomicity

  1. POST ConsultationBundle with encounter datetime in the future — verify 400 returned

  2. POST ConsultationBundle with encounter datetime before visit start — verify 400 returned

  3. POST bundle with valid allergy and invalid ServiceRequest — verify 400; GET Encounter confirms no consultation encounter persisted

  4. Repeat partial failure bundle — GET AllergyIntolerance confirms no allergy persisted (full rollback)

 

bundleValidation.spec.ts

39

Clinical (API)

TB Program Enrollment

Enroll patient in TB Program and verify enrollment details

  1. POST /bahmniprogramenrollment — enroll patient in TB Program with initial state and 4 attributes (ID number, treatment date, doctor in charge, patient stage)

  2. Verify response: patient UUID, program UUID, dateEnrolled, 1 initial state and 4 attributes

  3. GET /bahmniprogramenrollment?patient={uuid} — verify enrollment returned with program name, episodeUuid, initial state (endDate null) and all 4 attribute values

 

programs.spec.ts

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)