Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-3210 ward app - configuration system for ward patient cards #1184
O3-3210 ward app - configuration system for ward patient cards #1184
Changes from 21 commits
091498f
9260f40
8f7265e
28f952d
5a612cf
895b97c
525258a
bccda94
693f126
577059c
77d3d47
4d87d4f
3d3232b
2a316be
4d2cae4
2bd3210
1266781
a6b19f9
a00bacc
d3bcb20
a2f9640
92516fe
6bade24
9db705c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I really don't like this here. A specific type of
patientCardElement
should have a configuration that takes in an address field. Just like other types ofpatientCardElement
(like Gravity) might take in aConcept
. This should not be baked into a generic config schema.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 similar change was made to the queues app. I believe it was to facilitate adding validators on the fields. I'm not sure if it's possible to have a validator work by defining specific configs per element type, but I can play around with it.
@brandones what do you think?
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.
@mseaton This is the way we handle this kind of thing in registration and service queues; it's the best pattern we've figured out for this.
@chibongho You will definitely want to add a
_default
value foraddressFields
so that it is optional, since indeed it would be very bad if we required implementers to configureaddressFields
for an element of typebed-number
. We want implementers to be able to provide config likeand then we can add validators that ensure that implementers don't provide an element config that doesn't make sense with the element type.
@mseaton The only way I can imagine supporting what you're talking about would be to have a separate definitions array for each type:
So that would be our other option here.
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.
Given the frequency with which this pattern appears, I'm definitely open to thinking about whether we can add a schema feature that supports it better. It would be really nice if the config system had some way of knowing what element config schema should be used based on the element type.
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.
Quick first pass. This usually comes up in the context of arrays of elements right? Maybe for arrays we can support something like the following:
That could be typed like:
This file was deleted.