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-1054: Support for custom text-based attributes #132

Merged
merged 12 commits into from
Apr 1, 2022

Conversation

vasharma05
Copy link
Member

@vasharma05 vasharma05 commented Mar 21, 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

  1. I added support for custom text-based attributes' input fields. These fields are added through the implementer's tools
  2. The user can also add Regular expressions for validating the value entered for the attribute.
  3. Made separate fields for Coded person attributes and textBasedPersonAttributes.
  4. I have changed the names in the config from personAttributeTypes -> codedPersonAttributes.

Screenshots

image
image

Regular expression to check that the field only contains the alphabets.
image
Error when numbers are added:
image

Related Issue

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

Other

I made different fields for coded and text-based attributes and, removed some redundant data from the form-manager.ts.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2022

File size impact

Merging O3-1054 into main impact files as follow:

@openmrs/esm-active-visits-app (no impact)
Files new size
Unmodified (17) 1.28 MB (0 B / +0%) 👻
Total (17) 1.28 MB (0 B / +0%) 👻
@openmrs/esm-outpatient-app (no impact)
Files new size
Unmodified (15) 2.22 MB (0 B / +0%) 👻
Total (15) 2.22 MB (0 B / +0%) 👻
@openmrs/esm-patient-list-app (no impact)
Files new size
Unmodified (27) 1.65 MB (0 B / +0%) 👻
Total (27) 1.65 MB (0 B / +0%) 👻
@openmrs/esm-patient-registration-app (+0.15%)
Files new size
packages/esm-patient-registration-app/dist/16.js 320 kB 👶
packages/esm-patient-registration-app/dist/844.js 290 kB (+794 B / +0.27%) ↗️
packages/esm-patient-registration-app/dist/71.js 14.8 kB (+213 B / +1.46%) ↗️
packages/esm-patient-registration-app/dist/openmrs-esm-patient-registration-app.js 22.3 kB (+211 B / +0.96%) ↗️
packages/esm-patient-registration-app/dist/574.js 3.17 kB (+31 B / +0.99%) ↗️
packages/esm-patient-registration-app/dist/544.js deleted (-319 kB)
Unmodified (16) 946 kB (0 B / +0%) 👻
Total (22) 1.6 MB (+2.4 kB / +0.15%) ↗️
@openmrs/esm-patient-search-app (no impact)
Files new size
Unmodified (12) 1.02 MB (0 B / +0%) 👻
Total (12) 1.02 MB (0 B / +0%) 👻
Generated by @jsenv/file-size-impact during Report bundle size#2044154994 on 8be4d87

@vasharma05 vasharma05 merged commit 4a47c91 into openmrs:main Apr 1, 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
Development

Successfully merging this pull request may close these issues.

1 participant