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

Quantity may omit numeric value #1430

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Conversation

mint-thompson
Copy link
Collaborator

Completes task INT-1241 in alignment with this FSH 3.0 spec change.

Update the grammar to allow a quantity to omit the numeric value component. Since a ratio contains two quantities, this also affects the allowed FSH for a ratio. A quantity without a numeric value is useful for setting the unit.

Update the grammar to allow a quantity to omit the numeric value
component. Since a ratio contains two quantities, this also affects the
allowed FSH for a ratio. A quantity without a numeric value is useful
for setting the unit.
Copy link
Member

@cmoesel cmoesel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works really well. I manually tested it against my own set of cases like this:
https://fshschool.org/FSHOnline/#/share/3V9pUor

It's nice we got support in ratios for free. I think that makes sense. Unfortunately, ratios are a hidden feature in FSH. As far as I can tell, they are not documented in the spec at all. So... we probably should put them into the next ballot.

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good. I didn't notice anything in the implementation at all, but I did ask one question about tests.

test/import/FSHImporter.SDRules.test.ts Show resolved Hide resolved
@mint-thompson mint-thompson merged commit d9fdd64 into master Mar 5, 2024
14 checks passed
@jafeltra jafeltra deleted the assign-ucum-units-only branch March 15, 2024 15:58
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 this pull request may close these issues.

3 participants