Stream: dotnet
Topic: What is the different between Matches() and IsExactly()
Yunwei Wang (Oct 23 2018 at 04:34):
From reading the code, I think these two methods do the same thing. Is that correct?
Brian Postlethwaite (Oct 23 2018 at 08:19):
One is like an equLs, where the other is a pattern match.
Yunwei Wang (Oct 23 2018 at 13:13):
@Brian Postlethwaite What does the pattern match mean? Can you give an example
Brian Postlethwaite (Oct 24 2018 at 00:52):
A.IsEqual(B)
implies that B.isEqual(A)
However A Matches B
does not imply that B Matches A
Ewout Kramer (Oct 24 2018 at 09:04):
@Brian Postlethwaite What does the pattern match mean? Can you give an example
It's the kind of matching done by pattern[x] in ElementDefinition: http://hl7.org/fhir/elementdefinition-definitions.html#ElementDefinition.pattern_x_
Though I can see the description there lacks detail too. In general, the difference is that if your pattern contains e.g. a CodeableConcept with just one code, it would match a CodeableConcept with multiple (as long as your code matches one of those codes), and it would also match a CodeableConcept that in addition has "text", even when your pattern does not have text. Much like "Query by Example" (https://en.wikipedia.org/wiki/Query_by_Example)
Last updated: Apr 12 2022 at 19:14 UTC