Skip to content
7 changes: 6 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 @@ -2544,6 +2545,7 @@
"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 +2568,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 +5033,7 @@
"result_date": "Result Date",
"result_details": "Result details",
"result_on": "Result on",
"result_review": "Result Review",
"result_review": "Result Review of {{name}}",
"result_value": "Result value",
"resume": "Resume",
"retake": "Retake",
Expand Down Expand Up @@ -5062,6 +5065,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.
"revisit_days_non_negative": "Re-visit allowed days cannot be negative",
"revoke": "Revoke",
"revoke_token": "Revoke Token",
Expand Down Expand Up @@ -5527,6 +5531,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
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,31 +600,26 @@ 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>

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

<DiagnosticReportReview
facilityId={facilityId}
patientId={request.encounter.patient.id}
serviceRequestId={serviceRequestId}
diagnosticReports={diagnosticReports}
disableEdit={disableEdit}
/>
Comment thread
NikhilA8606 marked this conversation as resolved.
Outdated
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
</div>
</div>
{!isMobile && (
Expand Down
Loading
Loading