Skip to content

(feat) O3-4750 : Provide support on the form builder to be able to auto create a standard section containing encounterDateTime and encounterProvider to support RDE. #545

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jabahum
Copy link

@jabahum jabahum commented May 28, 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

This PR adds support for RDE on all new generated forms. It adds a new section on the form when enableRDESection = true . This section contains two fields encounterDateTime and EncounterProvider.

Screenshots

Related Issue

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

Other

@jabahum jabahum changed the title add support for RDE (feat) O3-4750 : Provide support on the form builder to be able to auto create a standard section containing encounterDateTime and encounterProvider to support RDE. May 28, 2025
@jabahum jabahum marked this pull request as ready for review May 29, 2025 10:57
Copy link
Member

@samuelmale samuelmale left a comment

Choose a reason for hiding this comment

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

Can we make it possible to translate labels for the two fields

enableRDESection: {
_type: Type.Boolean,
_default: false,
_description: 'Whether to enable the RDE section in the form builder',
Copy link
Member

@denniskigen denniskigen May 29, 2025

Choose a reason for hiding this comment

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

Suggested change
_description: 'Whether to enable the RDE section in the form builder',
_description: 'Whether to add an Encounter Details section for retrospective data entry, which includes encounter date/time and provider fields',

I think there's room for improving this config property description.

Copy link
Collaborator

@NethmiRodrigo NethmiRodrigo May 29, 2025

Choose a reason for hiding this comment

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

Do we really need a config for this? Since its just a section to be added into the form, and that too, as it is, gets added to the dummy form which is only if you press the Input dummy schema button. It doesn't seem like something that a user should need to "configure" to have in a form.
Can't we instead have a checkbox somewhere here that would add the section to the form?
Screenshot 2025-05-29 at 7 37 00 PM
Plus, this way, users could have it anytime and not accessible only under the input dummy schema button.

Copy link
Author

Choose a reason for hiding this comment

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

@NethmiRodrigo i could explore this approach.

@NethmiRodrigo
Copy link
Collaborator

NethmiRodrigo commented May 29, 2025

@jabahum if this is following the conversation on Slack here - https://openmrs.slack.com/archives/C04QZ5DDVMG/p1738009752344649?thread_ts=1738007285.263109&cid=C04QZ5DDVMG, if I'm not mistaken, I think the correct way to go about this would be to,

  1. Add a form that captures the encounterDateTime and encounterProvider information to here - https://github.com/openmrs/openmrs-content-referenceapplication-demo/tree/main/configuration/backend_configuration/ampathforms
  2. Have an option where the user can add a RDE section (like how I suggested above, I don't think a config is necessary), and on selecting that option, a form reference to the form created in step 1 would get added to the form JSON.

Right @ibacher?

@ibacher
Copy link
Member

ibacher commented May 30, 2025

Right @ibacher?

Yep! A hard-coded "RDE Section" is not something that's going to be sustainable. Each implementation is going to want to control how these fields look, where they occur, etc. So the thing we implement here should be able to handle that, and the most sustainable way to do that is to have the example component form that implementations can then duplicate.

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.

5 participants