FHIR / sushi

SUSHI (aka "SUSHI Unshortens Short Hand Inputs") is a reference implementation command-line interpreter/compiler for FHIR Shorthand (FSH).
Apache License 2.0
147 stars 43 forks source link

Cannot easily specify "unit" on Quantity #652

Closed ngfreiter closed 3 years ago

ngfreiter commented 4 years ago

We support an easy syntax for specifying a Quantity when the units are taken from UCUM:

* valueQuantity = 155.0 '[lb_av]'

But there is no way to specify the unit field when doing this. It might make sense to support a syntax like:

* valueQuantity = 155.0 '[lb_av]' "lb"

where the valueQuantity.unit would then get set to "lb". The unit is meant to be a human readable value, and there is plenty of precedent for setting human readable values as strings at the end of assignments, so I don't think users would find this a confusing addition.

This came out of a conversation with @markkramerus on creating an instance of the bodyweight profile, which does require the unit keyword. Wanted to put this out here for discussion, and if we think this is a good idea, I'll add it to the backlog for SUSHI and to JIRA for an update to the FSH spec.

cmoesel commented 4 years ago

👍

ngfreiter commented 4 years ago

Alright, added an issue for FSH to update the syntax: https://jira.hl7.org/browse/FHIR-29635, and added this to our backlog.