Skip to content

Commit 149e4cd

Browse files
committed
patch context processing
1 parent c50b820 commit 149e4cd

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/fhirpath.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ function parse(path) {
721721
* RESTful API that is used to create %terminologies that implements
722722
* the Terminology Service API.
723723
*/
724-
function applyParsedPath(resource, parsedPath, context, model, options) {
724+
function applyParsedPath(resource, parsedPath, vars, model, options) {
725725
constants.reset();
726726
let dataRoot = util.arraify(resource).map(
727727
i => i?.__path__
@@ -735,12 +735,10 @@ function applyParsedPath(resource, parsedPath, context, model, options) {
735735
let ctx = {
736736
dataRoot,
737737
processedVars: {
738-
ucum: 'http://unitsofmeasure.org'
739-
},
740-
vars: {
741-
context: dataRoot,
742-
...context
738+
ucum: 'http://unitsofmeasure.org',
739+
context: dataRoot
743740
},
741+
vars: vars || {},
744742
model
745743
};
746744
if (options.traceFn) {

0 commit comments

Comments
 (0)