-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update evaluator to V2.0 #1001
Comments
Not required for Medsafe, leave for longer-term upgrades |
Speaking of Fragments -- let's start a list of common evaluator expressions that we should define as Fragments in the system (please edit this list):
|
One additional bonus of doing things like this is that we'll be able to standardise the expression syntax between the front and back-end. Currently there is some discrepancy in the paths to applicationData values, but we can hard-code this into the Fragment definitions (differently for each) and then we can use the same expression syntax for both in actual configs. |
I have re-built the expression evaluator from scratch for my own project, and it's a lot more powerful, well organised and designed, and it should be 99% backwards compatible (so existing expressions continue to work without re-configuring):
https://github.com/CarlosNZ/fig-tree-evaluator
At some stage it'd be good to move conforma over to use it, but that'll take a bit of time to refactor (though hopefully with no config changes), so only when we have time.
However, some of the features might be useful for handling the Medsafe data lookup and pre-filling the list builder. I'm not sure yet, so I'm just flagging this as a "Maybe" until I get further into it and decide if it's necessary.(Not necessary for now)In particular, the features that might be helpful:
evaluateFullObject
option -- when creating "default" expressions for the listBuilder, it may be necessary to create a large response object that has evaluator expressions deep into the object tree, not just at the root level. We could make a really complicated "buildObject" expression, but it'd be simpler to useevaluateFullObject
and just put the expressions in at the required leaves. We shall see...Steps for migration
{value: ...}
objects from expressions (that's one of the few things not fully backwards compatible, as it's best left in the past)The text was updated successfully, but these errors were encountered: