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

O3-283 Configurable Support for Recording Registration Observations #221

Merged
merged 6 commits into from
Jul 14, 2022

Conversation

brandones
Copy link
Contributor

@brandones brandones commented May 25, 2022

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • I checked for feature overlap with existing widgets.

Summary

This makes it possible to configure the registration app to include obs.

I have also fixed up a few tests which either were being skipped or which, presumably by accident, did not test anything.

Screenshots

Peek 2022-07-13 15-14

Related Issue

https://issues.openmrs.org/browse/O3-283

@brandones brandones marked this pull request as draft May 25, 2022 18:31
@github-actions
Copy link
Contributor

github-actions bot commented May 25, 2022


Error: Error while trying to collect info after merging reg-obs into main.

Error: Command failed: git merge FETCH_HEAD --allow-unrelated-histories

    at ChildProcess.exithandler (node:child_process:398:12)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

Generated by @jsenv/file-size-impact during Report bundle size#2671913996 on a2f73c1

@brandones brandones marked this pull request as ready for review July 13, 2022 22:18
@brandones brandones changed the title UHM-6476 O3: Configurable Support for Recording Registration Observations O3-283 Configurable Support for Recording Registration Observations Jul 13, 2022
@@ -26,13 +26,13 @@ const PastAppointmentDetails: React.FC<PastAppointmentDetailsProps> = ({ pastApp
{pastAppointments.length >= 1 ? (
pastAppointments.map((appointment, index) => {
return (
<>
<React.Fragment key={`past-appointment-${index}`}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes warnings about needing unique keys when creating elements with map.

Copy link
Member

@vasharma05 vasharma05 left a comment

Choose a reason for hiding this comment

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

Great work @brandones!
Thank you!

@@ -9,14 +9,14 @@ export interface SectionDefinition {
export interface FieldDefinition {
id: string;
type: string;
label: string;
label: string | null;
Copy link
Member

Choose a reason for hiding this comment

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

We can also use label?: string instead of using |null. Both representations denotes that this value can be null.

Just a suggestion.
Thanks!

Copy link
Contributor Author

@brandones brandones Jul 14, 2022

Choose a reason for hiding this comment

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

Optional and "possibly null" are distinct. Optional is more or less the same as | undefined. In this case, the object will always have the label property, but it will sometimes be null-valued. See https://stackoverflow.com/a/52893726/1464495

@vasharma05
Copy link
Member

It'd be really helpful if you could share a small video, showing how is this working?
Thanks!

Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

LGTM

@brandones
Copy link
Contributor Author

It'd be really helpful if you could share a small video, showing how is this working? Thanks!

There is one in the PR description. Can you not see it? Or are there other details you're interested in?

@brandones brandones merged commit 27213ab into main Jul 14, 2022
@brandones brandones deleted the reg-obs branch July 14, 2022 18:07
@gracepotma
Copy link
Contributor

Woohoo!! Way to go Brandon! I can think of at least 3 different orgs who will want to use this right away. Thank you so much.

CynthiaKamau pushed a commit to CynthiaKamau/openmrs-esm-patient-management that referenced this pull request Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants