Commit Graph

9389 Commits

Author SHA1 Message Date
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 fb3512df1e
Deprecate dao methods that do not take a RequestDetails parameter (#4199)
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-10-25 14:01:24 -04: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
William Denton 51627fb873
fix generate-multi-file and generate-single-file goals with R5 (#4134)
* fix generate-multi-file and generate-single-file goals with R5
structures

* clean up Javadoc & fix R5 issue when generating for all resources
2022-10-24 18:42:29 -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
Tue Toft Nørgård 1dba9392ef
#4078 Fix BinaryAccessProvider empty stream check (#4170)
* Fix #4078 by using theRequestDetails.loadRequestContents() to check if the input stream is empty or not

* Remove unused imports
2022-10-21 13:08:21 -07: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
jmarchionatto f00f65aae4
Issue 4052 addition of properties to the loinc terminology uploading process (#4135)
* 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.

* Add new CODING property handler to run after all TermConcepts are created, to have them accessible for extracting display value

* Add small test file to ease setup

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-10-14 08:12:12 -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
alackerbauer 379220fc46
removed link (#4132)
Co-authored-by: Anna <anna.lin@smilecdr.com>
2022-10-12 08:13:17 -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
KGJ-software c5e1effe5b
3240 Added test case. Currently does not reproduce bug. (#4108)
* 3240 Added test case. Currently does not reproduce bug.

* 3552 Fixed test case.

* 3552 Added StrictErrorHandler validation before applying patch.

* 3552 Use logger instead of sysout.

* 3552 Use try blocks.

* 3552 Better test name.

Co-authored-by: kylejule <kyle.jule@smilecdr.com>
2022-10-07 09:50:49 -04:00
Tadgh 18093bf311
Hl7 core bump (#4110)
* Bump to 5.6.67

* wip

* wip

* Remove capabilitystatement2

* Update fhirversion.properties

* Remove xpathusage for r5

* add new structure defs
2022-10-06 17:50:45 +00: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 26756a40bb
add message key to all message types (#4101)
* add message key to all message types

* move test

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-10-01 15:36:04 +00: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