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

Add picker data source for Month/Year input fields. #43

Open
syoung-smallwisdom opened this issue Feb 28, 2018 · 3 comments
Open

Add picker data source for Month/Year input fields. #43

syoung-smallwisdom opened this issue Feb 28, 2018 · 3 comments

Comments

@syoung-smallwisdom
Copy link
Contributor

Implement a picker data source that is appropriate to displaying Month/Year selection and converting that selection to a Date answer value.

I recommend implementing a picker that implements the RSDMultipleComponentPickerDataSource protocol. RSDUSMeasurementPickerDataSource has an example implementation for using a picker to select height and weight in US customary units. This would then need to be returned by func dataSource() -> (RSDPickerDataSource?, Formatter) which is defined in an extension of RSDDateRange.

@Erin-Mounts
Copy link

Just a thought, would it make any sense to allow, say, form steps (or table item groups) to be presented with a multiple component picker, or in other words to have say a Month/Year picker that fills in two values on a form for Month and Year separately, or a blood pressure picker that fills in Systolic and Diastolic form items? This wouldn't make sense for heights and weights, which are inherently single measurements that sometimes are presented as multiple values in large and small units, but maybe for cases like these where we really want to capture them as two separate-but-related values?

@syoung-smallwisdom
Copy link
Contributor Author

@Erin-Mounts Yes, that's what the refactor last month was for. You can set up a RSDTableItemGroup with multiple RSDTableItem fields and then compose an answer from them. This is how multiple choice selection is already handled.

  • seealso: RSDChoicePickerTableItemGroup

@syoung-smallwisdom
Copy link
Contributor Author

We did not pursue this issue in large part b/c we didn't have a use-case for it that Bridge services supported. ie: We cannot report Date as Month/Year only so these either (a) have to be separate fields (b) record as a string or (c) Record with 1st day of the month.

syoung-smallwisdom added a commit to BridgeDigitalHealth/SageResearch that referenced this issue Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants