Commit Graph

1364 Commits

Author SHA1 Message Date
Roel-Scholten e5cf3ef396
4269 implement a toString for OkHttpRestfulRequest to have better log… (#4270)
* 4269 implement a toString for OkHttpRestfulRequest to have better loggin…

Implement a toString for OkHttpRestfulRequest logging to have better logging.
Currently this still differs from the ApacheHttpRequest.java as we do not have the used protocol (http/1.1/alpn) on request creation. This is added to the Response object.

* Add credit for #4269

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2022-11-11 10:56:12 -05: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 f50d350f1f
Post release HAPI FHIR cleanup (#4266)
* 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

* Fix tests

* Add changelog

* Test fix

* Avoid intermittent

Co-authored-by: James Agnew <james@jamess-mbp.lan>
2022-11-09 13:28:00 -05:00
dependabot[bot] 145f22c3df
Bump log4j-to-slf4j from 2.17.1 to 2.19.0 (#4265)
* Bump log4j-to-slf4j from 2.17.1 to 2.19.0

Bumps log4j-to-slf4j from 2.17.1 to 2.19.0.

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-to-slf4j
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
2022-11-09 10:16:36 -05: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
jmarchionatto 6c9fe710ee
Issue 4180 process slows down to a crawl while loading uscore ig (#4201)
* Make query synchronous

* Use outer joins only for sorting.

* Adjust test

* Add changelog

* Fix changelog typo

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-11-07 19:20:28 +00:00
James Agnew 5533afb9f5
Allow Batch2 transition from ERRORED to COMPLETE (#4242) (#4243)
* Allow Batch2 transition from ERRORED to COMPLETE

* Add changelog

* Test fix

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

Co-authored-by: James Agnew <james@jamess-mbp.lan>
2022-11-04 09:06:22 -04:00
jmarchionatto 6cf5989d6c
Issue 4106 process map to properties when uploading loinc terminology (#4231)
* Add loinc upload handler to process MAP_TO properties.

* Move test to test folder

* Fix mapto file location property name

* Allow override as full loinc upload tests take (much) longer than defined timeout

* Move handler later to make sure all concepts were added to map

* Update test to check all project enhancements

* Restore project unrelated changes

* Rename base test class properly and move to right package

* Condition MapTo.csv file processing to file presence for backwards as file is optional

* Document and annotate test-only usage for disabling deferred tasks timeout

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-11-03 08:48:02 -04:00
VK-SMILECDR 27ec3bec79
code coverage needs to run only for JACOCO PROFILE (#4230)
* code coverage needs to run only for JACOCO PROFILE

* remove ALLMODULES profile since it is default now
2022-11-02 15:34:27 -04: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
karneet1212 0a160a35ba
4175-$validate-operation-on-a-resource-update-results-in-an-error-stating-resource-has-no-id (#4181)
* Added unit test + solution

* Changelog

* Cleanup

* changelog filename
2022-10-26 10:29:28 -07:00
Tadgh 296ddb8a37
CVE Fixes (#4200)
* CVEs

* bump snakeyaml again

* Add updates to changes.yaml
2022-10-26 17:17:11 +00:00
Tadgh 78ce2a6344
4182 convert $mdm submit to a batch job (#4188)
* Changelog

* Wip implementation

* Wip

* wip

* wip

* Fix validator

* Fix up implementation

* tidfy

* TIdy up tests

* Add some docs

* Add changelog info:

* Tidy up self review

* License files

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_operations.md

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

* Review changes

* fixes

* add new method

* Update tests

* Add batch size parameter

Co-authored-by: Ken Stevens <khstevens@gmail.com>
2022-10-25 12:02:04 -07:00
Ken Stevens e7ac40d050
Add support for clustered database migrations (#4177)
* initial attempt

* cleanup

* add other databases

* fix test

* fix dangling connection

* the HapiMigratorTest passes when all the tests are run, but not individual tests.  Methinks the locking just isn't working.

* omg it was autoCommit all along ugh!  it works now

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* documentation

* javadoc

* cleanup

* final cleanup

* simple solution is working

* fix tests

* final fixmes.  this is actually a merge candidate

* pre-review cleanup

* changelog

* pre-review cleanup

* pre-review cleanup

* fix test

* review feedback

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-10-25 15:20:31 +00:00
Kevin Dougan SmileCDR 1190eb96ac
4197 - Fixed header on the server_jpa/elastic docs page. (#4198) 2022-10-25 14:53:26 +00:00
jmarchionatto 3d9dfd4f08
Fix ForcedId criteria query (#4195)
* Fix ForcedId criteria query

* wip parameterizing tests

* Refactor almost all APIs to use ResourcePersistentId. Convert to fhir resource id when necessary (at search time)

* run tests in ANY id mode

* Test fix

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: jamesagnew <jamesagnew@gmail.com>
2022-10-25 13:56:08 +00:00
StevenXLi e1e33df38c
4190 offset count and total are wrong for some queries offset produces short pages and repeats results on different pages (#4193)
* created failing test

* implemented the fix, added more tests

* added change log

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-10-25 09:42:54 -04:00
James Agnew 5328951f15
Version Bump a few dependencies (#4191)
* Version bumps

* Test fixes

* Test fix

* Test fix
2022-10-24 15:20:39 -07:00
James Agnew cbd65c794d
Add remove method to jobregistry (#4187)
* Add remove method to jobregistry

* Add changelog
2022-10-24 17:07:32 -04:00
Tadgh fb6bf5b6a4
Attribution (#4183) 2022-10-24 07:57:54 -04:00
Ken Stevens a824ba263b
package loader npe (#4186)
* begin with failing test

* fixed

* change log

* change log

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-10-22 16:16:27 +00:00
michaelabuckley 929767a09b
Change to a minimal first pre-fetch to avoid latency on the async path. (#4174)
* Change to a minimal first pre-fetch to avoid latency on the async path.

The "async" path is now synchronous, and was causing latency for first page by loading 500 results.
We avoid pre-fetch on the first page, and only pre-fetch after users fetch the second page.

* Fix a nasty bug continuing a pre-fetched search.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_2_0/3664-shorten-first-prefetch.yaml

* Patch up tests that assumed 500 pre-fetch first step
2022-10-21 20:45:30 +00:00
jmarchionatto 2830792c4b
Issue 3992 elastic search mapper parsing exception when uploading loinc terminology (#4141)
* Revert TermConceptProperty indexing to not-nested type to avoid hitting elastic default maximums and
fix regexp issue which was main reason to change indexing way in the first place.

* Add changelog

* Document that terminology reindexing is required.

* Implement revision suggestions. Fix file name typo.

* Adjust and enable test created to reproduce bug

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-10-21 16:19:45 -04:00
Tadgh b04f082991
Move to correct folder (#4176) 2022-10-21 02:28:20 +00: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
Luke deGruchy c8312662d7
Set batch export job results count to number of resources processed instead of 0. (#4172)
* Add count to batch export admin page results and new add new unit test.

* Fix failing unit test in WriteBinaryStepTest.

* Add changelog.

* Small changelog fix.
2022-10-20 14:27:01 -04:00
jmarchionatto 0c5b64cce7
Change IG loader check for existence of SearchParameter resources to use same strategy as validator to avoid first one not finding resource and validator finding it later, producing a duplication exception. (#4164)
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-10-20 10:47:18 -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
JasonRoberts-smile 5a31ce0386
disable batch job reuse (#4155) 2022-10-19 11:43:51 -04:00
karneet1212 a6ed393969
4140-upload-terminology-does-not-allow-snomed-ct-canada-edition-zip-file-to-load-due-to-a-different-file-name (#4144)
* Test + Implementation of the Solution

* Changes made based on comments
2022-10-19 08:33:21 -07: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
samuelwlee2 dac266b719
Extend $member match to validate matched patient (#4136)
* added validation for family name and birthdate

* making changes to tests

* update patient identifer return and validatePatientMember

* update patient identifer type for test

* update method name

* update test comment
2022-10-18 12:19:03 -06:00
jmarchionatto bd22b8d1c0
Issue 4145 reindex terminology command is not documented (#4149)
* Add documentation for reindex-terminology command

* Fix fix type

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-10-17 22:07:33 +00:00
jmarchionatto f6fe8dfc4a
Add documentation for reindex-terminology command (#4146)
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-10-17 13:40:10 -04:00
Etienne Poirier a5fb87bb1d
4142 resource contents are written to logs on subscription failure (#4143)
* Add test reproducing the issue.

* Adding solution and changelog.

* Modification following code review.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-10-17 11:09:17 -04:00
James Agnew 26ef32c1dd
Fix 2 issues with has reverse chaining (#4139)
* Fix 2 issues with chains

* Add changelog

* Cleanup

* Add comment

* Cleanup
2022-10-14 16:46:18 -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
MykolaMedynskyiSCDR 2e6b3d16d6
4017 creating a searchparameter with an expression referencing metasecurity will return error hapi 1118 (#4037)
* Adding initial test reproducing the issue.

* some comments and small refactoring to run pipeline to see the extent of the damage that this can cause.

* Parsing dstu3 expression with FHIRpath parser

* fixed code.

* omitting searchParameter expression(xpath) validation for DSTU2

* Added test for search parameter with many expressions

* changed deprecated method.

* removed and modified custom search parameters tests for DSTU3 and DSTU2.

* fixed code

* Added change log

* Test testIndexFailsIfInvalidSearchParameterExists() is back.

* Update createResourceSearchParameter_withExpressionMetaSecurity_succeeds() test

* Update createResourceSearchParameter_withExpressionMetaSecurity_succeeds() test

* Refactoring if statement and exception message.

* Refactoring tests and rewording changelog.

* Fixing tests.

* Fixing more tests.

* Addressing comments from first code review.

* Fixing issue number.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-10-13 11:05:04 -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
samuelwlee2 2de9b5aa03
added attribute to Operation annotation (#4120)
* added attribute to Operation annotation

* add find operation id

* update readOperationDefinition method

* add example to canonicalUrl

* adding more examples
2022-10-12 10:06:22 -04:00
Qingyixia 9d7829a404
Implemented a new setting for Bulk Export that changes how many resources are stored in each binary file (#4119)
* Implemented a new setting for Bulk Export that changes how many resources are stored in each binary file

* Addressing suggestions

* Fixing test

* Fixing test
2022-10-12 10:03:54 -04:00
Tadgh b74e12172e
4098 Resultset missing resources when querying with _sort result parameter (#4099)
* Add broken test

* Finished writing test

* Add in parameterized test to show it works with one

* Adding extra test asserting sort results when providing short chain

* Providing fix to search with sorting.4098-sort-missing-parameter

* Adding ChangeLog.

* Improving, cleaning up and commenting tests.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-10-12 08:06:46 -04:00
James Agnew 108e357ca7
Preserve tags on delete (#4128)
* Preserve tags on delete

* Add changelog

* Add changelog

* Test fix

* Build fix

* Address review comments
2022-10-12 11:01:47 +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
James Agnew 26fe5e6b8e
Interceptor improvements (#4125)
* Interceptor improvements

* Add changelogs
2022-10-09 15:02:12 -04:00
Ken Stevens 44ed3ee354
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>
2022-10-05 00:37:40 +00: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
jmarchionatto 43ed8ca051
Issue 4052 addition of properties to the loinc terminology uploading process (#4100)
* Allow for easier override of DataSource and dialect

* Add debug logging

* Load AskAtOrderEntry and AssociatedObservations properties from loinc.cvs.
Add changelog.

* Add disabled sandbox test used to develop loinc upload modifications

* Add flags to easily select running mode

* Add validation counters and use gziped csv input to save space in repo

* Implement revision suggestions.
As test is a sandbox remove large files and add readme and test notes to locate them before running the test.

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-10-03 08:48:40 -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
James Agnew fc82ed4e44
One more tweak to #4093 (#4094)
* One more tweak to #4093

* Add changelog
2022-09-28 16:46:00 +00:00
Nathan Doef 31e13e6adb
Upload Terminology with Endpoint Validation (#4035)
* add failing test

* Fix doc upload issue

* Add change log yaml file

* update due to review from Nathan

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: weiping202209 <weiping.yang@smilecdr.com>
2022-09-28 11:17:01 -04:00
James Agnew e4a2285f30
Make sure to not mix resource types in bulk export (#4093)
* Make sure to not mix resource types in bulk export

* Avoid dupes

* Add test
2022-09-28 15:16:15 +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
StevenXLi 9e1120a47a
4080 support onc requirements for group bulk export (#4081)
* added failing tests

* added include to bulk export processor, added support for different resource types in bulk export fetch id step

* added changelog

* fixed duplication issue, and added null check

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-09-27 14:51:43 +00:00
Tadgh f06f9dc90a
4084 error segment of bulk export job poll status is missing (#4085)
* changelog

* Change serialization rules

* Always populate error field even if no errors
2022-09-27 01:16:33 +00: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
James Agnew 641007f5b6
Fix DSTU2 conformance statement (#4082)
* Fix DSTU2 conformance statement

* Add changelog and test
2022-09-26 12:33:12 -07:00
Luke deGruchy 3435806df5
4058: Fix JpaPersistedResourceValidationSupport to search for resources that it currently doesn't handle (#4062)
* Add failing and passing tests with bundle JSONs for each scenario based on pared down versions of the following JSON bundle: https://smilecdr.com/docs/fhir_repository/clinical_quality_language/measure-bundle-example.json.html

* Add experimental code to handle cases of "Library" and "Measure". Add a measure report to measure unit test with new JSON with a MeasureReport to Measure resource (can't make it pass yet).

* Refine case statements for JpaPersistedResourceValidationSupport.  MeasureReport test passes if -ea is omitted from run configuration.

* Add changelog.  Remove TODOs from validator.

* Remove erroneous whitespace chance.

* Ken feedback:  Handle SearchParameters from the default case casting a wider net than just Library and Resource.  Assume all CanonicalType inputs to the switch statement have a URL.

* Get rid of TODO since it's not relevant.

* Disable test with only MeasureReport and Measure.  Fix case issue with filenames that was only discovered by running the github pipeline.

* Add more context to the Disabled text, including a reference to a new issue:  https://github.com/hapifhir/org.hl7.fhir.core/issues/930.

* Add more context to the Disabled text, including a reference to a new issue:  https://github.com/hapifhir/org.hl7.fhir.core/issues/930.
2022-09-26 10:08:04 -04:00
TipzCM 389bdce372
fixed bug (#4069)
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-09-26 13:43:11 +00:00
James Agnew 917cf8d062
Remove ActionRequestDetails (#3527)
* Add test

* Add test

* Start removing unneeded things

* Fixes

* Add changelog

* Test fix

* Address LGTM issues

* Resolve fixme

* Address review comment

* Add changelog

* Update doc

* Test fixes
2022-09-25 21:29:08 +00:00
James Agnew 3bab3544ec
Reduce SQL queries for _include (#4007)
* Rework includes processing for reuse

* Optimize include

* Test fixes

* Bump version down

* Fixed

* Update

* Test fixes

* Start to add javadoc

* Test fixes
2022-09-25 15:22:06 -04:00
James Agnew 3935b78083
Add operation blocking interceptor (#4057)
* Add operation blocking interceptor

* Work on interceptor

* Work on interceptor

* FIx up docs

* Address CVE

* Tweak changelog

* Address review comments
2022-09-25 14:19:17 -04:00
Tadgh 2770295638
Add MDM Expansion Docs (#4068)
* Add docs

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_expansion.md

Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_mdm/mdm_expansion.md

Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>

Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
2022-09-24 01:40:13 +00:00
Tadgh 6f80206776
Fix transactional issue in everything operation (#4063)
* Fix transactional issue in everything operation

* Add license files

* Add changelog
2022-09-23 08:33:08 -07:00
Tadgh f862098ce6
Add test and changelog (#4039)
* Add test and changelog

* Fix up tests
2022-09-22 05:15:05 +00:00
Tadgh 5a978646c5
Add changelog, test, and implementation (#4055) 2022-09-21 21:18:12 -07:00
jmarchionatto 27ecba796b
Change hsearch to consider unquoted parameter strings as prefix match (#4045)
* Change hsearch to consider unquoted parameter strings as prefix match

* Adjust test according to spec (code fixed before).

* Add :text handling to StringParam

* Adjust StringParam tokenization to spec.
Enable StringParam tests.
Add changelog.

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_2_0/4034-align-text-query-syntax-with-hapi-string-search.yaml

Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>

* Avoid changing simple query parameters.
Implement suggested tests.

* Consider a few Lucene Simple Query Syntax special cases

* Add search syntax changes to documentation and test to make sure samples are good.

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
2022-09-21 20:09:09 +00:00
Tadgh 392bfb790f
Fix content negotiation on binary streaming (#4053)
* Fix content negotiation on binary streaming

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_2_0/4051-content-type-negotiation-binaries.yaml

Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>

* Tidy logic

* Tidy logic

* Naming

* Wip

Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
2022-09-21 19:05:35 +00:00
MykolaMedynskyiSCDR 3349ad8ca9
3929 batch2 jobs file fetching step strict policy for response header content type (#3945)
* Adding failing tests cases.

* What was done:
-Accepting text/plain and application/json as import response content type.
-Added change log.

* Fixed NDJSON EncodingEnum

* Added content type application/json+fhir to the test

* Fixed code

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_2_0/3929-batch2-jobs-file-fetching-step-strict-policy-for-response-header-content-type.yaml

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

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_2_0/3929-batch2-jobs-file-fetching-step-strict-policy-for-response-header-content-type.yaml

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

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_2_0/3929-batch2-jobs-file-fetching-step-strict-policy-for-response-header-content-type.yaml

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

* Changed message

* Fixed code

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-09-21 08:29:32 -07: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
KGJ-software 4d16a109de
SMILE-3459 Implemented -l parameter in validator. (#3983)
* SMILE-3459 Implemented -l parameter in validator. Added SnapshotGeneratingValidationSupport to R4 support chain.

* SMILE-3459 Removed failing test that I added.

* Revert "SMILE-3459 Removed failing test that I added."

This reverts commit d11abc7ad5.

* SMILE-3459 Added test cases for loading local R4 profile.

* SMILE-3459 Added when clause to test names.

* SMILE-3459 WIP Logging assert isn't working.

* - changes to test for logging

* - change logging level to error

* - capture all logging events in tests

* SMILE-3459 Ensure validation error is logged when resource doesn't comply with profile.

* SMILE-3459 Added changelog.

* SMILE-3459 Made ValidateCommandTest less brittle.

* SMILE-3459 Changed LocalFileValidationSupport to support all resource types.

* SMILE-3459 Added LocalFileValidationSupportTest

* SMILE-3459 Created ValidationSupportChainCreator.

* SMILE-3459 Added new Msg.code for local profile load failure.

Co-authored-by: kylejule <kyle.jule@smilecdr.com>
Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
2022-09-20 13:36:41 -04:00
Tadgh d1f988f98a
Skip resource updating completely if found in package load. (#4036)
* add ability to skip loading package resources that already exists, to avoid reindex when loading IGs

* Add a test for validating no updates or creates are called on anything but binaries

* Add changelog

Co-authored-by: Craig McClendon <craig.mcclendon@accenture.com>
2022-09-20 08:45:37 -07:00
jmarchionatto 97b82596f6
Add :text handling to StringParam (#4047)
* Add :text handling to StringParam

* Return qualifier when set.
Add changelog.

* Fix changelog file name (duhhh)

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-09-20 11:36:37 -04:00
MykolaMedynskyiSCDR 14253dd0e3
3960 when creating a resource patient where patientmetasource is provided with a hash the hash value is overwritten (#3965)
* Adding failing test.

* What was done:
-Meta source id is not replaced if provided.
-Added change log.

* Fixed code

* More tests for meta source

* Overwriting meta source can be configured.

* Test naming convention uplift and renaming of overwrite flag along with setter/getter

* Fixed when the source did not return if there was no resourceID

* Test naming convention uplift and renaming of overwrite flag along with setter/getter

* WIP in getting search on _source to be returning the correct number of patients.

* Custom requestId now stored on its own column

* Simplified getRequestId method in BaseHapiFhirDao

* Simplified getRequestId method in BaseHapiFhirDao

* An unused variable has been removed

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-09-19 10:17:09 -04:00
Tadgh c3339f38c3
Rel 6 1 2 mergeback (#4033)
* 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

* Tidy versionenum

* Fix import

* Remove files that were repackaged

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>
2022-09-15 22:18:32 +00:00
TipzCM ae3faafc9a
change search method for missing parameter names (#3982)
* handle changing in missing parameters

* added changelog

* refactor step1

* refactor step 2

* refactor step 3

* refactor step 3

* more code review fixes

* tra lala

* tra lala

* blah

* more changes

* review fixes

* review point

* more review points

* blah

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-09-14 09:29:16 -04:00
James Agnew 6021a09288
Avoid NPE when run in IJ (#4018)
* Avoid NPE when run in IJ

* Add changelog
2022-09-13 20:25:15 +00:00
James Agnew 6c0c730ebc
ForcedOffsetSearchModeInterceptor should not modify the search when it is already manually marked as synchronous (#4016)
* ForcedOffsetSearchModeInterceptor should not modify the search when it
is already manually marked as synchronous

* Add changelog
2022-09-12 10:48:56 +00:00
Tadgh cb3cc1f434
Iam opensearch auth (#4011)
* Bump HS version, add support for credential provider

* License files

* Use index settings file instead of injecting a template at boot

* Changelog

* Typo

* fix logs

* Add javadoc
2022-09-09 23:24:06 +00:00
Tadgh 4226cae752
Broken bulk export (#4012)
* Implement test

* wip

* Fixed a bug in bulk export

* add changelog

* typo

* Switch out to debug logs
2022-09-09 23:18:30 +00:00
Qingyixia 306bb8b64a
Handling unexpected response status code of import-poll-status operation (#3939)
* Handling unexpected response status code when executing import-poll-status operation

* Handling unexpected response status code
2022-09-08 08:44:41 -07:00
Tadgh 6d9a19997f
Rel 6 1 1 mergeback (#4004)
* 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

* Fix bad mergback

* Added a couple of missing imports to a unit test.

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>
Co-authored-by: Kevin SmileCDR <kevinsmilecdr@Kevins-MacBook-Pro-2.local>
2022-09-08 10:38:42 -04:00
jmarchionatto 002a7dc670
Issue 3419 elastic search exception while pre expanding valueset with more than 10 000 concepts (#3991)
* Add test reproducing bug

* Refactor ValueSet expansion hsearch queries to use scroll.

* Use void method for never used return value.

* Execute action when transaction is active

* Update tests query counts as the CodeSystemVersion.pid is always queried now

* Enable test after reproduced bug fix.
Add changelog.

* Implement suggestions

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-09-07 15:52:38 -04:00
Nathan Doef 9b50b332a4
:nickname Qualifier Support for Custom SearchParameters (#3969)
* - add failing test

* 4977 Allow any search parameter to have a nickname qualifier.

* IT test to ensure nickname expansion is working on custom SearchParameters

* capture log output in tests

* changelog

* code review changes

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: kylejule <kyle.jule@smilecdr.com>
2022-09-07 08:52:37 -07:00
Tadgh cc183c7079
Ensure HS before attempting fulltext reindex. (#3995)
* Do not attempt fulltext reindex if disabled. Validate enabled before using any operation

* attribute
2022-09-07 08:35:57 -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
Qingyixia f3e6837fce
Fixed the issue of bulk export returning the wrong path if "Fixed Value for Endpoint Base URL" is set (#3958)
* Fixed the issue of bulk export returning the wrong path if "Fixed Value for Endpoint Base URL" is set

* Minor modifications according to the suggestions

* Modify the msg code number

* Modify the tests to be parameterized test

* Modifications according to review suggestions

* Update the msg code
2022-09-06 08:40:03 -07:00
Kai Kewley dd5c49a9ef
Add support for ICD-10 International Version (Fixes #3734) (#3849)
* Update CLI upload examples for R4.

* Fixes #3734 Add support for ICD-10 (International)

Include all concept properties in ICD-10 loader.

Remove newlines and tabs from ICD Rubrics.

* Bump Msg code and use in Term Loader.

* Added a changelog entry for this addition.

* Update icd10-dummy-test-en.xml

* Added a default impl to the new interface method to avoid breaking upstream projects.

Co-authored-by: Kevin Dougan <kevin.dougan@smilecdr.com>
Co-authored-by: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com>
Co-authored-by: Kevin SmileCDR <kevinsmilecdr@Kevins-MacBook-Pro-2.local>
2022-09-06 09:11:45 -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
StevenXLi a4a7fd9344
3987 group bulk export does not apply typefilter searches to members of the group (#3988)
* Create failing test

* Implemented the fix, fixed existing unit tests

* added changelog

* added test case for no filter, exclude 1 patient

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-09-02 13:53:52 -07:00
jdar8 21cce44524
3962 import csv to conceptmap needs status element (#3963)
* wip

* test

* refactor

* doc change and changelog

* add test cases

* edit msg.code

* fix msg code

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
2022-09-02 10:58:57 -07:00
Tadgh 9fd0addec6
Add test, changelog, and implementation (#3981) 2022-09-01 18:00:48 +00:00
StevenXLi 65d4fe81ad
3947 support http delete for operation $export poll status (#3961)
* Added failing test, and the methods that are necessary to not break the build

* Implemented solution to cancel jobs via delete request for poll status

* change log added

* change log name change to pass test

* Changed implementation to work with existing infrastructure

* code review changes

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-08-30 11:30:03 -04:00
Kunjan Patel bd39d65d0e
Update points.json (#2516)
Co-authored-by: James Agnew <jamesagnew@gmail.com>
2022-08-30 12:39:42 +00:00
Tadgh b9caec1c42
Rel 6 0 mb 3 (#3933)
* 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

* Add skip of checkstyle to upload

* Typo

* upping version enum, upping version number, 6.0.1

* Group Bulk Export rules exiting too early.  (#3643)

* Implementation, test, changelog

* Add jira link

* adding backport in yaml for 3642

* adding folder for 6.0.1 release

* pom changes to publish checkstyle to sonatype

* bad version in pom file

* Make FulltextSearchSvcImpl optional bean for ValuesetOperationProvider

* AUtomcplete error code

* updating comment indicating final erorr code

* Bump error code

* fixing version enum so release docs generate correctly, adding additional changelog for 3650

* 3684 subscription for delivering delete events formatted wrong (#3685)

* Fixed issue with delivering delete events Subscriptions

* Extracted deliverer class name to a constant, now shared across tests and interceptor class

* Added change log and doc changes

* moved the constant to a more appropriate place

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

* Version bump

* Add version enum

* Version enum and folder

* adding release pipeline yml file fo azure

* Adding autoclose for sonatype publishing (#3797)

* Add impl test and changelog (#3713)

* fix up changelog, new version

* Version bump

* Updating version to: 6.0.4 post release.

* reverting 6.0.4 commit

* Updating version to: 6.0.4 post release.

* removing double entry from preious release

* Add support for DSTU3 delete subscrion events, add test

* Add changelogP

* Add version enum

* Remove notnull

* Add test for DSTU2

* Updating version to: 6.0.5 post release.

* Fix up

* wip

* Adding solution and changeLog file.

* Adding failing test.

* fix up

* 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-08-30 02:29:02 +00:00
James Agnew 5509bd053d
Move partition interceptor (#3907)
* Add license headers

* Move partition interceptor

* More cleanup

* One more tweak

* Headers

* Add changelog

* Test logging enhancement

* Test fix

* Test fixes

* Add test method
2022-08-29 13:42:10 +00:00
Etienne Poirier b5f5cd3e75
3937 searching for resources with a target resource parameter in include fail (#3938)
* Adding failing test.

* Adding solution and changeLog file.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-08-22 08:23:35 -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
Jose Arturo Garcia 7f7b7d6303
Update points.json (#3919)
* Update points.json

* Update points.json
2022-08-15 13:45:43 -04:00
dotasek dad1e420fa
3764 Fix NullPointer on validator meta extension (#3910)
* Failing test

* Failing test

* Add necessary package load to test

* WIP add minimum code for passing test

* Use PrePopulatedValidationSupport binaryMap in NpmPackage

* Rename test

* Add test for non-CachingValidationSupport

* Rename Tests + InvalidExtensionValue test

* Revert change to ValidateDirectory

* Gentle reformat

* Fix typo

* Test CachingValidationSupport fetchBinary

* Test for NpmPackageValidationSupport

* Refactor

* Check for nulls when adding Binary

* Test PrePopulatedValidationSupport addBinary

* Test ValidationSupportChain

* Move ValidationSupportChainTest to proper package

* Remove FIXME in VersionSpecificWorkerContextWrapper

* Test VersionSpecificWorkerContextWrapper

* Add example in docs

Co-authored-by: dotasek <david.otasek@smilecdr.com>
2022-08-12 15:01:07 -04:00
MykolaMedynskyiSCDR 64e1f4d381
Fixing response message when deleting non-existing or deleted resource. (#3898)
* Fixing response message when deleting non-existing or deleted resource.

* Changed names of properties.

* The full ID shown in message, not just IdPart
2022-08-11 16:37:12 -07:00
James Agnew f4a0397b18
Add test for #3890 (#3891)
* Add test for #3890

* Remove unneeded import

* Add changelog
2022-08-09 17:30:10 -04:00
michaelabuckley 60a879c842
Renable elasticsearch tests (#3850)
* Renable elasticsearch tests

Limit elasticsearch container to 512MB instead of the default 4GB.
2022-08-07 07:09:12 +00: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
jmarchionatto 7010ddd715
Allow hsearch sorted offset searches (#3864)
* Start direct HSearch path

* Support no HSearch

* Spike out the direct resource query

* Implement hsearch fast load

* Fix last master merge in issues

* Implement revision requests

* Test direct resources (no IDs query) sorting

* Use mock to count freetext searches to avoid implementing interface in test

* Remove fixme

* Make listener optional as it is used only for tests

* Provide new dependency

* Widen fast path test scope and fix previously untested configurations

* Make method transactional as it can be called from outside a TX (at least testObservationLastNAllParamsPopulated does)

* Update test validation

* Allow hsearch sorted offset searches

* Add changelog

Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-08-04 12:30:20 -04:00
Patrick Werner b026ac10e5
Bump fhir.core to latest version (#3593)
* 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

* added support for OO.issue.details from Java RI Validator

* remove duplicated Msg.code

* 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

* removed duplicated dependency with wrong version

* fixed test file(added a Base64 string)

* fixed tests

* fixed test:
history?_since is an instant

* removing time from date-strings in examples

* fixed more instant strings

* changed filtering of messages to messageId

* fixed messageId filter on missing profiles

* changed messageID system string to Grahames preferred String

* updated MsgIds of unsupported methods

* removed fixed commons-codec version as fhir.core uses commons-codec:1.15
This will introduce issues with the android built.

* fixed GraphQL Test

* fixing test issue caused by different message string, switch to details code assertion

* fixing test issue caused by different message string, switch to details code assertion

* updated Msg.codes

* updated Msg.codes

* fixed duplicated Msg.codes

* setErrorOnInvalidValue set to false in test

* reverted date precision test changes

* updated r5 resources to latest build version

* updated to latest snapshot, https://github.com/hapifhir/org.hl7.fhir.core/issues/884 causes test failures.

* Try to fix message codes

* Test fixes

* Checkstyle fix

* Test fix

* Try to avoid CME

Co-authored-by: markiantorno <markiantorno@gmail.com>
Co-authored-by: katiesmilecdr <88786813+katiesmilecdr@users.noreply.github.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.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: James Agnew <jamesagnew@gmail.com>
2022-08-03 16:12:59 -04:00
jmarchionatto 71a3fa949c
Fix range calculation for number or quantity search parameters (#3870)
by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-08-03 11:51:34 -04:00
TipzCM eae1c0ffb8
3846 migrate bulk import pull to batch2 (#3853)
* still fixing tests

* migrated a bulk import pull job t obatch 2

* changelog

* cleanup

* review fixes

* minor tweaks

* cleaningup

* tra la la

* blah

* blah

* updating msg

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-08-03 10:50:51 -04: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
jmarchionatto 5586b325ce
Issue 3857 elastic lucene search returns only 50 results when offset0 and count100 (#3858)
* Add logback definition to project to stop debugging all output

* Fix limit definition to include _offset=0 case

* Move test required resources from previous test module

* Add changelog

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-07-28 19:09:31 -04:00
Etienne Poirier d5a69d82b2
3859 hapi fhir doc snippet link referring a file as opposed to classpath (#3860)
* Using snippet type of classpath as opposed to file.

* Modifying documentation.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-07-28 16:07:58 -04:00
TipzCM 9a1d6f3172
3821 term code system batch jobs (#3826)
* step one

* blah

* no working test

* updated existing tests

* delete code system version and code system jobs

* trying to get terminology fixed

* updating tests

* need to have some movement

* added completion handler

* added clearing code for failsafe

* review points

* fixing tests

* fixing tests

* more test fixes

* fixing more tests

* review fixes

* todo

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-07-27 14:50:42 -04:00
Etienne Poirier d405fa1f32
3792 providing capability to alter source resource content before mdm matching (#3802)
* Solution baseline.

* Adding integration test.

* Parameterizing the test

* Adding to documentation.

* Modification following code review.

* Modification following code review.

* Adding documentation.

* Adding documentation specific to MDM customization with pointcut.

* Modifications following second code review.

* Code review modifications.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-07-27 08:45:59 -04: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
Tadgh 6d9bbbec1c
Add support for deletes to stu3/dstu2 subscriptions. (#3836)
* Add support for DSTU3 delete subscrion events, add test

* Add changelogP
2022-07-22 19:24:59 +00:00
Nathan Doef cbcf3f1942
3829 Fix Subscriptions created with package installer and partitioning enabled bug (#3830)
* - failing test + increase existing code coverage

* - fix: use RequestPartitionId.defaultPartition() to handle malformed default partitions

* - changelog

* - typo
2022-07-22 13:12:07 -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
Tadgh 0a1e782a8e
3817 enhance subscription before message delivery (#3824)
* Add changelog

* implementation and changes

* collection implementation

* tidy
2022-07-22 01:56:27 +00:00
JasonRoberts-smile f5697e13c9
3755 use batch2 job after search parameter change (#3806)
* broke some tests

* invoke batch 2 reindex

* changelog

* fix compile error after merge

* fix failing test

* hook up partition support

* fix some failing tests

* deprecate the old reindex service

* fix more failing tests

* fix broken test
2022-07-21 12:26:15 -07:00
jmarchionatto e5cc727013
Document the need to reindex when enabling full resource storage with indexed resources. (#3815)
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-07-20 13:24:49 -04:00
jmarchionatto 67e67bbf44
Issue 3804 application fails to start 610 pre14 snapshot with beandefinitionoverrideexception invalid bean definition with name loadidsstep (#3805)
* shared steps

* Add changelog

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-07-19 10:00:28 -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
jmarchionatto 398ed99f86
Hsearch no scroll queries (#3799)
* Avoid scrolling result for not-asynchronous searches

* Adjust deprecated properties

* Add changelog

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-07-15 18:04:12 +00: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
Tadgh ab4d9578e7
Make patch `add` actually add instead of replace. (#3800)
* Fix some patch problems

* Changelog
2022-07-15 16:29:16 +00:00
jdar8 5575e722d4
3788 FHIR patch on soft deleted resource undeletes resource (#3789)
* failing test

* fix

* refactor

* refactor

* changelog

* changelog

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3788-fix-fhir-patch-on-soft-deleted-resources.yaml

Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
2022-07-14 18:41:36 +00:00
Tadgh 05ebf0286d
3790 remove legacy search builder (#3791)
* Remove legacy SB

* Add changelog

* Fix more messages

* Fix missed hapi message

* Fix up more messages
2022-07-14 16:01:44 +00:00
michaelabuckley 94a1cda512
Fix sort in hsearch - use full millis (#3787)
Fix sort in hsearch - use full millis
2022-07-13 13:32:40 -04:00
michaelabuckley 1785c07283
Mb implement token :not inmemory (#3784)
Implement token :not and fix :not-in in InMemoryMatcher

Both `:not` and `:not-in` require that NONE of the values in an OR-list match, so we need some machinery to do a none-match instead of any-match.
2022-07-13 15:51:24 +00:00
jamesagnew 6ba84e1c51 Changelog 2022-07-12 16:01:18 -04:00
jamesagnew b7c316fb21 Credit for #3619 2022-07-12 15:57:26 -04:00
Tadgh f0decbf8c8
Mergeback 2022 07 08 2 (#3772)
* 3138 externalized binary packages (#3139)

* Add test and impl

* Add changelog

* Fix test

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3138-support-externalized-binaries.yaml

* add beans to test configs

* Typo

* Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/IBinaryStorageSvc.java

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

* Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/NullBinaryStorageSvcImpl.java

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

Co-authored-by: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>

* 3131 - Added support for the lookup operation in the Remote Terminology code (#3134)

* Remove leading underscores from identifiers (#3146)

* Version bump

* License files

* version.yaml

* Add executeRawSql() method to Migrator (#3183)

* Add implementation, add test

* Add javadoc

* Add another helper function

* Bump version

* 3153 update unknowncodesystemwarningvallidationsupport to have configurable severities (#3155)

* 3153 updating the unknowncodesystemwarningvalidationsupport class

* 3153 updating version for smile

* 3153 update broken tests

* 3153 adding log

* 3153 cleanup

* 3153 cleanup

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

* Add backport info

* Avoid creating ResourcePersistentId for placeholder resources with null ID (#3158)

* Add check before mapping storage ID to resource ID in TransactionDetails.

* Add change log.

* Changed to instead prevent creation of ResourcePersistentId with null ID value.

* Changed to instead prevent ResourcePersistentId being created with null resource ID.

Co-authored-by: ianmarshall <ian@simpatico.ai>

* Fix bug loading packages in non-database mode (#3199)

* Add implementation

* Add changelog

* Add backports

* 3164 updating code review points (#3165)

* 3164 updating code review points

* 3164 updating code review points

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

* Add executeRawSqlStub (#3203)

Co-authored-by: Joanne Mendoza <joanne@smilecdr.com>

* Add new version

* begin with failing test

* fix bug

* change log

* change log

* Add backport informationm

* begin with failing test

* fix issue

* change log

* code review

* Add backport info. Add folder

* fixed

* Add test

* Update test

* Add backport info

* Bump minor version

* 3170 language portion of language code is case insensitive (#3171)

* 3170 language portion of language code is case insensitive

* 3170 adding changelog

* 3170 house keeping

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

* Add backport info:

* Add version enum

* Bump hapi version to 5.6.3

* Add version enum

* Add changelog folder and version.yaml

* Patch vulnerability, add changelog

* AuthorizationInterceptor concurrency failure (#3528)

* Fix #3256 - AuthorizationInterceptor concurrency failure

* Test fixes

* Add backport info

* Fix test for lang level 8

* Bump hapi

* License updates

* Add release pipeline

* remove checkstyle from old version

* swap jdk for build

* Couple removals for arbitrary failures

* disabling tests for this next 5_6 release because we shoot from the hip here

* Updating version to: 5.6.5 post release.

* add new folder

* fix versionenum

* remove unreleased versions

* Bring back into line

Co-authored-by: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
Co-authored-by: TipzCM <leif.stawnyczy@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: IanMMarshall <49525404+IanMMarshall@users.noreply.github.com>
Co-authored-by: ianmarshall <ian@simpatico.ai>
Co-authored-by: Joanne Mendoza <joannemmendoza@gmail.com>
Co-authored-by: Joanne Mendoza <joanne@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: katie_smilecdr <katie@smilecdr.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
Co-authored-by: markiantorno <markiantorno@gmail.com>
2022-07-12 11:09:02 -07:00
Tadgh 57ee93251a
Mergeback 2022 07 08 (#3771)
* fix handling of common search parameters

* Revert "fix handling of common search parameters"

This reverts commit 89c45eebdc.

* Fix implementation, add test (#3378)

* Fix implementation, add test

* Tighten test

* Rip out dead modules

* Add changelog

* Jr 20220210 handle common search params in contained searches (#3377)

* fix handling of common search parameters

* add support for reference search parameters with multiple paths

* Issue 3357

* Version bump

* Fixed null pointer exception for re-loading subscription on cdr restart and when there's no partition id in the request, and added tests

* added changelogs for this fix

* Fix broken changelog file

* Can't specify specific resource type permissions for bulk export (#3376)

* deny user from exporting without perms

* add unit tests

* add changelog

Co-authored-by: olivia-you <olivia.you@smilecdr.com>

* Make migration donothing as it was added in error

* Remove ehcache

* Add version.yaml:

* Add to sources/javadocs for dist

* Fix typo

* fix up pom

* wip test removing checkstyle plugin from deployable pom

* remove test pom changes, instead just dont deploy to sonatype

* typo

* Version bump

* Add implementation, testing, and changelog

* Add backport info, make aware of 6_0_0

* add jira ref

* Fix test

* Add versionenum

* Bump dep for spring, add changelog, add versionenum, add changelog folder

* Actually do the version bump

* 3654 postgres lobs (#3656)

* Implementation, test, changelog

* Modify changelog

* Fix changelog

* Add upgrade.md file

* Modify to yaml changes

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_3/3654-lob-problems.yaml

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

* tidy

* more work

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

* Fix bad yaml indent

* Version bump

* Back out the reindex changes introduced in 5.7.3

* update changelog

* version bump

* added fix for subscription in default partition when default partition's id is null

* added changelog

* Add version info and changelog folder

* adding release pipeline yml file fo azure

* Fix parameter count limitation on MSSQL/Oracle large transactions (#3075)

* Fix parameter count limitation on MSSQL/Oracle large transactions

* Changelog fix

* Move changelog

* Force a change to trigger CI

* Test refactoring

* Backport oracle fix

* Fix backport

* upping version to 5.7.5 for release

* add versionenum

* Updating version to: 5.7.6 post release.

* Add query-chunk-aware code

* Add new folder

* Fix up versionenum

* Remove imports

Co-authored-by: Jason Roberts <jason.roberts@smilecdr.com>
Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Mark Iantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>
Co-authored-by: olivia-you <olivia.you@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
2022-07-12 11:08:46 -07: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
Qingyixia 3d4556b70b
Move PATCH to hapi-fhir-storage (#3763)
* Not the final version

* Support PATCH operation

* minor modifications

* minor modifications

* Final version

* Final version
2022-07-11 14:56:22 +00: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
Ken Stevens 839a1b53e9
fix batch intermittent and status update atomicity (#3773)
* fix intermittent and status update atomicity

* change log

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-09 08:51:04 -04:00