Commit Graph

583 Commits

Author SHA1 Message Date
longma1 2171ad04a2
3924 mdm match resources across partitions and storing golden resources on a specific partition (#4770)
* added mdm search all partition for golden resource functionality

* added mdm partition setting

* build header fix

* test fixes and added missing side effect of allowing cross partition links on opeartions

* added changelog, also test fixes

* fixed changelog to an actual yaml file

* review fixes,  also simplified tests

* reverted one test because the original test schenario was correct

* added setting clearing in afterEach method so test dont fail while run in maven

* bump to pre-15

---------

Co-authored-by: Long Ma <long@smilecdr.com>
2023-04-28 02:15:35 -06:00
David 457b39bac1
Fix $mdm clear doesn't expunge golden record resources (#4767)
* Failing test

* Add method to expunge collection of deleted resources

* Failing test passes

* Add changelog

* Version bump

* Forgot to commit change

* Update test

* Check type validity

* Fix broken tests

---------

Co-authored-by: David Chen <david.chen@smilecdr.com>
2023-04-27 21:35:27 -06:00
Tadgh 78b3b148ba
Support `_exportId` for bulk exports. (#4781)
* Full implementation, test, changelogs

* Add changelogs

* Add default method

* Update hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/export/WriteBinaryStep.java

Co-authored-by: James Agnew <jamesagnew@gmail.com>

* Code Review Comments

* Compilation failures

---------

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2023-04-27 21:46:09 +00:00
James Agnew 855e10a62d
Add post-fetch filtering to bulk export (#4772)
* Add post-fetch filtering to bulk export

* Add changelog

* Add validator

* Test fixes

* Test fix
2023-04-26 17:05:03 -04:00
michaelabuckley 20c7a32203
Add covering data to res_link index for all tgt->src queries. (#4769)
Add covering data to res_link index for all tgt->src queries.
2023-04-24 23:24:11 +00:00
Etienne Poirier 88459d0d00
4657 method name is inconsistent with the method behavior (#4659)
* Test implementation

* providing method getMessageKeyOrDefault();

* providing changelog

* preping codereview.

* Deprecating method getMessageKeyOrNull in favor of getMessagekey()

* updating comments following code review.

* Bumping version to 6.5.13-SNAPSHOT

* passing all tests.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2023-04-17 10:41:08 -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
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
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
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
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
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
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
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
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
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
James Agnew ae1d249d99
Bulk export reducer step fix mergeback (#4606)
* One more fix for #4467

* Enabling massIngestionMode causes incomplete resource deletion (#4476)

* Adding initial test.

* Adding fix and subsequent test.

* Adding changelog.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Provide the capability to request that the name of the subscription matching channel be unqualified (#4464)

* Adding initial test.

* Adding initial solution implementation.

* Adding change log and code clean up.

* addressing comments from 1st code review.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Change visibility of migration method (#4471)

* change migration visibility

* add empty migration method for 640

---------

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>

* Fix subscription validation not to validate partition ID when invoked from an update pointcut (#4484)

* First commit:  Make SubscriptionValidatingInterceptor aware of which Pointcut is being called.  In validatePermissions(), skip determinePartition() if the Pointcut is STORAGE_PRESTORAGE_RESOURCE_UPDATED.   Fix resulting compile errors in various unit tests.

* Fix/enhance unit tests.  Mark methods as deprecated instead of deleting them.  Add proper error code.  Complete changelog.

* Remove erroneous TODOs and tweak the validation logic.

* Enhance unit tests and fix changelog.

* Reindex batch job fails when processing deleted resources. (#4482)

* adding changelog.

* Providing solution and adding changelog.

* Adding new test.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* cleaning up checkstyle files (#4470)

* cleaning up checkstyle files

* One more fix for #4467 (#4469)

* added exlusions for files at base project level so checkstyle doesn't error out

* duplicate error code from merge

* changing lifecycle goal for all module checkstyle check

* moving checkstyle to base pom file, changing exectution phase on base check, cleaning dependency, resolving duplicate error code

* wip

* trying to figure out why pipeline cannot copy files

* removing modules that don't actually need to be built.

* I messed up the version

---------

Co-authored-by: James Agnew <jamesagnew@gmail.com>

* Bump core to 5.6.881 (#4496)

* Bump core to 5.6.881-SNAPSHOT

* Work on fixing tests

* Work on fixing tests 2

* Bump to core release

---------

Co-authored-by: dotasek <david.otasek@smilecdr.com>

* Issue 4486 mdm inconsistent possible match score values (#4487)

* Extract method for readability

* Save always normalized score values in POSSIBLE_MATCH links.

* Avoid setting properties to null values. Adjust test.

* Simplify fix

* Fix test. Add RangeTestHelper.

---------

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>

* Revert "cleaning up checkstyle files (#4470)"

This reverts commit efae3b5d5f.

* core version fix

* Loosen rules for id helper

* License

* fix batch2 reduction step (#4499)

* fix bug where FINALIZE jobs are not cancellable

* moved reduction step to message hander

* moving reduction step to queue

* addingchangelog

* cleaning up

* review fixes

* review fix'

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* Scheduled batch 2 bulk export job and binary delete (#4492)

* First commit:  Scheduled batch 2 bulk export job delete and binary, incomplete mock-based unit test, and a mess of TODOs and code that needs to be deleted.

* Refine solution and add a concrete unit test but still work to do.

* Comment out code in cancelAndPurgeAllJobs() and see if it breaks the pipeline.

* Unit tests complete.  New Msg code for new IJobPersistence.fetchInstances() method.  Cleanup TODOs and add others.

* Finish final touches on implementation.

* Add changelog.

* Various cleanup.

* Code review feedback.

* Small tweak to changelog.

* Last code review tweak.

* Address more code review comments.

* Reverse changes to consider work chunks.  Add a constant for write-to-binary.

* Change bulk import test for valueUri type (#4503)

* change tests

* suggested test change

* CVE resolutions (#4513)

* Bump Postgres for CVE

* Bump jetty

* Verison bump

* Remove comments

* Revrt bump

* Add check in scanner (#4518)

* 4516 create hapi fhir cli command to clear stale lock entries (#4517)

* Initial implementation

* better tests

* Add changelog and docs

* Forgotten files

* Code review comments

* Fix checkstyle

* Unable to Expunge CodeSystem (#4507)

* changes for GL-3943

* changes for GL-3943

---------

Co-authored-by: isaacwen <isaac.wen@smilecdr.com>

* New line::

* Update to documentation regarding narrative generation; (#4521)

Providing changelog;

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* changed what score is set for mdmlinks that created new golden resource (#4514)

* changed what score is set for mdmlinks that created new golden resource

* fix test

---------

Co-authored-by: Long Ma <long@smilecdr.com>

* REVERT: change to operationoutcome.html

* trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNo… (#4527)

* trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNotShowUp

* added change log

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* fix build (#4530)

* Making narrative_generation.md reference an html snippet (#4531)

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* fixed the issue of meta.source field inconsistently populated in subscription messages for different requests (#4524)

* fix + test

* minor fix

* Addressing suggestion

* Minor changes

* 4441 rel 6 4 bad references creation bug (#4519)

* adding a test

* fail in the case of ref enforce on type and on write and autocreate are all true

* update to code

* removing a line

* cleanup

* removing check on urn

* changing just to trigger a build

* adding a comment to the pom

* updating test for better information

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* fixed channel import null pointer exception from null header (#4534)

* retryCount 0 on null header + test + changelog

* suggested changes

* Revert "fixed the issue of meta.source field inconsistently populated in subscription messages for different requests (#4524)" (#4535)

This reverts commit 53252b8d15.

* Better error handling for when channel type is not supported (#4538)

Co-authored-by: kylejule <kyle.jule@smilecdr.com>

* Avoid logging message payloads that contain sensitive data (#4537)

Don't log payloads - they may contain sensitive data.

* Bulk Export Bug With Many Resources and Low Max File Size (#4506)

* failing test

* fix + changelog

* tweak

* add method to IJobPersistence to use a Stream

* tweak

* tweak

* decrease test time

* clean up

* code review comments

* version bump

* Increase timeout limit to match BulkExportUseCaseTest

* shorten test

* maintenance pass

* add logging

* Revert "add logging"

This reverts commit b0453fd953.

* Revert "maintenance pass"

This reverts commit bbc7418d51.

* test

* trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNotShowUp

* shorten tests

* logging

* move test location

* fixes a regression caused my change in hapi-fhir

* timeout

* Revert "fixes a regression caused my change in hapi-fhir"

This reverts commit 4b58013149.

* testing

* Revert "testing"

This reverts commit aafc95c2f3.

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* bump ver

* License updates'

* Downgrade dep'

* Updating version to: 6.4.1 post release.

* Add javadocs and sources to our serviceloaders

* Reset version

* Change parent

* Remove bumped version

* License fixes, new parent

* Updating version to: 6.4.1 post release.

* Fix bad creation of versionenum

* Improve performance on bulk export

* Add changelog

* Start working on cleaned up reducer

* Clean up batch calls

* Work on issues

* Build fixes

* typedbundleprovider getallresources override (#4552)

* typedbundleprovider getallresources override

* added test to immunization tests that validates pagination does not result in null pointer if over default queryCount

* moved HapiFhirDal test to its own test class

* removed unused imports

* Update to use JpaStorageSettings

* adding changelog for issue 4551

* fix changelog spacing

* changelog type  to fix

---------

Co-authored-by: justin.mckelvy <justin.mckelvy@smilecdr.com>
Co-authored-by: Jonathan Percival <jonathan.i.percival@gmail.com>

* Add backport info

* Upgrade core to 5.6.97, make adjustments in hapi-fhir, and ensure that all tests pass (#4579)

* First commit:  Create new branch from the release branch with changes from James' branch.  This probably won't compile as the work is incomplete.

* Second round of changes from integrating James' branch.

* Mark most test failures with TODOs.

* Add whitespace

* Add changes to FhirPathR4 to set FHIRPathEngine to non-strict FP evaluation.

* Fix CreatePackageCommandTest to assert null instead of empty string.  Comments on tests that fail due to the double-quote encoding problem.

* Downgrade to core 5.6.97.

* Fix another test and remove TODOs.

* Fix changelog.

* Clean up some erroneous changes and TODOs.

---------

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

* Fix up dal test

* Address leftover code review feedback from the upgrade to core 5.6.97. (#4585)

* Exclude pinned core deps

* Force pin structs

* Add model changes to IBaseCoding and related changes (#4587)

* Add IbaseCoding changes, and tinder changes

* Fix up tag definition

* converter addition

* Fix unit test and add changelog.

* Add jira to changelog.

---------

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

* Fix changelog

* Tidy metadata

* Test fixing

* Test fixes

* Work on progress

* Add changelog

* Build tweak

* Fixes

* Disable intermittently failing tests. (#4593)

* rename tests to IT

* Disable more intermittently failing tests (#4595)

* Disable more intermittently failing tests.

* Disable another intermittently failing tests.

* ITify

* Disable yet another intermittently failing tests. (#4596)

* disable

* disables

* Fixes

* disables

* Fix compile

* Test fixes

* Updating version to: 6.4.2 post release.

* Bump to 6.4.2-SNAPSHOT

* Fix compile

* fix version

* Address review comments

* Review comments

* Version bump

* Compile fix

* Test fixes

* Compile fixes

* One more compile fix

* Test fixes

* Version bump

* Resolve fixme

---------

Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Nathan Doef <n.doef@protonmail.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: Luke deGruchy <luke.degruchy@smilecdr.com>
Co-authored-by: Mark Iantorno <markiantorno@gmail.com>
Co-authored-by: dotasek <dotasek.dev@gmail.com>
Co-authored-by: dotasek <david.otasek@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>
Co-authored-by: samguntersmilecdr <123124187+samguntersmilecdr@users.noreply.github.com>
Co-authored-by: Isaac Wen <76772867+isaacwen@users.noreply.github.com>
Co-authored-by: isaacwen <isaac.wen@smilecdr.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: KGJ-software <39975592+KGJ-software@users.noreply.github.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
Co-authored-by: Justin McKelvy <60718638+Capt-Mac@users.noreply.github.com>
Co-authored-by: justin.mckelvy <justin.mckelvy@smilecdr.com>
Co-authored-by: Jonathan Percival <jonathan.i.percival@gmail.com>
2023-03-01 14:52:36 -05:00
James Agnew bf495e2d92
Don't merge yet: MegaScale API Changes 2 (#4544)
* Megascale changes 2

* Cleanup

* CLeanup

* Sync master

* Cleanup

* Ongoing work

* Move service

* Fixes

* Ongoing megascaler work

* Work

* Work

* Fixes

* Work

* Test fixes

* Work on remote services

* Interceptor rework

* Work on config refactor

* Fixes

* Docs tweaks

* Address review comments

* Test tweak

* Test fixes

* Try to fix tests

* Test tweaks

* Fix changelogs

* Work on merging

* Changes

* Megascale fixes

* Remove accidental commit

* Address fixmes

* Cleanup

* Test fixes

* Compile fix

* Test fixes

* Account for review comments

* Bump HAPI FHIR version
2023-02-27 22:19:28 -05:00
James Agnew eea6193df9
JPA config refactoring (#4545)
* Interceptor rework

* Work on config refactor

* Fixes

* Docs tweaks

* Address review comments

* Test tweak

* Test fixes

* Try to fix tests

* Test tweaks
2023-02-15 08:43:01 -05:00
Ken Stevens 794e4510c6
6_4 mergeback (#4547)
* One more fix for #4467

* Enabling massIngestionMode causes incomplete resource deletion (#4476)

* Adding initial test.

* Adding fix and subsequent test.

* Adding changelog.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Provide the capability to request that the name of the subscription matching channel be unqualified (#4464)

* Adding initial test.

* Adding initial solution implementation.

* Adding change log and code clean up.

* addressing comments from 1st code review.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Change visibility of migration method (#4471)

* change migration visibility

* add empty migration method for 640

---------

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>

* Fix subscription validation not to validate partition ID when invoked from an update pointcut (#4484)

* First commit:  Make SubscriptionValidatingInterceptor aware of which Pointcut is being called.  In validatePermissions(), skip determinePartition() if the Pointcut is STORAGE_PRESTORAGE_RESOURCE_UPDATED.   Fix resulting compile errors in various unit tests.

* Fix/enhance unit tests.  Mark methods as deprecated instead of deleting them.  Add proper error code.  Complete changelog.

* Remove erroneous TODOs and tweak the validation logic.

* Enhance unit tests and fix changelog.

* Reindex batch job fails when processing deleted resources. (#4482)

* adding changelog.

* Providing solution and adding changelog.

* Adding new test.

---------

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* cleaning up checkstyle files (#4470)

* cleaning up checkstyle files

* One more fix for #4467 (#4469)

* added exlusions for files at base project level so checkstyle doesn't error out

* duplicate error code from merge

* changing lifecycle goal for all module checkstyle check

* moving checkstyle to base pom file, changing exectution phase on base check, cleaning dependency, resolving duplicate error code

* wip

* trying to figure out why pipeline cannot copy files

* removing modules that don't actually need to be built.

* I messed up the version

---------

Co-authored-by: James Agnew <jamesagnew@gmail.com>

* Bump core to 5.6.881 (#4496)

* Bump core to 5.6.881-SNAPSHOT

* Work on fixing tests

* Work on fixing tests 2

* Bump to core release

---------

Co-authored-by: dotasek <david.otasek@smilecdr.com>

* Issue 4486 mdm inconsistent possible match score values (#4487)

* Extract method for readability

* Save always normalized score values in POSSIBLE_MATCH links.

* Avoid setting properties to null values. Adjust test.

* Simplify fix

* Fix test. Add RangeTestHelper.

---------

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>

* Revert "cleaning up checkstyle files (#4470)"

This reverts commit efae3b5d5f.

* core version fix

* Loosen rules for id helper

* License

* fix batch2 reduction step (#4499)

* fix bug where FINALIZE jobs are not cancellable

* moved reduction step to message hander

* moving reduction step to queue

* addingchangelog

* cleaning up

* review fixes

* review fix'

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* Scheduled batch 2 bulk export job and binary delete (#4492)

* First commit:  Scheduled batch 2 bulk export job delete and binary, incomplete mock-based unit test, and a mess of TODOs and code that needs to be deleted.

* Refine solution and add a concrete unit test but still work to do.

* Comment out code in cancelAndPurgeAllJobs() and see if it breaks the pipeline.

* Unit tests complete.  New Msg code for new IJobPersistence.fetchInstances() method.  Cleanup TODOs and add others.

* Finish final touches on implementation.

* Add changelog.

* Various cleanup.

* Code review feedback.

* Small tweak to changelog.

* Last code review tweak.

* Address more code review comments.

* Reverse changes to consider work chunks.  Add a constant for write-to-binary.

* Change bulk import test for valueUri type (#4503)

* change tests

* suggested test change

* CVE resolutions (#4513)

* Bump Postgres for CVE

* Bump jetty

* Verison bump

* Remove comments

* Revrt bump

* Add check in scanner (#4518)

* 4516 create hapi fhir cli command to clear stale lock entries (#4517)

* Initial implementation

* better tests

* Add changelog and docs

* Forgotten files

* Code review comments

* Fix checkstyle

* Unable to Expunge CodeSystem (#4507)

* changes for GL-3943

* changes for GL-3943

---------

Co-authored-by: isaacwen <isaac.wen@smilecdr.com>

* New line::

* Update to documentation regarding narrative generation; (#4521)

Providing changelog;

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* changed what score is set for mdmlinks that created new golden resource (#4514)

* changed what score is set for mdmlinks that created new golden resource

* fix test

---------

Co-authored-by: Long Ma <long@smilecdr.com>

* REVERT: change to operationoutcome.html

* trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNo… (#4527)

* trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNotShowUp

* added change log

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* fix build (#4530)

* Making narrative_generation.md reference an html snippet (#4531)

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* fixed the issue of meta.source field inconsistently populated in subscription messages for different requests (#4524)

* fix + test

* minor fix

* Addressing suggestion

* Minor changes

* 4441 rel 6 4 bad references creation bug (#4519)

* adding a test

* fail in the case of ref enforce on type and on write and autocreate are all true

* update to code

* removing a line

* cleanup

* removing check on urn

* changing just to trigger a build

* adding a comment to the pom

* updating test for better information

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* fixed channel import null pointer exception from null header (#4534)

* retryCount 0 on null header + test + changelog

* suggested changes

* Revert "fixed the issue of meta.source field inconsistently populated in subscription messages for different requests (#4524)" (#4535)

This reverts commit 53252b8d15.

* Better error handling for when channel type is not supported (#4538)

Co-authored-by: kylejule <kyle.jule@smilecdr.com>

* Avoid logging message payloads that contain sensitive data (#4537)

Don't log payloads - they may contain sensitive data.

* Bulk Export Bug With Many Resources and Low Max File Size (#4506)

* failing test

* fix + changelog

* tweak

* add method to IJobPersistence to use a Stream

* tweak

* tweak

* decrease test time

* clean up

* code review comments

* version bump

* Increase timeout limit to match BulkExportUseCaseTest

* shorten test

* maintenance pass

* add logging

* Revert "add logging"

This reverts commit b0453fd953.

* Revert "maintenance pass"

This reverts commit bbc7418d51.

* test

* trying to fix BulkDataExportTest testGroupBulkExportNotInGroup_DoesNotShowUp

* shorten tests

* logging

* move test location

* fixes a regression caused my change in hapi-fhir

* timeout

* Revert "fixes a regression caused my change in hapi-fhir"

This reverts commit 4b58013149.

* testing

* Revert "testing"

This reverts commit aafc95c2f3.

---------

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* bump ver

* License updates'

* Remove checkstyle

* Verison bump

* Move migrations

* semicolon

---------

Co-authored-by: James Agnew <jamesagnew@gmail.com>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Nathan Doef <n.doef@protonmail.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: Luke deGruchy <luke.degruchy@smilecdr.com>
Co-authored-by: Mark Iantorno <markiantorno@gmail.com>
Co-authored-by: dotasek <dotasek.dev@gmail.com>
Co-authored-by: dotasek <david.otasek@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>
Co-authored-by: samguntersmilecdr <123124187+samguntersmilecdr@users.noreply.github.com>
Co-authored-by: Isaac Wen <76772867+isaacwen@users.noreply.github.com>
Co-authored-by: isaacwen <isaac.wen@smilecdr.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: KGJ-software <39975592+KGJ-software@users.noreply.github.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-02-13 13:23:25 -08:00
Tadgh 54c9b9422a
Bump to 6.5 post-release-branch (#4472)
* Create version enum and bump

* Version bump

* fix typo
2023-01-28 09:28:15 -08:00
michaelabuckley 10060bef7f
Batch option processing cleanup (#4466)
* BulkDataExportOptions null safety
2023-01-26 11:50:45 -05:00
Tadgh 456cc81b32
Rel 6 2 5 mergeback (#4459)
* jm wrong bundle entry url (#4213)

* Bug test

* here you go

* Generate relative URIs for bundle entry.request.url, as specified

* Point jira issue in changelog

* Adjust tests to fixes

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

* improved logging (#4217)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Rel 6 1 3 mergeback (#4215)

* Bump for CVE (#3856)

* Bump for CVE

* Bump spring-data version

* Fix compile

* Cut over to spring bom

* Bump to RC1

* remove RC

* do not contrain reindex for common SP updates (#3876)

* only fast-track jobs with exactly one chunk (#3879)

* Fix illegalstateexception when an exception is thrown during stream response (#3882)

* Finish up changelog, minor refactor

* reset buffer only

* Hack for some replacements

* Failure handling

* wip

* Fixed the issue (#3845)

* Fixed the issue

* Changelog modification

* Changelog modification

* Implemented seventh character extended code and the corresponding dis… (#3709)

* Implemented seventh character extended code and the corresponding display

* Modifications

* Changes on previous test according to modifications made in ICD10-CM XML file

* Subscription sending delete events being skipped (#3888)

* fixed bug and added test

* refactor

* Update for CVE (#3895)

* updated pointcuts to work as intended (#3903)

* updated pointcuts to work as intended

* added changelog

* review fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* 3904 during $delete expunge job hibernate search indexed documents are left orphaned (#3905)

* Add test and implementation

* Add changelog

* 3899 code in limits (#3901)

* Add implementation, changelog, test

* Update hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java

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

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

* 3884 overlapping searchparameter undetected rel 6 1 (#3909)

* Applying all changes from previous dev branch to current one pointing to rel_6_1

* Fixing merge conflict related to Msg.code value.

* Fixing Msg.code value.

* Making checkstyle happy.

* Making sure that all tests are passing.

* Passing all tests after fixing Msg.code

* Passing all tests.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* 3745 - fixed NPE for bundle with duplicate conditional create resourc… (#3746)

* 3745 - fixed NPE for bundle with duplicate conditional create resources and a conditional delete

* created unit test for skip of delete operation while processing duplicating create entries

* moved unit test to FhirSystemDaoR4Test

* 3379 mdm fixes (#3906)

* added MdmLinkCreateSvcimplTest

* fixed creating mdm-link not setting the resource type correctly

* fixed a bug where ResourcePersistenceId was being duplicated instead of passed on

* Update hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkCreateSvcImplTest.java

Change order of tests such that assertEquals takes expected value then actual value

Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* added changelog, also changed a setup function in test to beforeeach

Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* Fix to the issue (#3855)

* Fix to the issue

* Progress

* fixed the issue

* Addressing suggestions

* add response status code to MethodOutcome

* Addressing suggestions

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Fix for caching appearing broken in batch2 for bulkexport jobs (#3912)

* Respect caching in bullk export, fix bug with completed date on empty jobs

* add changelog

* Add impl

* Add breaking test

* Complete failing test

* more broken tests

* Fix more tests'

* Fix paging bug

* Fix another brittle test

* 3915 do not collapse rules with filters (#3916)

* do not attempt to merge compartment permissions with filters

* changelog

* Rename to IT for concurrency problems

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

* Version bump

* fix $mdm-submit output (#3917)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Gl3407 bundle offset size (#3918)

* begin with failing test

* fixed

* change log

* rollback default count change and corresponding comments

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Offset interceptor now only works for external calls

* Initialize some beans (esp interceptors) later in the boot process so they don't slow down startup.

* do not reindex searchparam jobs on startup

* Fix oracle non-enterprise attempting online index add (#3925)

* 3922 delete expunge large dataset (#3923)

* lower batchsize of delete requests so that we do not get sql exceptions

* blah

* fix test

* updated tests to not fail

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* add index

* Fix up colun grab

* Revert offset mode change

* Revert fix for null/system request details checks for reindex purposes

* Fix bug and add test for SP Validating Interceptor (#3930)

* wip

* Fix uptests

* Fix index online test

* Fix SP validating interceptor logic

* Updating version to: 6.1.1 post release.

* fix compile error

* Deploy to sonatype (#3934)

* adding sonatype profile to checkstyle module

* adding sonatype profile to tinder module

* adding sonatype profile to base pom

* adding final deployToSonatype profile

* wip

* Revert version enum

* Updating version to: 6.1.1 post release.

* Add test, changelog, and implementation

* Add backport info

* Create failing test

* Implemented the fix, fixed existing unit tests

* added changelog

* added test case for no filter, exclude 1 patient

* wip

* Add backport info

* Add info of new version

* Updating version to: 6.1.2 post release.

* bump info and backport for 6.1.2

* Bump for hapi

* Implement bug fixes, add new tests (#4022)

* Implement bug fixes, add new tests

* tidy

* Tidy

* refactor for cleaning

* More tidying

* Lower logging

* Split into nested tests, rename, add todos

* Typo

* Code review

* add backport info

* Updating version to: 6.1.3 post release.

* Updating version to: 6.1.3 post release.

* removed duplicate mention of ver 6.1.3 in versionEnum

* backport pr 4101

* mdm message key (#4111)

* begin with failing test

* fixed 2 tests

* fix tests

* fix tests

* change log

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* backport 6.1.3 docs changes

* fixed typo on doc backport message

* fix test breaking

* Updating version to: 6.1.4 post release.

* wip

Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>

* pin okio-jvm for kotlin vuln (#4216)

* Fix UrlUtil.unescape() by not escaping "+" to " " if this is an "application/..." _outputFormat. (#4220)

* First commit:  Failing unit test and a TODO with a vague idea of where the bug happens.

* Don't escape "+" in a URL GET parameter if it starts with "application".

* Remove unnecessary TODO.

* Add changelog.

* Code review feedback on naming.  Also, make logic more robust by putting plus and should escape boolean && in parens.

* Ks 20221031 migration lock (#4224)

* started design

* complete with tests

* changelog

* cleanup

* tyop

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* 4207-getpagesoffset-set-to-total-number-of-resources-results-in-inconsistent-amount-of-entries-when-requests-are-sent-consecutively (#4209)

* Added test

* Added solution

* Changelog

* Changes made based on comments

* Fix bug with MDM submit

* fix

* Version bump

* 4234 consent in conjunction with versionedapiconverterinterceptor fails (#4236)

* Add constant for interceptor

* add test, changelog

* Allow Batch2 transition from ERRORED to COMPLETE (#4242)

* Allow Batch2 transition from ERRORED to COMPLETE

* Add changelog

* Test fix

Co-authored-by: James Agnew <james@jamess-mbp.lan>

* 3685 When bulk exporting, if no resource type param is provided, defa… (#4233)

* 3685 When bulk exporting, if no resource type param is provided, default to all registered types.

* Update test case.

* Cleaned up changelog.

* Added test case for multiple resource types.

* Added failing test case for not returning Binary resource.

* Refactor solution.

Co-authored-by: kylejule <kyle.jule@smilecdr.com>

* Add next version

* bulk export permanently reusing cached results (#4249)

* Add test, fix bug, add changelog

* minor refactor

* Fix broken test

* Smile 4892 DocumentReference Attachment url (#4237)

* failing test

* fix

* increase test Attachment url size to new max

* decrease limit to 500

* ci fix

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>

* Overlapping SearchParameter with the same code and base are not allowed (#4253)

* Overlapping SearchParameter with the same code and base are not allowed

* Fix existing tests according to changes

* Cleanup dead code and remove related tests

* Version Bump

* ignore misfires in quartz

* Allowing Failures On Index Drops (#4272)

* Allowing failure on index drops.

* Adding changeLog

* Modification to changelog following code review.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Revert "ignore misfires in quartz"

This reverts commit 15c74a46bc.

* Ignore misfires in quartz (#4273)

* Reindex Behaviour Issues (#4261)

* fixmes for ND

* address FIXME comments

* fix tests

* increase max retries

* fix resource id chunking logic

* fix test

* add modular patient

* change log

* version bump

Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>

* Set official Version

* license

* Fix up numbers

* Fix up numbers

* Update numbers

* wip

* fix numbers

* Fix test:

* Fix more tests

* TEMP FIX FOR BUILD

* wip

* Updating version to: 6.2.1 post release.

* Add a whack of logging

* wip

* add implementation

* wip and test

* wip

* last-second-fetch

* expose useful method

* remove 10000 limit

* Strip some logging

* Fix up logging

* Unpublicize method

* Fix version

* Make minor changes

* once again on 6.2.1

* re-add version enum

* add folder

* fix test

* DIsable busted test

* Disable more broken tests

* Only submit queued chunks

* Quiet log

* Fix wrong pinned version

* Updating version to: 6.2.2 post release.

* fixes for https://github.com/hapifhir/hapi-fhir/issues/4277 and https… (#4291)

* fixes for https://github.com/hapifhir/hapi-fhir/issues/4277 and https://github.com/hapifhir/hapi-fhir/issues/4276

* Credit for #4291

Co-authored-by: James Agnew <jamesagnew@gmail.com>

* backport and changelog for 6.2.2

* Updating version to: 6.2.3 post release.

* fix https://simpaticois.atlassian.net/browse/SMILE-5781

* Version bump to 6.2.3-SNAPSHOT

* Auto retry on MDM Clear conflicts (#4398)

* Auto-retry mdm-clear on conflict

* Add changelog

* Build fix

* Disable failing test

* Update to 6.2.3 again

* Update license dates

* Dont fail on batch2 double delivery (#4400)

* Don't fail on Batch2 double delivery

* Add changelog

* Update docker for release ppipeline

* Updating version to: 6.2.4 post release.

* Add test and implementation to fix potential NPE in pre-show resources (#4388)

* Add test and implementation to fix potential NPE in pre-show resources

* add test

* WIP getting identical test scenario

* More robust solution

* Finalize Code

* Add changelog, move a bunch of changelogs

* Remove not needed test

* Minor refactor and reporting

* Fix up megeback

* update backport info

* update backport info

* Updating version to: 6.2.5 post release.

* Prevent chunk from returning to in-progress unless it is errorred, in-progress, or queued

* changelog

* Update logger

* Indicate backport

* Add version and upgrade info. add backport

* hapi-fhir side done

* cdr side

* add assert

* add test

* Fix import

* prevent multiple reduction step runs in maintenance run (#4423)

* setting job to inprog to prevent multiple maintenance passes from running reduction steps

* added a new status

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>

* Add backport info

* Fix up tests

* Fix discrepancies

* Fix test

* Version bump

* bump ips

Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Luke deGruchy <luke.degruchy@smilecdr.com>
Co-authored-by: karneet1212 <112980019+karneet1212@users.noreply.github.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
Co-authored-by: James Agnew <james@jamess-mbp.lan>
Co-authored-by: KGJ-software <39975592+KGJ-software@users.noreply.github.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
Co-authored-by: Nathan Doef <n.doef@protonmail.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>
2023-01-24 17:38:35 -08:00
James Agnew d584e14048
Add IPS Generator (#4438)
* Begin IPS refactor

* Commit work so far

* Fix test bug

* Fix typo

* Fix typo

* Narrative generator cleanup

* Narrative generator working

* Add test for bad reference in narrative

* Tests passing

* Start docs

* Tests passing

* Cleanup

* Update cyangelog

* Doc tweaks

* Version bump

* Address review comments

* Address review comments

* Build fix

* Cleanup

* Compile fix

* Test fix

* Test fix

* Version bump

* Build update

* Test fix

* Test fix

* Add one utility method

* Add doc
2023-01-24 12:07:36 -05:00
Ken Stevens 5dda16d467
Reduce postconstruct use (#4445) 2023-01-21 00:37:58 -05:00
Ken Stevens bf53a08b83
Batch2 fastracking configurable (#4453)
* licenses

* hapi-fhir side done

* cdr side

* add assert

* add test

* bump hapi version

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-01-20 19:03:13 -05:00
Qingyixia 663834ddfe
Added resourceType as a parameter to $mdm-duplicate-golden-resources operation (#4434)
* Solution + changelog

* Addressing suggestions

* Minor changes

* Version Bump
2023-01-19 08:43:44 -05:00
TipzCM 23b593aa17
breaking up package installer and package config (#4319)
* breaking up package installer and package config

* breaking out parsing of resources

* wrong nullable

* added an integration test

* adding a changelog

* added a few minor tests

* review fixes

* unit test fixes

* fixing code checkstyle

* moving fetching local package data to package loader svc

* updating the method name

* splitting the fhirversion parsing

* updating table creation task for pretty printing and use in RTE

* adding foreign keys

* Adding mroe info

* minor prettiness changes

* fixing fk generation

* minor changes

* update version

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2023-01-17 01:58:14 +00:00
Ken Stevens 04c28b6c08
Schedule jobs via IJobScheduler instead of in @PostConstruct (#4415)
* parameterizing BinaryStorageInterceptor

* parameterizing BinaryStorageInterceptor

* changed jobs scheduling from @PostConstruct to coordinated by HapiLifecycleService events

* fix test

* remove events for now

* fix test

* simplify design

* FIXME

* changelog

* fix compile issue

* review feedback.  partially implemented

* review feedback

* review feedback

* bump hapi version to 6.3.8-SNAPSHOT

* fix test

* mirror contextclosedevent handlers with contextrefreshedevent

* version bump

* licenses

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2023-01-14 23:51:04 -05:00
James Agnew d0a77f4322
Clean up ResourceMetadataKeyEnum (#4425)
* Clean up ResourceMetadataKeyEnum

* Compile fix

* Test fix

* Test fix

* Change

* Test fixes
2023-01-12 11:22:40 -05:00
Justin McKelvy 8c48a6fb91
Clinical reasoning module (#4347)
* Add new Clinical Reasoning module

* Add config to get test up and running

* Removed FhirClient from tests

* First passing test

* Remove unused utilities

* Build updates

* exclude xxp3 and substitute with unbundled version

* Refactor to use provider factory and loader pattern

* First passing dstu3 test

* CR r4 test config and immunization tests

* Add base test classes

* Exclude transitive dependency xmlpull

* More dependency cleanup

* Refactor to remove JPA dependencies, rename module to hapi-fhir-storage-cr

* Fixes for duplicate xpp3 classes

* Remove more references to jpa

* Add mock FHIR server for terminology endpoint tests

* fix cql file for making providerr4 tests pass

* fix pom

* fix generic

* Adding r4 test cases for measure operations.

* Fix endpoint tests

* javadoc comment, temporarily comment out test results for practitioner sync

* javadoc typo fix

* adding java docs for cr module WIP

* Updates to clinical reasoning documentation

* More documentation updates

* docs now compile

* fix test

* DqmR4IT now successfully starts up, but the test does not pass

* Fix additionalData test

* Make measure service bean overridable

* adding clinical reasoning javadoc information

* Rename interfaces to start with I

* More styleguide updates

* Reformat all code in the storage-cr module

* More coding convention updates

* Remove bunches of unused code, reogranize so that fhir version in package name is consistent

* Clean up some static array initializations

* add practitioner patient list

* refactor product-line constant

* test dependency update

* add change log for cr module

* Add hapi-validation to the pom

* Exclude dependencies that are causing duplicates

* More dependencies and exclusions

* Make some base MeasureService components protected

* Update to latest cql compiler release

* fix measure service for null subject & practitioner and open up practitioner test

* Rev to release versions

* Add remaining Dstu3 tests

* update hedis bundle from policyHolder to beneficiary

* update snapshot

* Delete old CQL module

* Post-master-merge recovery

* Fix Java 17 feature usage issue

* update changelog with more information about new functionality

* Remove support chain wrapper usage

* Add javadocs to IResourceLoader

* added the property versioning for antlr jar.

* addressing code review comments.

* addressing code review comments.

* Fix typos in changelog

* Remove azure pipeline for cql module, add it for cr module

* Address exception comments, add Msg.code calls to exceptions

* Fix self-assignment bug

* Add storage-cr module to bom

* addressing coding comments.

* Addressed the variable naming convention to camelCase.

* Snapshot version bump

Co-authored-by: Brenin Rhodes <brenin@alphora.com>
Co-authored-by: Jonathan Percival <jonathan.i.percival@gmail.com>
Co-authored-by: justin.mckelvy <justin.mckelvy@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: Chalma Maadaadi <chalma@alphora.com>
Co-authored-by: mdnazmulkarim <nazmul.karim@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2023-01-10 19:49:57 +00:00
Tadgh f2f29a1a32 Add forgotten license changes 2023-01-05 17:31:43 -08:00
karneet1212 cfa6c13262
Add resource type as a parameter for $mdm-query-links (#4372)
* Added Solution + test

* Removed old methods

* fixed issues

* Added refactoring

* Deprecated methods on the interfaces

* Remove todo

* Documentation

* Changelog

* Changelog

* Changelog

* Changes made based on comments

* Changes made based on comments

* Clean up

* hapi bumping to version 6.3.6-SNAPSHOT

* hapi bumping to version 6.3.6-SNAPSHOT
2022-12-22 09:54:32 -05:00
James Agnew 0d5f8da93f
API improvements for MegaScale (#4112)
* Start work on sharded DB

* Work on migrating

* Work

* Ongoing work

* Ongoing work

* Work

* Work

* Ongoing work

* Work

* Work

* Test fix

* Test fix

* Work

* Compile fix

* Test cleanup

* Test fix

* Resolve fixmes

* Resolve fixme

* Resolve compile errors

* Compile fix

* Fixes

* Work

* Add note for later

* Test fix

* Test fixes

* Build fix

* Test fixes

* Fixes

* Test fixes

* Test fixes

* Test fixes

* Test fix

* Fixes

* Fixes

* Remove dead code in pom

* More test cleanup

* Docs fix

* Changes

* Fix

* Fixes

* Resolve merge conflicts

* Build update

* Merge build fixes

* Version bump

* Address review comments

* Review comments

* Review comments

* Test fixes

* Test fix

* Cleanup
2022-12-20 12:05:15 -05:00
Nathan Doef 7b86eda8a9
Refactor Common SearchParameter Functionality (#4321)
* refactor checkpoint

* clean up

* add method to find runtime search param by id

* new search param cache tests

* extract SearchParameter validation functionality

* create common interface for combo searchparameters

* Remove ResourceTable from extractor interface

* clean up

* move SearchParameterDaoValidator

* resolve code review comments

* remove reflection

* change log

* bump version to 6.3.4-SNAPSHOT

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
2022-12-15 06:46:45 -05:00
kateryna-mironova 017cc4e29c
4244 - Deprecate usages of ResourcePersitentId in jpa (#4245)
* init rev

* id to jpa and mongo id

* 3444 - replaced methods and constructors of ResourcePersistentId with child constructors and methods

* 3444 - replaced methods and constructors of ResourcePersistentId with child constructors and methods

* fixed conflicts, pulled from master

* fixed code for passing tests successfully

* changed PersistentId to Jpa in MdmSearchInterceptor

* added the todo comments with questions

* added one more question

* renamed TODO questions

* first pass at converting to generic ResourcePersistentId

* fix test

* fix test

* fix test

* make ResourcePersistentId abstract

* Generic type MdmLink

* Final TODOs

* Final TODOs

* cleanup

* fix test

* fix id to string

* fix cyclic package dep

* add <?> to Base so we can extract interface

* Revert "add <?> to Base so we can extract interface"

This reverts commit a806f3d2bc.

* switch to interface

* javadoc

* replace base with interface

* fix test

* add generic template to mdmdao

* remove unneccessary JpaPid casts

* remove unneccessary JpaPid casts

* remove unneccessary JpaPid casts

* remove unneccessary MongoPid casts

* fix test

* fix regression

* fix compile issues arising from merging master

* fix beans

* bump version to 6.3.3-SNAPSHOT

* change logs

* review feedback

* review feedback

* fixme

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-12-09 09:30:51 -05:00
Ken Stevens f4ce765122
IndexedSearchParamExtractor regression returned wrong number of links pre-persistence (#4341)
* fixed the issue

* change log

* fix regression

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-12-08 05:22:51 +00:00
Etienne Poirier f13b247c74
4324 excessive amount of time required to update large group resources (#4332)
* Initial test.

* Solution implementation with test adjustment.

* Adding changelog.

* Modifications following first code review.

* Moving changelog to 6.4.0

* Further reductions in query counts

* Fix for broken test

* Test fix

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2022-12-07 15:27:33 +00:00
James Agnew 50ca94eded
Improve JPA response messages (#4293)
* Improve JPA response messages

* FIxes

* Test fixes

* Test fixes

* Ongoing testing

* Work on messages

* Work on messages

* Add valueset

* Add response code enum

* Version bump

* Undo bump

* Improve changelog

* Test fixes

* Add javadocs

* Version bump HAPI

* Test fixes

* Test fix

* Test fixes

* Test fixes

* Account for review changes

* Test fix

* Docs fix

* Work on API

* Improve SqlQuery api
2022-11-28 07:52:12 -05:00
James Agnew c3697a5f87
JPA Cleanup (#4278)
* JPA cleanup

* Test fixes

* Cleanup

* Resolve fixme

* Fix bad changelog entry

* A bit of documentation reworking

* Version bump

* POM bump

* Avoid timeout

* Build fix

* HTMLUnit bump
2022-11-24 14:32:56 -05:00
Tadgh b1e3468dcd
Rel 6 2 1 mergeback (#4288)
* jm wrong bundle entry url (#4213)

* Bug test

* here you go

* Generate relative URIs for bundle entry.request.url, as specified

* Point jira issue in changelog

* Adjust tests to fixes

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

* improved logging (#4217)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Rel 6 1 3 mergeback (#4215)

* Bump for CVE (#3856)

* Bump for CVE

* Bump spring-data version

* Fix compile

* Cut over to spring bom

* Bump to RC1

* remove RC

* do not contrain reindex for common SP updates (#3876)

* only fast-track jobs with exactly one chunk (#3879)

* Fix illegalstateexception when an exception is thrown during stream response (#3882)

* Finish up changelog, minor refactor

* reset buffer only

* Hack for some replacements

* Failure handling

* wip

* Fixed the issue (#3845)

* Fixed the issue

* Changelog modification

* Changelog modification

* Implemented seventh character extended code and the corresponding dis… (#3709)

* Implemented seventh character extended code and the corresponding display

* Modifications

* Changes on previous test according to modifications made in ICD10-CM XML file

* Subscription sending delete events being skipped (#3888)

* fixed bug and added test

* refactor

* Update for CVE (#3895)

* updated pointcuts to work as intended (#3903)

* updated pointcuts to work as intended

* added changelog

* review fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* 3904 during $delete expunge job hibernate search indexed documents are left orphaned (#3905)

* Add test and implementation

* Add changelog

* 3899 code in limits (#3901)

* Add implementation, changelog, test

* Update hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java

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

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

* 3884 overlapping searchparameter undetected rel 6 1 (#3909)

* Applying all changes from previous dev branch to current one pointing to rel_6_1

* Fixing merge conflict related to Msg.code value.

* Fixing Msg.code value.

* Making checkstyle happy.

* Making sure that all tests are passing.

* Passing all tests after fixing Msg.code

* Passing all tests.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* 3745 - fixed NPE for bundle with duplicate conditional create resourc… (#3746)

* 3745 - fixed NPE for bundle with duplicate conditional create resources and a conditional delete

* created unit test for skip of delete operation while processing duplicating create entries

* moved unit test to FhirSystemDaoR4Test

* 3379 mdm fixes (#3906)

* added MdmLinkCreateSvcimplTest

* fixed creating mdm-link not setting the resource type correctly

* fixed a bug where ResourcePersistenceId was being duplicated instead of passed on

* Update hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkCreateSvcImplTest.java

Change order of tests such that assertEquals takes expected value then actual value

Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* added changelog, also changed a setup function in test to beforeeach

Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* Fix to the issue (#3855)

* Fix to the issue

* Progress

* fixed the issue

* Addressing suggestions

* add response status code to MethodOutcome

* Addressing suggestions

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Fix for caching appearing broken in batch2 for bulkexport jobs (#3912)

* Respect caching in bullk export, fix bug with completed date on empty jobs

* add changelog

* Add impl

* Add breaking test

* Complete failing test

* more broken tests

* Fix more tests'

* Fix paging bug

* Fix another brittle test

* 3915 do not collapse rules with filters (#3916)

* do not attempt to merge compartment permissions with filters

* changelog

* Rename to IT for concurrency problems

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

* Version bump

* fix $mdm-submit output (#3917)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Gl3407 bundle offset size (#3918)

* begin with failing test

* fixed

* change log

* rollback default count change and corresponding comments

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Offset interceptor now only works for external calls

* Initialize some beans (esp interceptors) later in the boot process so they don't slow down startup.

* do not reindex searchparam jobs on startup

* Fix oracle non-enterprise attempting online index add (#3925)

* 3922 delete expunge large dataset (#3923)

* lower batchsize of delete requests so that we do not get sql exceptions

* blah

* fix test

* updated tests to not fail

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* add index

* Fix up colun grab

* Revert offset mode change

* Revert fix for null/system request details checks for reindex purposes

* Fix bug and add test for SP Validating Interceptor (#3930)

* wip

* Fix uptests

* Fix index online test

* Fix SP validating interceptor logic

* Updating version to: 6.1.1 post release.

* fix compile error

* Deploy to sonatype (#3934)

* adding sonatype profile to checkstyle module

* adding sonatype profile to tinder module

* adding sonatype profile to base pom

* adding final deployToSonatype profile

* wip

* Revert version enum

* Updating version to: 6.1.1 post release.

* Add test, changelog, and implementation

* Add backport info

* Create failing test

* Implemented the fix, fixed existing unit tests

* added changelog

* added test case for no filter, exclude 1 patient

* wip

* Add backport info

* Add info of new version

* Updating version to: 6.1.2 post release.

* bump info and backport for 6.1.2

* Bump for hapi

* Implement bug fixes, add new tests (#4022)

* Implement bug fixes, add new tests

* tidy

* Tidy

* refactor for cleaning

* More tidying

* Lower logging

* Split into nested tests, rename, add todos

* Typo

* Code review

* add backport info

* Updating version to: 6.1.3 post release.

* Updating version to: 6.1.3 post release.

* removed duplicate mention of ver 6.1.3 in versionEnum

* backport pr 4101

* mdm message key (#4111)

* begin with failing test

* fixed 2 tests

* fix tests

* fix tests

* change log

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* backport 6.1.3 docs changes

* fixed typo on doc backport message

* fix test breaking

* Updating version to: 6.1.4 post release.

* wip

Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>

* pin okio-jvm for kotlin vuln (#4216)

* Fix UrlUtil.unescape() by not escaping "+" to " " if this is an "application/..." _outputFormat. (#4220)

* First commit:  Failing unit test and a TODO with a vague idea of where the bug happens.

* Don't escape "+" in a URL GET parameter if it starts with "application".

* Remove unnecessary TODO.

* Add changelog.

* Code review feedback on naming.  Also, make logic more robust by putting plus and should escape boolean && in parens.

* Ks 20221031 migration lock (#4224)

* started design

* complete with tests

* changelog

* cleanup

* tyop

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* 4207-getpagesoffset-set-to-total-number-of-resources-results-in-inconsistent-amount-of-entries-when-requests-are-sent-consecutively (#4209)

* Added test

* Added solution

* Changelog

* Changes made based on comments

* Fix bug with MDM submit

* fix

* Version bump

* 4234 consent in conjunction with versionedapiconverterinterceptor fails (#4236)

* Add constant for interceptor

* add test, changelog

* Allow Batch2 transition from ERRORED to COMPLETE (#4242)

* Allow Batch2 transition from ERRORED to COMPLETE

* Add changelog

* Test fix

Co-authored-by: James Agnew <james@jamess-mbp.lan>

* 3685 When bulk exporting, if no resource type param is provided, defa… (#4233)

* 3685 When bulk exporting, if no resource type param is provided, default to all registered types.

* Update test case.

* Cleaned up changelog.

* Added test case for multiple resource types.

* Added failing test case for not returning Binary resource.

* Refactor solution.

Co-authored-by: kylejule <kyle.jule@smilecdr.com>

* Add next version

* bulk export permanently reusing cached results (#4249)

* Add test, fix bug, add changelog

* minor refactor

* Fix broken test

* Smile 4892 DocumentReference Attachment url (#4237)

* failing test

* fix

* increase test Attachment url size to new max

* decrease limit to 500

* ci fix

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>

* Overlapping SearchParameter with the same code and base are not allowed (#4253)

* Overlapping SearchParameter with the same code and base are not allowed

* Fix existing tests according to changes

* Cleanup dead code and remove related tests

* Version Bump

* ignore misfires in quartz

* Allowing Failures On Index Drops (#4272)

* Allowing failure on index drops.

* Adding changeLog

* Modification to changelog following code review.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* Revert "ignore misfires in quartz"

This reverts commit 15c74a46bc.

* Ignore misfires in quartz (#4273)

* Reindex Behaviour Issues (#4261)

* fixmes for ND

* address FIXME comments

* fix tests

* increase max retries

* fix resource id chunking logic

* fix test

* add modular patient

* change log

* version bump

Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>

* Set official Version

* license

* Fix up numbers

* Fix up numbers

* Update numbers

* wip

* fix numbers

* Fix test:

* Fix more tests

* TEMP FIX FOR BUILD

* wip

* Updating version to: 6.2.1 post release.

* Add a whack of logging

* wip

* add implementation

* wip and test

* wip

* last-second-fetch

* expose useful method

* remove 10000 limit

* Strip some logging

* Fix up logging

* Unpublicize method

* Fix version

* Make minor changes

* once again on 6.2.1

* re-add version enum

* add folder

* fix test

* DIsable busted test

* Disable more broken tests

* Only submit queued chunks

* Quiet log

* Fix up checkstyle

* log to console

* Remove double import

* Version bump

* licenses

* Fix up version

* fix build

* wip

* wip

* Fix up search expansion to use new behaviour of idhelper service

* Fix up MDM Search Expansion

Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Luke deGruchy <luke.degruchy@smilecdr.com>
Co-authored-by: karneet1212 <112980019+karneet1212@users.noreply.github.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
Co-authored-by: James Agnew <james@jamess-mbp.lan>
Co-authored-by: KGJ-software <39975592+KGJ-software@users.noreply.github.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
Co-authored-by: Nathan Doef <n.doef@protonmail.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
2022-11-20 08:14:28 -08:00
michaelabuckley 6c4283e930
Start moving forced-id inline to ResourceTable (#4260)
New fhir_id column in HFJ_RESOURCE.

Migration, changelog, and insert hook for inline fhir_id column.
2022-11-16 13:38:52 -05:00
jmarchionatto 2df09c0cf3
Issue 4214 bulk export group observations missed when search parameter indexing enabled (#4241)
* Add failing test

* Add failing test for hsearch reference without type

* Modify cache to store forcedid type

* Disable failing test until finding out if it is a bug and strategy for fix in that case

* Remove fixmes and commented lines

* Update test. Add changelog.

* Added test that passes on this branch.

* Added Encounters to test case.

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
2022-11-11 20:08:41 +00:00
James Agnew 9a45576793
Cache service loaders (#4196)
* Extracting a Cache interface and building service loaders for Caffeine and Guava

* Fix estimated size interface

* Use LoadingCache when needed.

* Removing Caffeine from dependency lists.

* Adding hapi-fhir-cache-caffeine as a test dependency

* Putting caching solutions in a single module.

* Fixing the spacing

* Standardizing the use of TimeUnits

* Making a new module to simplify the switch of the cache library in tests.

* Making sure the Guava design matches the behavior of Caffeine.

* Making sure the Cache structure also does not throw InvalidCacheLoading exception to match the LoadingCache.

* Renaming module names for the caching group.

* Better error handing that informs devs what to do.

* Improving documentation

* Typo

* Matching error message design with Caffeine.

* Matching the behavior of Caffeine with Guava

* Final adjustments for the test dependencies on the cache modules.

* Fixing relative pom path.

* Adding caffeine as a testing requirement for the new modules.

* Add changelog and set JPA server to use caffeine cache

* POM fixes

* Build fix

* Buid fix

* Fixes

* Address review comment

* One more cache

* Move changelog to next release

* Update pom versions

* Build fix

* Build fixes

* Build fix

* Try to get build working

* Experiment with failing build

* Rever change

* Fix POM version

* Build fix

* Build fix

* Add Msg.code to new exceptions

Co-authored-by: Vitor Pamplona <vitor@vitorpamplona.com>
2022-11-09 19:47:23 +00:00
James Agnew b3ebbe7933
ValueSet cleanup (#4227)
* POST release deferred cleanup

* Fixes

* One more test fix

* Test fixes

* Test fixes

* Test cleanup

* Test fixes

* Fixes

* ValueSet cleanup

* Test fix

* Test fixes

* Fixes

* Test fixes

* Fixed

* Test fixes

* Test fixes

* Test fixes

* Test fixes

* Test fixc

* Build fix

* Fix merge artifact

* Build fix

* Work on tests

* Test fixes

* Work

* Fixes

* Changelog fix

* Add changelog

* Test fix

* Test fixes

* Fixes

* Test fixes

* Test fixes

* Test fixes

* Test fix

* Tests

* Bumps

* Fixes

* Add errorprone

* Drop bz2 bins

* POM fix

* Build fix

* Update

* Test fix

Co-authored-by: James Agnew <james@jamess-mbp.lan>
2022-11-08 22:18:36 -05:00
Tadgh d3367cfede
Rel 6 2 mergeback (#4257)
* jm wrong bundle entry url (#4213)

* Bug test

* here you go

* Generate relative URIs for bundle entry.request.url, as specified

* Point jira issue in changelog

* Adjust tests to fixes

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

* improved logging (#4217)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Rel 6 1 3 mergeback (#4215)

* Bump for CVE (#3856)

* Bump for CVE

* Bump spring-data version

* Fix compile

* Cut over to spring bom

* Bump to RC1

* remove RC

* do not contrain reindex for common SP updates (#3876)

* only fast-track jobs with exactly one chunk (#3879)

* Fix illegalstateexception when an exception is thrown during stream response (#3882)

* Finish up changelog, minor refactor

* reset buffer only

* Hack for some replacements

* Failure handling

* wip

* Fixed the issue (#3845)

* Fixed the issue

* Changelog modification

* Changelog modification

* Implemented seventh character extended code and the corresponding dis… (#3709)

* Implemented seventh character extended code and the corresponding display

* Modifications

* Changes on previous test according to modifications made in ICD10-CM XML file

* Subscription sending delete events being skipped (#3888)

* fixed bug and added test

* refactor

* Update for CVE (#3895)

* updated pointcuts to work as intended (#3903)

* updated pointcuts to work as intended

* added changelog

* review fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* 3904 during $delete expunge job hibernate search indexed documents are left orphaned (#3905)

* Add test and implementation

* Add changelog

* 3899 code in limits (#3901)

* Add implementation, changelog, test

* Update hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java

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

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

* 3884 overlapping searchparameter undetected rel 6 1 (#3909)

* Applying all changes from previous dev branch to current one pointing to rel_6_1

* Fixing merge conflict related to Msg.code value.

* Fixing Msg.code value.

* Making checkstyle happy.

* Making sure that all tests are passing.

* Passing all tests after fixing Msg.code

* Passing all tests.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* 3745 - fixed NPE for bundle with duplicate conditional create resourc… (#3746)

* 3745 - fixed NPE for bundle with duplicate conditional create resources and a conditional delete

* created unit test for skip of delete operation while processing duplicating create entries

* moved unit test to FhirSystemDaoR4Test

* 3379 mdm fixes (#3906)

* added MdmLinkCreateSvcimplTest

* fixed creating mdm-link not setting the resource type correctly

* fixed a bug where ResourcePersistenceId was being duplicated instead of passed on

* Update hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkCreateSvcImplTest.java

Change order of tests such that assertEquals takes expected value then actual value

Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* added changelog, also changed a setup function in test to beforeeach

Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* Fix to the issue (#3855)

* Fix to the issue

* Progress

* fixed the issue

* Addressing suggestions

* add response status code to MethodOutcome

* Addressing suggestions

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Fix for caching appearing broken in batch2 for bulkexport jobs (#3912)

* Respect caching in bullk export, fix bug with completed date on empty jobs

* add changelog

* Add impl

* Add breaking test

* Complete failing test

* more broken tests

* Fix more tests'

* Fix paging bug

* Fix another brittle test

* 3915 do not collapse rules with filters (#3916)

* do not attempt to merge compartment permissions with filters

* changelog

* Rename to IT for concurrency problems

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

* Version bump

* fix $mdm-submit output (#3917)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Gl3407 bundle offset size (#3918)

* begin with failing test

* fixed

* change log

* rollback default count change and corresponding comments

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Offset interceptor now only works for external calls

* Initialize some beans (esp interceptors) later in the boot process so they don't slow down startup.

* do not reindex searchparam jobs on startup

* Fix oracle non-enterprise attempting online index add (#3925)

* 3922 delete expunge large dataset (#3923)

* lower batchsize of delete requests so that we do not get sql exceptions

* blah

* fix test

* updated tests to not fail

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* add index

* Fix up colun grab

* Revert offset mode change

* Revert fix for null/system request details checks for reindex purposes

* Fix bug and add test for SP Validating Interceptor (#3930)

* wip

* Fix uptests

* Fix index online test

* Fix SP validating interceptor logic

* Updating version to: 6.1.1 post release.

* fix compile error

* Deploy to sonatype (#3934)

* adding sonatype profile to checkstyle module

* adding sonatype profile to tinder module

* adding sonatype profile to base pom

* adding final deployToSonatype profile

* wip

* Revert version enum

* Updating version to: 6.1.1 post release.

* Add test, changelog, and implementation

* Add backport info

* Create failing test

* Implemented the fix, fixed existing unit tests

* added changelog

* added test case for no filter, exclude 1 patient

* wip

* Add backport info

* Add info of new version

* Updating version to: 6.1.2 post release.

* bump info and backport for 6.1.2

* Bump for hapi

* Implement bug fixes, add new tests (#4022)

* Implement bug fixes, add new tests

* tidy

* Tidy

* refactor for cleaning

* More tidying

* Lower logging

* Split into nested tests, rename, add todos

* Typo

* Code review

* add backport info

* Updating version to: 6.1.3 post release.

* Updating version to: 6.1.3 post release.

* removed duplicate mention of ver 6.1.3 in versionEnum

* backport pr 4101

* mdm message key (#4111)

* begin with failing test

* fixed 2 tests

* fix tests

* fix tests

* change log

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* backport 6.1.3 docs changes

* fixed typo on doc backport message

* fix test breaking

* Updating version to: 6.1.4 post release.

* wip

Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>

* pin okio-jvm for kotlin vuln (#4216)

* Fix UrlUtil.unescape() by not escaping "+" to " " if this is an "application/..." _outputFormat. (#4220)

* First commit:  Failing unit test and a TODO with a vague idea of where the bug happens.

* Don't escape "+" in a URL GET parameter if it starts with "application".

* Remove unnecessary TODO.

* Add changelog.

* Code review feedback on naming.  Also, make logic more robust by putting plus and should escape boolean && in parens.

* Ks 20221031 migration lock (#4224)

* started design

* complete with tests

* changelog

* cleanup

* tyop

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* 4207-getpagesoffset-set-to-total-number-of-resources-results-in-inconsistent-amount-of-entries-when-requests-are-sent-consecutively (#4209)

* Added test

* Added solution

* Changelog

* Changes made based on comments

* Fix bug with MDM submit

* fix

* Version bump

* 4234 consent in conjunction with versionedapiconverterinterceptor fails (#4236)

* Add constant for interceptor

* add test, changelog

* Allow Batch2 transition from ERRORED to COMPLETE (#4242)

* Allow Batch2 transition from ERRORED to COMPLETE

* Add changelog

* Test fix

Co-authored-by: James Agnew <james@jamess-mbp.lan>

* 3685 When bulk exporting, if no resource type param is provided, defa… (#4233)

* 3685 When bulk exporting, if no resource type param is provided, default to all registered types.

* Update test case.

* Cleaned up changelog.

* Added test case for multiple resource types.

* Added failing test case for not returning Binary resource.

* Refactor solution.

Co-authored-by: kylejule <kyle.jule@smilecdr.com>

* Add next version

* bulk export permanently reusing cached results (#4249)

* Add test, fix bug, add changelog

* minor refactor

* Fix

* Bump HAPI version

* Remove jetbrains

* Fix broken test

Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Luke deGruchy <luke.degruchy@smilecdr.com>
Co-authored-by: karneet1212 <112980019+karneet1212@users.noreply.github.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
Co-authored-by: James Agnew <james@jamess-mbp.lan>
Co-authored-by: KGJ-software <39975592+KGJ-software@users.noreply.github.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
2022-11-07 23:57:57 +00:00
samuelwlee2 1b55f49a60
4153 extend $member match operation to store consent resource if matched (#4165)
* added senstive and regular filter

* add UUID to Consent

* blah

* fix merge with master

* fixing merge

* blah

* fhir tests

* use constructor injection

* put all tests together

* blah

* blah

* finalize

* add consent update patient and performer reference

* fixes after code review

* blah

* refactor to save consent once

* blah

* fix performer and add validation

* code clean up

* add changelog

* add hrex member match flag

* fix PatientMemberMatchOperationR4Test

* adding code fixes after code review

* move changelog file

* bump version

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-mbp.home>
2022-10-31 13:33:54 -04:00
Tadgh 31a193fbd3
Bump to 6.3.0 (#4211) 2022-10-28 02:40:59 +00:00
James Agnew 7a39f8cbaf
Make reference extractor more reusable (#4205)
* Refactor

* Make reference extractor more reusable

* Test fix

* Test fix

* Headers

* Small refactor
2022-10-27 21:31:39 -04:00
James Agnew a71b8fad56
Add R4B Support (#4150)
* Add r4b stuff

* Work on R4B

* Core version bump

* Revert some changes

* Add R4B

* Docs

* Test fixes

* Work on R4B

* Tests passgin

* Add config

* Work on merging

* Work

* Work

* Work

* Test fix

* Fixes

* Test fixes

* Test fix

* Work

* Work

* Fixes

* Test fixes

* Fixes

* Test fix

* Test fix

* Test fix

* Version bump

* Test fix

* Test fix

* ompile fixes

* Fix

* Resolve build warnings

* Updates

* Test fixes

* Fix docs
2022-10-20 13:57:06 -07:00
Etienne Poirier 4200ccf756
DatabaseBlobBinaryStorage service will only store blob up to Integer.MAX_VALUE (#4167)
* Modification of entity to support long.

* Adding Changelog.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-10-19 21:06:51 +00:00
Luke deGruchy 0798ab35db
ResourceIndexedSearchParamString: equals() and hashCode(): Add normalized String and use same fields for both calls. (#4148)
* Fix hashCode() to reflect equals() contract in ResourceIndexedSearchParamString.  Write ResourceIndexedSearchParamStringTest with new tests for normalized hashCode.

* Add un-hashed normalized value to ResourceIndexedSearchParamString equals() and hashCode() with comments about potential performance implications.

* Add changelog.  Remove TODOs.

* Inline hashCode.

* Fix comment and issue number and rename changelog.
2022-10-19 14:13:21 -04:00
KGJ-software 69d55b7184
3052 Changed IBinaryStorageSvc MaximumBinarySize from int to long. (#4123)
* 3052 Changed IBinaryStorageSvc MaximumBinarySize from int to long.

* 3052 Added changelog

* 3052 Bumped version

* 3052 Remove mysterious +1 on maximum binary size causing overflow.

* Bumping version to 6.2.0-PRE16-SNAPSHOT

* Adding + 1L as original implementation.

* Getting all tests to pass dealing with + 1L.

* Getting all tests to pass dealing with + 1L.

* Adding migration definition and removing unnecessary comment.

* Preventing register overflow when setting maxBinaryStorage.

* Mering relevant test.

* Fixing typo in migration script

Co-authored-by: kylejule <kyle.jule@smilecdr.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-10-19 06:09:02 -04:00
James Agnew 422ef87a5d
Standardize on one Transactional annotation (#4130)
* Standardize on one Transactional annotation

* Add changelog

* Disable checkstyle rule

* Fix up transactions

* Test fixes

* Test cleanup

* License headers

* One more dep bump

* Resolve commit issue

* Test fixes

* Test fix

* Dep bump

* Fix

* Fix test

* Version bump

* Test fixes
2022-10-13 16:26:11 -04:00
Etienne Poirier 4cebcfb766
4115 Combining 'indexMissingFields' and 'advancedHSearchIndexing' functionalities will prevent creating a resource (#4122)
* Added Test

* Added Integration Test

* Made changes based on comments

* Implemented solution

* Implemented solution

* Debug

* Changelog

* Changes made based on comments

* Changelog

* Made changes based on comments

* Made changes based on comments

Co-authored-by: Karneet Kaur <karneet.kaur@smilecdr.com>
2022-10-12 16:16:44 +00:00
Luke deGruchy 5831cbedf5
Concurrent cascade delete operations leading to confusing errors (#4126)
* Add unit tests and supporting classes from gitlab issue.

* Commit with changes thus far to be reviewed.   Namely, add savepoint capabilities to HapiTransactionService, inject HapiTransactionService into CascadingDeleteInterceptor, add savepoint capabilities to the TransactionDetails, and catch an Exception in BaseHapiFhirResourceDao.delete() then rollback to the checkpoint.

* Fix compile error.

* hapi transaction service test

* hapi transaction service test

* hapi transaction service test

* First draft of RetryTemplate and flush() logic.  Try unit testing with PointcutLatch.

* hapi transaction service test

* Latest changes including moving RetryTemplate, cleaning up unit tests.

* First attempt at correct design.  Fix compile errors.

* Add failed rollback savepoint test.

* fix propogation

* interesting test failure in SafeDeleterTest

* Latest code

* move delete

* test passing

* all tests pass

* yay we're done just cleanup

* First round of cleanup:  Get rid of all exploratory logging, remove unneeded dependencies, move creation of RetryTemplate to SafeDeleter.

* More cleanup.  Add changelog.

* Bump to 6.2.0-PRE13-SNAPSHOT.

* Code review feedback:  Refactor SafeDeleter to a service and bean.  Add comments.

* Code review feedback:  Comments on unit test assertions.

* Code review feedback:  Rename SafeDeleterSvc to ThreadSafeResourceDeleterSvc.  Add javadoc.  Add logger to DelayListener.   Remove useless commented out code.

* Fix unit test failure in CascadingDeleteInterceptorTest.

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-10-11 16:48:01 -04:00
Ken Stevens 40163f73d2
Ks 20220916 remove flyway (#4040)
* removed flyway, started coding persistence

* started wiring up new dao service

* replace jpa with sqlbuilder

* down to 16 failed tests

* remove outOfOrder test.  We no longer support validating order.

* Removed noFlyway mode.  It is no longer a thing.

* merge migrator

* down to 1 failing test

* cleanup

* removed unused noflyway cli arguments

* cleanup

* cleanup

* cleanup

* cleanup

* create MigrationTaskList to replace the List<BaseTask> that gets passed around a lot.  This allows us to add a bunch of behaviour to that as a first-order thing

* fix test

* fix test

* improve migration table detection to use the catalogue

* Msg.code()

* cleanup

* save version in same format as flyway

* cleanup

* add migration result to migration result class

* failed migrations stay in the table and don't really affect anything.

* change log

* docs

* ugh Flyway requires lower-case column names

* integration test fixes

* log

* fix oracle issue

* lowercase tablenames for postgres.  fussy fussy!

* Revert "lowercase tablenames for postgres.  fussy fussy!"

This reverts commit 92c9cb263b.

* revert to capital table names.  surround table name by quotes for Postgres.

* added log message before executing find all query

* changed log message from info to debug

* javadoc

* pom cleanup

* review feedback

* Update hapi-fhir-sql-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/MigrationTaskList.java

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

* review feedback

* review feedback.  Use prepared statement.

* Change installedOn insert from timestamp to date

* Change installedOn column type from timestamp to date

* bump hapi version

* fix poms

* fix poms and cdr compile

* add exclusions to clean up build

Co-authored-by: Ken Stevens <ken@smilecdr.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2022-10-03 22:40:09 -04:00
weiping202209 66baa8263d
Fix bug in history search (#4009)
* add failing test

* Fix history search bug and add tests for two more scenarios

* Fix history search bug and add tests for two more scenarios

* - added failing test condition

* Fix history search bug and add tests for two more scenarios

* Fix build test failures

* Fix build test failures

* Add extra verifications for scenarios of _since

* Refactor dao.history interface to add overload method and shall come back to remove old method once cdr is refactored.

* Update with new hapi interface

* Add depreciate comment

* Add depreciate comment

* Version bump to mvn 6.2.0-PRE11-SNAPSHOT

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
2022-10-03 09:00:41 -04:00
Ken Stevens e9a855d3f6
remove spring batch (#4064)
* remove spring batch
it compiles
expect test failures

* fix test transaction manager bean name (wow that was quite the hunt the wumpus!)

* fix test and fix build

* fix test and fix build

* fix test

* remove spring batch schema initialization

* bump hapi version

* fix schema migrator

* bump to PRE-10

* merge master

* change logs

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-09-30 13:18:48 -04:00
Tadgh b472c4bb54
4083 batch permissions (#4095)
* Move threadpool factory into a bean

* Move threadpool factory into a bean

* change return type

* Add license files

* Version bump

* Fix test
2022-09-29 17:24:05 +00:00
Luke deGruchy bcdbb51fde
Fix hashCode() to reflect the equals() contract by passing in getValu… (#4086)
* Fix hashCode() to reflect the equals() contract by passing in getValue() instead of getHashIdentity().  Fix bug with DaoSearchParamSynchronizer setting wrong count on AddRemoveCount.addToCount().

* Add hashIdentity to both equals and hashCode.  Rename unit test to be more descriptive.

* Add changelog and fix changelog for previous MR.

* Add newline to changelog file.
2022-09-27 12:39:10 -07:00
michaelabuckley 96b92153f6
Implement composite search parameters in HibernateSearch for JPA (#3839)
Implement composite search parameters in Lucene/Elasticsearch Hibernate Search indexing

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-09-27 00:20:06 +00:00
StevenXLi 3b781022c1
4030 bulk export to support fhir basepatientid$export endpoint (#4032)
* Refactored test helper method to be more generic, added new failing test for feature, and changed BulkDataExportOptions to fix compile error

* added field to all objects needed in the bulk export pipeline for adding patient id, added new operation for the feature

* added changelog

* added support for patient parameter to patient export, changed patient id to a list to match the requirements for the patient parameter, added test for multiple id patient export

* refactored methods, added new changes to changelog

* code review changes

* fix test error

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-09-20 10:42:55 -07:00
jdar8 c647154777
Everything operation with type param code review fixes (#3926)
* check for valid resource type

* add test and refactor test class

* refactor auto get method name

* introduce parameter object to patient everything methods

* introduce parameter object to patient everything methods

* change record to class

* add hapi error code

* refactor

* refactor

* change code num

* refactor getmethodname to util method

* add docs and rename fields to conform to fhir standard

* typo

* version bump

* resolving merge conflicts.

* Bumping version

* Bumping version to 6.2.0-PRE5-SNAPSHOT

* Encapsulating parameters in a PatientEverythingParameters object.

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-09-07 06:44:36 -04:00
Ken Stevens 100b8f9190
batch2 rework (#3964)
* consolidated Batch2Helper
check status in assert before running maintenance
ignore illegal job instance state transition

* Fix mock tests

* rename intermittent to IT

* extra logging

* into to debug

* review feedback

* added more logging

* removed fasttracking.  replaced with support for triggering a maintenance run

* fixed tests

* fixed tests

* add asserts

* licenses

* snakeyaml cve version bump

* data migration

* merge origin/master

* merge origin/master

* fix test (support triggering jobs when scheduling is disabled)

* add counter to abort potential infinite loop after 100000 calls

* compile error

* move multipartition mdm tests out to a separate IT
update mongo job instance creation with new logic

* fix race condition

* back out infinite loop circuit breaker.  it breaks terminology tests that depend on this loop running > 100000 times.

* fix test (triggered job key was missing group)

* revert saveAllDeferred

* Almost finished getting JpaPersistenceR4IT to pass

* testBulkExportDeleteForOnGoingJob still not passing

* testBulkExportDeleteForOnGoingJob still not passing

* Removed method `fetchInstanceAndMarkInProgress`.  It was clobbering other state transitions like CANCELLED.

* undo rename of cancelled to cancelRequested.  Thymeleaf depends on the old name

* ExpandResourcesStep requires a synchronous search

* Tests are passing but man testBulkExportDeleteForOnGoingJob is a flakey test

* fix test

* fix test

* change log

* allow ERRORED -> FAILED state transition

* add a timeout to saveAllDeferred()

* improve error message on timeout message

* fix tests

* added more logging

* added more logging

* fix semaphore issue

* Msg.code

* fix test

* javadoc

* switch all batch loggers to batch troubleshooting log

* add unit test, improve logging

* move TimeoutManager to its own class.  Add tests.

* fix tests

* comment cleanup

* test race condition

* review feedback

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-09-05 00:04:54 -04:00
Ken Stevens 26ca950bce
Checkstyle Abstract Class Name (#3966)
* init rev

* checkstyle enforce abstract classes start with "Base" (and vice versa)

* checkstyle enforce abstract classes start with "Base" (and vice versa)

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-08-30 22:15:32 -04:00
Mark Iantorno caf370da31
Azure Pipelines Overhaul (#3948)
This PR changes the way HAPI is built by Azure pipelines. Instead of a FIFO queue for all tests in the project, the entire project is quickly built and cached without testing, then the individual modules are built and tested in separate jobs which can be run in parallel from each other. Each of these jobs then uploads the test coverage for that module as a build artifact. Finally, a last stage downloads all the archived tests results and aggregates them using jacoco so they can be uploaded to codecov.

This has two key benefits:

    If there is a failing test because of an intermittent, the individual failing module can be re-run instead of having to re-run the whole project build.
    The build time is decreased substantially (90min -> 45min).

This is the first run at this, I will be iterating to further reduce build times going forward.
2022-08-24 12:55:00 -04:00
Tadgh e7a4c49aac
Rel 6 1 mergeback (#3927)
* Bump for CVE (#3856)

* Bump for CVE

* Bump spring-data version

* Fix compile

* Cut over to spring bom

* Bump to RC1

* remove RC

* do not contrain reindex for common SP updates (#3876)

* only fast-track jobs with exactly one chunk (#3879)

* Fix illegalstateexception when an exception is thrown during stream response (#3882)

* Finish up changelog, minor refactor

* reset buffer only

* Hack for some replacements

* Failure handling

* wip

* Fixed the issue (#3845)

* Fixed the issue

* Changelog modification

* Changelog modification

* Implemented seventh character extended code and the corresponding dis… (#3709)

* Implemented seventh character extended code and the corresponding display

* Modifications

* Changes on previous test according to modifications made in ICD10-CM XML file

* Subscription sending delete events being skipped (#3888)

* fixed bug and added test

* refactor

* Update for CVE (#3895)

* updated pointcuts to work as intended (#3903)

* updated pointcuts to work as intended

* added changelog

* review fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* 3904 during $delete expunge job hibernate search indexed documents are left orphaned (#3905)

* Add test and implementation

* Add changelog

* 3899 code in limits (#3901)

* Add implementation, changelog, test

* Update hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java

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

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

* 3884 overlapping searchparameter undetected rel 6 1 (#3909)

* Applying all changes from previous dev branch to current one pointing to rel_6_1

* Fixing merge conflict related to Msg.code value.

* Fixing Msg.code value.

* Making checkstyle happy.

* Making sure that all tests are passing.

* Passing all tests after fixing Msg.code

* Passing all tests.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>

* 3745 - fixed NPE for bundle with duplicate conditional create resourc… (#3746)

* 3745 - fixed NPE for bundle with duplicate conditional create resources and a conditional delete

* created unit test for skip of delete operation while processing duplicating create entries

* moved unit test to FhirSystemDaoR4Test

* 3379 mdm fixes (#3906)

* added MdmLinkCreateSvcimplTest

* fixed creating mdm-link not setting the resource type correctly

* fixed a bug where ResourcePersistenceId was being duplicated instead of passed on

* Update hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmLinkCreateSvcImplTest.java

Change order of tests such that assertEquals takes expected value then actual value

Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* added changelog, also changed a setup function in test to beforeeach

Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>

* Fix to the issue (#3855)

* Fix to the issue

* Progress

* fixed the issue

* Addressing suggestions

* add response status code to MethodOutcome

* Addressing suggestions

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Fix for caching appearing broken in batch2 for bulkexport jobs (#3912)

* Respect caching in bullk export, fix bug with completed date on empty jobs

* add changelog

* Add impl

* Add breaking test

* Complete failing test

* more broken tests

* Fix more tests'

* Fix paging bug

* Fix another brittle test

* 3915 do not collapse rules with filters (#3916)

* do not attempt to merge compartment permissions with filters

* changelog

* Rename to IT for concurrency problems

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

* Version bump

* fix $mdm-submit output (#3917)

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Gl3407 bundle offset size (#3918)

* begin with failing test

* fixed

* change log

* rollback default count change and corresponding comments

Co-authored-by: Ken Stevens <ken@smilecdr.com>

* Offset interceptor now only works for external calls

* Initialize some beans (esp interceptors) later in the boot process so they don't slow down startup.

* do not reindex searchparam jobs on startup

* Fix oracle non-enterprise attempting online index add (#3925)

* 3922 delete expunge large dataset (#3923)

* lower batchsize of delete requests so that we do not get sql exceptions

* blah

* fix test

* updated tests to not fail

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>

* add index

* Fix up colun grab

* Bump Version for non-breaking purposes

* Fix broken test

* bump error code

* revert internal logic

* Revert offset mode change

* wip

* Revert fix for null/system request details checks for reindex purposes

* Fix bug and add test for SP Validating Interceptor (#3930)

* wip

* Fix uptests

* Fix index online test

* Fix SP validating interceptor logic

Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Qingyixia <106992634+Qingyixia@users.noreply.github.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Etienne Poirier <33007955+epeartree@users.noreply.github.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: kateryna-mironova <107507153+kateryna-mironova@users.noreply.github.com>
Co-authored-by: longma1 <32119004+longma1@users.noreply.github.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-08-18 17:21:27 -07:00
jmarchionatto ebac65cb31
Add simple local implementation of UCUM temperature canonicalization … (#3872)
* Add simple local implementation of UCUM temperature canonicalization for Celsius and Fahrenheit

* Adjust conversion to not increase precision, as it matter when finding ranges

* Simplify test variables

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-08-05 14:48:37 +00:00
Tadgh dcfaf42e73 add new version enum, bump version, new folder 2022-08-02 21:46:20 -07:00
jdar8 5f1c50a6b8
everything operation with type param (#3842)
* wip+test

* wip, rough implementation

* clean up

* clean up

* clean up unused methods

* Completing implementation.

* Removing TODO.

* Replacing toList() with Collectors.toList()

* support other fhir versions and everything instance

* tests wip

* tests for instance

* Adding default methods in interface

* add testsss

* Removing @Deprecated.

* fix spacing

* changelog

* reword changelog

* Removing default methods from interface.

* Bumping version to 6.1.0-PRE28-SNAPSHOT

* Adding parameter to method call following interface modification.

* Fixing documentation and parameter order for consistency.

* Bumping version to PRE30.

* Providing backward compatibility.

* fix pom

* licences

* Fixing pom dependencies.

* Fixing more pom dependencies.

* Fixing dependencies for test-utilities.

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-08-02 20:51:37 -07:00
Nathan Doef e2bed96d74
3776 add https support for hapi fhir cli using tls (#3777)
* wip functional
TODO
- add tests
- look at adding TLS to other RestfulClientFactory classes (FhirwebRestfulClientFactory, JaxRsRestfulClientFactory, OkHttpRestfulClientFactory)

* move BaseRestServerHelper to Hapi-Fhir

* - add TLS support for JaxRsClient and OkHttpClient
- add tests

* -  to use resources and files

* -  ci fixes

* -  ci fixes

* -  ci fixes

* -  ci fixes

* - refactor and tests

* - ci fixes

* - tests

* - tests

* - tests / refactor

* - clean up

* - changelog

* - remove OkHttpClient HTTPS support

* - ci

* - Ken's code review changes

* - Ken's code review: method renaming

* - Ken's code review: javadoc

* - Code coverage

* - Create HapiFhirCliRestfulClientFactory to encapsulate new HTTPS functionality. Remove modifications to the FhirContext API.

* - version bump

* - fix unable to bind port errors by using Jetty functionality to assign random ports

* Revert "- version bump"

This reverts commit cfce82576a.

* - version bump

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
2022-08-02 09:27:02 -04:00
David be0b6f1a0b
3840 add sort parameter to fetching jobs (#3861)
* added a paging api to ijobcoordinator

* adding changelog

* moved location

* added a comment

* Added Sort parameter to JobInstanceFetchRequest

* Bump HAPI-FHIR version

* Updated JPA api to include sort

* Add changelog

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: David Chen <david.chen@smilecdr.com>
2022-07-29 09:12:53 -06:00
longma1 f933ff3d9c
2878 mdm mongo support (#3748)
* small refactor

* refactored MDM module to use iterface IMDMLink, refactored MDMLink to use ResourcePersistenceId wrapper rather than pid as long

* removing IJpaIdHelperService and refactor IIdHelperService

* fixed bugs for GoldenResourceMergerSvcImpl and FindCandidateByExampleSvc

* changes to IIdHelperService

* move MdmSearchParamSvc and MdmSubmitSvcImpl out of jpaserver-mdm

* moved JpaResourceLoader to hapi-fhir-storage, renamed to ResourceLoaderImpl

* added error Msg code, removed Fixme

* fixed error code, update last used code in Msg.java to 2083

* fixed accidentally throwing unprocessableentityException

* added MdmLinkExpandSvc interface

* build adding license to files

* MdmLinkdao refactor

* fix build

* mdm config refactoring

* MdmStorageInterceptor and IExpungeEverythingService changes

* fix bug where a pid is converted to ResourcePersistenceId twice

* minor refactor to IMdmLink, change id from long to ResourcePersistenceId

* changed PageImpl to Page interface

* refactor MdmSearchExpandingInterceptor to use interface

* fixed missed refactor where the resourcePersistenceId is still assumed to be long

* resolve test failures resulting from merging master

* changed conflicting exception code

* fixed issue with bulk export wrapping resourcePid inside resourcePersistenceId

* added IMdmLinkImpl to MdmSettings

* fixed missing import in IdHelperService from merging master

* fixed MdmLinkDaoSvcTest importing wrong MdmLinkTuple

* restored JpaIdHelperService and added changelog

* modified msg.code to non-duplicate

* code review changes

* refactored some bulk export batch 2 files to accomodate change in beans being exported

* fixed jpa bulk export failing tests

* removed duplicate bean declaration of MdmLinkImplFactory in BaseMdmR4Test

* merged master and bump version to pre25

* extracted expungeEverythingByType to IExpungeEverythingService

* fixed wiring issue

* messed up merging pom with master

* fixed broken changelog

Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: Samuel Lee <samuel.lee@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-29 08:58:40 -06:00
TipzCM 59540ce803
3813 paging job coordinator (#3814)
* added a paging api to ijobcoordinator

* adding changelog

* moved location

* added a comment

* blah

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-07-26 11:29:37 -06:00
Ken Stevens 533019f051
Response Terminology Wiring (#3807)
* cleaned up response terminology wiring

* jpa is failing atm

* bump pom versions

* double build RAM

* bump hapi version to PRE-22

* license headers

* re-bump to PRE-22

* tag intermittent

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-25 18:41:01 -04:00
Ken Stevens f01e4a7ad2
Remote Terminology support refactor (#3822)
* Revert "test passes with a lot of copy/paste"

This reverts commit f2f28e22ef.

* make translateOutcomeToResults public

* double RAM

* final consolidation.  move shared code out to static utility methods

* revert azure memory
disable jacoco on jpaserver test prokect

* bump hapi version

* rebump hapi to PRE-21

* licenses

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-25 11:47:31 -04:00
Etienne Poirier d2fd0989c3
3820 Providing an exception for search request with invalid or incomplete tokenParam (#3825)
* Creating an exception to be raised when searching for _tag/_provide/_security where the associated tokenParam is not properly formatted.

* Adding changelogs.

* Adding integration test.

* Rewording ChangeLog.

* Rewording exception message.

* Addressing code review comments.

* Addressing code review comments.

* Bumping hapi-fhir version to 6.1.0-PRE20-SNAPSHOT

* Modifications to pass checkstyle.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-07-22 11:55:44 -04:00
Qingyixia 592190701c
Implement patch in mongo db (#3781)
* Not the final version

* Support PATCH operation

* minor modifications

* minor modifications

* Final version

* Final version

* Version Bump

* bump version again

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-17 21:26:34 -04:00
TipzCM 8ed0a18ef4
3531 implement bulk processors (#3566)
* base batch2 bulk export steps - unimplemented

* added the basic steps

* adding tests

* we have added the tests

* added tests for bulk export stages

* implementing jpa

* 3531 adding the jpabukexportprocessorimplementation

* 3531 first step for mongo bulk export

* jpa stuff updated

* 3531 hapi fhir stuff

* trying to fix up tests

* fixing test

* fixed most tests in batch export

* deprecate

* need some more guidance here

* fixing some tests

* some steps taken

* blah

* stashing

* test

* fixing tests round 1

* many a changes

* updating version

* small updates

* merging in mster again

* fixing up serialization

* added the permission checkers

* cleanup and sonarkube crap

* some more tests

* updating adding tests

* crimes

* blah

* updatingmsg number again

* removal of commented code

* cleanup

* merge confflicts

* fixing msg

* review fixes round 1

* more review fixes

* merging in master

* fixing poms

* review points

* test fix

* test fix

* fix test race condition

* truncate error

* add stack trace to error

* rename to IT

* fix race condition in test

* finally fixed race condition in test.  this time I'm optimistic hapi ci will finally pass

* fix mock test.  not a fan of mock tests like this.

* any job definition with a reducer step must be gated.

* fixed common batch bean wiring

* fix test

* lazy init ResponseTerminologyTranslationSvc

* change the way we lazy init ResponseTerminologyTranslationSvc

* change the way we lazy init ResponseTerminologyTranslationSvc (for the third time.  this is super tricky!)

* disabling testGoldenResourceWithCircularReferenceCanBeCleared for now

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-17 17:49:03 -04:00
TipzCM 0c644271ce
3770 fix batch2 failure loop (#3779)
* 3770 fixing error handling

* some updates to error handling

* changelog

* blah

* bumping version

* fix test failures

* code review points

* review points

* add retry test

* assert counts in the test

* test fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-15 12:42:46 -04:00
Gjergj Sheldija 4684dde6a6
add `displayLanguage` to the `ValueSet/$expand` (#3619)
* add `displayLanguage` to the `ValueSet/$expand`

* fix tests

* fix tests
2022-07-12 15:54:29 -04:00
StevenXLi 2bc6c91153
3719 enable map response terminology for bulk export (#3735)
* added failing test for Map Response Terminology for bulk export

* moved logic for terminology translation out of the interceptor to svc, added translation logic to bulk export file writer, added more tests

* added changelog

* Wip refactor dependency fix

* wip terminology translation code refactor

* terminology translation code refactor

* refactor clean up

* Remove circular dependency

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3719-enable-map-response-terminology-for-bulk-export.yaml

* bump version of hapi to 6.1.0-PRE7-SNAPSHOT

* doc update

* fix issue when search param registry doesn't contain search param for the resource type

* fix beans

* hapi version bump from PRE7 to PRE10

* doc update

* add ResponseTerminologyTranslationSvc as a constructor variable to the interceptor

* fixed ResponseTerminologyInterceptorLoaderTest, added IT for cdr side

* version bump to PRE13

* removed unused import

Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-12 12:24:15 -04:00
Ken Stevens 0526da080b
3757 move delete expunge to batch2 (#3759)
* begin with failing test

* begin with failing test

* remove unused Spring Batch classes.
convert service classes

* move provider

* just one test left to fix

* fix test

* msg.code

* change log

* bumping hapi to PRE12

* fix test

* review feedback

* license update

* fix intermittent and status update atomicity

* restore url-level partition selection

* fix tests

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-09 17:25:55 -04:00
Nathan Doef b68ccb373a
3693 Search by id is returning a deleted resource with a client-generated id (#3694)
- Added functionality to optionally filter out deleted resources when resolving forced ids to persistent ids
- Bumps version

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-05 12:37:25 -04:00
Ken Stevens 3a28920ea7
Add error-handler callback and ensure batch2 completion handler can't be called twice (#3752)
* rename field that drives everything includes

* discovered design flaw in completion

* fix intermittent

* ensure batch2 completion handler can't be called twice

* changelog

* changelog

* javadoc

* bump hapi version

* licences

* Batch2 job definitions can now optionally provide an error handler callback that will be called when a job
instance fails, errors or is cancelled.

* Changed error handler and completion handler to take a "read-only" copy of an instance instead of just certain fields.

* comment

* javadoc

* fix test

* change step execution context from taking instance id to instance

* review feedback

* fix test

* replace 20 or so jetbrains annotations

* fixed a few incorrect @NotNull annotations

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-04 23:27:58 -04:00
Ken Stevens 069f20a5f7
batch2 management operations api (#3742)
* first test passes.  onto the next one

* two down two to go

* three down one to go

* licenses

* basic admin-json plumbing confirmed with IT

* FIXME

* FIXME

* FIXME

* FIXME

* changelog

* bump hapi version to 6.1.0-PRE6-SNAPSHOT

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-28 23:02:17 -04:00
jmarchionatto 84fe58cc86
Hsearch namespace consolidation (#3733)
* Initial implementation

* Implement job cancellation

* Works for date and token. Cleanup required.

* Works for string and quantity.Cleanup pending.

* Works for reference and perform cleanup.

* Cleanup configuration and add missing tests

* Eliminate sort property registry (no go for a cluster) for a static property map.

* Missed in previous commit

* Implement HSearch number parameter

* Implement HSearch number sorting

* Unify different hibernate search names (HibernateSearch, Freetext and Lucene) to HSearch

* Move analysis configures for lucene and elastic to same file to enforce the need to keep them in synch

* Use new defined constant

* Rename package too

* Rename additional elastic references

* bump version to 6.1.0-PRE5-SNAPSHOT

* Restore Hap prefix to hapi configurers

* fixing hapi version of new maven module

* fix pom

* fix pom

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-28 18:38:05 -04:00
Ken Stevens 49d298dba1
mdm clear move to batch2 (#3671)
* begin with failing test

* continue building out

* continue building out

* reworking chunk api

* replace ChunkId zippers with proper iterator

* progressing test

* yay test passes!

* switch to idchunk interface

* fixmes

* compiles

* fixme

* fixme

* rename classes

* rename json classes with json suffix

* work towards homogeneous chunks

* fixme

* fixme

* unit test

* fixme

* fixme

* pull out builder

* moar tests

* moar tests

* preserve order

* moar test

* moar test

* fixme

* fixme -> wip to start ci

* msg code

* msg code fix test

* fixme

* change provider implementation

* final WIPs

* IT failing

* IT passes

* java 11

* fix test

* fix test

* fix test

* changelog

* use batch size if provided

* last WIP

* fix test

* fix test

* fix test

* whitespace change to trigger new build

* fix test

* bumping hapi version

* bumping hapi version

* fix test

* review feedback

Co-authored-by: Ken Stevens <ken@Kens-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-25 20:26:44 -04:00
jmarchionatto e7ce41e5b8
Freetext search sort (#3695)
* Works for date and token. Cleanup required.

* Works for string and quantity.Cleanup pending.

* Works for reference and perform cleanup.

* Cleanup configuration and add missing tests

* Eliminate sort property registry (no go for a cluster) for a static property map.

* Missed in previous commit

* Implement HSearch number parameter

* Implement HSearch number sorting

* Replicate new normalizer configuration from HapiElasticsearchAnalysisConfigurer to HapiLuceneAnalysisConfigurer.
Replace deprecated word filter factory

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-06-22 10:31:01 -04:00
TipzCM 48c28997e6
3662 batch2 reduction step (#3681)
* adding a bunch of stuff

* most of the steps are working now

* writing more tests

* adding more tests

* updated the batch2 coordinators

* updating version

* some minor test tweaks

* added a new test

* adding more tests

* blah

* blah

* review fixes 1

* fixing tests and refactoring

* review points

* updated for code review

* review fixes

* updated

* step 1 on review step 5

* final touches

* blah

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-20 18:59:01 +00:00
StevenXLi 3da39aeda3
3658 adding updating with history rewrite feature (#3659)
* Updating With History Rewrite implementation

* Missed new files

* Updated changelog and documentation

* Fixed test failures and doc

* minor fix

* lgtm code refactor

* Fixed test to clear DaoConfig

* Removed unused class

* Code review changes

* Simplified updateHistoryRewrite's fluent, combining with normal update's, also changed logic on custom header error checking, updated tests

* refactored method to extracted common code

* removed `updateHistoryRewrite()` and replaced with `update()`, updated tests accordingly

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-06-15 12:40:58 -04:00
jmarchionatto 4eb099b900
Freetext search source parameter support (#3641)
* Handle uri, _tag, _security and _profile freetext search parameters

* Fix combined 'and' and 'or' clauses and add tests
Use collection instead of typed array to eliminate warnings

* Eliminate predicate nesting level

* Implement _source freetext search

* Implement suggestions

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-05-25 20:07:29 +00:00
JasonRoberts-smile b9579313ef
Jr 20220519 expunge config params (#3627)
* fix config settings for system-level expunge

* clean up expunge everything interface

* extract common system provider

* changelog

* version bump

* touch changelog to force a fresh pipeline

* re-enable publishing of checkstyle

* back out Gary's Sonatype change entirely
2022-05-23 18:55:42 -04:00
Tadgh 54f578c8b1
Rel 6 0 mergeback (#3597)
* adding version.yaml, updating version in pom.xml

* It is possible to write to a resource in a partition the user is not authorized to. (#3397)

* fixed

* remove sout

* add msg.code

* fix failed tests

* fix equal sign

* update msg code

* extract method

* Fix up code numbers

* Clean changelog

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

* Revert final artifact version

* add graphql test (#3585)

* added graphql birthdate test

* fix variable name

* typo

* 3506 mdm log enhancement (#3543)

* Providing Fixme's to be reworked at a later time.

* Adding // FIXME Anna to assist our Austrian friend.

* Adding logging test as a first step in addressing issue #2822.

* hapifhir#3506 part 2: enhance logging for (un)successful MDM matching

hapifhir#3506 part 2: enhance logging for (un)successful MDM matching

* Update MdmMatchLinkSvc.java

#3506 move "narrowed down" log to different place

* #3506 added scores and tests

#3506 added scores and tests

* #3506 formatting

#3506 formatting

* #3506 create changelog file

#3506 create changelog file

* #3506 fix typo

#3506 fix typo

* #3506 fix part 3, minor formatting

#3506 fix part 3, minor formatting

* #3506 fix tests

#3506 fix tests

Co-authored-by: Etienne Poirier <etienne.poirier@smilecdr.com>
Co-authored-by: Anna <anna@MacBook-Pro.local>

* mdm matching (#3579)

* Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter… (#3551)

* Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/328

* Update HapiFhirJpaMigrationTasks.java

Corrected ordering

* Update HapiFhirJpaMigrationTasks.java

Moving index status to be last operation

* Revert "Update HapiFhirJpaMigrationTasks.java"

This reverts commit 37bfd3e66e.

* Moved to bottom

Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>

* begin with failing test

* fixed

* changelog

* add jira tag

* Update to 6 1 (#3582)

* added changelog folder, upped version

* version enum

* add a few more unit tests to assert proper NO_MATCH exclusion

* revert merge master doh! bad reflexes

* revert merge origin master

* unrevert revert.  ugh what a pain

* merge recovery.  fix poms.

* merge recovery.  more reverting

* merge recovery.  more reverting

* merge recovery.  more reverting

* Revert "merge recovery.  fix poms."

This reverts commit ae6e0ddb06.

* more revert revert reversions

* more revert revert reversions

* pre-review cleanup

Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>
Co-authored-by: Mark Iantorno <markiantorno@gmail.com>

* Fix regression of 3411 - _lastUpdated gets clobbered during $reindex job (#3586)

* When chunking for the reindex job, don't clobber the lastUpdated if provided by the caller.

* License

* Ks 20220508 log colour (#3592)

* don't use colours when output is redirected to a file

* change log

* Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter… (#3551) (#3594)

* Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/328

* Update HapiFhirJpaMigrationTasks.java

Corrected ordering

* Update HapiFhirJpaMigrationTasks.java

Moving index status to be last operation

* Revert "Update HapiFhirJpaMigrationTasks.java"

This reverts commit 37bfd3e66e.

* Moved to bottom

Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>

Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>

* 3584 case sensitive string elasticsearch (#3596)

* Fix for case-sensitive search with newer elasticsearch

* Test and fix ascii normalization too

* more test cases

* comments

* Docs update empi usecase (#3598)

* Update diagram for use case 5

* Add new page for database support

* Licnese

* Mb norm fix (#3604)

* Normalize query since wildcard searches aren't normalized in elastic

* Handle batch2 job cancellation (#3603)

* Handle batch2 job cancellation

* Add CANCELLED status

* Remove unuseful test

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>

* Add batch2 interfaces to obtain recent instances (#3601)

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>

* changelog folder

* Documentation change, added warning log and change log for ticket (#3609)

Co-authored-by: Steven Li <steven@smilecdr.com>

* fix ne for lastUpdated search param (#3589)

* init/wip

* add implementation, add tests

* add checks and some refactoring

* refactor and simplify tests

* refactor

* get rid of some of the warnings

* add changelog

* remove my todos

* redo ne logic to account for less precise dates

* add tests

* refactoring

* rename to follow convention

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>

* Version bump

Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: katiesmilecdr <88786813+katiesmilecdr@users.noreply.github.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: alackerbauer <33912849+alackerbauer@users.noreply.github.com>
Co-authored-by: Etienne Poirier <etienne.poirier@smilecdr.com>
Co-authored-by: Anna <anna@MacBook-Pro.local>
Co-authored-by: Jens Kristian Villadsen <jenskristianvilladsen@gmail.com>
Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>
Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: StevenXLi <stevenli_8118@hotmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: jdar8 <69840459+jdar8@users.noreply.github.com>
Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
2022-05-16 22:08:27 +00:00
Mark Iantorno 544ef3de1b
Update to 6 1 (#3582)
* added changelog folder, upped version

* version enum
2022-05-03 20:34:25 +00:00
Jens Kristian Villadsen eb4732a59e
Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter… (#3551)
* Added fix for https://github.com/hapifhir/hapi-fhir-jpaserver-starter/issues/328

* Update HapiFhirJpaMigrationTasks.java

Corrected ordering

* Update HapiFhirJpaMigrationTasks.java

Moving index status to be last operation

* Revert "Update HapiFhirJpaMigrationTasks.java"

This reverts commit 37bfd3e66e.

* Moved to bottom

Co-authored-by: Jens Kristian Villadsen <jvi@trifork.com>
2022-05-03 05:44:47 -04:00
Tadgh 581f40f373
Upgrade Hibernate Search (#3572)
* wip

* updated rest high level for lucene mismatch

* Remove custom JNA

* Bump to 13

* License files

* Changelog
2022-05-02 13:38:56 -04:00
michaelabuckley 5aef3cec9e
New tag indexing (#3570)
* New tag indexing

* Migration for tag indexing
2022-04-30 16:51:59 -04: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
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
jmarchionatto f9824d6b15
Freetext search query builder consolidation (#3556)
* Refactor query builder for Reference

* Execute loop for all entries

* Add sandbox disabled test

* Add multiple components tests

* Revert "Refactor query builder for Reference"

This reverts commit 85e0442082.

* Fix imports

* Simplify test

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
2022-04-21 16:50:21 +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
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
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 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
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
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
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 2cba62b4e8
Enable search narrowing on large ValueSets (#3405)
* 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
2022-03-01 09:16:31 -05:00
michaelabuckley 86f7373f16
Distinguish multi-coded items during token autocomplete (#3429)
Add nested indexing to support autocomplete of multi-coded items.
2022-03-01 00:59:09 +00:00
James Agnew b7d1ae217d
New batch framework / Bulk Import (#3387)
* 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
2022-02-27 16:04:49 -05:00
Ben Li-Sauerwine 65776bbab3
Adds a NDJSON-capable Bulk Data Import Provider (#3039)
* 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>
2022-02-27 11:38:20 -05:00
Tadgh c6122bcb1b Add license files 2022-02-18 19:11:29 -08:00
Ken Stevens 631391819b
remove hapi jpa spring config hierarchy (#3390)
* initial refactor to remove hapi jpa spring config hierarchy

* fix poms

* fix batch config

* dependency rearrangement arising from further testing

* fix searchDao bean name

* fixed dstu2 tests

* consolidate validation config

* dstu2 validation regression (man dstu2 support is expensive)

* fix test (with WIP comment)

* restore poms

* fix demo projects

* fix build

* bumping version

* rename generated config class
2022-02-16 20:44:03 -05:00
michaelabuckley 1c82d0933c
Mb new date search index (#3368)
* 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.
2022-02-16 22:12:20 +00:00
Tadgh 43f570259e Merge branch 'rel_5_7' 2022-02-10 08:44:07 -08:00
Jaison B 7794113455
2838 lastn refactor to use extended lucene index (#3339)
* 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>
2022-02-10 11:05:31 +00:00
michaelabuckley 3531d9b4fc
Fix exception when contained indexing met hibernate search. (#3372)
* Fix exception when contained indexing met hibernate search.
2022-02-09 20:27:40 -05:00
James Agnew 0f2fc7a882
Allow search narrowing and auth interceptor by `token:in` (#3360)
* Optmize valueset expansion

* Working

* Version bump

* Add documentation

* Add test

* Checkstyle message cleanup

* Add reverse rule

* Test ficx

* Test fix

* Test fix

* Test fixes

* Test fixes

* Test fix

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/security/search_narrowing_interceptor.md

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

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/security/search_narrowing_interceptor.md

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

* Test fixes

* Fix conflict

* Add setter

* Test fixes

Co-authored-by: Ken Stevens <khstevens@gmail.com>
2022-02-09 14:27:14 -05:00
michaelabuckley 6b15754b4a
Mb auto complete code (#3330)
New autocomplete extension to ValueSet $expand with contextDirection=existing
2022-02-02 21:03:53 +00:00
Tadgh 6982c4d680
bump version to 6.0.0-PRE1-SNAPSHOT (#3353)
* bump version

* Add new version enum

* Bumped to 6.0.0
2022-02-02 12:11:31 -08:00
Johnson Lu c42ecc5c08
Add error codes to all exceptions (#3278)
* 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>
2022-01-31 13:10:15 -08:00
James Agnew 715a4c4602
Fix resource version regression caused by Hibernate 5.6 (#3325)
* 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>
2022-01-23 19:05:02 -05:00
longma1 ab22fd6e82
2718 cross partition support for subscription (#3298)
* 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>
2022-01-21 15:04:39 -07:00
James Agnew 3fa76a9027
Add support for of-type token modifier (#3309)
* Add support for of-type token modifier

* Add changelog

* Clean up hash calculation logic

* Test fix

* Rework hash generation

* Work on hash generation

* Test fix

* Avoid redundant hash calculations

* Revert some useless changes

* Cleanup

* Test fixes
2022-01-21 16:10:51 +00:00
James Agnew 80e4c3dd92
Bump HIbernate to 5.6.x (#3305)
* Bump HIbernate to 5.6.x

* Test fixes

* Test fix

* Dependency bump

* Rollback change

* Fix tests

* One more fix

* Avoid bump
2022-01-19 11:14:14 -05:00
Jaison B cc2ca9e491
Change token and reference search params to 'keyword' field type (#3310) 2022-01-18 22:57:51 +00:00
jamesagnew aafc42fdd8 License header updates 2022-01-04 13:37:10 -05:00
James Agnew d610d33ac3
Dependency bumps (#3264)
* Bump a number of versions

* Fixes

* Work on version bump

* Bump

* Test fix

* More version bumps

* Build fixes

* Test fixes

* Fixes

* Fixes

* Test fix

* Bump jacoco

* Test fix

* Test fix

* Test fix

* Build fix

* Build fix

* Remove versioned H2

* Build fix

* Avoid memory issue in validation tests

* JDK bump

* Restore compile with errorprone

* Force coloured output

* Force jansi

* Try again to force jansi

* Fix for hardcoded date that just passed

* Fixes to JPA

* Improve changelog

* Work on failing test

* Test fix

* Compile fix

* One more version bump

* Test fixes
2022-01-04 13:21:14 -05:00
James Agnew d9820bfb89
Add inline resource mode (#3267)
* Start work on inline resource text storage mode

* Work on inlining

* Add changelog

* Test fixes

* Fix for hardcoded date that just passed
2022-01-03 11:43:45 -05:00
Tadgh 6a333c08bc Fix badly built migrations and indexes 2021-12-16 01:49:28 -08:00
Tadgh 9e20d62380
Issue 3237 delete expunge performance (#3239)
* Initial test looking for bad deletes

* Add indexes, add migration, add test'

* Fix npe

* Add provider test

* fix up comments, tighten test

* Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeProcessor.java

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

* Add changelog

* Remove unnecessary migration

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2021-12-15 06:53:26 +00:00
Tadgh 50a3005c23
Fix flag name (#3247)
* Fix flag name

* Bump hapi version
2021-12-14 19:20:03 +00:00
longma1 a56603daa2
2480 partition aware subscription (#3218)
* some fixmes to start

* Added some FIXMEs

* added RequestPartitionId to reosurceDelivryMessage and ResourceModifiedMessage

* ResourceDeliveryMessage and ResourceModifiedMessage tests

* fixed issue with test missing partitionHelperSvc mocked bean

* Added tests and implemented SubscriptionMatchingSubscriber for partition aware subscription

* modified implementation of partitionId in CanonicalSubscription

* Moved PartitionablePartitionId, and refactored all calls to getUserData(Constants.RESOURCE_PARTITION_ID) and setUserData(Constants.RESOURCE_PARTITION_ID)

* Revert "Moved PartitionablePartitionId, and refactored all calls to getUserData(Constants.RESOURCE_PARTITION_ID) and setUserData(Constants.RESOURCE_PARTITION_ID)"

This reverts commit fe40fb9733.

* Got added partitionId to subscriptions, added changes to make SubscriptionMatchingSubscriberTest work

* added SubscriptionTriggering test, also added partition support to subscriptionLoader

* Changed implementation for storing partition id of subscriptions from messages, refactored tests to new implementation

* added all subscription systemRequestDetails with all partition to subscription reader

* refactored a generic system request details with default all partition request

* Added test for dao subscriptions, fixes to get the test working

* added partition support for latest version delivery

* added doc changes and changelog for multitenancy subscription

* cleanup and added partitioned subscription manually trigger test

* fixed mocked subscriptionDao

* added package-info for subscription module

* some code review changes

* removed AllPartitionSystemRequestDetail, added new text for multitenant subscription

* renamed method for code review

* version bump to 5.7.0PRE7

Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
2021-12-13 08:45:30 -07:00
VK-SMILECDR bd89cf022b
Improve mail service (#3230)
* move mail config to mail service constructor

* update subscription email sender

* added license text

* [2669] bump HAPI version to 5.7.0-PRE6-SNAPSHOT

* add changelog
2021-12-09 17:05:42 -05:00
Ken Stevens 9753b66610
2564 contained resource validation flag (#3225)
* First cut at multithreading bundle validation

* javadoc

* change test to a red-green test

* add daoconfig

* move bundle concurrency config from validationsupport to request validator

* Moved concurrent details from ValidationOptions to FhirValidator

* Remove bundleValidationThreadCount (it's set by creating an appropriate executor)

* validate threadpool prefixes

* FIXME cleanup

* reassign FIXMEs to JB

* only create the threadpool if it will be used

* Add the MdcTaskDectorator to all threadpools

* Add bundle path to concurrently validated bundle resource validation messages.

* Add test to check bundle entry path being added to validation messages

* Threaded validation of contained resources initial checkin

* FHIR validator refactored to maintain correct bundle path and async validation task

* Refactored to use validation complete invoke callback to support raw string resource or resource object

* switch from XML to JSON

* # Conflicts:
#	hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java
#	hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java

* Updated to use new HAPI-FHIR version

* merge 'validate_contains_change' into issue-3144-multi-threaded-bundle-validation

* Updated to use new HAPI-FHIR version

* Revert "Updated to use new HAPI-FHIR version"

This reverts commit 910b7f676b.

* Revert "merge 'validate_contains_change' into issue-3144-multi-threaded-bundle-validation"

This reverts commit c7d60fc3e6.

* Revert "Updated to use new HAPI-FHIR version"

This reverts commit aa8a7af455.

# Conflicts:
#	hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java

* Fix Test dependencies after reverting changes.

* merge 'validate_contains_change' to 2564-contained-resource-validation-flag

* Disable threadpool prefix name validate check.

* merge master

* fix thread regexp

* pre-review cleanup

* change log

* fix test

* revert to XML as default validation serialization

* fix test

* fix test

Co-authored-by: Jaison B <jaisonb@gmail.com>
2021-12-08 15:18:54 -05:00
jamesagnew 90d05a9ed4 Fix accidental commit 2021-12-07 14:55:16 -05:00
jamesagnew 8aef580aed Bump core library 2021-12-07 10:57:43 -05:00
James Agnew d072357c2a
Move graphql provider (#3214)
* Move graphql provider

* Version bump
2021-12-05 17:22:20 -05:00