Commit Graph

3789 Commits

Author SHA1 Message Date
Jens Kristian Villadsen 37bfd3e66e
Update HapiFhirJpaMigrationTasks.java
Moving index status to be last operation
2022-05-01 21:11:21 +02:00
Jens Kristian Villadsen 644b885ebe
Merge branch 'hapifhir:master' into fix_for_5.0.0-snapshot1 2022-04-29 20:13:42 +02:00
michaelabuckley 06030094c8
Add res_id, and partition_id to string norm and exact indexes (#3569)
Add res_id, and partition_id to string norm and exact indexes to avoid random row reads.
2022-04-29 08:12:29 -04:00
Ken Stevens 10ebb082d0
Issue 3563 mdm nickname support (#3565)
* added NicknameMap

* added NicknameSvc

* create NicknameInterceptor

* test interceptor integration

* add nickname matcher

* test nickname matcher

* unit test

* documentation

* unit test

* cleanup

* cleanup

* Msg.code()

* Msg.code() in test

* Msg.code()

* review feedback
2022-04-28 18:02:56 -04:00
Jaison Baskaran e0f1b913b7
Support _total and _count works for hibernate search (#3567)
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>
2022-04-28 16:35:39 -04:00
Kevin Dougan SmileCDR dd5ab4ede7
Add New Index On HFJ_RESOURCE For $reindex Operation (#3536)
* 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>
2022-04-26 17:19:05 +00:00
seanmikalson-smilecdr 68c8523046
$translate operation implementation for remote terminology (#3552) 2022-04-25 12:37:15 -07:00
Jens Kristian Villadsen af3afa8a9d
Update HapiFhirJpaMigrationTasks.java
Corrected ordering
2022-04-25 12:59:58 +02:00
Jens Kristian Villadsen 8ad18915a1
Merge branch 'hapifhir:master' into fix_for_5.0.0-snapshot1 2022-04-25 11:02:50 +02:00
Tadgh f7a31287b6
3558 bulk export premature deletion (#3562)
* 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
2022-04-24 01:46:44 +00:00
jdar8 5ccb4effb0
3547 Interceptor hook for client-assigned IDs (#3559)
* add pointcut

* draft test

* fix test, change name and location of pointcut

* add changelog

* change check condition, improve changelog wording

* improve changelog wording

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_0_0/3547-interceptor-hook-for-client-assigned-ids.yaml

Co-authored-by: Tadgh <garygrantgraham@gmail.com>

* change pointcut name

* update test

* fix test

* fix changelog

* renaming variables in test

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-04-22 18:09:25 -04:00
Tadgh 53c8b067d5
Support forward references in Group Bulk Export (#3558)
* 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
2022-04-22 05:33:10 +00:00
JasonRoberts-smile 1114c72f03
Further expunge refactoring (#3550)
* convert expunge public interfaces to use ResourcePersistentId instead of Long

* changelog

* version bump
2022-04-21 09:51:19 -04:00
Tadgh 612ee0af32
Supported search (#3549)
* wip

* Revert some work

* Add changelog

* refactor method into SeachParamRegistryImpl

* Javadocs
2022-04-21 07:46:58 +00:00
Tadgh 578d42c955
Add implementation and changelog, and test. (#3554)
* Add implementation and changelog, and test.

* Add daoconfig settings

* Updatae test

* Rename deexternalize -> autoinflate
2022-04-20 13:47:02 -04:00
Jens Kristian Villadsen 5c564bc343 Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/328 2022-04-19 16:42:05 +02:00
James Agnew 5dfdc91682
Add gated execution mode for Batch2 (#3545)
* Add gated execution mode for Batcvh2

* Allow for async processing

* Test fixes

* Cleanup

* Add javadoc

* Fixes
2022-04-18 20:20:52 -04:00
michaelabuckley 51f38eae98
Make Hibernate Search Path asynchronous to speed up first bundle (#3535)
* logging prep

* Start async path

* start async scroll

* Limit size to avoid saving too many results

* Allow unbounded results when no limit set.

* Larger default scroll page size

* Cleanup
2022-04-18 10:06:46 -04:00
Olivia You e0cc325294
Allowing any client assigned ID throws ResourceNotFoundException when creating a CodeSystem (#3505)
* add test and potential fix

* add changelog

* fix

* add tests again

* oops. missed a file.

* clean up

* fix resolveResourcePersistentIds

* fix RESOURCE_PID constant

* format

* apply suggestion

* get R5 pid key

* better solution

Co-authored-by: olivia-you <olivia.you@smilecdr.com>
2022-04-17 08:02:50 -04:00
Jaison Baskaran c29bb462c5
Add support for additional params with lastN operation on Observation (#3533) 2022-04-13 21:38:43 +00:00
JasonRoberts-smile f361aa5998
move expunge core classes and interfaces to storage project (#3529)
* move expunge core classes and interfaces to storage project

* post-merge clean-up

* changelog
2022-04-12 14:12:10 -04:00
James Agnew 8d116b932e
Refactor to restore LGTM functionality (#3455)
* 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
2022-04-10 15:54:27 -04:00
michaelabuckley 1a8678cb1c
Implement support for Quantity search parameters in the Hibernate Search index (#3477)
* 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>
2022-04-08 08:25:27 -06:00
longma1 01d6e15f90
2579 partitioned support for mdm (#3485)
* 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>
2022-04-06 15:48:30 -04:00
Ken Stevens 40de855d17
Add tests. pull some inner classes out as package private classes. (#3516)
* Add tests.  pull some inner classes out as package private classes.

* review feedback
2022-04-02 20:34:26 +00:00
Tadgh 05bc208192
Fix for path parsing in STU3 SPs (#3503) 2022-03-30 08:40:17 -07:00
Jaison Baskaran f88d2d63bd
Fix QuestionnaireResponse reference search on canonical urls (#3502) 2022-03-30 07:56:11 -06:00
Mark Iantorno 179c970144
Issue 3486 (#3487)
* 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'
2022-03-30 08:52:52 -04:00
Tadgh f87f468521 Move non-DB modes to storage 2022-03-27 16:51:35 -07:00
Tadgh b1e2d7c104
Add test, add changelog, fix bug (#3494)
* Add test, add changelog, fix bug

* Test fix

* Fix some more test artifacts
2022-03-26 20:34:43 -04:00
Tadgh 5b413a9135
Package move-around (#3488)
* 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
2022-03-26 22:43:41 +00:00
James Agnew b833c13a3c
Improve batch2 error handling (#3482)
* 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
2022-03-26 17:40:12 -04:00
michaelabuckley 1dcc64ee44
Fast-path for lucene queries that skip the database (#3468)
* 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>
2022-03-25 16:21:47 +00:00
michaelabuckley 9e46fad1b9
Undo "helpful" IntelliJ edit (#3489)
IntelliJ added a compiler configuration which should not have been committed.
2022-03-24 18:43:47 +00:00
michaelabuckley 92db526786
Skip database query when hibernate search fully satisfies search (#3478)
If a query is completely satisfied by Hibernate Search, skip the database.

Co-authored-by: Jaison Baskaran <jaisonb@gmail.com>
2022-03-22 22:41:21 +00:00
Ken Stevens 50e6e94105 review feedback 2022-03-21 15:08:04 -04:00
James Agnew f82534ca51
Convert Reindex into Batch2 Job (#3458)
* 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
2022-03-19 16:07:58 -04:00
jmarchionatto f518f30506
Issue 3450 there is no way to recreate freetext indexes for terminology entities (#3481)
* 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>
2022-03-18 15:09:25 -04:00
jmarchionatto e45f7ee9cb
Issue 3450 there is no way to recreate freetext indexes for terminology entities (#3463)
* 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>
2022-03-18 08:39:12 -04:00
Mark Iantorno 49e19d9779
Issue 3441 reindex query being ignored (#3451)
https://github.com/hapifhir/hapi-fhir/issues/3441

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-03-14 15:18:43 -04:00
michaelabuckley 03b6c589c8
New indexing for number and quantity search parameters (#3464)
* 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
2022-03-11 16:23:06 +00:00
michaelabuckley 80d1a5a6f8
Mb new token search index (#3386)
* New token search param indexing.
* New token query test cases for sql extraction
* Retire JPA fk ugly nams
2022-03-11 00:51:53 +00:00
Ken Stevens dfd99c5471
improve search parameter registry logging (#3452)
* Startup log cleanup.  Use cached fhir contexts.

* improve logging

* improve logging

* add full comparator

* wrap resource search param map

* rename wrapped map methods

* add fixmes

* further searchparam encapsulation

* fix regression found by test

* improve logging

* pre-review cleanup

* pre-review cleanup

* bump hapi version

* license

* since I'm bumping hapi-fhir now, improve the api dependency

* licenses
2022-03-09 19:57:38 -05:00
Tadgh 7eb1bd14d1
Do not validate auto-created placeholder resources (#3461)
* Add implementation, testing, and changelog

* add jira ref
2022-03-08 22:22:04 +00:00
samuelwlee2 cde39dcc6c
3423 include with client assigned id partition (#3448)
* changes to doResolvePersistentIds

* make changes to tests

* Add code changes after the review
2022-03-08 11:48:33 -05:00
James Agnew ac80c7ffaa
Search Narrowing by Code Tweaks (#3453)
* Search narrowing tweaks

* Search narrowing tweaks

* Test

* Test fixes

* Try to fix LGTM

* Add license headers

* Test fixes

* Test fixes
2022-03-07 20:27:21 -05:00
Jaison Baskaran 0e9372775b
Fix to address lastN search limiting to only 100 hits. (#3456) 2022-03-07 22:04:54 +00:00
Jaison Baskaran abea0389be
2843 questionnaire include url fix (#3447)
* 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
2022-03-07 16:39:13 +00:00
Jaison Baskaran ecf782d59e
Fix '_include' to work for canonical urls (#3440)
* 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
2022-03-03 21:28:19 -07:00
michaelabuckley 20e092ba6d
Better error messages for ValueSet $expand contextDirection=existing (#3446)
* Better error messages for ValueSet $expand contextDirection=existing
* Apply to $lastn too - it uses aggregations
2022-03-03 21:11:08 -07:00