Stream: fhirpath.js
Topic: Releases
Paul Lynch (Mar 07 2019 at 18:42):
Version 0.10.3 has just been published on npm with a fix for the bin/fhirpath command-line script.
Paul Lynch (Apr 04 2019 at 23:30):
Version 0.11.0 has just been published on npm. It now has support for DateTime and Time (but not Date, which is not yet a part of the official FHIRPath-- for at least another month) equality and comparison operators. Because JSON does not provide type information for DateTime/Time in resources, when comparing a known DateTime/Time value with a string, it will see if the string is in the right format to be converted. Arithmetic between DateTime/Time and Quantity is not yet supported, though I think that would easy to add via the ucum-lhc unit conversion library.
Paul Lynch (May 28 2019 at 19:42):
@Ivan Mikhailov has implemented the new math functions in version 0.14.0 of fhirpath.js.
Paul Lynch (May 29 2019 at 18:02):
Support for unary "+" and "-" has been added to fhirpath.js.
Chris Grenz (May 31 2019 at 17:00):
Many thanks to the implementers and maintainers!
Paul Lynch (Aug 01 2019 at 20:37):
We received a contribution from "bpacJoseph" for a fix for IE 10. This is now in version 0.16.2.
Paul Lynch (Aug 22 2019 at 20:54):
Version 0.17.0 now supports the beginnings of Date/time arithmetic. You can do things like "today() + 1 year > @2020" which could be useful for skip logic. There currently isn't a way to convert a string to Date (e.g. a string representation of a date in a JSON resource) which kind of limits its usefulness. After we move to support the new version of the FHIRPath spec we can start adding things like toDateTime(), etc.
Paul Lynch (Aug 28 2019 at 14:26):
I went to implement the needed toDateTime() and toTime functions(), and found they were already there. (I had forgotten....) So, you can do things like "Patient.birthDate.toDateTime() + 1 month".
Paul Lynch (Jan 06 2020 at 16:44):
Release 1.0.0 now has support for choice types. Operators "is" and "as" won't work yet, but you can now write ".value" instead of ".valueQuantity". The support is optional, in that you need to include an additional file with data from the FHIR model (specific to the release version). "is" and "as" will require a lot more data from the FHIR model, which is why these files are separate, even though right now they are fairly small.
Bryn Rhodes (Jan 06 2020 at 21:34):
That's great, very cool! What format are the additional files?
Paul Lynch (Jan 06 2020 at 21:36):
JavaScript. You just have to include "fhirpath.r4.min.js" in addition to "fhirpath.min.js" in your page (if using the browser-ready version in the releases).
Bryn Rhodes (Jan 06 2020 at 21:40):
If you're interested, there is a set of tools to generate FHIR type information in the ModelInfo format defined in the spec that communicates this information (it's how the CQL tooling currently resolves choice types): https://github.com/cqframework/cqf-tooling/tree/master/src/main/java/org/opencds/cqf/modelinfo
Paul Lynch (Jan 06 2020 at 22:47):
Thanks for the pointer-- I will take a look at it.
Paul Lynch (Jan 10 2020 at 16:54):
FYI regarding choice type support: A user found (https://github.com/HL7/fhirpath.js/issues/33) that I had forgotten to handle recursive definitions (item.answer.item) and also that for some reason paths with descendants() also prevents choice type recognition.
nicola (RIO/SS) (Jan 10 2020 at 17:00):
Just to remind the root of the problem - https://github.com/fhir-fuel/fhir-fuel.github.io/issues/2 - vote for FHIR JSON 2.0!
nicola (RIO/SS) (Jan 10 2020 at 17:00):
This is a design bug
Paul Lynch (Jan 10 2020 at 17:33):
Vote how?
nicola (RIO/SS) (Jan 10 2020 at 17:34):
I do not know :) Just tell your opinion about this to @Grahame Grieve and @Lloyd McKenzie
Paul Lynch (Jan 10 2020 at 17:43):
I really dislike the choice types, and the amount of FHIR model data required to be loaded to support them fully. I would like to see types explicitly specified on nodes with types-- something like what you have suggested. The only reason I've been working on implementing it is that the current standard (normative for JSON and nearly normative for FHIRPath) calls for it. I would be delighted if something would replace the current JSON format, but my understanding is that that would be a long process at this point. Still, perhaps it is best to start it sooner than later.
nicola (RIO/SS) (Jan 10 2020 at 17:51):
My proposal was to introduce FHIR JSON 2.0 as a draft and keep JSON 1.0 until everybody forgets about it.
nicola (RIO/SS) (Jan 10 2020 at 17:52):
In Aidbox we have a converter between JSON 1.0 and Aidbox JSON (which fixes these issues https://docs.aidbox.app/basic-concepts/aidbox-and-fhir-formats) - we can open-source it
nicola (RIO/SS) (Jan 10 2020 at 17:53):
We applied these ideas in SQL on FHIR draft - https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md#choice-types
nicola (RIO/SS) (Jan 10 2020 at 17:54):
I am waiting for an initiative group of experts to try it again :)
Paul Lynch (Jan 10 2020 at 17:54):
That converter might be a useful thing to open source. Then people could pre-process and work with the improved JSON format.
nicola (RIO/SS) (Jan 10 2020 at 17:55):
Yes - we can do this.
Paul Lynch (Jan 17 2020 at 22:39):
FYI regarding choice type support: A user found (https://github.com/HL7/fhirpath.js/issues/33) that I had forgotten to handle recursive definitions (item.answer.item) and also that for some reason paths with descendants() also prevents choice type recognition.
These issues are now fixed (in 1.0.1).
Paul Lynch (Mar 23 2020 at 21:26):
2.0.0 is now out, which introduces the new grammar file for the FHIRPath N1 release. (Thanks @Yury Sedinkin).
Paul Lynch (Apr 06 2020 at 21:02):
2.1.0 is now out, which implements toQuantity(unit). (Thanks to @Yury Sedinkin .)
Paul Lynch (Aug 13 2020 at 00:49):
In version 2.4.0, @Yury Sedinkin has added DSTU2 model information so that choice types will work with DSTU2 models.
Paul Lynch (Sep 01 2020 at 12:53):
Version 2.5.0 now has support for the "union" function. (Previous versions supported |, but not union(...)).
Last updated: Apr 12 2022 at 19:14 UTC