-
Notifications
You must be signed in to change notification settings - Fork 16
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
Build reference and quantity components #639
Comments
Hi @fongsean - in the Agency we are looking to build a set of Questionnaire instances using item.type = "quantity", and making use of the CSIRO renderer. Therefore, just wondering what the plans are for implementing quantity? Thank you! (note- we have no plans for type = "reference") |
It was previously placed in the backlog (stale issues) as a to-do without a high priority since none of our Questionnaires use it. Given your interest in having it, I think its high time I get this implemented :) https://github.com/konsulin-id/smart-forms actually implemented it in their fork a couple days ago: konsulin-care@af8b8f8. I'll work with them to get this into the main repo. Will keep you updated. |
* Add Quantity Item Form Component * Update package version * Update packages version
Thanks very much @fongsean ! |
I created a PR for this @fongsean |
Thanks @ryuuzake! I'll look into it today and add my changes re: pre-population |
Hi all, Unfortunately I have to work on something else with higher priority (needs to be demoed next week at Brisbane), I'll come back to this if I have capacity this week, otherwise it seems like I can only deliver it next week. I'm pretty close, is just more about making sure it works properly with calculations and other SDC stuff. |
All good @fongsean - thank you again for progressing this |
Hi @robeastwood-agency, just got this implemented. See the docs here: https://smartforms.csiro.au/docs/components/quantity We got unitOption implemented (big thanks to Riza!) but not unitValueSet. Not sure if that is something your team is interested in having. |
Thank you very much @fongsean (sorry have just returned from leave). This looks great, having used the smartforms playground to do some experimentation with (close to) our real examples of vital sign measures. Comments:
Cheers, thanks again; looks awesome! |
Sounds great Rob! Feel free to open a feature request if you have a need for minQuantity and maxQuantity. We currently have minValue and maxValue implemented https://smartforms.csiro.au/docs/sdc/advanced/constraint#minvalue, so hopefully it can be leveraged during our future implementation. I'll keep this issue open given we haven't built out type |
Hi, just weighing in on the discussion surrounding the implementation of quantity. Wondering if this can be suppressed as it is not deemed useful for the specific questions. However of course the optional symbol may be required for other situations - so removing the option is not desired, but rather optionally suppressing. Is it ok to post this request here or open a new feature request? b) the other associated field is for the configured unit(s) of the quantity (cm, kg, etc). Our CHAP usecase questions have a single unit and therefore the drop down seems redundant, but of course there would be other use cases where multiple units need to be configured and the drop down is necessary. Therefore wondering if there was a way (also sounds like a new feature) to not render a drop down when one unit is configured. Thank you |
@samturneradha Thanks for raising this. a) I wholeheartedly agree with you on this. Most of the questionnaires I've seen with Quantity items do not require the comparator symbol, but it's wrong to leave it out given it's there in the spec. These new library APIs are currently in the alpha release of the library, but I imagine there could be breaking changes between different alpha versions (not yet so far), so proceed with caution. There are also no documentation on how to use these APIs yet. b) Valid point. I think it makes sense to have the unit baked into the input field (example) when there's only a single unitOption. Can you create two new issues on both of these? Thanks a bunch. |
Thanks so much will do. |
The renderer is still yet unable to render items of type = "reference" and "quantity".
The "Bit of everything" questionnaire provides a simple example of how these items look like.
The text was updated successfully, but these errors were encountered: