Skip to content
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

Fix Context.childContext(null) to default to empty context_values object #282

Merged
merged 7 commits into from
Oct 26, 2022

Conversation

cmoesel
Copy link
Member

@cmoesel cmoesel commented Oct 22, 2022

In some cases, a Context's childContext function may be called with a null argument. In #277, this was happening as part of a sort comparator in a query. When childContext is called with null, the context_values should default to {}, but instead they were being set to null. This caused a crash when other code tried to access those context_values.

Bonus content:

  • When creating unit tests for this, I ran into some problems w/ declared types in Context and fixed them.
  • When fixing declared types in Context, I found a bug in UnfilteredContext, which I also fixed.
  • And gradlew was giving me some problems (timeouts downloading), so I upgraded it to the latest version.

To reproduce w/ unit tests:

  1. Check out this PR branch (git checkout fix-null-context-values).
  2. Run git reset --hard 4a4856d to go back to the commit w/ a broken test demonstrating the problem.
  3. Run npm test and note the failure (AssertionError: expected null to equal Object {}).
  4. Run git pull to get back up to date (w/ the fix).
  5. Run npm test again and see the glorious green font of success.

To reproduce manually:

  1. Download and unzip the ecqm-test-pr-fix.zip test project.
  2. Follow the instructions in the README.md in the unzipped test project.

Fixes #277

CDS Connect and Bonnie are the main users of this repository.
It is strongly recommended to include a person from each of those projects as a reviewer.

Submitter:

  • This pull request describes why these changes were made
  • Code diff has been done and been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
  • Tests are included and test edge cases
  • Tests have been run locally and pass
  • Code coverage has not gone down and all code touched or added is covered.
  • Code passes lint and prettier (hint: use npm run test:plus to run tests, lint, and prettier)
  • All dependent libraries are appropriately updated or have a corresponding PR related to this change
  • cql4browsers.js built with npm run build:browserify if source changed.

Reviewer:

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.
Added a broken test showing that when you call Context.childContext(null), it results in null context_values instead of the intended default empty obect ({}).
@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2022

Codecov Report

Merging #282 (687fd51) into master (9fd81cb) will not change coverage.
The diff coverage is 80.00%.

@@           Coverage Diff           @@
##           master     #282   +/-   ##
=======================================
  Coverage   86.22%   86.22%           
=======================================
  Files          50       50           
  Lines        4400     4400           
  Branches     1234     1236    +2     
=======================================
  Hits         3794     3794           
  Misses        319      319           
  Partials      287      287           
Impacted Files Coverage Δ
src/runtime/context.ts 81.02% <80.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@mgramigna mgramigna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, good catch!

I have one open question about the type declarations:

src/runtime/context.ts Show resolved Hide resolved
src/runtime/context.ts Show resolved Hide resolved
@cmoesel cmoesel merged commit ecaf3f5 into master Oct 26, 2022
@cmoesel cmoesel deleted the fix-null-context-values branch October 26, 2022 13:56
birick1 pushed a commit that referenced this pull request Jan 15, 2023
…ect (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest
mgramigna pushed a commit that referenced this pull request Jan 16, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
cmoesel added a commit that referenced this pull request Jan 16, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Jan 16, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Jan 16, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Mar 27, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Mar 27, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Mar 27, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Mar 28, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Mar 29, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
mgramigna pushed a commit that referenced this pull request Apr 21, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
cmoesel added a commit that referenced this pull request May 4, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
cmoesel added a commit that referenced this pull request May 4, 2023
The main motivation of this pull request is to introduce a targeted performance improvement to list operations. The list and query distinct operations are non-performant on large lists which do occur in real-world use. These performance issues are resolved by using normalized immutable objects (with the Immutable.js library) as keys (or hashes) optimized for value comparisons.

In implementing the performance improvements, an issue was identified with the Uncertainty type where point equality with other types was not commutative. This could produce unexpected behavior based on the order in which Uncertain points were compared. This is corrected and tests added (thanks @hossenlopp / @cmoesel for constructor.name improvement suggestions).

All Commits:

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add cross-env dependency for cross-platform test support; Update package-lock to v2 (npm 7+)

* Fix a number of Typescript errors for test files using @ts-nocheck; Fix broken tests

* Update Uncertainty to account for different types/constructors for comparison; Update Uncertainty.equals to account for point behavior; Add Uncertainty tests

* Focused performance improvements for lists (doDistinct, doExcept, doIntersect) and queries (toDistinctList)

* Resolve ESLint issues in Windows; Resolve ESLint and Prettier issues;

* Correct wrong ESLint update for eslintrc.js

* Update cql4browsers.js

* Update ESLint config to use ecmaVersion 8 to align with es2017 update

* Add ESLint curly rule for if {}; Fix nonconformant if statements; Remove redundant IMemoizeOptions; Remove unnecessary instanceof Uncertainty

* Resolve cql4broswers, eslint, and prettier issues

* Using 'has' has better performance

* Change type checks in uncertainty; Add test to distinguish possible solutions

* Update test comment

* Change normalization to use fixed names where possible

* Change normalization to use constructor (instead of constructor.name)

* Add a _typeHierarchy check in normalization for model objects

* Reword comment.

* Rename memoizer.ts; Simplify; Update descriptions.

* Fix Context.childContext(null) to default to empty context_values object (#282)

* Fix Context.childContext to default to {} on undefined AND null

Fixes #277

* Context type updates & UnfilteredContext bug fix

Updated Context constructor to indicate that a Library can be passed in as the parent.  Updated PatientContext and UnfilteredContext library property to indicate it is, in fact, a Library. In the process of doing this, discovered code that was looking for expression identifiers at the root of the Library object instead of Library.expressions.  Oops!  Fixed it.

* Upgrade gradle wrapper

* npm audit fix + npm install --save-dev mocha@latest

* v2.4.3 (#284)

* Re-up to package lock v2 after merge from master

* Update build:test-data, build:spec-test-data, and watch:test-data scripts to run in Windows env too

* Resolve npm security vulnerability via audit

* Return doExcept and doIntersect to original implementations; Remove toKvp and toKvpParams in immutableUtil

* Revert doUnion

* Update cql4browsers post doUnion reversion

* Prettier spacing

* Update var names to reflect change from kvp to just keys

* Correct build/watch scripts for windows/mac

* Replace the toDistinctList implementation with in query.ts with list.ts implementation; Rename

* Add .version/.display for normalized key for codes

* Update test name

* Add description for immutableUtil

* Revert .eslintrc.js to .eslintrc.json removing the linebreak rule but keeping curly rule

* Browserify, lint, prettier update post changes

* Post Rebase Corrections

* Matt/Chris Review updates

* Resolve commit issues

Co-authored-by: Chris Moesel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read properties of null (reading 'FHIRHelpers')
3 participants