History & Viewing
Viewing consent history, AOE values, and additional patient info values in livehealth-frontend.
History & Viewing Responses
All history views share a common structure built on a reusable AG Grid component (FormValuesGrid) and a shared export header.
Shared Infrastructure
Components:
ValuesExportHeader— date picker (max 1-month range), Excel export button, branch filterFormValuesGrid— AG Grid with 30 columns for viewing submitted form values
API Call: fetchLabFormValues(formType, from, to) → GET api-v3/account/{formType}/values?from=...&to=...
Branch Filtering: filterLabFormDataByBranch() — supports dot-path keys and array branch IDs for multi-branch labs.
FormValuesGrid Column Definitions
| Column | Visibility |
|---|---|
| Patient ID, Full Name, DOB, Gender | Always visible |
| Bill ID | Always visible |
| Test ID, Test Name, Test Code, Report ID | Hidden for bill/patient/store/promotion process types |
| Promotion ID, Promotion Name | Only visible when processType === "promotion" |
| Process ID, Name, Code, Type | Always visible |
| Sub Process ID, Name, Code | Always visible |
| Question, Question Code, Field Type | Always visible |
| Answer, Iteration, Form Status | Always visible |
| Filled Time | Always visible |
| Edit AOE | Only visible if allow_aoe_edit feature flag AND formType === "aoe" |
8.1 Consent History
Component: ConsentHistoryNew (src/components/Registration/Components/LabFormValues/Consent/ConsentHistoryNew.tsx)
Two sub-tabs:
- Consent Status →
ConsentHistorycomponent (separate date range stored inGENERIC.historyDateRange) - Form Values →
ConsentValuescomponent with 3 sub-tabs:- Patient Consents →
FormValuesGrid(consent, patient) - Bill Consents →
FormValuesGrid(consent, bill) - Test Consents →
FormValuesGrid(consent, test)
- Patient Consents →
8.2 AOE Values
Component: AOEValues (src/components/Registration/Components/LabFormValues/AOE/AOEValues.tsx)
Tabs rendered based on feature flags:
| Tab | Component | Condition |
|---|---|---|
| Bill AOE | FormValuesGrid(aoe, bill) | Always |
| Test AOE | FormValuesGrid(aoe, test) | Always |
| Promotion AOE | FormValuesGrid(aoe, promotion) | Only if crm_access flag |
| Store AOE | FormValuesGrid(aoe, store) | Only if crm_access flag |
Each grid includes an Edit AOE button column when the allow_aoe_edit feature flag is enabled. Clicking it opens the AOEDetailsModal (see Editing Responses).
8.3 Additional Patient Info Values
Component: PatientInfoValues (src/components/Registration/Components/LabFormValues/PatientInfo/PatientInfoValues.tsx)
Renders a single grid: FormValuesGrid(additional_patient_info, patient)
Because additional_patient_info is patient-scoped (not bill-scoped), the grid does not show Bill ID or Test ID columns.