Commit Graph

9383 Commits

Author SHA1 Message Date
Ken Stevens b88ccbc7b0
R4B SubscriptionTopic support (#4724)
* add tests for r4b subscriptions

* begin with failing test

* prepare for SubscriptionTopicLoader

* backwards compatibility

* subscription topic registry done

* topic matching is working

* all but delivery is working now

* yay test passes with FIXMEs

* FIXME -> WIP

* switch notification to bundle

* message codes

* fixme

* disable services for fhir versions below R4B

* fix regression

* fix intermittent

* this change will likely break some other tests

* try a safer option

* fix tests

* fix intermittent (I hope)

* unit test

* improve logic around topic subscription categorization

* moar test

* moar test

* changed to support both r4b and r5

* moar test

* cleanup for test

* moar test

* moar test

* moar test

* changelog

* comment

* Msg.code

* fix mock

* add update test

* fix test cleanup

* tracking link for version converter issue

* review

* fix test

* fix test

---------

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-04-12 00:44:08 +00:00
chalmarm 450ccb5599
$care-gaps functionality integration (#4561)
* care gaps integration

* fix review comments.

* Clean up for HAPI Conventions

* More cleanup to share constants

* More cleanup of tests

* More cleanup

* Update CQL versions

* Added changelog

* fix failing test cases for care gaps.

* WIP care-gaps tests

* implementation of end to end care gaps test case.

* addressing the code review comments.

* addressing comments to bring to hapi-fhir standards.

* added the docs required.

* Adding hapi-fhir-storage-cr module for test coverage inclusion.

* Addressing the comments.

* addressing comments and updated with master.

* Addressing comments for minor changes requested.

---------

Co-authored-by: Jonathan Percival <jonathan.i.percival@gmail.com>
Co-authored-by: Chalma Maadaadi <chalma@alphora.com>
2023-04-11 16:28:14 +00:00
Luke deGruchy 3a2b722093
Clinical Reasoning code fixes (#4726)
* Try removing the IFhirResourceDaoValueSet Bean.

* Add more TODOs.

* Push changes before testing with master.

* Prevent the following error from happening with mongo, dqm, and no validation support module configured:

org.springframework.context.annotation.AnnotationConfigApplicationContext@4a5b9e6b has not been refreshed yet

* Cleanup unnecessary changes.

* Add changelog.
2023-04-11 14:25:44 +00:00
David 89cb179116
Fix fhirweb diff template error (#4721)
* Add test to check template returned is not empty

* Check operation is diff so web template does not error

* Refactor for clarity

* add changelog

---------

Co-authored-by: David Chen <david.chen@smilecdr.com>
2023-04-11 09:28:16 -04:00
James Agnew e500b23fe6
Instance level reindex operations (#4699)
* Reindex improvements

* Work

* Work on reindex

* Test fixes

* Generator now working

* Add instance reindex

* Work

* Build fixes

* Build fix

* Fixes

* Add changelog

* Test fixes

* Resolve checkstyle fix

* Version bump

* Address review comments

* Resolve imports

* Address review comments

* Test fix
2023-04-06 17:00:41 -04:00
JP 182ac3b36c
Initial stub out of the CR repo API (#4627)
* Initial stub out of the CR repo API

* Pagination first pass

* cleanup

* add transaction tests

* add search param conversion working logic

* add result parameter conversion

* add test for keymap

* add type checking logic and tests

* remove and / or logic from test and cleanup

* Initial stub out of the CR repo API

* Pagination first pass

* cleanup

* add transaction tests

* add search param conversion working logic

* add result parameter conversion

* add test for keymap

* add type checking logic and tests

* Fix repository tests to use parameters

* Cleanup after latest merge

* Cleanup

* Cleanup

* Fix Msg codes

* Fix Msg codes

* Rename variable for clinical reasoning module

* Update clinical-reasoning version

* Fix version

* review comments

---------

Co-authored-by: Brenin Rhodes <brenin@alphora.com>
Co-authored-by: Rosie Elphick <rosalie.elphick@smilecdr.com>
2023-04-06 15:53:29 -04:00
michaelabuckley 02556187a3
Fix versions of httpcore-osgi and httpcore-nio to match httpcore (#4720)
Declare versions of httpcore-osgi and httpcore-nio to match httpcore.
2023-04-06 19:42:29 +00:00
michaelabuckley f1166fe0e6
Tune postgres settings for Hapi indexing. (#4712)
Tune postgress settings for Hapi indexing.
2023-04-05 10:01:24 -07:00
Primož Delopst 49a39c195c
Improve performance of ResourceSearchView (use hfj_resource res_id instead of hfj_res_ver res_id when querying by resource pids) (#4716)
* Improve performance of ResourceSearchView (use hfj_resource res_id instead of hfj_res_ver res_id when querying by resource pids)

* Add changelog and credit

---------

Co-authored-by: Primož Delopst <primoz.delopst@better.care>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
2023-04-04 18:30:28 +00:00
michaelabuckley fa00ef23e2
Remove IntelliJ workaround now that IDEA-85478 is fixed. (#4710)
Remove IntelliJ workaround now that IDEA-85478 is fixed.
2023-04-03 20:04:18 +00:00
James Agnew a2bc9a7212
Partition aware search cleanup (#4706)
* Partition aware search cleanup

* Compile fixes

* Build fixes

* HAPI FHIR version bump

* License

* License header

* Tests
2023-04-02 11:50:20 -04:00
Ken Stevens 4fbeeccda4
enable some disabled tests (#4662)
* enabled test

* added explanations to disabled tests

* added explanations to disabled tests

* yay enabled another one

* yay enabled another one

* testEverythingWithLargeSet2 failing intermittently

* fix intermittent regression introduced by splitting test class

* test passes

* need to document

* updated documentation

* prereview cleanup

* change log

* cleanup

* cleanup

* added breaking changes

* update changelog and breaking changes upgrade document to reverse the change to always return 200 per the spec.

* back out documentation change

* update documentation

* fix tests

* dstu2

* dstu3

* fix r4 validation warning test

* changelog

* hapi-fhir version bump to 6.5.10-SNAPSHOT

* fix cdr test

* fix tests

* remove accidental commit

---------

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-04-02 08:47:16 -04:00
Justin McKelvy 9066ad618e
Bug cql engine paging (#4664)
* WIP paging

* iterable HapifhirRetrieveProvider

* Bundle iterating action

* cr config update

* adding paging functionality for search in cr

* updating BundleIterable logic and removing paging references

* add measureeval threaded config into cr

* update properties

* adding hapi change log 4663

* version bump for hapi

* update exception with msg.code, move copyright

* exorcism of paging provider from cr

* updating IT tests for terminology evaluatemeasure

* unit test, javadocs, removed reflection code

* added comments for explanation

* fix javadoc, iterable.size instead of method

* update from master

---------

Co-authored-by: Jonathan Percival <jonathan.i.percival@gmail.com>
Co-authored-by: justin.mckelvy <justin.mckelvy@smilecdr.com>
2023-03-31 11:09:50 -04:00
StevenXLi 3fb9a16975
4693 enable partitioning in bulk import (#4694)
* created failing tests

* implemented feature, added more tests

* added documentation and changelog

* fixed duplicate error code

* code review changes

---------

Co-authored-by: Steven Li <steven@smilecdr.com>
2023-03-31 09:43:40 -04:00
James Agnew ccd1e94a47
Fix index uniqueness (#4703) 2023-03-30 18:49:07 +00:00
Luke deGruchy 1faf77dcc8
Fix error message for bad $mdm-link-history input and handle comma-delimited input (#4701)
* Fix error message for bad $mdm-link-history input and handle comma-delimited input.

* Code review feedback:  filter out null objects in the stream.
2023-03-30 12:51:17 -04:00
James Agnew ee8b5b39d4
Render narrative in HTML resource view (#4702)
* Working

* Add changelog
2023-03-30 14:18:35 +00:00
James Agnew e69fe05e96
Re-enable "Flush SP cache after SP change" (#4635)
* Revert "Revert "Flush SP cache after SP change (#4566)" (#4614)"

This reverts commit 9492999ed6.

* Additions for performance

* HAPI version bump

* Test logging improvement

* Test fixes

* Test fix

* Test fix

* Compile fix

* Fix

* License headers

* Test fix
2023-03-29 19:57:57 -04:00
James Agnew 05b3bff89f
Order Location searches using near in closest distance to center of the box (#4687)
* All working

* CHangelog tweak

* Address review comments
2023-03-29 03:19:34 +00:00
samguntersmilecdr 2e70b351a2
tests + change + changelog (#4672) 2023-03-28 15:52:05 -04:00
Mark Iantorno 4883be0474 removing hapi-fhir-jpa-server from MR pipeline 2023-03-28 15:31:30 -04:00
Luke deGruchy 734bb3cbff
Ensure querying $mdm-link-history on only golden resource or resource only does not result in an error (#4681)
* Ensure querying $mdm-link-history on only golden resource or resource ID does not result in an error.

* Change MdmHistorySearchParameters semantics back to set**** so we don't need to a hapi-fhir to cdr bump.

* Remove envers disabling from HibernatePropertiesProvider.getDialect as by then it's too late.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_6_0/4680-mdm-link-history-only-one-of-each-param-no-error.yaml

Co-authored-by: Ken Stevens <khstevens@gmail.com>

---------

Co-authored-by: Ken Stevens <khstevens@gmail.com>
2023-03-28 16:25:59 +00:00
Luke deGruchy 479e412786
Ensure that source resource type of Provenance is also excluded from the $everything linkage. (#4692) 2023-03-28 14:41:24 +00:00
IanMMarshall b2c0a48915
4610 enable partitioning in bulk export (#4682)
* Initial commit adding support for partition awareness to Bulk Export.

* Additional cleanup and remove references in tests to "all partitions".

* Additional cleanup and remove references in tests to "all partitions".

* More cleanup, test fixes and additional checking to validate partition accesses.

* Additional changes to ensure checking of partition during polling operations.

* Add change log.

* More cleanup.

* Change recommended in code review.

---------

Co-authored-by: ianmarshall <ian@simpatico.ai>
2023-03-27 14:22:30 -04:00
Nathan Doef 90da12fbdf
_has query with non-existent reference field (#4676)
* handle empty values for QueryParameterUtils.toEqualToOrInPredicate and QueryParameterUtils.toNotEqualToOrInPredicate

* fix tests that were improperly mocked

* Revert "handle empty values for QueryParameterUtils.toEqualToOrInPredicate and QueryParameterUtils.toNotEqualToOrInPredicate"

This reverts commit 4382cd31

* throw InvalidRequestException if non-existent reference field is provided for a _has query
2023-03-27 15:52:29 +00:00
Ken Stevens 47262f5bd5
Ks 20230324 include prov (#4685)
* fix test

* fixed

* changelog

* add another test

* improve docs

* fix change log

* fix test

* fix test

---------

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-03-25 17:50:12 -04:00
michaelabuckley 7d26a7a38d
V2 index for string (#4629)
v2 indexing for String for when sorting.
2023-03-24 19:45:14 +00:00
James Agnew bcc1ca7593
Transaction SQL Optimization (#4679)
* Start work optimizing transaction

* Tons of test cleanup

* Cleanup

* More optimization

* Optimize

* Many tests fixed

* Work on test fixes

* Optimization done, now doing cleanup

* Cleanup

* Add docs

* Test fixes

* Test fix

* License headers

* Test fix

* Test cleanup

* Test fix
2023-03-24 10:29:56 -04:00
Jens Kristian Villadsen 90895aab57
Added exposure of uninstall (#4567)
* Added exposure of uninstall

* Add changelog

---------

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2023-03-23 21:08:11 +00:00
Etienne Poirier fb057d4fb1
4671 Searching with _source parameter will return matches for all resource types (#4673)
* adding solution with new test.

* adding changelog

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2023-03-23 14:04:01 -04:00
Mark Iantorno b33b789880 adding nightly build for SNAPSHOTS 2023-03-23 10:16:24 -04:00
Nathan Doef 5f2c88d9d9
Scaffolding for testing with different db vendors (#4653)
* scaffolding for testing with different db vendors

* changelog

* refactor

* javadocs
2023-03-22 14:17:02 -04:00
Luke deGruchy 7e25008d9f
Implement $mdm-link-history on JPA (#4648)
* First commit:  prototyping code.

* Push down hard-coding of MdmLink revision results into MdmLinkQuerySvcImplSvc.

* More fixes and push hard-coded MdmLink revisions to DAO.  Add unit test for converter.  Add largely disabled new Spring config to load the AuditReader.  Add new interface method to Dao interface.

* Add config key for enabling envers.  Add generated javadoc to EnversAuditConfig.  Add properties for both the new config and the new mdm history REST API.

* First commit post-merge with new logic to retrieve audited MdmLinks and convert them to JSON.

* Change revision timestamp long to a Date.

* Add a separate inheritance hierarchy for BasePartitionable classes that use Hibernate Envers.  Ensure MdmLink is part of this new hierarchy.  Fix HapiFhirJpaMigrationTasks to properly migrate the modification of HFJ_REVINFO from long to timestamp and to add partition_id and partition_date to the MdmLink audit table.

* Deprecate IMdmLinkDao.findHistory() and mark for removal as well as related methods.

* Add changelog.   Handle empty query results.  Remove hard-coded disabling of envers.  Clean up JPA code.  Clean up unit tests and make them pass.

* Add new hapi-fhir system property to disable envers but leave it enabled by default.  Fix nasty validation bug in IdHelperService.  Tweak MDM dao to throw another Exception and code if envers is disabled.

* Fix error code messages.  More cleanup.

* Another error code fix.

* Add documentation for new feature.

* Fix unit test.  Fix migration tasks to drop and add column instead of modifying it because of a postgres error.

* Cleanup TODOs, delete dead code, tweak unit tests, move/rename classes.

* Default implementation of new history DAO method to avoid need for bump.

* Non-dupe Msg code.

* Since 6.5.7.

* Remove misleading comment.

* Set disabled to TRUE, not FALSE.

* First round of code review fixes.

* Apply documentation suggestions from code review

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>

* Code review fix:  Split out $mdm-link-history into a separate provider that's enabled by configuration.

* Change configuration strategy from system properties to JpaStorageSettings and JpaStorageSettingsConfigurer.   Hook into these new settings from HibernatePropertiesProvider.  Update more documentation.

* Fix unit test failure in SearchQueryBuilder.

* Apply suggested Javadoc and documentation changes from code review

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>

* Change semantics for this feature from disabled to enabled.

* Fix failing unit test.

* Fix conditional logic for reversal of envers disabled/enabled.

---------

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2023-03-22 12:15:37 -04:00
JP 5ba487ce27
Replace use of github emojis with fontawesome icons in measure docs (#4665) 2023-03-22 11:32:28 -04:00
michaelabuckley 4b3405a456
Use java event names for work chunk transitions. (#4658)
Change work-chunk creation to be first event in state machine.
2023-03-21 13:53:16 -04:00
Simon Zuccherato ece6661120
Fix to interceptor (#4578)
* Fix to interceptor

* Changes from code review

* Extracting method

---------

Co-authored-by: Simon Zuccherato <szuccher@Simons-MacBook-Pro.local>
2023-03-21 10:26:36 -04:00
Isaac Wen 14be0553d0
Moving all license comments to the first line (#4656)
* changes for GL-4023

* changes for GL-4023

* changes for GL-4023

* changes for GL-4023

* changes for GL-4023

* changes for GL-4023

---------

Co-authored-by: isaacwen <isaac.wen@smilecdr.com>
2023-03-20 10:04:26 -04:00
Ken Stevens 8b80da6441
re-enabled some disabled tests (#4644)
* re-enabled some disabled tests

* add logging

* improve logging

* removed nonsense test

* fix regression

* fix %now

* licenses

* disable searchparam reindexing on intermittent failing test

* refining fix to RetryingMessageHandlerWrapper

* licenses

* remove hapi-fhir-cli-jpaserver from azure pipelines

* undo unneeded change

* change log

* back out unneccessary changes

---------

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-03-17 13:04:29 -04:00
samguntersmilecdr 32d224b7bc
Bring support of conditional updates into alignment with the R4 spec (#4602)
* first draft changes

* small fixes

* rename config

* allow placeholders

* fix tests

* fix concurrency test (messy fix)

* add temp comment

* test pipeline

* add placeholder check

* remove configurability

* cleanup comment

* code review suggestions

* condition changes for test

* extract conditional expression into method

* fix conditional expression
2023-03-15 18:35:25 -04:00
StevenXLi 733259a13b
4618 refactor searchparamwithinlinereferencesextractor to create a interface and a base class (#4619)
* Introduced new interface, refactored SearchParamWithInlineReferencesExtractor, added new test

* clean up, remove unused param

* added change log

* moved error message to properties file, made base class abstract

* fixed issue with test

* code review changes

---------

Co-authored-by: Steven Li <steven@smilecdr.com>
2023-03-15 16:27:52 +00:00
Luke deGruchy e4bb254754
Reverse disabled tests. (#4646) 2023-03-15 10:58:08 -04:00
James Agnew cf5470ae58
Search and Sort on Uplifted Refchains (#4633)
* Start work on refchains

* Semi working

* Add tests for transactions

* Add docs and lots of tests

* Add changelog

* Add tests

* Work on cleanup

* Add document operations

* Test fix

* Test fix

* Fixes

* Fix typo

* Test fix

* Test update

* Test updates

* Test fix

* Test fixes

* Test additions

* Test fix

* Add some javadocs

* Test fixes

* Intermittent test fix

* Doc tweak

* Test fixes

* Merge master in

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa/search.md

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>

* Review comments

* Version bump

* Add license

---------

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2023-03-15 07:04:32 -04:00
Aditya Dave 8956b273f0
Concurrent Transaction Conditonal Creates (#4639)
* push broken test for testing placeholder create in transaction retry

* reproduce error for transaction retry

* cleanup test

* fix test testPlaceholderCreateTransactionRetry

* revert temp fix

* revert spacing

* Add tests

* Remove fixme

* Test fix

* test fix

* Test fix

* Remove test line

* Remove unneeded change

* Review comments

* Add docs

* Test logging

* Add test logging

* Add logging for intermittents

---------

Co-authored-by: aditya_dave <aditya@smilecdr.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
2023-03-14 16:39:55 -04:00
Luke deGruchy ea8b68f5e5
Introduce hibernate envers, use it only for MdmLink, disable it for now, add to MdmLink Dao and unit test revisions. (#4615)
* First commit with new maven deps for envers and stubbed changelist.

* Add repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class to BaseAppCtxPersistence.  Comment it out in JpaConfig.  Add constant for hibernate.integration.envers.enabled.  Hard-code envers to false.  App starts without error.  Basic smoke testing for MpmLink update works.

* Add mdmLink code to retrieve envers history and unit test it.

* Initial code to handle envers from HapiFhirEnversRevision along with a custom extension of the revision/REVINFO entity.

* Add changelist and tweak table/sequence/field names and clean up the HapiFhirJpaMigrationTasks method.

* Fix some unit test failures and address TODOs.

* Ensure hard-coded deactivation of envers is overridden by unit tests.

* Remove commented-out code.

* Address code review comments.

* Remove sysout traces.

* Tweaks to poms with comments explaining why I left the versions in the plugin dependencies.  Get rid of a duplicate envers dependency.

* Bump hapi-fhir version to 6.5.5-SNAPSHOT.

* Disable intermittently failing test: PartitionedSubscriptionTriggeringR4Test.testCreateSubscriptionInPartitionAndResourceInDifferentPartition

* Try disabling Batch2CoordinatorIT failing test and see if branch pipeline passes.

* Add back hapi-fhir-validation-resources-r4b to hapi-fhir-jpaserver-base pom.xml.

* Bump hapi-fhir to 6.5.6-SNAPSHOT.

* Bump rest of hapi-fhir to 6.5.6-SNAPSHOT.

* Fix compile error on Batch2CoordinatorIT.

* Change revision ID column from integer to long in both the revision entity and the migration tasks.  Fix a bug with the migration tasks having the wrong name for the timestamp column.

* Fix interface in MongoDB to return Long for the revision ID instead of Int.   Implement TINYINT for all supported database products.  Keep TARGET_TYPE column at 40 instead of 100 for now since otherwise the schema migration test will fail.  Also, don't try to rename the foreign key or the schema migration test will fail.
2023-03-14 15:32:00 -04:00
Etienne Poirier fdf7450096
4598: Possible creation of resource duplicates when ingesting large quantity of resources. (#4609)
* Creating test to reproduce the issue.

* rebasing development branch from release to master.

* adding migration task.

* providing solution to duplicate resource creation and passing initial test.

* making initial test more readable.

* Implementing test for scheduled deletion of stale searchUrl entries.

* Implementing test for scheduled deletion of stale searchUrl entries.

* Removing interface declaration since it was not needed.

* Reverting changes.

* Adding changelog.

* Adding comments for clarity.

* Adding purgeDatabase operation in IT to delete all ResourceSearchUrlEntity [before|after}Each tests.

* Adding pom.xml exclusion to get all tests passing.

* Adjusting query counts and adding pointcut name to log in interceptor.

* Fixing typos.

* WIP

* implementing edge case tests and solutions.

* wip: passing all tests.

* wip: passing more tests .

* wip: passing tests.

* wip: passing tests.

* enhancing the test.

* changes following code review.

* modifications to tests.

* minor modifications following second code review.

* passing all tests.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2023-03-14 08:01:06 -04:00
James Agnew 59123cf0f0
Fix intermittent in batch2 tests (#4643)
* Fix intermittent in batch2 tests

* Add changelog

* Test fix

* Resolve intermittent

* Reducer changes

* Test fix

* Test fixes

* Resolve fixme

* Fix changelog
2023-03-13 19:59:05 +00:00
Nathan Doef 5f74396bfb
Fix Quartz Scheduler Race Condition (#4607)
* fix

* clean up
2023-03-13 11:02:42 -04:00
michaelabuckley d1f9c94038
Make WorkChunk handling transactional at state transitions. (#4621)
- use a separate enum for the states - chunks have different transitions than instances.
- use transactional update events for work-chunk state transitions
- introduce spec-test to define behaviour of batch2 storage
- replace synchronized facade with simpler ProxyUtil handler.
- change job cancellation to db update query
2023-03-12 19:19:21 -04:00
Nathan Doef 2f3108c2b6
fix tests (#4631) 2023-03-07 14:28:31 -05:00
Tadgh bfa8ca9571
Add chaained near search test (#4611)
* Add chaained near search test

* robustify test, remove gate checking

* Add changelog

* Correct issue number

* Tidy
2023-03-03 08:30:28 -08:00