Add support for _total, _count, and _offset to Lucene backend.
Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
* 3534 - Added new multi-column Index and removed existing single-column Index.
* 3534 - Added PARTITION_ID to the new Index.
* Change migrations to have no timeout.
Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
* Implementation, parameterize test, changelog
* Bump spring framework for a vuln while i'm in here
* Fix number of changelog
* Add IS NOT NULL to query
* Preliminary test work to generate forward-reference data
* Complete implementation
* Permit Practitioner/Organization as forward references in bulk export group params
* Wip
* Fix test
* Add error number
* Address review comments
* Update assert
* Refactor to restore LGTM functionality
* Compile fix
* Work on cleanup
* Attempt to restore LGTM
* Work on tests
* Fixes
* Build fixes
* Build fix
* Test fix
* Test fixes
* Work on build
* License header updates
* Test fixes
* Test fixes
* License header
* Test fix
* Test fix
* Test fixes
* Restore LGTM
* Fix azure
* Disable test
* Test fixes
* Test cleanup
* Build fix
* Build fix
* Test fix
* Test fix
* Test fixes
* markers for new quantity hibernate search support
* Add quantity search
* Add normalized (canonical) quantity search
* Add comment
* Use double values instead of BigDecimal to avoid scaling
* Remove multiple case labels which are not supported until source version 14
* Remove switch rules which are not supported until source version 14
* Use constant for error message used in tests
* A failing test for multiple indexed quantity paths
* Disallow dirtying context for nested classes
* failing test for normalized units
* Make sp.value-quantity.quantity a nested structure to handle correlated queries for code and value.
Save units for canonical case and consider them when querying.
Collapse normalized sub-structure under *.quantity.
* Nest sp.value-quantity instead of sp.value-quantity.quantity for compatibility with other nested types (IE. token)
* Comment out debug statements
* Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedLuceneClauseBuilder.java
Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>
* Add test for nested correlated quantity query
* Address MR comments
* Add proper handling of or query predicates
* Use positive conditions for better readability
* Add tests to validate behavior of combined and and or clauses, including some making no sense but still syntactically correct.
* Only consider normalized quantity searching if ModelConfig search level is NORMALIZED_QUANTITY_SEARCH_SUPPORTED
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>
* committed changes discussed at tasking
* Changed the subscription message to store the request partition
* modified mdm subscription loader to create a cross partition subscription in the default partition if multitenancy is enabled
* Fix errors when running Multitenant IT for mdm
* Added partition id to mdm golden resource search and creating/updating golden resource
* added partition id column to the mdm link table
* Added partition id of the source resource to partition id column of the mdm link table
* broken build
* working -links, missing hapi tests
* Fixed the mdm link db table due to feedback
* added IT for create link mdm operation, also added changes to pass the IT
* Fixed test for create mdm links, added test for update mdm link on partitioned server
* changed mdmLink search from searchbyExample to criteriaBuilder, added partitionHelperSvc to determine partition
* added test for merge golden resource and search golden resource on partitioned server
* added unit test for not duplicate on partitioned and non-partitioned server
* added criteriabuilder search and tests
* code cleanup
* added partition support to -merge-golden-resources operation
* test cleanup
* fixed operations with multitenancy
* added test for mdm clear operation
* added waiting for batch job to finish in mdm clear operation test
* added query to dao to support partitioned server for mdm clear operation
* resolve mistake from merge conflict
* added mdm-submit operations, also fixed paging for -query
* added partitionIds constant
* fixed build issue where there was no Code.msg in mdm partition exceptions
* code review fixes
* fix broken test, also fix a bug where query link could not query by linkSource properly
* fix test stubbing
* bump hapi version to 6.0.0-PRE10-SNAPSHOT
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Long Ma <long@smilecdr.com>
* added failing tests
* tests pass
* Added changelog and javadocs
* fixed package tests for resources with no active field
* adding jira ticket number
* feedback from code review'
* switching to old style switch statement'
* moved classes
* Bump version
* licensing
* Repackage, fix messages
* reject empty streams
* Remove dead import
* Version bump
* Fix up test to actually return a data stream
* Move null binary svc to storage
* Improve batch2 error handling
* Build fixes
* Work on reindexing
* Test fixes
* Account for gzipped contents
* License header updates
* Register VS operations on public server
* Test fix
* Build fix
* Remove animal sniffer plugin
* Compile fix
* Store resource data inline with lucene/es resourcetable index.
* Use fulltextsearch to load resources if resource inlined in ES/Lucene index
Co-authored-by: Jaison Baskaran <jaisonb@gmail.com>
* Start working on reindex job
* Updates
* Ongoing work
* Ongoing work
* Work on reindex
* Reindex work
* Add logging
* Fix typo
* Test fix
* Test fix
* Address fixme
* Liocense header
* Resolve fixme
* Add logging
* Update logs
* Address review comments
* License header
* Test fixes
* Test fix
* Test fixes
* Test fix
* Version bump
* Version bump
* Add reindex-terminology batch command
* Handle number of thread throttling and concurrency with other terminology batch operations
* Add required dbcp2 dependency
* Fix test
* Improve ConnectionPoolInfoProvider setup. Handle maximum connections.
* Remove java higher version construction
* Remove unused config
* Add reindex terminology integration test.
Reset termConcept counters before pre-expanding, which otherwise accumulate if it was pre-expanded before.
* Address MR comments
* Adjust test to tested class change
* Adjust test to tested class change
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
* Add reindex-terminology batch command
* Handle number of thread throttling and concurrency with other terminology batch operations
* Add required dbcp2 dependency
* Fix test
* Improve ConnectionPoolInfoProvider setup. Handle maximum connections.
* Remove java higher version construction
* Remove unused config
* Add reindex terminology integration test.
Reset termConcept counters before pre-expanding, which otherwise accumulate if it was pre-expanded before.
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
* New Add Index forced-INCLUDE columns, and Online option
* Remove forced-include. Simpler just to add all columns to index.
* New date index definitions.
* Oops. Remove test for deleted feature.
* Cleanup
* Drop IDX_SP_DATE_UPDATED
* Add online option to drop index
* Update annotations to match and redefine FK
* Push sp->resource FK down to control name
* remove dead end
* Cleanup date tests
* New token query test cases for sql extraction
* New token search param indexing.
* Continue to allow the legacy hibernate names while we update the indexing.
* Fix jpa annotations with overloaded field
* Decide on token sorting - we do it.
* review comments
* fixme
* disable dead data migration too
* review fixups
* Test cases for numeric search
* add ne and ap
* Test for Numeric SP
* start
* finish number
* new indexing for quantity
* Move config
* cleanup
* Added test to verify BUG: #2843 (_include doesn't return canonically referred resource)
* Fix '_include' query search by native query to support canonical url references
* Fixed code review comments
* Restored the res_type condition on join
* Rely on context refresh event instead of postconstruct. Load bean lazily.
* Remove parent autowire
* Break termcodesystem circular dependency with new bean
* Break cycle between BaseTermReadSvcImpl and TermCodeSystemStorageSvcImpl
* move back into helper method
* Rip out scheduling and submission to spring batch away from BulkDataExportSvcImpl
* wip
* Fix bean naming
* Revert
* re-add autowiring
* Reformat
* docs and reformat
* Back out change
* feedback from review
* merge conflicts
* Enable search narrowing on large ValueSets
* ValueSet improvements
* Work on narrowing
* Work on narrowing
* Work on narrowing
* Work on narrowing
* Add test
* Work on narrowing interceptor
* Work on narrowing
* License headers
* Refactor code narrowing
* Add docs
* Version bump
* Test fix
* Test fixes
* Build fix
* Fixes
* Version bump
* Test fix
* License header updates
* Build fix
* Test fixes
* Test fix
* Test fix
* Docs fix
* Test fix
* Test fix
* Resolve fixme
* Bump
* Force a CI build
* Make CI happen again
* Added log to the create() and valiForUpload() methods in the PackageInstallerSvcImpl class
* Added helper methods to extract URL from SearchParameter.Tested and fixed log entries.
* Changelog entry
* Update 3384-Package-Install-added-logs-for-resources-validation.yaml
Co-authored-by: Kai Liu <kliu@Kais-MacBook-Pro.local>
* Work on new batch framework
* Work on new batch framework
* Work on new batch framework
* Work on batch
* Compile working
* Work on bulk import
* Adjust import
* Work
* Work on batch
* Bump version
* WOrk on new batch processes
* Work on bath
* Bump to PRE4
* Build fixes
* CLeanup
* Small tweak
* Add exception code
* Test fixes
* Test fixes
* Test fix
* Additional synchronization
* Add license headers
* Test fixes
* Test fixes
* Add changelogs
* Address PG
* Test fix
* Test fix
* Test fixes
* Review notes
* Work on tests
* Test fixes
* Test fix
* Work on tests
* Tets fix
* Test fixes
* Test fixes
* Add missing exception codes
* Test fix
* Test fixes
* More test fixing
* License headers
* Test fix
* Add new test logging
* Work on tests
* Test fixes
* Test fix
* Resolve fixme
* Try to avoid test failure
* Add import command
* Work on storage
* Fix error codes
* Fixes
* License header
* Build fix
* Build fixes
* Fix dep
* NDJsonParser with one example test.
* Add test for empty NDJson, and fix bug for empty NDJson.
* Adds multi-Patient test, and fixes bug whereby all multi-line NDJSON would be put into the same line.
* Adds test for NDJson with newlines in it.
* Adds test for converting non-Bundle types to NDJSON failing.
* Confirm that we can only extract to Bundle types in test.
* Update hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
Co-authored-by: James Agnew <jamesagnew@gmail.com>
* Documents behavior of the NDJsonParser in FhirContext.
* Attempt to fix failing build by using TestUtil to clear context in the manner of r4 parser tests instead of dstu
Also clean up indentation.
* Adds a BulkDataImportProvider, with a single test. More tests are forthcoming.
* Adds an additional test.
* Enhance tests to include content of job files. Fix a bug whereby the content was never actually being added.
* Adds several tests for BulkImportProvider's polling operation.
* Adds requred Msg.code to errors.
* Apparently I can't duplicate Msg.code even if it's the same issue.
Co-authored-by: James Agnew <jamesagnew@gmail.com>
* Refactor ValueSet expansion code to simplify property filtering by using new Hibernate search V6 nested classes capabilities; use generic hibernate search queries where possible (mostly everywhere but regex queries) and add R4 integration tests for both elastic and lucene.
* Refactor ValueSet expansion code to simplify property filtering by using new Hibernate search V6 nested classes capabilities; use generic hibernate search queries where possible (mostly everywhere but regex queries) and add R4 integration tests for both elastic and lucene.
* Add comment for trick
* Add codes to exception messages
* Add test specific for the fix
* Move changelog to current release. Add upgrade notice.
* Improve fail-fast method
* Update upgrade instructions
* Try luck with new exception codes
* Update hapi-fhir-storage/src/test/java/ca/uhn/fhir/jpa/search/ElasticsearchNestedQueryBuilderUtilTest.java
Add missed quote
Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
* Add FK index to avoid timeout when deleting large ValueSet
* Add exception to allow same name for index and FK
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
* Start working on graphql Schema
* Start testing
* Work on introspection
* Work on introspection
* Use integers for date ordinals
* Add changelog
* GraphQL updates
* Ongoing wrk
* Cleanup
* Bump core lib
* Add changelog
* Clean up dependencies
* CLeanup
* Add missing message
* Test fix
* Change to force CI
* fix handling of common search parameters
* Revert "fix handling of common search parameters"
This reverts commit 89c45eebdc.
* Fix implementation, add test (#3378)
* Fix implementation, add test
* Tighten test
* Rip out dead modules
* Add changelog
* Jr 20220210 handle common search params in contained searches (#3377)
* fix handling of common search parameters
* add support for reference search parameters with multiple paths
* Issue 3357
* Version bump
* Fixed null pointer exception for re-loading subscription on cdr restart and when there's no partition id in the request, and added tests
* added changelogs for this fix
* Fix broken changelog file
* Can't specify specific resource type permissions for bulk export (#3376)
* deny user from exporting without perms
* add unit tests
* add changelog
Co-authored-by: olivia-you <olivia.you@smilecdr.com>
* Make migration donothing as it was added in error
* Remove ehcache
* Add version.yaml:
* Add to sources/javadocs for dist
* Fix typo
* fix up pom
* wip test removing checkstyle plugin from deployable pom
* remove test pom changes, instead just dont deploy to sonatype
* typo
* Remove ehcache
Co-authored-by: Jason Roberts <jason.roberts@smilecdr.com>
Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Mark Iantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>
Co-authored-by: olivia-you <olivia.you@smilecdr.com>
* New date index definitions.
* Dropped unused indexes.
* Add online option to drop index and add index
* Push sp->resource FK down to control name
* Update annotations to match and redefine FK
* Continue to allow the legacy hibernate names while we update the indexing.
* fix handling of common search parameters
* Revert "fix handling of common search parameters"
This reverts commit 89c45eebdc.
* Fix implementation, add test (#3378)
* Fix implementation, add test
* Tighten test
* Rip out dead modules
* Add changelog
Co-authored-by: Jason Roberts <jason.roberts@smilecdr.com>
* Fixed null pointer exception for re-loading subscription on cdr restart and when there's no partition id in the request, and added tests
* added changelogs for this fix
Co-authored-by: Steven Li <steven@smilecdr.com>
* Change token and reference search params to 'keyword' field type
* remove normalizer for keyword field
* WIP - refactor lastN operation to use hibernate search generated ES index.
* Add ES native aggregation builder for lastN
* added date search param support for searching resourcetable ES index
* * Added DateSearch parameterized tests to ElasticSearch test suite
* Added more tests cases for Date searches
* WIP refactor LastN test data to central generator class and use it for both hibernate-search and elastic search implementations.
* WIP fix lastNDataGenerator to avoid assertion errors.
* Fixed tests to run test suite on both existing lastN search implementation and newer extended lucene index based search.
* Cleanup json string to avoid carriage return noise
* Fix checkstyle issues
* Fix checkstyle Msg code issues
* Fix checkstyle Msg code issues
* Add more test case for GT, SA precision modifier
* Fix date precision test cases
* Fix Msg Code conflicts
* Add more logging
* Add way more loggging
* even more logging
* fix msg code conflicts
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
* feat: added support for package.zgz uri in the "file:/" format
* added changelog entry
* add error code to thrown message
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
* 3354 fixing flakey tests
* must fix code
* updating number again
* fixing test
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
* Delete TestR4WithLuceneDisabledConfig
* Split off the ES and ESClient test configs
* move hibernate search config out to add-ins
* Use addIn for all R4
* Finish R4
* Finish R3
* Finish dstu2
* R5
* Remove property override, and docs
* Apply error code to error
* Fix test to match new error code
* Lighten test
* Disabling broken test.
* Initial design of adding exception codes to exceptions
* Initial design of adding exception codes to exceptions
* change int module name to string
* add comment
* shorten message
* shorten message
* added checkstyle
* developing checker
* completed checkstyle plugin and unit test for it
* fix NPE
* fix checker so it ignores throws on exceptions that aren't new
* change parameter order in InvalidResponseException
* accept Msg.code() in any parameter since some exceptions like MessageException have the message string as the second parameter
* exclude generated files
* BIG COMMIT added error codes to all exception throws
* example test fix
* Modified tests such that the assert statements would better match the message responses.
* Modified additional tests such that the assert statements would better match the message responses.
* fix test
* merge master
* merge master
* Fourth commit of modified tests such that the assert statements would better match the message response
* Changes made to modify assert statements such that they match the new errors which now use error codes. Also changed ResourceNotFoundException to include error codes in its messages.
* Modified assert messages to better match new error codes
* Time Zone changes DRAFT. Certain tests pass in intellij and fail during mvn install
* Modified assert messages to better match new error codes
* Added comments for time zone fixes. Previous commit comment on time zone fixes was incorrect. By invaliding caches, all tests on both intellij and mvn install passed.
* Reverted changes on azure-pipelines.yml
* updated hapi-fhir version for checkstyle module
* changes to azure-pipelines.yml
* changes to azure-pipelines.yml
* change to pom.xml to include hapi-fhir-checkstyle in ALLMODULES
* changes to azure-piplines (these changes are to be reverted after testing)
* reverted changes to azure-piplines
* reverted change where hapi-fhir-checkstyle was added to pom.xml (hapi-fhir)
* Attempted fix on checkstyle build error
* modified azure-piplines.yml to change maven repository for checkstyle build
* Attempted fix on checkstyle build error
* checkstyle config location change for hapi-depoloyable-pom. (will be reverted if it does not work)
* attempted dependency add for hapi-depoloyable-pom. (will be reverted if it does not work)
* reverted changes for hapi-deployable-pom
* add javadoc
* update last code
* Attempted fix on checkstyle build error
* Finished adding in missing error codes to pass Checkstyle checks
* Test pipelining
* Fixing errors and bumping version (as suggested by Gary)
* Merge
* Fixing Checkstyle error
* Attempted fix for date error
* Add error code onto assert statement
* Add in a couple more error codes
* Fixing assert statements
* Bump to static version for dependency
* Adding error code to message
* Adding error codes to exceptions
* Adding error codes to exceptions
* Change to work with cdr branch
* Update to faulty error message
* Merge changes
* allow checkstyle pom to deploy
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Simon Zuccherato <simon.zuccherato@smilecdr.com>
Co-authored-by: Predap <simon.zuccherato@gmail.com>
Co-authored-by: Predap <46201929+Predap@users.noreply.github.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
* 3156 fix race condition that results in multiple tags being created
* 3156 added changelog
* cleanup
* added smile jira ticket
* 3156 review fixes
* review fixes
* 3156 added an additional integratoin test
* cleanup
* review fix and master merge
* threadsafe stuff
* small change
* upping min threads for tests to pass
* changing test
* test check
* fix
* test testing
* one more update
* using threadpoolutil
* temporary measure
* git push
* all builds
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
* failing test
* failing test
* Fixes
* Updated note to self
* Improve pre-caching of resource IDs
* Work on tests
* Test fixes
* Add changelog
Co-authored-by: Ken Stevens <khstevens@gmail.com>
* added settings for cross-partition to Dao and Model config
* modified subscription validator to validate cross partition subscriptions
* modify subscription matcher to allow matching on all partitions when subscription is set to cross partition
* added cross partition to canonicalSubscription
* end of day commit, changed how we are checking if default partition in subscription validator
* fixed issue with i memory matching for cross partition subscriptions
* added test for parsing legacy CanonicalSubscription
* added changelog and doc changes
* addressed comments in pr
* added assertdoesnotthrow
* test fixes, added new mocks
* added check for if resource can have extension before checking for extensions
* removed unnecessary semicolon
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Long Ma <long@smilecdr.com>
* Make RestfulClientFactory.myValidatedServerBaseUrls usage thread safe so capability validation request is sent only once per client-endpoint
* Can't use @GuardedBy for fields which are not always locked by annotation object
* Use same variable when checking and setting
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
* base restructuring of query
* fix unit tests
* suppress unnecessary resource type parameter
* pass the resource type used to fetch the search param as part of the chain, so later we do not need to guess what it was
* add query structure tests
* changelog
* fix test failures
* got one of the branches wrong in the 3-reference case