Skip to content

Conversation

@its-kios09
Copy link
Contributor

@its-kios09 its-kios09 commented Sep 10, 2025

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

As a laboratory technician/manager, I want to have the ability to review lab results before they are finalized, so that I can ensure quality control and accuracy of test results before they become available to clinicians.

global configuration

{
  "enableReviewingLabResultsBeforeApproval": true  
}

Screenshots

Watch the demo

Related Issue

https://openmrs.atlassian.net/browse/O3-5020

Other

…rendering

- Add enableReviewingLabResultsBeforeApproval config option
- Implement dual workflow in LabResultsForm (ON_HOLD vs COMPLETED)
- Add conditional rendering for pending review tabs and tiles
- Hide edit results action when approval workflow is enabled
- Maintain backward compatibility with existing workflow

Components updated:
- LabResultsForm: merged workflows with conditional logic
- LaboratoryOrdersTabs: conditional pending review tab
- LaboratorySummaryTiles: conditional pending review tile
- OrdersDataTable: conditional edit results menu item
@its-kios09 its-kios09 requested a review from ibacher October 16, 2025 09:52
@its-kios09
Copy link
Contributor Author

@pirupius I Believe we are okay now
Screenshot from 2025-10-28 20-11-35

@its-kios09
Copy link
Contributor Author

@chibongho @ibacher ping

Copy link
Member

@pirupius pirupius left a comment

Choose a reason for hiding this comment

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

Some minor clean ups before we get this in. Also don't forget to push the updated lock file once you've updated the package.json

@jabahum
Copy link
Collaborator

jabahum commented Oct 29, 2025

@its-kios09 lets resolve conflicts

@its-kios09 its-kios09 requested a review from pirupius October 29, 2025 15:58
Copy link
Member

@pirupius pirupius left a comment

Choose a reason for hiding this comment

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

Please add these lines after Install dependencies in to the e2e.yml to resolve the e2e error

  - name: 🎭 Install Playwright Browsers
    run: npx playwright install --with-deps chromium

@its-kios09 its-kios09 requested a review from pirupius October 30, 2025 11:58
@its-kios09
Copy link
Contributor Author

@pirupius sorted

@pirupius pirupius merged commit a969a94 into openmrs:main Oct 30, 2025
5 checks passed
type OrderUrgency,
type OrderAction as ExternalOrderAction,
} from '@openmrs/esm-patient-common-lib';
export type FulfillerStatus = 'DRAFT' | 'RECEIVED' | 'IN_PROGRESS' | 'EXCEPTION' | 'ON_HOLD' | 'DECLINED' | 'COMPLETED';

Choose a reason for hiding this comment

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

The FulfillerStatus enum does not have "DRAFT" as a valid value. Do we plan on adding that to the backend? @pirupius @its-kios09

Copy link
Member

Choose a reason for hiding this comment

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

@chibongho i believe he made that change after this comment #445 (comment) from Ian but the part am not sure about is if it needs an extra configuration or update to esm-core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chibongho I think we should update the backend to support correct FulfillerStatus enum as Draft as @ibacher suggest ^IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chibongho I have this PR on adding the enum openmrs/openmrs-core#5447 maybe you can see some light


const filteredExtensions = tilesExtensions
.filter((extension) => Object.keys(extension.meta).length > 0)
.filter((extension) => {

Choose a reason for hiding this comment

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

Is this test code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chibongho Thanks, I didn't see it I have done a follow up PR for it #532

@denniskigen
Copy link
Member

Isn't it more appropriate to default this config property to false? Otherwise, we're making assumptions about implementations wanting to have this review and approval workflow enabled out of the box. The canonical pattern with these configuration options is always to default to having them turned off and let implementations opt-in if they want to @its-kios09 @pirupius.

@denniskigen
Copy link
Member

I've pushed a commit here making the behaviour opt-in by default ecc7701.

@pirupius
Copy link
Member

pirupius commented Dec 2, 2025

I agree @denniskigen thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants