FHIR Chat · Invariant Authoring · IG creation

Stream: IG creation

Topic: Invariant Authoring


view this post on Zulip Corey Spears (Oct 28 2021 at 17:19):

Invariant Authoring with FHIRPath can be error prone. What are IG creators doing to author and testing invariants?

view this post on Zulip David Pyke (Oct 28 2021 at 17:27):

I get LLoyd to do mine

view this post on Zulip Corey Spears (Oct 28 2021 at 17:38):

:thinking: I am thinking Lloyd would appreciate a more scalable solution?

view this post on Zulip Jean Duteau (Oct 28 2021 at 17:39):

i read the FHIRPath documentation every time I need to write one up then pull my hair out when it doesn't do what I want it to do. and then I ask on the #fhirpath stream.

view this post on Zulip Jean Duteau (Oct 28 2021 at 17:40):

for easy FHIRPath invariants, I've gotten to understand how to write them up. It is just some of the esoteric invariants that trip me up.

view this post on Zulip Jean Duteau (Oct 28 2021 at 17:41):

i'm not implying that I'm Lloyd-like, but after doing a bunch of them, I feel like I'm fairly good at writing them :)

view this post on Zulip David Pyke (Oct 28 2021 at 17:54):

If Lloyd isn't available, I tend to steal them from others that are close and modify them.

view this post on Zulip Lloyd McKenzie (Oct 28 2021 at 17:55):

I use the fhirpath tester to test things out, though there are a few capabilities it doesn't support.

My general convention is:

  • "if it's simple" I just write it (and then test it)
  • if it's more complicated, I look for something similar, copy and adjust
  • if I can't find something similar, I wade through the documentation
  • if I still can't make it work, I ask here - and generally ping Bryn and/or Grahame.

In all cases, unless it's super simple (and even then I've been bitten), test with a tool to make sure that it catches what you want and doesn't catch what you don't want.

view this post on Zulip David Pyke (Oct 28 2021 at 17:55):

fhirpath tester?

view this post on Zulip Lloyd McKenzie (Oct 28 2021 at 17:57):

@Brian Postlethwaite wrote it. Available as a free Windows plugin. https://www.microsoft.com/en-us/p/fhirpath-tester/9nxv8qdq154v

view this post on Zulip David Pyke (Oct 28 2021 at 17:59):

Remind me to buy him two beer at the next in-person meeting

view this post on Zulip Josh Mandel (Oct 28 2021 at 18:02):

I also use https://hl7.github.io/fhirpath.js/ in a similar capacity

view this post on Zulip John Moehrke (Oct 28 2021 at 18:04):

well, you can't use it on SquidGames https://chat.fhir.org/#narrow/stream/179160-social/topic/Squid.20Games.20on.20.23FHIR

view this post on Zulip Elliot Silver (Oct 28 2021 at 18:08):

Are these mentioned on the FHIRpath or tooling resources pages?

view this post on Zulip Brian Postlethwaite (Oct 28 2021 at 18:24):

I'm also working on a version to help testing invariants that have a context of a child element. UI doesn't feel right yet

view this post on Zulip Brian Postlethwaite (Oct 28 2021 at 18:47):

@Lloyd McKenzie which particular fhirpath features are you missing?
I've just recently got the aggregate v and date addition stuff in. Not released yet though. I might be able to add some more.

view this post on Zulip David Pyke (Oct 28 2021 at 18:48):

I'll happily be your test partner on any updates you make @Brian Postlethwaite

view this post on Zulip Jean Duteau (Oct 28 2021 at 18:52):

and i'd be your test partner for the Mac version you will create :grinning_face_with_smiling_eyes:

view this post on Zulip Lloyd McKenzie (Oct 28 2021 at 19:18):

@Brian Postlethwaite Don't remember. Think it might have been %resource or some of the other FHIR-specific extensions. Also missing the new Questionnaire stuff I expect.

view this post on Zulip Brian Postlethwaite (Oct 28 2021 at 20:42):

Cool, will recheck these in the upcoming release

view this post on Zulip Eirik Myklebost (Nov 01 2021 at 23:19):

I test the invariants using the validator, examples and expected outcome. I've written the fhir-validator-junit-engine to simplify this.

view this post on Zulip Jens Villadsen (Nov 06 2021 at 14:27):

@Corey Spears using https://hl7.github.io/fhirpath.js/ you get the feedback instantly


Last updated: Apr 12 2022 at 19:14 UTC