Stream: implementers
Topic: Constraint checks (regex) on Simplifier
Jens Meier (May 14 2020 at 09:53):
Hi guys,
I'm trying to put a regex on the identifier value from my Patient profile (its a german social security number, eGK).
grafik.png
grafik.png
The ressource is validating without any errors or warnings on Simplifier.
And then, I made up an example patient with an incorrect identifier and uploaded it to Simplifier. But the example validates without errors. Is the regex on the wrong position? Does Simplifier not check those kind of constraints?
grafik.png
Thank you for the help!
Jens
Lloyd McKenzie (May 14 2020 at 13:37):
What's showing up in your resulting StructureDefinition?
Jens Meier (May 15 2020 at 06:21):
Hi Lloyd,
it looks like that:
grafik.png
Jens Meier (May 15 2020 at 06:23):
You can see it here in Simplifier completely:
https://simplifier.net/spezifikation-kkr/patientvst
Matthijs van der Wielen (May 15 2020 at 11:20):
Hi @Jens Meier ,
I've taken look at your regex using fhirpath tester. When I add "and length() =10" to your fhirpath the regex does work(as I think you intend). It seems that the "matches" performs a contains here. Would this solve your issue?
Jens Meier (May 15 2020 at 11:33):
Hi @Matthijs van der Wielen ,
thank you for the information! It works like a charme :slight_smile:
Now I was testing a bit, because I wonder why the regex itself is not working for that.
When I remove the "and length()=10", use a number with a length of 10 but with 2 letters at the beginning the regex works. So somehow it realizes that there should only be one letter, but not 1 letter and 9 digits.
But anyways, thank you very much!
Last updated: Apr 12 2022 at 19:14 UTC