| | | | | | |
|---|
1 | Registration | Patient registration tests | Register and verify patient demographic details | Login as Admin Navigate to Registration module Create new patient with all details (name, gender, DOB, phone, email) Upload patient photo Fill address information Save patient Search and open patient by ID Verify basic, contact and address information
| BAH-4252, BAH-4244, BAH-4275 | registerSearch.spec.ts |
2 | Registration | Patient registration tests | Verify patient relationship | Login as Admin Create first patient and save Create second patient Add Father/Son relationship to second patient linking first patient Save second patient Verify relationship on second patient Navigate to first patient 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 | Navigate to clinical module Add allergy (allergen, severity, reaction) in consultation Save and verify allergy displayed in patient summary
| BAH-4449 | consultation.spec.ts |
4 | Clinical | Clinical Consultation Tests | Order investigation and procedure in consultation | Navigate to clinical module Add investigations (single test, panel, radiology) and a procedure in consultation 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 | Navigate to clinical module Add condition and diagnosis in consultation Save and verify condition displayed Verify diagnosis displayed
| BAH-4449 | consultation.spec.ts |
6 | Clinical | Clinical Consultation Tests | Add medication in consultation | Navigate to clinical module Add medication (drug, dosage, frequency, duration, route) in consultation Save and verify medication displayed
| BAH-4449 | consultation.spec.ts |
7 | Clinical | Clinical Consultation Tests | Add vaccination in consultation | Navigate to clinical module Add vaccination in consultation Reload page Verify vaccination displayed
| BAH-4405, BAH-4393 | consultation.spec.ts |
8 | Clinical | Clinical Consultation Tests | Add vitals observation form in consultation | Navigate to clinical module Fill and save vitals form Verify vitals in observations section Verify vitals flowsheet 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 | Navigate to clinical module Add first medication and save consultation Verify first medication displayed In new consultation, search for same drug with different dosage Verify duplicate medication error shown Cancel consultation
| | duplicateMedication.spec.ts |
10 | Lab | Lab Orders | Validate lab orders - order anemia panel and absolute atypical lymphocyte count and verify results | Navigate to clinical module Order Anemia Panel and Atypical Lymphocyte Count investigations Save consultation Post lab results via FHIR API (anemia + atypical lymph reports) Reload page Verify anemia lab results displayed 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 | Navigate to clinical module Fill and save Admission Letter form Open Admission Letter form from observations Verify form data 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 | Navigate to clinical module Fill and save Vitals form Verify vitals in observations section Verify vitals flowsheet Open Vitals form modal and verify data 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 | Navigate to clinical module Fill and save Death Note form Open Death Note form from observations Verify form data 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 | Navigate to clinical module Fill and save Diabetes Progress form Open Diabetes Progress form from observations Verify form data 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 | Navigate to clinical module Fill and save Malaria form Open Malaria form from observations Verify form data 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 | Login as Front Desk — Register patient — Start OPD visit Logout Login as Doctor — Navigate to patient clinical Add allergy, condition/diagnosis, and medication in consultation Logout Login as Clinical Read user — Navigate to patient clinical Verify allergy, diagnosis, and medication displayed Logout
| Privilege | e2ePatientFlow.spec.ts |
17 | Registration | Edit patient registration tests | Edit patient and verify | Login as Admin Register a new patient with name, gender, DOB, phone, email, address and save Edit patient details with new data Save updated patient Search and open patient by updated name Verify updated basic, contact and address information
| | editRegistration.spec.ts |
18 | Clinical | Appointments Display Tests | Upcoming appointments sorted ASC and past appointments sorted DESC | Set up patient with 2 upcoming (10:00 AM, 2:00 PM) and 2 past (10:00 AM, 2:00 PM) appointments via API Navigate to clinical module Verify Upcoming tab is active with 2 Scheduled appointments Verify upcoming appointments are sorted in ascending order by time Click Past tab 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 | Upload patient documents via API Navigate to clinical module Verify document is displayed by identifier and document type Open attachment Verify all attachments are displayed
| | patientDocuments.spec.ts |
20 | Lab | Radiology Investigations | Validate radiology report - order echocardiogram and verify report results | Navigate to clinical module Order Echocardiogram investigation in consultation Save consultation Post echocardiogram report via FHIR API Reload page 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 | POST /patientprofile — create patient with name, gender, DOB, phone, email, address; verify 200 and patient UUID GET /patientprofile — verify stored demographics match payload GET /visit — confirm no active visit exists yet POST /visit — start OPD visit; verify 201 and visitType contains OPD 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 | POST /patientprofile without specifying identifier — verify identifier auto-generated with configured prefix POST /patientprofile with manually-entered identifier that jumps ahead of sequence — verify 412 returned POST /patientprofile with exact birthdate (birthdateEstimated=false) — verify exact date stored and flag is false 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 | POST /patientprofile with givenName exceeding 50 characters — verify 400 returned POST /patientprofile with familyName exceeding 50 characters — verify 400 returned POST /patientprofile with a relationship to another patient — verify patient and relationship created GET /relationship — verify relationship is retrievable 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 | POST /patientprofile to create a patient GET /fhir2/R4/Patient/{uuid} — verify resourceType is Patient 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 | Create two patients (A and B) each with a different allergy (penicillin / aspirin) via ConsultationBundle GET /fhir2/R4/AllergyIntolerance?patient={A} — verify only A's allergy returned; B's allergy absent; all patient references contain A's UUID GET /fhir2/R4/AllergyIntolerance?patient={B} — verify only B's allergy returned; A's allergy absent 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 | GET /fhir2/R4/AllergyIntolerance without authentication — verify 401 returned GET AllergyIntolerance, Condition, MedicationRequest, ServiceRequest, Observation as doctor role — verify 200 GET same resources as nurse role — verify 200 GET same resources as clinicalRead role — verify 200 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 | POST /fhir2/R4/ConsultationBundle with allergy entry GET /fhir2/R4/AllergyIntolerance — verify allergy appears with correct patient reference, valid category, allergen code, reaction severity and manifestation code POST duplicate allergen for same patient — verify 400 returned POST bundle with invalid patient reference — verify 400 returned 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 | POST ConsultationBundle with encounter-diagnosis — verify Condition saved with correct code, category, subject, encounter reference and recorder POST ConsultationBundle with problem-list-item — verify Condition saved with correct code, clinicalStatus active, onsetDateTime; no encounter reference GET /fhir2/R4/Condition?category=problem-list-item — verify encounter-diagnosis does not appear 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 | 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 GET /bahmnicore/patient/{uuid}/forms?numberOfVisits=10 — verify both Vitals and Obstetrics and Gynaecology forms appear for the encounter 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 | POST /appointment — create single appointment; verify status Scheduled, patient, service, provider, location and datetime POST /recurring-appointments with DAY frequency, period=1, frequency=3 — verify 3 instances created sharing one booking identifier 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 | POST ConsultationBundle with single lab test — GET ServiceRequest; verify status active, category lab, requester, note and urgency extension POST ConsultationBundle with panel lab test — verify ServiceRequest reuses same encounter POST ConsultationBundle with radiology order — verify ServiceRequest with radiology category 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 | Create patient with lab and radiology orders across two separate visits GET lab ServiceRequests with numberOfVisits=1 — verify only orders from most recent visit returned GET lab ServiceRequests with numberOfVisits=2 — verify orders from both visits returned GET radiology ServiceRequests with numberOfVisits=1 — verify only most recent visit orders returned 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 | POST DiagnosticReport/$submit-bundle with single numeric observation — verify final status and valueQuantity POST with panel (numeric x6) — verify 6 result references and observation values POST with coded observation and 1 attachment — verify presentedForm and valueCodeableConcept POST with mixed observations (numeric + text + coded) and 3 attachments — verify all types POST with text observation — verify valueString 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 | Order Echocardiogram and X-ray Arm via ConsultationBundle POST DiagnosticReport/$submit-bundle for Echocardiogram — GET $fetch-bundle; verify 15 mixed observations including ejection fraction (valueQuantity), LV function (valueCodeableConcept) and summary (valueString) 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 | Upload PNG via document upload API POST /fhir2/R4/DocumentReference with single attachment — verify 201, patient reference, masterIdentifier, content URL and author Upload PNG and PDF; POST DocumentReference with multiple attachments — verify 2 content entries with correct URLs 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 | POST ConsultationBundle for each route; verify MedicationRequest status active, route code, dose value/unit, frequency, duration and total dispense quantity Routes: Oral (Acetaminophen Tablet), Intravenous (Acetaminophen Injection), Intramuscular (Anti-rabies vaccine), Sub Cutaneous (Insulin), Inhalation PRN (Isoflurane) Routes: Sub Lingual (Nitroglycerin), Nasogastric (ORS Powder), Per Rectum (Acetaminophen Suppository), Nasal (Xylometazoline), Topical (Lidocaine Gel) 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 | GET /fhir2/R4/Medication?name=par with _count=20 — verify matching medications returned with display containing search term GET /fhir2/R4/Medication?name=p — verify results returned for single-character search 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 | POST ConsultationBundle with encounter datetime in the future — verify 400 returned POST ConsultationBundle with encounter datetime before visit start — verify 400 returned POST bundle with valid allergy and invalid ServiceRequest — verify 400; GET Encounter confirms no consultation encounter persisted 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 | POST /bahmniprogramenrollment — enroll patient in TB Program with initial state and 4 attributes (ID number, treatment date, doctor in charge, patient stage) Verify response: patient UUID, program UUID, dateEnrolled, 1 initial state and 4 attributes GET /bahmniprogramenrollment?patient={uuid} — verify enrollment returned with program name, episodeUuid, initial state (endDate null) and all 4 attribute values
| | programs.spec.ts |