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

(feat) O3-3604: Add notes history section on inpatient notes workspace #1269

Merged
merged 8 commits into from
Aug 8, 2024

Conversation

usamaidrsk
Copy link
Collaborator

@usamaidrsk usamaidrsk commented Aug 7, 2024

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

Adds notes history section on the ward-inpatient-workspace

Screenshots

image

Related Issue

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

Other

@usamaidrsk usamaidrsk changed the title (feat) O3-3604: (feat) O3-3604: Add notes history section on inpatient notes workspace Aug 7, 2024
@usamaidrsk usamaidrsk marked this pull request as ready for review August 7, 2024 12:03
@usamaidrsk usamaidrsk marked this pull request as draft August 7, 2024 12:05
@usamaidrsk usamaidrsk marked this pull request as ready for review August 7, 2024 12:55
Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Thanks @usamaidrsk , generally looks good... just one question about passing the config as a prop instead of fetching it, and adding a t() for the Note text.

@@ -29,14 +29,19 @@ const noteFormSchema = z.object({

interface PatientNotesFormProps extends DefaultWorkspaceProps {
patientUuid: PatientUuid;
emrConfiguration: EmrApiConfigurationResponse;
isLoadingEmrConfiguration: boolean;
errorFetchingEmrConfiguration: Error;
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason you moved this from using to useEmrConfiguration to pass in as a prop? I think SWR is smart enough to cache this request instead of making it multiple times, it seems clearer to just have useEmrConfiguration each time you need that resource. @chibongho?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, will revert this. Thanks @mogoodrich

return (
<Tile className={styles.noteTile}>
<div className={styles.noteHeader}>
<span className={styles.noteProviderRole}>Note</span>
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for changing this to "Note". Let's use a t() here to translate this.

'encounterRole:(uuid,display),' +
'provider:(uuid,person:(uuid,display))),' +
'diagnoses';
const encountersApiUrl = `${restBaseUrl}/encounter?patient=${patientUuid}&encounterType=${encounterType}&v=${customRepresentation}`;
Copy link
Member

Choose a reason for hiding this comment

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

Great... I will add the "visit" limiting factor once the endpoint is ready with it.

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @usamaidrsk !

@mogoodrich
Copy link
Member

Merging, thanks!

@mogoodrich mogoodrich merged commit 1bf3db0 into openmrs:main Aug 8, 2024
6 checks passed
@denniskigen denniskigen mentioned this pull request Aug 29, 2024
3 tasks
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.

2 participants