I am working on customizing the Analysis Reports section under the Clients view in SENAITE LIMS. Specifically, I want to display Patient Names and Test Profiles/Test Names as additional columns in the reports table.
Here’s what I have tried so far:
I created a subscriber for the Samples table as follows:
The Patient Names column does not show up in the Analysis Reports tab of Client Samples table, regardless of resetting or reordering columns.
I am using:
SENAITE.LIMS: 2.x (latest)
SENAITE.Core: 2.x (latest)
Additionally, I want to add Patient Names and Test Profiles/Test Names as columns in the Analysis Reports table. Could you advise which files need to be modified and how to achieve this? Any guidance on troubleshooting the missing column issue in the Samples table would also be appreciated.
Thank you for your response and willingness to assist!
I managed to solve the issue, and I’d like to share my solution in case it helps someone else working on similar customizations in published reports_listing table.
I updated the folderitem method to populate the new column:
def folderitem(self, obj, item, index):
"""Augment folder listing item
"""
.............................................
# Include Patient Full Name
patient_full_name = obj.getPatientFullName() # This is a placeholder, replace with actual method to get patient full name
item["PatientFullName"] = patient_full_name
.............................................
After these changes, the “Patient Full Name” column now appears in the **Published Reports ** section and displays the data as expected.
Thanks again for your help, and I hope this solution proves useful to others working on similar tasks.