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

Build reference and quantity components #639

Open
fongsean opened this issue Feb 20, 2024 · 10 comments · Fixed by #649 or #950
Open

Build reference and quantity components #639

fongsean opened this issue Feb 20, 2024 · 10 comments · Fixed by #649 or #950

Comments

@fongsean
Copy link
Collaborator

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.

@fongsean fongsean mentioned this issue Mar 7, 2024
fongsean added a commit that referenced this issue Mar 7, 2024
Add attachment, reference and quantity component. For issue #639 and #640
@fongsean fongsean reopened this Mar 7, 2024
@robeastwood-agency
Copy link

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")

@fongsean
Copy link
Collaborator Author

fongsean commented Aug 6, 2024

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.

fongsean referenced this issue in konsulin-care/smart-forms Aug 6, 2024
* Add Quantity Item Form Component

* Update package version

* Update packages version
@robeastwood-agency
Copy link

Thanks very much @fongsean !

@ryuuzake ryuuzake mentioned this issue Aug 6, 2024
@ryuuzake
Copy link
Contributor

I created a PR for this @fongsean

@fongsean
Copy link
Collaborator Author

Thanks @ryuuzake! I'll look into it today and add my changes re: pre-population

@fongsean
Copy link
Collaborator Author

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.

@robeastwood-agency
Copy link

All good @fongsean - thank you again for progressing this

@fongsean
Copy link
Collaborator Author

Hi @robeastwood-agency, just got this implemented.

See the docs here: https://smartforms.csiro.au/docs/components/quantity
See examples here: https://smartforms.csiro.au/storybook/?path=/story/component-itemtype-quantity--quantity-basic

We got unitOption implemented (big thanks to Riza!) but not unitValueSet. Not sure if that is something your team is interested in having.

@fongsean fongsean reopened this Aug 22, 2024
@robeastwood-agency
Copy link

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:

  • At this point we don't anticipate a need for unitValueSet, as a single unitOption looks to suffice.
  • We don't know yet from the business whether range restrictions should be applied to various values (eg pulse rate as a quantity only between 40 - 300 say). But if so, the extensions Min Quantity and Max Quantity would be desirable to use to control data entry. And having played with these in the Playground, I'm guessing they are not implemented. So, this might be a feature request, if and when requirements come our way. Your thoughts?

Cheers, thanks again; looks awesome!

@fongsean
Copy link
Collaborator Author

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 reference yet.

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 a pull request may close this issue.

3 participants