Stream: implementers
Topic: FHITPath .matches() with linebreaks
Pieter Edelman (May 12 2021 at 19:09):
Hi,
I'm trying to use the .matches()
FHIRPath function to check if the StructureDefintion.purpose
text is properly populated in some of our profiles. This works as long as I don't include linebreaks in the .purpose
field. If I do, I get inconsistent results. Take the following synthetic example:
-- snip --
<description value="An anatomical location specifies the location (e.g. foot) and laterality (e.g. links) of a bodypart." />
<purpose value="A
B" />
<fhirVersion value="4.0.1" />
-- snip --
Yields:
HL7 Validator | FHIRPath Tester | |
---|---|---|
StructureDefinition.purpose.matches('A.*') |
false | true |
StructureDefinition.purpose.matches('A.*B') |
false | false |
However, the specification states that regexes in matches()
are considered to use single-line mode, suggesting that a dot should match newlines. Could anybody help out?
Lloyd McKenzie (May 12 2021 at 21:45):
Maybe raise on #fhirpath ?
Pieter Edelman (May 14 2021 at 06:39):
Didn't even realize this stream existed, I've moved the topic
Last updated: Apr 12 2022 at 19:14 UTC