-
Notifications
You must be signed in to change notification settings - Fork 249
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-1592: Support adding visit attributes when saving a visit #879
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far - good job!
packages/esm-patient-chart-app/src/visit/hooks/useVisitAttributeType.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/visit/hooks/useVisitAttributeType.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few corrections to be made
packages/esm-patient-chart-app/src/visit/visit-form/visit-attribute-type.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/visit/visit-form/visit-attribute-type.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/visit/visit-form/visit-attribute-type.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx
Show resolved
Hide resolved
Hi @denniskigen ! I am not adding the |
Dependent on openmrs/openmrs-esm-core#571 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - good job!
Size Change: +1.89 kB (0%) Total Size: 5.66 MB ℹ️ View Unchanged
|
…#879) * Saving visit attributes completed * Fixed the visitAttribute value for date type * Fixing failing tests * Fixed the datatypes, error handling for required fields * Updated translations * Added types in the functions * Updated the openmrs and @openmrs/esm-framework * Minor changes
Requirements
Summary
Support adding visit attributes when saving a visit
Workflow
In the configuration of the
@openmrs/esm-patient-chart-app
, I have added a new configurable key: visitAttributeTypesDepending on the visitAttributeType's Datatype, the following fields render for the different datatypes:
Different datatypes and the fields shown
org.openmrs.customdatatype.datatype.ConceptDatatype
We get the concept's UUID in the
datatypeConfig
. Hence we fetch the concept's answers and the fetched answers are then showed in the Select field returned for the field.org.openmrs.customdatatype.datatype.FloatDatatype
This datatype shows the
NumberInput
fieldFree Text
This datatype shows the
TextInput
fieldLong Free Text
This datatype shows the
TextArea
fieldBoolean
This datatype shows the
Checkbox
fieldDate
This datatype shows the
Date
fieldElse
This datatype shows the
TextInput
fieldScreenshots
Sample Visit attributes
Related Issue
https://issues.openmrs.org/browse/O3-1592
Other