Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6168 customised reports satisfaction rate per program #6428

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

roxy-dao
Copy link
Contributor

@roxy-dao roxy-dao commented Feb 6, 2025

Fixes #6168

πŸ‘©πŸ»β€πŸ’» What does this PR do?

Review alongside https://github.com/msupply-foundation/open-msupply-reports/pull/140. Both are needed to close Satisfaction Report issue. This PR:

  • Endpoint for getting periods
  • Rename ProgramSearch -> PatientProgramSearch
  • Custom renderer for Program Search & Period Search
  • Add section to load other reports

πŸ§ͺ Testing

  • Check out above OMS-report branch
  • Follow instructions in the linked PR in the reports repo

πŸ“ƒ Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added this to the v2.6.0 milestone Feb 6, 2025
@@ -0,0 +1,52 @@
import React from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole file change was just a rename. This one only gets the Patient programs through documents

Comment on lines +38 to +39
setPeriod(period);
handleChange(path, period.id);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will have to refactor this in other report issue to also return the start/end date to correctly filter out stocktake/prescriptions by start/end time

import { PeriodFragment } from '@openmsupply-client/requisitions';

export const usePeriodList = (programId?: string, enabled?: boolean) => {
const { api, storeId } = useProgramsGraphQL();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reusing the programs graphQL since they're kinda grouped together...

@@ -22,7 +26,7 @@ pub fn programs(
let user = validate_auth(
ctx,
&ResourceAccessRequest {
resource: Resource::QueryProgram,
resource: Resource::QueryMasterList,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is used for both Patient & Requisition programs... and doesn't make sense to use QueryProgram permission when that is a Patient Program specific permission... though it has a lot of other checks... maybe should have just created a dup with query masterlist permission? πŸ‘€

Copy link

github-actions bot commented Feb 6, 2025

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.3 MB 5.3 MB 1.38 KB (0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customised Reports: Satisfaction rate per program
1 participant