Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5fcab8e
ENG-500 Support for creating multiple diagnostic reports in a service…
NikhilA8606 Jun 16, 2026
a8f3809
Merge branch 'develop' into ENG-500-support-for-creating-multiple-dia…
NikhilA8606 Jun 19, 2026
7df41e2
applied grayish to notReviewable tests
NikhilA8606 Jun 19, 2026
0d1dc49
Merge branch 'ENG-500-support-for-creating-multiple-diagnostic-report…
NikhilA8606 Jun 19, 2026
f28b7f1
copilot and greptile suggestions
NikhilA8606 Jun 23, 2026
29314ad
Merge branch 'develop' into ENG-500-support-for-creating-multiple-dia…
NikhilA8606 Jun 23, 2026
13acde3
ai suggestions
NikhilA8606 Jun 25, 2026
af5db1b
test fix
NikhilA8606 Jun 25, 2026
41bb2fa
cleanups
NikhilA8606 Jun 25, 2026
af05e7b
corrected toast
NikhilA8606 Jun 26, 2026
db602f2
requested changes
NikhilA8606 Jun 27, 2026
e2537fc
removed onError handler
NikhilA8606 Jun 29, 2026
8614e10
Copilot suggestions
NikhilA8606 Jul 1, 2026
76861d6
added view all report
NikhilA8606 Jul 5, 2026
0e5afd5
cleanups
NikhilA8606 Jul 6, 2026
f011c4e
removed org routes
NikhilA8606 Jul 6, 2026
d55cc57
revert the facility route
NikhilA8606 Jul 7, 2026
88ef689
revert the facility route
NikhilA8606 Jul 7, 2026
f15ef2e
minor cleanups
NikhilA8606 Jul 8, 2026
257deb5
Copilot suggestions
NikhilA8606 Jul 8, 2026
8cc6d10
resolved merge conflicts
NikhilA8606 Jul 9, 2026
ac46a03
review and product suggestions
NikhilA8606 Jul 12, 2026
24b2c55
Resolved merge conflicts
NikhilA8606 Jul 12, 2026
8fb53bf
resolved copilot suggestions
NikhilA8606 Jul 12, 2026
53d39eb
fix print page error
NikhilA8606 Jul 12, 2026
3cea86c
cleanup observation history
NikhilA8606 Jul 13, 2026
cca7592
Merge branch 'develop' into ENG-500-support-for-creating-multiple-dia…
NikhilA8606 Jul 13, 2026
79ff661
Copilot suggestions
NikhilA8606 Jul 13, 2026
30a1517
added translation
NikhilA8606 Jul 14, 2026
ef3e185
requested changes
NikhilA8606 Jul 23, 2026
ae41da7
used DR api instead of getting it from SR
NikhilA8606 Jul 28, 2026
0256a28
added DR name in right pannel of DR list in encounter
NikhilA8606 Jul 29, 2026
cfcaa11
useQueries to retrieve all report in detail
NikhilA8606 Aug 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@
"and_more_medications": "+{{count}} more medication(s)",
"and_more_service_requests": "+{{count}} more service request(s)",
"and_the_status_of_request_is": "and the status of request is",
"another_diagnostic_report": "Another Diagnostic Report",
"answer": "Answer",
"answer_options": "Answer options",
"answer_options_description": "Define possible answers for this question",
Expand Down Expand Up @@ -2537,13 +2538,15 @@
"failed_to_add_service_request": "Failed to add service request",
"failed_to_add_to_template": "Failed to add medication to template",
"failed_to_apply_template": "Failed to apply template",
"failed_to_approve_diagnostic_report": "Failed to approve diagnostic report: {{error}}",
"failed_to_archive_child_tag": "Failed to archive child tag",
"failed_to_cancel_invoice": "Failed to cancel invoice",
"failed_to_cancel_payment": "Failed to cancel payment",
"failed_to_capture_image": "Failed to capture image",
"failed_to_check_appointments": "Failed to check appointments",
"failed_to_create_appointment": "Failed to create an appointment",
"failed_to_create_category": "Failed to create category",
"failed_to_create_diagnostic_report": "Failed to create diagnostic report: {{error}}",
"failed_to_create_invoice": "Failed to create invoice",
Comment thread
NikhilA8606 marked this conversation as resolved.
"failed_to_create_questionnaire": "Failed to create Questionnaire",
"failed_to_create_queue": "Failed to create queue",
Expand All @@ -2566,6 +2569,7 @@
"failed_to_remove_tags": "Failed to remove the tag",
"failed_to_restart_encounter": "Failed to restart encounter",
"failed_to_revoke_token": "Failed to revoke token",
"failed_to_save_test_results": "Failed to save test results: {{error}}",
"failed_to_send_message": "Failed to send message",
Comment thread
NikhilA8606 marked this conversation as resolved.
"failed_to_stop_camera": "Failed to stop camera",
"failed_to_unlock_invoice": "Failed to unlock invoice",
Expand Down Expand Up @@ -5030,7 +5034,7 @@
"result_date": "Result Date",
"result_details": "Result details",
"result_on": "Result on",
"result_review": "Result Review",
"result_review": "Result Review of {{name}}",
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
"result_value": "Result value",
"resume": "Resume",
"retake": "Retake",
Expand Down Expand Up @@ -5062,6 +5066,7 @@
"review_and_finalise_request_description": "Add more items if needed, or approve to mark this delivery as requested.",
"review_before": "Review Before",
"review_missed": "Review Missed",
"review_test_results": "Review Test Result",
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
Copilot marked this conversation as resolved.
Outdated
"revisit_days_non_negative": "Re-visit allowed days cannot be negative",
"revoke": "Revoke",
"revoke_token": "Revoke Token",
Expand Down Expand Up @@ -5527,6 +5532,7 @@
"select_register_patient": "Select/Register Patient",
"select_report": "Select Report",
"select_report_type": "Select Report Type",
"select_report_type_to_create": "Select a diagnostic report type to create a new report",
"select_requester": "Select requester",
"select_resource": "Select the resource",
"select_resource_category": "Select resource category",
Expand Down Expand Up @@ -6062,6 +6068,7 @@
"test_results": "Test Results",
"test_results_actions": "Test Results actions",
"test_results_entry": "Test Results Entry",
"test_results_saved_successfully": "Test results saved successfully",
"test_type": "Type of test done",
"tested_on": "Tested on",
"tests": "Tests",
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/useFileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import fileApi from "@/types/files/fileApi";
export type FileUploadOptions = {
multiple?: boolean;
type: FileType;
inputId?: string;
category?: FileCategory;
onUpload?: (file: FileReadMinimal) => void;
// if allowed, will fallback to the name of the file if a seperate filename is not defined.
Expand Down Expand Up @@ -80,6 +81,7 @@ export default function useFileUpload(
category = FileCategory.UNSPECIFIED,
multiple,
allowNameFallback = true,
inputId,
} = options;

const { t } = useTranslation();
Expand Down Expand Up @@ -355,7 +357,7 @@ export default function useFileUpload(
const Input = (props: FileInputProps) => (
<input
{...props}
id={`file_upload_${fileType}`}
id={inputId ?? `file_upload_${fileType}`}
title={t("change_file")}
onChange={onFileChange}
type="file"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ export default function ServiceRequestShow({
activityDefinition.observation_result_requirements ?? [];
const diagnosticReports = request.diagnostic_reports || [];

const activeDiagnosticReports = diagnosticReports.filter(
(report) => report.status !== DiagnosticReportStatus.final,
);

const assignedSpecimenIds = new Set<string>();

const preparePrintAllQRCodes = async () => {
Expand Down Expand Up @@ -596,22 +600,18 @@ export default function ServiceRequestShow({
</DropdownMenu>
</div>
)}
{(!diagnosticReports.length ||
diagnosticReports[0]?.status !==
DiagnosticReportStatus.final) && (
<DiagnosticReportForm
patientId={request.encounter.patient.id}
facilityId={facilityId}
serviceRequestId={serviceRequestId}
observationDefinitions={observationRequirements}
diagnosticReports={diagnosticReports}
activityDefinition={activityDefinition}
specimens={request.specimens || []}
disableEdit={disableEdit}
/>
)}
</div>

<DiagnosticReportForm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

if there are mutiple diagnostic reports

1 A
2 B

if I edit A and click save results after the update the order changes in the UI

1 B
2 A

This feels like a Bad UX


I think this is happening because of the diagnostic_reports returned in the SR are not ordered in the backend, either we need to fix the order in the backend or handle it in FE

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @gauritejusa is this fix needed in this pr?

patientId={request.encounter.patient.id}
facilityId={facilityId}
serviceRequestId={serviceRequestId}
observationDefinitions={observationRequirements}
diagnosticReports={activeDiagnosticReports}
activityDefinition={activityDefinition}
specimens={request.specimens || []}
disableEdit={disableEdit}
/>
</div>
{diagnosticReports.length > 0 && (
<DiagnosticReportReview
facilityId={facilityId}
Expand Down
Loading
Loading