You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,10 @@ context (dict): a hash of variable name/value pairs.
68
68
69
69
model (dict): The "model" data object specific to a domain, e.g. R4.
70
70
71
+
options (dict) - Custom options (see the documentation below)
72
+
73
+
options.userInvocationTable - a user invocation table used to replace any existing functions or define new ones (see User-defined functions documentation below)
74
+
71
75
## compile
72
76
Returns a function that takes a resource and an optional context hash (see "evaluate"), and returns the result of evaluating the given FHIRPath expression on that resource. The advantage of this function over "evaluate" is that if you have multiple resources, the given FHIRPath expression will only be parsed once
73
77
@@ -76,3 +80,28 @@ Returns a function that takes a resource and an optional context hash (see "eval
76
80
path (string) - the FHIRPath expression to be parsed.
77
81
78
82
model (dict) - The "model" data object specific to a domain, e.g. R4.
83
+
84
+
options (dict) - Custom options
85
+
86
+
options.userInvocationTable - a user invocation table used to replace any existing functions or define new ones (see User-defined functions documentation below)
87
+
88
+
## User-defined functions
89
+
90
+
```python
91
+
user_invocation_table = {
92
+
"pow": {
93
+
"fn": lambdainputs, exp=2: [i**exp for i in inputs],
0 commit comments