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
145 stars 44 forks source link

Can't assign DateTime with only year component #1483

Open mint-thompson opened 3 months ago

mint-thompson commented 3 months ago

Transferred from internal JIRA issue originally created 2023-09-20.

A four-digit number is a valid DateTime, but it matches the NUMBER token, so it doesn’t get assigned correctly:

* valueDateTime = 2023

When trying to assign a number to a DateTime, check if the raw value of the assignment is a four-digit number. If so, allow it.