Details
-
Technical Correction
-
Resolution: Persuasive
-
Medium
-
FHIRPath (FHIR)
-
1.0
-
Imaging Integration
-
fluentpath
-
5.5.15
-
-
Correction
-
Non-substantive
Description
The FHIRPath spec states that toString() returns a String. However, the specification states that in certain circumstances the function may return false. I've copied the documentation from http://hl7.org/fhirpath/2018Sep/index.html#tostring-string and colored the portion in red that concerns me. Please clarify the behavior of toString().
If the input collection contains a single item, this function will return a single String if:
- the item in the input collection is a String
- the item in the input collection is an Integer, Decimal, Date, Time, DateTime, or Quantity the output will contain its String representation
- the item is a Boolean, where true results in 'true' and false in 'false'.
If the item is not one of the above types, the result is false.
The String representation uses the following formats:Type Representation Boolean true or false Integer (\\+|-)?\d+ Decimal (\\+|-)?\d+(.\d+)? Quantity (\\+|-)?\d+(.\d+)? '<unit>' Date YYYY-MM-DD DateTime YYYY-MM-DDThh:mm:ss.fff(+/-)hh:mm Time Thh:mm:ss.fff(+/-)hh:mm Note that for partial dates and times, the result will only be specified to the level of precision in the value being converted.
If the input collection contains multiple items, the evaluation of the expression will end and signal an error to the calling environment.
In all other cases, the function will return an empty collection.