Stream: shorthand
Topic: MedicationRequest No Error for Multiple Status
Sheila Connelly (Sep 30 2020 at 16:33):
I am working with files that include a number of MedicationRequest FSH
By mistake, the FSH included two statuses - one completely shouldn't be there. Copy/Paste error a few days ago.
FSH allowed the two * status lines and did not flag an Error. Is this something that needs to be fixed?
Instance: my_unique_code-01
InstanceOf: $usCoreMedicationRequest
etc...
- status = $ConditionClinicalStatusCodes#active "Active" // SHOULD NOT BE HERE - MISTAKE - BUT COMPILE ALLOWED
- status = $MedicationRequestStatusCodes#active "Active"
etc....
Chris Moesel (Sep 30 2020 at 17:06):
Hi @Sheila Connelly -- this is allowed but would ideally generate a warning (as it's usually a mistake). The one case where something like this might be intentional is with RuleSets -- in which a RuleSet might assign something to a property, but then a further rule (after the Rule Set is inserted) chooses to override it. Since RuleSets are intended to be re-used across multiple definitions, there are cases where that might be desirable. But even so, the exact situation in your example is almost always a mistake. I'll add an issue to our project to consider flagging this as a warning.
Chris Moesel (Sep 30 2020 at 17:10):
Sheila Connelly (Sep 30 2020 at 17:12):
Thank you. Also, in my example, I should not have used underscores in the example Instance name - should be hyphens.
Sheila Connelly (Sep 30 2020 at 17:20):
I love underscores, but FSH doesn't. :(
Last updated: Apr 12 2022 at 19:14 UTC