Commit Graph

4034 Commits

Author SHA1 Message Date
michaelabuckley 06030094c8
Add res_id, and partition_id to string norm and exact indexes (#3569)
Add res_id, and partition_id to string norm and exact indexes to avoid random row reads.
2022-04-29 08:12:29 -04:00
Ken Stevens 10ebb082d0
Issue 3563 mdm nickname support (#3565)
* added NicknameMap

* added NicknameSvc

* create NicknameInterceptor

* test interceptor integration

* add nickname matcher

* test nickname matcher

* unit test

* documentation

* unit test

* cleanup

* cleanup

* Msg.code()

* Msg.code() in test

* Msg.code()

* review feedback
2022-04-28 18:02:56 -04:00
Jaison Baskaran e0f1b913b7
Support _total and _count works for hibernate search (#3567)
Add support for _total, _count, and _offset to Lucene backend.

Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-04-28 16:35:39 -04:00
Kevin Dougan SmileCDR dd5ab4ede7
Add New Index On HFJ_RESOURCE For $reindex Operation (#3536)
* 3534 - Added new multi-column Index and removed existing single-column Index.
* 3534 - Added PARTITION_ID to the new Index.
* Change migrations to have no timeout. 

Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
2022-04-26 17:19:05 +00:00
seanmikalson-smilecdr 68c8523046
$translate operation implementation for remote terminology (#3552) 2022-04-25 12:37:15 -07:00
Tadgh f7a31287b6
3558 bulk export premature deletion (#3562)
* Implementation, parameterize test, changelog

* Bump spring framework for a vuln while i'm in here

* Fix number of changelog

* Add IS NOT NULL to query
2022-04-24 01:46:44 +00:00
jdar8 5ccb4effb0
3547 Interceptor hook for client-assigned IDs (#3559)
* add pointcut

* draft test

* fix test, change name and location of pointcut

* add changelog

* change check condition, improve changelog wording

* improve changelog wording

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

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

* change pointcut name

* update test

* fix test

* fix changelog

* renaming variables in test

Co-authored-by: Justin_Dar <justin.dar@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-04-22 18:09:25 -04:00
Tadgh 53c8b067d5
Support forward references in Group Bulk Export (#3558)
* Preliminary test work to generate forward-reference data

* Complete implementation

* Permit Practitioner/Organization as forward references in bulk export group params

* Wip

* Fix test

* Add error number

* Address review comments

* Update assert
2022-04-22 05:33:10 +00:00
JasonRoberts-smile 1114c72f03
Further expunge refactoring (#3550)
* convert expunge public interfaces to use ResourcePersistentId instead of Long

* changelog

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

* Revert some work

* Add changelog

* refactor method into SeachParamRegistryImpl

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

* Add daoconfig settings

* Updatae test

* Rename deexternalize -> autoinflate
2022-04-20 13:47:02 -04:00
James Agnew 5dfdc91682
Add gated execution mode for Batch2 (#3545)
* Add gated execution mode for Batcvh2

* Allow for async processing

* Test fixes

* Cleanup

* Add javadoc

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

* Start async path

* start async scroll

* Limit size to avoid saving too many results

* Allow unbounded results when no limit set.

* Larger default scroll page size

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

* add changelog

* fix

* add tests again

* oops. missed a file.

* clean up

* fix resolveResourcePersistentIds

* fix RESOURCE_PID constant

* format

* apply suggestion

* get R5 pid key

* better solution

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

* post-merge clean-up

* changelog
2022-04-12 14:12:10 -04:00
James Agnew 8d116b932e
Refactor to restore LGTM functionality (#3455)
* Refactor to restore LGTM functionality

* Compile fix

* Work on cleanup

* Attempt to restore LGTM

* Work on tests

* Fixes

* Build fixes

* Build fix

* Test fix

* Test fixes

* Work on build

* License header updates

* Test fixes

* Test fixes

* License header

* Test fix

* Test fix

* Test fixes

* Restore LGTM

* Fix azure

* Disable test

* Test fixes

* Test cleanup

* Build fix

* Build fix

* Test fix

* Test fix

* Test fixes
2022-04-10 15:54:27 -04:00
michaelabuckley 1a8678cb1c
Implement support for Quantity search parameters in the Hibernate Search index (#3477)
* markers for new quantity hibernate search support

* Add quantity search

* Add normalized (canonical) quantity search

* Add comment

* Use double values instead of BigDecimal to avoid scaling

* Remove multiple case labels which are not supported until source version 14

* Remove switch rules which are not supported until source version 14

* Use constant for error message used in tests

* A failing test for multiple indexed quantity paths

* Disallow dirtying context for nested classes

* failing test for normalized units

* Make sp.value-quantity.quantity a nested structure to handle correlated queries for code and value.
Save units for canonical case and consider them when querying.
Collapse normalized sub-structure under *.quantity.

* Nest sp.value-quantity instead of sp.value-quantity.quantity for compatibility with other nested types (IE. token)

* Comment out debug statements

* Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedLuceneClauseBuilder.java

Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>

* Add test for nested correlated quantity query

* Address MR comments

* Add proper handling of or query predicates

* Use positive conditions for better readability

* Add tests to validate behavior of combined and and or clauses, including some making no sense but still syntactically correct.

* Only consider normalized quantity searching if ModelConfig search level is NORMALIZED_QUANTITY_SEARCH_SUPPORTED

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: jmarchionatto <60409882+jmarchionatto@users.noreply.github.com>
Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>
2022-04-08 08:25:27 -06:00
longma1 01d6e15f90
2579 partitioned support for mdm (#3485)
* committed changes discussed at tasking

* Changed the subscription message to store the request partition

* modified mdm subscription loader to create a cross partition subscription in the default partition if multitenancy is enabled

* Fix errors when running Multitenant IT for mdm

* Added partition id to mdm golden resource search and creating/updating golden resource

* added partition id column to the mdm link table

* Added partition id of the source resource to partition id column of the mdm link table

* broken build

* working -links, missing hapi tests

* Fixed the mdm link db table due to feedback

* added IT for create link mdm operation, also added changes to pass the IT

* Fixed test for create mdm links, added test for update mdm link on partitioned server

* changed mdmLink search from searchbyExample to criteriaBuilder, added partitionHelperSvc to determine partition

* added test for merge golden resource and search golden resource on partitioned server

* added unit test for not duplicate on partitioned and non-partitioned server

* added criteriabuilder search and tests

* code cleanup

* added partition support to -merge-golden-resources operation

* test cleanup

* fixed  operations with multitenancy

* added test for mdm clear operation

* added waiting for batch job to finish in mdm clear operation test

* added query to dao to support partitioned server for mdm clear operation

* resolve mistake from merge conflict

* added mdm-submit operations, also fixed paging for -query

* added partitionIds constant

* fixed build issue where there was no Code.msg in mdm partition exceptions

* code review fixes

* fix broken test, also fix a bug where query link could not query by linkSource properly

* fix test stubbing

* bump hapi version to 6.0.0-PRE10-SNAPSHOT

Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Long Ma <long@smilecdr.com>
2022-04-06 15:48:30 -04:00
Ken Stevens 40de855d17
Add tests. pull some inner classes out as package private classes. (#3516)
* Add tests.  pull some inner classes out as package private classes.

* review feedback
2022-04-02 20:34:26 +00:00
Tadgh 05bc208192
Fix for path parsing in STU3 SPs (#3503) 2022-03-30 08:40:17 -07:00
Jaison Baskaran f88d2d63bd
Fix QuestionnaireResponse reference search on canonical urls (#3502) 2022-03-30 07:56:11 -06:00
Mark Iantorno 179c970144
Issue 3486 (#3487)
* added failing tests

* tests pass

* Added changelog and javadocs

* fixed package tests for resources with no active field

* adding jira ticket number

* feedback from code review'

* switching to old style switch statement'
2022-03-30 08:52:52 -04:00
Tadgh f87f468521 Move non-DB modes to storage 2022-03-27 16:51:35 -07:00
Tadgh b1e2d7c104
Add test, add changelog, fix bug (#3494)
* Add test, add changelog, fix bug

* Test fix

* Fix some more test artifacts
2022-03-26 20:34:43 -04:00
Tadgh 5b413a9135
Package move-around (#3488)
* moved classes

* Bump version

* licensing

* Repackage, fix messages

* reject empty streams

* Remove dead import

* Version bump

* Fix up test to actually return a data stream

* Move null binary svc to storage
2022-03-26 22:43:41 +00:00
James Agnew b833c13a3c
Improve batch2 error handling (#3482)
* Improve batch2 error handling

* Build fixes

* Work on reindexing

* Test fixes

* Account for gzipped contents

* License header updates

* Register VS operations on public server

* Test fix

* Build fix

* Remove animal sniffer plugin

* Compile fix
2022-03-26 17:40:12 -04:00
michaelabuckley 1dcc64ee44
Fast-path for lucene queries that skip the database (#3468)
* Store resource data inline with lucene/es resourcetable index.
* Use fulltextsearch to load resources if resource inlined in ES/Lucene index
Co-authored-by: Jaison Baskaran <jaisonb@gmail.com>
2022-03-25 16:21:47 +00:00
michaelabuckley 9e46fad1b9
Undo "helpful" IntelliJ edit (#3489)
IntelliJ added a compiler configuration which should not have been committed.
2022-03-24 18:43:47 +00:00
michaelabuckley 92db526786
Skip database query when hibernate search fully satisfies search (#3478)
If a query is completely satisfied by Hibernate Search, skip the database.

Co-authored-by: Jaison Baskaran <jaisonb@gmail.com>
2022-03-22 22:41:21 +00:00
Ken Stevens 50e6e94105 review feedback 2022-03-21 15:08:04 -04:00
James Agnew f82534ca51
Convert Reindex into Batch2 Job (#3458)
* Start working on reindex job

* Updates

* Ongoing work

* Ongoing work

* Work on reindex

* Reindex work

* Add logging

* Fix typo

* Test fix

* Test fix

* Address fixme

* Liocense header

* Resolve fixme

* Add logging

* Update logs

* Address review comments

* License header

* Test fixes

* Test fix

* Test fixes

* Test fix

* Version bump

* Version bump
2022-03-19 16:07:58 -04:00
jmarchionatto f518f30506
Issue 3450 there is no way to recreate freetext indexes for terminology entities (#3481)
* Add reindex-terminology batch command

* Handle number of thread throttling and concurrency with other terminology batch operations

* Add required dbcp2 dependency

* Fix test

* Improve ConnectionPoolInfoProvider setup. Handle maximum connections.

* Remove java higher version construction

* Remove unused config

* Add reindex terminology integration test.
Reset termConcept counters before pre-expanding, which otherwise accumulate if it was pre-expanded before.

* Address MR comments

* Adjust test to tested class change

* Adjust test to tested class change

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-03-18 15:09:25 -04:00
jmarchionatto e45f7ee9cb
Issue 3450 there is no way to recreate freetext indexes for terminology entities (#3463)
* Add reindex-terminology batch command

* Handle number of thread throttling and concurrency with other terminology batch operations

* Add required dbcp2 dependency

* Fix test

* Improve ConnectionPoolInfoProvider setup. Handle maximum connections.

* Remove java higher version construction

* Remove unused config

* Add reindex terminology integration test.
Reset termConcept counters before pre-expanding, which otherwise accumulate if it was pre-expanded before.

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-03-18 08:39:12 -04:00
Mark Iantorno 49e19d9779
Issue 3441 reindex query being ignored (#3451)
https://github.com/hapifhir/hapi-fhir/issues/3441

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-03-14 15:18:43 -04:00
michaelabuckley 03b6c589c8
New indexing for number and quantity search parameters (#3464)
* New Add Index forced-INCLUDE columns, and Online option

* Remove forced-include.  Simpler just to add all columns to index.

* New date index definitions.

* Oops.  Remove test for deleted feature.

* Cleanup

* Drop IDX_SP_DATE_UPDATED

* Add online option to drop index

* Update annotations to match and redefine FK

* Push sp->resource FK down to control name

* remove dead end

* Cleanup date tests

* New token query test cases for sql extraction

* New token search param indexing.

* Continue to allow the legacy hibernate names while we update the indexing.

* Fix jpa annotations with overloaded field

* Decide on token sorting - we do it.

* review comments

* fixme

* disable dead data migration too

* review fixups

* Test cases for numeric search

* add ne and ap

* Test for Numeric SP

* start

* finish number

* new indexing for quantity

* Move config

* cleanup
2022-03-11 16:23:06 +00:00
michaelabuckley 80d1a5a6f8
Mb new token search index (#3386)
* New token search param indexing.
* New token query test cases for sql extraction
* Retire JPA fk ugly nams
2022-03-11 00:51:53 +00:00
Ken Stevens dfd99c5471
improve search parameter registry logging (#3452)
* Startup log cleanup.  Use cached fhir contexts.

* improve logging

* improve logging

* add full comparator

* wrap resource search param map

* rename wrapped map methods

* add fixmes

* further searchparam encapsulation

* fix regression found by test

* improve logging

* pre-review cleanup

* pre-review cleanup

* bump hapi version

* license

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

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

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

* make changes to tests

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

* Search narrowing tweaks

* Test

* Test fixes

* Try to fix LGTM

* Add license headers

* Test fixes

* Test fixes
2022-03-07 20:27:21 -05:00
Jaison Baskaran 0e9372775b
Fix to address lastN search limiting to only 100 hits. (#3456) 2022-03-07 22:04:54 +00:00
Jaison Baskaran abea0389be
2843 questionnaire include url fix (#3447)
* Added test to verify BUG: #2843 (_include doesn't return canonically referred resource)

* Fix '_include' query search by native query to support canonical url references

* Fixed code review comments

* Restored the res_type condition on join
2022-03-07 16:39:13 +00:00
Jaison Baskaran ecf782d59e
Fix '_include' to work for canonical urls (#3440)
* Added test to verify BUG: #2843 (_include doesn't return canonically referred resource)

* Fix '_include' query search by native query to support canonical url references

* Fixed code review comments
2022-03-03 21:28:19 -07:00
michaelabuckley 20e092ba6d
Better error messages for ValueSet $expand contextDirection=existing (#3446)
* Better error messages for ValueSet $expand contextDirection=existing
* Apply to $lastn too - it uses aggregations
2022-03-03 21:11:08 -07:00
Tadgh d11a312abf This bean should not be lazy 2022-03-03 18:59:14 -08:00
Tadgh a2133f6940
Break a couple Circular Bean Dependencies (#3437)
* Rely on context refresh event instead of postconstruct. Load bean lazily.

* Remove parent autowire

* Break termcodesystem circular dependency with new bean

* Break cycle between BaseTermReadSvcImpl and TermCodeSystemStorageSvcImpl

* move back into helper method

* Rip out scheduling and submission to spring batch away from BulkDataExportSvcImpl

* wip

* Fix bean naming

* Revert

* re-add autowiring

* Reformat

* docs and reformat

* Back out change

* feedback from review

* merge conflicts
2022-03-03 09:37:40 -05:00
jmarchionatto 4b5f75c069
Issue 3421 pre expansion fails for valuesets with more than 1024 concepts (#3434)
* Build search queries involving many predicates avoiding crashing when number is larger than configured BooleanQuery.maxClauseCount

* Add changelog

* Restore temp directory config

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-03-02 14:11:55 -05:00
James Agnew f614eaf6c8
Avoid error when unknown code system behaviour set to warning (#3436)
* Avoid error when unknown code system behaviour set to warning

* Add changelog

* Test fix

* Build fix

* Fixes

* Address review comment
2022-03-01 17:30:59 +00:00
James Agnew 2cba62b4e8
Enable search narrowing on large ValueSets (#3405)
* Enable search narrowing on large ValueSets

* ValueSet improvements

* Work on narrowing

* Work on narrowing

* Work on narrowing

* Work on narrowing

* Add test

* Work on narrowing interceptor

* Work on narrowing

* License headers

* Refactor code narrowing

* Add docs

* Version bump

* Test fix

* Test fixes

* Build fix

* Fixes

* Version bump

* Test fix

* License header updates

* Build fix

* Test fixes

* Test fix

* Test fix

* Docs fix

* Test fix

* Test fix

* Resolve fixme

* Bump

* Force a CI build

* Make CI happen again
2022-03-01 09:16:31 -05:00
Tadgh 68c1015552
Bump core to 5.6.36 (#3433)
* Bump version

* Add changelog, make use of theNoInactive flag

* add test

* remove magic strings
2022-03-01 08:23:48 -05:00
michaelabuckley 86f7373f16
Distinguish multi-coded items during token autocomplete (#3429)
Add nested indexing to support autocomplete of multi-coded items.
2022-03-01 00:59:09 +00:00
kailiu-smile 1bc6e0e3ae
Smile 2775 package install logs ignore resource validation (#3381)
* Added log to the create() and valiForUpload() methods in the PackageInstallerSvcImpl class

* Added helper methods to extract URL from SearchParameter.Tested and fixed log entries.

* Changelog entry

* Update 3384-Package-Install-added-logs-for-resources-validation.yaml

Co-authored-by: Kai Liu <kliu@Kais-MacBook-Pro.local>
2022-02-28 19:52:43 +00:00
James Agnew f2afb0844d
Fix migration (#3428) 2022-02-27 21:25:14 -05:00
James Agnew b7d1ae217d
New batch framework / Bulk Import (#3387)
* Work on new batch framework

* Work on new batch framework

* Work on new batch framework

* Work on batch

* Compile working

* Work on bulk import

* Adjust import

* Work

* Work on batch

* Bump version

* WOrk on new batch processes

* Work on bath

* Bump to PRE4

* Build fixes

* CLeanup

* Small tweak

* Add exception code

* Test fixes

* Test fixes

* Test fix

* Additional synchronization

* Add license headers

* Test fixes

* Test fixes

* Add changelogs

* Address PG

* Test fix

* Test fix

* Test fixes

* Review notes

* Work on tests

* Test fixes

* Test fix

* Work on tests

* Tets fix

* Test fixes

* Test fixes

* Add missing exception codes

* Test fix

* Test fixes

* More test fixing

* License headers

* Test fix

* Add new test logging

* Work on tests

* Test fixes

* Test fix

* Resolve fixme

* Try to avoid test failure

* Add import command

* Work on storage

* Fix error codes

* Fixes

* License header

* Build fix

* Build fixes

* Fix dep
2022-02-27 16:04:49 -05:00
Ben Li-Sauerwine 65776bbab3
Adds a NDJSON-capable Bulk Data Import Provider (#3039)
* NDJsonParser with one example test.

* Add test for empty NDJson, and fix bug for empty NDJson.

* Adds multi-Patient test, and fixes bug whereby all multi-line NDJSON would be put into the same line.

* Adds test for NDJson with newlines in it.

* Adds test for converting non-Bundle types to NDJSON failing.

* Confirm that we can only extract to Bundle types in test.

* Update hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java

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

* Documents behavior of the NDJsonParser in FhirContext.

* Attempt to fix failing build by using TestUtil to clear context in the manner of r4 parser tests instead of dstu

Also clean up indentation.

* Adds a BulkDataImportProvider, with a single test.  More tests are forthcoming.

* Adds an additional test.

* Enhance tests to include content of job files.  Fix a bug whereby the content was never actually being added.

* Adds several tests for BulkImportProvider's polling operation.

* Adds requred Msg.code to errors.

* Apparently I can't duplicate Msg.code even if it's the same issue.

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2022-02-27 11:38:20 -05:00
Ken Stevens c7be674b84
small performance optimization (#3426) 2022-02-26 02:35:23 +00:00
jmarchionatto dbc9427a05
Issue 3391 2588 expand valueset regex include not working (#3410)
* Refactor ValueSet expansion code to simplify property filtering by using new Hibernate search V6 nested classes capabilities; use generic hibernate search queries where possible (mostly everywhere but regex queries) and add R4 integration tests  for both elastic and lucene.

* Refactor ValueSet expansion code to simplify property filtering by using new Hibernate search V6 nested classes capabilities; use generic hibernate search queries where possible (mostly everywhere but regex queries) and add R4 integration tests  for both elastic and lucene.

* Add comment for trick

* Add codes to exception messages

* Add test specific for the fix

* Move changelog to current release. Add upgrade notice.

* Improve fail-fast method

* Update upgrade instructions

* Try luck with new exception codes

* Update hapi-fhir-storage/src/test/java/ca/uhn/fhir/jpa/search/ElasticsearchNestedQueryBuilderUtilTest.java

Add missed quote

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

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: michaelabuckley <michael.buckley@smilecdr.com>
2022-02-24 21:32:11 +00:00
jmarchionatto 53c5a9bbeb
Add FK index to avoid timeout when deleting large ValueSet (#3416)
* Add FK index to avoid timeout when deleting large ValueSet

* Add exception to allow same name for index and FK

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-02-23 13:54:30 -05:00
James Agnew cc44deee1a
GraphQL Introspection Support (#3348)
* Start working on graphql Schema

* Start testing

* Work on introspection

* Work on introspection

* Use integers for date ordinals

* Add changelog

* GraphQL updates

* Ongoing wrk

* Cleanup

* Bump core lib

* Add changelog

* Clean up dependencies

* CLeanup

* Add missing message

* Test fix

* Change to force CI
2022-02-22 09:48:57 -05:00
James Agnew 1e2e17784a
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
2022-02-20 11:52:42 -05:00
James Agnew 058e53616f
Use integers for date ordinals (#3346)
* Use integers for date ordinals

* Add changelog

* Adjust changelog
2022-02-19 18:50:18 -05:00
Tadgh c6122bcb1b Add license files 2022-02-18 19:11:29 -08:00
Tadgh 3561672fe7
Rel 5 7 mergeback (#3401)
* 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

* Remove ehcache

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>
2022-02-18 19:22:44 +00:00
Ken Stevens 631391819b
remove hapi jpa spring config hierarchy (#3390)
* initial refactor to remove hapi jpa spring config hierarchy

* fix poms

* fix batch config

* dependency rearrangement arising from further testing

* fix searchDao bean name

* fixed dstu2 tests

* consolidate validation config

* dstu2 validation regression (man dstu2 support is expensive)

* fix test (with WIP comment)

* restore poms

* fix demo projects

* fix build

* bumping version

* rename generated config class
2022-02-16 20:44:03 -05:00
michaelabuckley 1c82d0933c
Mb new date search index (#3368)
* New date index definitions.
* Dropped unused indexes.
* Add online option to drop index and add index
* Push sp->resource FK down to control name
* Update annotations to match and redefine FK
* Continue to allow the legacy hibernate names while we update the indexing.
2022-02-16 22:12:20 +00:00
michaelabuckley ae33cf825b
Handle token search by partial code, and various nulls (#3399) 2022-02-16 08:23:16 -07:00
Tadgh 700221ad07
return concretions (#3373) 2022-02-10 21:07:47 -05:00
Tadgh 38912423c1
Remove dead modules (#3380)
* 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

Co-authored-by: Jason Roberts <jason.roberts@smilecdr.com>
2022-02-10 16:44:26 -05:00
Jaison B ecdb8c2ce6
Fix datesearch issue to resolve CI build failures (#3375) 2022-02-10 19:55:31 +00:00
StevenXLi 7841e578ab
2789 nullpointerexception rest hook subscription is not being triggered when cross partition is (#3370)
* 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

Co-authored-by: Steven Li <steven@smilecdr.com>
2022-02-10 14:14:41 -05:00
Tadgh 43f570259e Merge branch 'rel_5_7' 2022-02-10 08:44:07 -08:00
Jaison B 7794113455
2838 lastn refactor to use extended lucene index (#3339)
* Change token and reference search params to 'keyword' field type

* remove normalizer for keyword field

* WIP - refactor lastN operation to use hibernate search generated ES index.

* Add ES native aggregation builder for lastN

* added date search param support for searching resourcetable ES index

* * Added DateSearch parameterized tests to ElasticSearch test suite

* Added more tests cases for Date searches

* WIP refactor LastN test data to central generator class and use it for both hibernate-search and elastic search implementations.

* WIP fix lastNDataGenerator to avoid assertion errors.

* Fixed tests to run test suite on both existing lastN search implementation and newer extended lucene index based search.

* Cleanup json string to avoid carriage return noise

* Fix checkstyle issues

* Fix checkstyle Msg code issues

* Fix checkstyle Msg code issues

* Add more test case for GT, SA precision modifier

* Fix date precision test cases

* Fix Msg Code conflicts

* Add more logging

* Add way more loggging

* even more logging

* fix msg code conflicts

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-02-10 11:05:31 +00:00
michaelabuckley 3531d9b4fc
Fix exception when contained indexing met hibernate search. (#3372)
* Fix exception when contained indexing met hibernate search.
2022-02-09 20:27:40 -05:00
James Agnew 0f2fc7a882
Allow search narrowing and auth interceptor by `token:in` (#3360)
* Optmize valueset expansion

* Working

* Version bump

* Add documentation

* Add test

* Checkstyle message cleanup

* Add reverse rule

* Test ficx

* Test fix

* Test fix

* Test fixes

* Test fixes

* Test fix

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

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

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

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

* Test fixes

* Fix conflict

* Add setter

* Test fixes

Co-authored-by: Ken Stevens <khstevens@gmail.com>
2022-02-09 14:27:14 -05:00
Tadgh 0ccf1bfa52 Merge branch 'rel_5_7' 2022-02-07 12:11:35 -08:00
Patrick Werner 2531e6e57d
feat: added support for package.tgz uri in the "file:/" format (#3347)
* feat: added support for package.zgz uri in the "file:/" format

* added changelog entry

* add error code to thrown message

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-02-05 13:25:50 -05:00
Tadgh 1af4912603 Merge branch 'rel_5_7' 2022-02-04 22:22:02 -08:00
James Agnew 1d5714aec2
Fix #3261 - Incorrect revinclude selector (#3358) 2022-02-04 07:50:13 -05:00
TipzCM f6181fb6ff
3354 fixing flakey tests (#3355)
* 3354 fixing flakey tests

* must fix code

* updating number again

* fixing test

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-02-03 18:30:58 -05:00
michaelabuckley 6b15754b4a
Mb auto complete code (#3330)
New autocomplete extension to ValueSet $expand with contextDirection=existing
2022-02-02 21:03:53 +00:00
Tadgh 6982c4d680
bump version to 6.0.0-PRE1-SNAPSHOT (#3353)
* bump version

* Add new version enum

* Bumped to 6.0.0
2022-02-02 12:11:31 -08:00
michaelabuckley 717ff71695
Simplify JPA Elasticsearch Test Configuration (#3345)
* Delete TestR4WithLuceneDisabledConfig

* Split off the ES and ESClient test configs

* move hibernate search config out to add-ins

* Use addIn for all R4

* Finish R4

* Finish R3

* Finish dstu2

* R5

* Remove property override, and docs

* Apply error code to error

* Fix test to match new error code

* Lighten test

* Disabling broken test.
2022-02-02 16:09:19 +00:00
Johnson Lu c42ecc5c08
Add error codes to all exceptions (#3278)
* Initial design of adding exception codes to exceptions

* Initial design of adding exception codes to exceptions

* change int module name to string

* add comment

* shorten message

* shorten message

* added checkstyle

* developing checker

* completed checkstyle plugin and unit test for it

* fix NPE

* fix checker so it ignores throws on exceptions that aren't new

* change parameter order in InvalidResponseException

* accept Msg.code() in any parameter since some exceptions like MessageException have the message string as the second parameter

* exclude generated files

* BIG COMMIT added error codes to all exception throws

* example test fix

* Modified tests such that the assert statements would better match the message responses.

* Modified additional tests such that the assert statements would better match the message responses.

* fix test

* merge master

* merge master

* Fourth commit of modified tests such that the assert statements would better match the message response

* Changes made to modify assert statements such that they match the new errors which now use error codes. Also changed ResourceNotFoundException to include error codes in its messages.

* Modified assert messages to better match new error codes

* Time Zone changes DRAFT. Certain tests pass in intellij and fail during mvn install

* Modified assert messages to better match new error codes

* Added comments for time zone fixes. Previous commit comment on time zone fixes was incorrect. By invaliding caches, all tests on both intellij and mvn install passed.

* Reverted changes on azure-pipelines.yml

* updated hapi-fhir version for checkstyle module

* changes to azure-pipelines.yml

* changes to azure-pipelines.yml

* change to pom.xml to include hapi-fhir-checkstyle in ALLMODULES

* changes to azure-piplines (these changes are to be reverted after testing)

* reverted changes to azure-piplines

* reverted change where hapi-fhir-checkstyle was added to pom.xml (hapi-fhir)

* Attempted fix on checkstyle build error

* modified azure-piplines.yml to change maven repository for checkstyle build

* Attempted fix on checkstyle build error

* checkstyle config location change for hapi-depoloyable-pom. (will be reverted if it does not work)

* attempted dependency add for hapi-depoloyable-pom. (will be reverted if it does not work)

* reverted changes for hapi-deployable-pom

* add javadoc

* update last code

* Attempted fix on checkstyle build error

* Finished adding in missing error codes to pass Checkstyle checks

* Test pipelining

* Fixing errors and bumping version (as suggested by Gary)

* Merge

* Fixing Checkstyle error

* Attempted fix for date error

* Add error code onto assert statement

* Add in a couple more error codes

* Fixing assert statements

* Bump to static version for dependency

* Adding error code to message

* Adding error codes to exceptions

* Adding error codes to exceptions

* Change to work with cdr branch

* Update to faulty error message

* Merge changes

* allow checkstyle pom to deploy

Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Simon Zuccherato <simon.zuccherato@smilecdr.com>
Co-authored-by: Predap <simon.zuccherato@gmail.com>
Co-authored-by: Predap <46201929+Predap@users.noreply.github.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2022-01-31 13:10:15 -08:00
TipzCM 65398ca14f
3156 multiple tag race condition (#3297)
* 3156 fix race condition that results in multiple tags being created

* 3156 added changelog

* cleanup

* added smile jira ticket

* 3156 review fixes

* review fixes

* 3156 added an additional integratoin test

* cleanup

* review fix and master merge

* threadsafe stuff

* small change

* upping min threads for tests to pass

* changing test

* test check

* fix

* test testing

* one more update

* using threadpoolutil

* temporary measure

* git push

* all builds

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-01-31 08:49:12 -08:00
TipzCM 41193c60db
3335 allow alternative character encoding length in searchparam (#3336)
* added fixme

* 2714 added support for specifying max code lengths for supported phonetic encoders

* 3335git status

* 3335 updated changelog

* 3335 review fixes

* review fixes

* fixing test

Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-01-27 17:29:07 +00:00
Tadgh 6506527dd6
Fix mdm config for single application context environment. (#3338)
* wip

* remove beans

* Remove javax.mail from the classpath as we use simplemail instead, which uses jakarta.
2022-01-27 06:18:44 -05:00
James Agnew 3f42414287
Validate include statements for JPA (#3331)
* Validate include statements for JPA

* Add changelog

* Optmize test fix
2022-01-26 09:16:28 -05:00
James Agnew 31bb1d9e9a
Bump RestEasy to 5.0.2 (#3329)
* Bump deps

* Test fix

* Add test logging

* Add test logging

* Add logging
2022-01-24 20:15:41 -05:00
katiesmilecdr a11d72ba51
3322 graph ql searches cannot be executed when number of matching results exceeds default page size (#3323)
* fix NPE

* check if size is null
2022-01-24 11:53:21 -05:00
Patrick Werner 37e7d6eea5
populate ValueSet.url in $expand Operation (#3241) 2022-01-24 08:12:56 -08:00
James Agnew 715a4c4602
Fix resource version regression caused by Hibernate 5.6 (#3325)
* failing test

* failing test

* Fixes

* Updated note to self

* Improve pre-caching of resource IDs

* Work on tests

* Test fixes

* Add changelog

Co-authored-by: Ken Stevens <khstevens@gmail.com>
2022-01-23 19:05:02 -05:00
longma1 ab22fd6e82
2718 cross partition support for subscription (#3298)
* added settings for cross-partition to Dao and Model config

* modified subscription validator to validate cross partition subscriptions

* modify subscription matcher to allow matching on all partitions when subscription is set to cross partition

* added cross partition to canonicalSubscription

* end of day commit, changed how we are checking if default partition in subscription validator

* fixed issue with i memory matching for cross partition subscriptions

* added test for parsing legacy CanonicalSubscription

* added changelog and doc changes

* addressed comments in pr

* added assertdoesnotthrow

* test fixes, added new mocks

* added check for if resource can have extension before checking for extensions

* removed unnecessary semicolon

Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Long Ma <long@smilecdr.com>
2022-01-21 15:04:39 -07:00
jmarchionatto 62966de58b
Issue 3299 conformance validation is happening once per client endpoint thread instead as just once per client endpoint (#3319)
* Make RestfulClientFactory.myValidatedServerBaseUrls usage thread safe so capability validation request is sent only once per client-endpoint

* Can't use @GuardedBy for fields which are not always locked by annotation object

* Use same variable when checking and setting

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-01-21 14:29:24 -05:00
James Agnew 3fa76a9027
Add support for of-type token modifier (#3309)
* Add support for of-type token modifier

* Add changelog

* Clean up hash calculation logic

* Test fix

* Rework hash generation

* Work on hash generation

* Test fix

* Avoid redundant hash calculations

* Revert some useless changes

* Cleanup

* Test fixes
2022-01-21 16:10:51 +00:00
JasonRoberts-smile 48caff30d9
Improve performance of chained queries into contained resources (#3312)
* base restructuring of query

* fix unit tests

* suppress unnecessary resource type parameter

* pass the resource type used to fetch the search param as part of the chain, so later we do not need to guess what it was

* add query structure tests

* changelog

* fix test failures

* got one of the branches wrong in the 3-reference case
2022-01-20 21:22:02 +00:00
michaelabuckley 283ff19375
Re-index lucene when reindexing hibernate, even if resource unchanged. (#3311) 2022-01-19 23:02:39 +00:00
Tadgh 71e959c1be
SERVER_OUTGOING_RESPONSE invocation on manualResponse operations (#3315)
* Fix implementation so we can make the call anyhow

* modify test to ensure that pointcut is invoked

* Add changelog

* Tighten tests

* Add comment
2022-01-19 08:24:59 -08:00
James Agnew 80e4c3dd92
Bump HIbernate to 5.6.x (#3305)
* Bump HIbernate to 5.6.x

* Test fixes

* Test fix

* Dependency bump

* Rollback change

* Fix tests

* One more fix

* Avoid bump
2022-01-19 11:14:14 -05:00
TipzCM f0a9b33671
3283 delete will not return a 404 if resource is not found (#3284)
* 3283 delete will not return a 404 if resource is not found

* minor tweaks

* checking if tests fail due to asynchronicity

* 3283 added integration test

* cleanup

* review fixes

* changed id names

* cleanup

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-01-18 13:07:26 -05:00
Tadgh 9f7c454c6b
Issue 2377 missing entry full url in document (#3304)
* start with failing test

* wip

* add changelog

* Add implementation

* Fix DSTU3 impl

* Fix DSTU2 and R5
2022-01-18 10:40:53 -05:00
TipzCM 221d7ed5b7
3274 transactions with full request url should be rejected (#3280)
* 3274 throw if url is full url

* 3274 will throw on invalid urls

* 3274 fixing the tests

* 3274 cleanup

* anonymize the data

* review fixes

* 3274 fixed for backward compatibility

* added review fixes

* fixing tests

* some more test fixes

* test fixes

* 3274 fixing the check to only look for resource at begining

* 3274 fixed test

* test fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-01-17 08:46:32 -08:00
Mark Iantorno 10dea0796a
JUnit jupiter fix for @Disabled tag order. (#3300) 2022-01-14 01:43:56 +00:00
IanMMarshall e6fd5c9807
Fix batching of mdm-clear tasks (#3295)
* Fix batching of mdm-clear tasks.

* Fix batching of mdm-clear tasks.

Co-authored-by: ianmarshall <ian@simpatico.ai>
2022-01-13 12:06:27 -05:00
jmarchionatto 737409955a
Issue 3251 terminology reindexing job is never triggered (#3271)
* Run intended job

* Add test ti validate right method is invoked by inner job

* Add changelog

* Make test fail with proper message instead of crash

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-01-06 13:29:01 -05:00
IanMMarshall 095b959917
Fix PatientIdPartitionInterceptor where patient ID has hashCode equal to Integer.MIN_VALUE. (#3275)
* Fix PatientIdPartitionInterceptor for case where patient ID has hashCode equal to Integer.MIN_VALUE

* Fix PatientIdPartitionInterceptor for case where patient ID has hashCode equal to Integer.MIN_VALUE

Co-authored-by: ianmarshall <ian@simpatico.ai>
2022-01-06 10:00:33 -05:00
James Agnew c38fdc4c42
Fix inline resource migration (#3277) 2022-01-06 08:40:51 -05:00
jmarchionatto 2106631718
Disallow operation invocation by GET request (#3272)
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2022-01-05 16:53:46 -05:00
TipzCM b148121ab3
3242 search content param removed not readded (#3244)
* 3242 initial changes and nonsense tests

* 3242 added changelog

* 3242 cleanup

* cleanup

* 3242 updated for review

* cleanup

* 3242 review fixes

* review fixes

* fix changelog file

* review fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
2022-01-04 19:38:52 +00:00
jamesagnew aafc42fdd8 License header updates 2022-01-04 13:37:10 -05:00
James Agnew d610d33ac3
Dependency bumps (#3264)
* Bump a number of versions

* Fixes

* Work on version bump

* Bump

* Test fix

* More version bumps

* Build fixes

* Test fixes

* Fixes

* Fixes

* Test fix

* Bump jacoco

* Test fix

* Test fix

* Test fix

* Build fix

* Build fix

* Remove versioned H2

* Build fix

* Avoid memory issue in validation tests

* JDK bump

* Restore compile with errorprone

* Force coloured output

* Force jansi

* Try again to force jansi

* Fix for hardcoded date that just passed

* Fixes to JPA

* Improve changelog

* Work on failing test

* Test fix

* Compile fix

* One more version bump

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

* Work on inlining

* Add changelog

* Test fixes

* Fix for hardcoded date that just passed
2022-01-03 11:43:45 -05:00
michaelabuckley 1c318aac1e
Bypass jpa for lastn results (#3226)
* Add flag in DaoConfig to enable storing resources in lucene index

* Update loadResourceByPid to use ElasticSearch for loading observation resource and test added to check it

* Added parsing to elastic search to parse inlined observation resources json to resource object
2021-12-17 22:38:43 +00:00
Ken Stevens a41d79ed22
call delete expunge hook for pid list within delete expunge batch job (#3252)
* call delete expunge hook for pid list within delete expunge batch job

* review feedback
2021-12-16 21:35:23 -05:00
Tadgh 6a333c08bc Fix badly built migrations and indexes 2021-12-16 01:49:28 -08:00
Tadgh 700b614610 Allow system request details to go through MDM 2021-12-15 22:47:33 -08:00
Tadgh 9e20d62380
Issue 3237 delete expunge performance (#3239)
* Initial test looking for bad deletes

* Add indexes, add migration, add test'

* Fix npe

* Add provider test

* fix up comments, tighten test

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

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

* Add changelog

* Remove unnecessary migration

Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2021-12-15 06:53:26 +00:00
jmarchionatto ef83777115
Allow Subscription to be configured to send delete messages (#3245)
* Allow Subscription to be configured to send delete messages

* Add tests and implement MR suggestions

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2021-12-14 16:32:56 -05:00
Tadgh 50a3005c23
Fix flag name (#3247)
* Fix flag name

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

* Added some FIXMEs

* added RequestPartitionId to reosurceDelivryMessage and ResourceModifiedMessage

* ResourceDeliveryMessage and ResourceModifiedMessage tests

* fixed issue with test missing partitionHelperSvc mocked bean

* Added tests and implemented SubscriptionMatchingSubscriber for partition aware subscription

* modified implementation of partitionId in CanonicalSubscription

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

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

This reverts commit fe40fb9733.

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

* added SubscriptionTriggering test, also added partition support to subscriptionLoader

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

* added all subscription systemRequestDetails with all partition to subscription reader

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

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

* added partition support for latest version delivery

* added doc changes and changelog for multitenancy subscription

* cleanup and added partitioned subscription manually trigger test

* fixed mocked subscriptionDao

* added package-info for subscription module

* some code review changes

* removed AllPartitionSystemRequestDetail, added new text for multitenant subscription

* renamed method for code review

* version bump to 5.7.0PRE7

Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Long Ma <long@smilecdr.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
2021-12-13 08:45:30 -07:00
Ken Stevens d561577a9e
Ks 20211209 xml to java (#3236)
* try xml -> json

* Change from xml serialization to json serialization.  Also fix a deadlock in how the validation cache is used.

* changelog

* back out logback
change

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/3236-change-validation-from-xml-to-java.yaml

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>
2021-12-12 00:29:52 +00:00
VK-SMILECDR bd89cf022b
Improve mail service (#3230)
* move mail config to mail service constructor

* update subscription email sender

* added license text

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

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

* javadoc

* change test to a red-green test

* add daoconfig

* move bundle concurrency config from validationsupport to request validator

* Moved concurrent details from ValidationOptions to FhirValidator

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

* validate threadpool prefixes

* FIXME cleanup

* reassign FIXMEs to JB

* only create the threadpool if it will be used

* Add the MdcTaskDectorator to all threadpools

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

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

* Threaded validation of contained resources initial checkin

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

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

* switch from XML to JSON

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

* Updated to use new HAPI-FHIR version

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

* Updated to use new HAPI-FHIR version

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

This reverts commit 910b7f676b.

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

This reverts commit c7d60fc3e6.

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

This reverts commit aa8a7af455.

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

* Fix Test dependencies after reverting changes.

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

* Disable threadpool prefix name validate check.

* merge master

* fix thread regexp

* pre-review cleanup

* change log

* fix test

* revert to XML as default validation serialization

* fix test

* fix test

Co-authored-by: Jaison B <jaisonb@gmail.com>
2021-12-08 15:18:54 -05:00
jamesagnew 90d05a9ed4 Fix accidental commit 2021-12-07 14:55:16 -05:00
jamesagnew 8aef580aed Bump core library 2021-12-07 10:57:43 -05:00
Mark Iantorno d60d07b697
Validate contains change (#3209)
* wip

* The updated changes to the validator that were pulled in from the core dependencies are not backwards compat. Need to bump HAPI version.

* pointing to stable core version

* review feedback

* Add changelog

Co-authored-by: markiantorno <miantorno@pop-os.localdomain>
2021-12-06 11:25:00 -05:00
James Agnew b7bf10ced4
Missed commits from #3214 (#3222)
* Move graphql provider

* Version bump

* Moving things around

* More reworking

* Fix
2021-12-06 06:49:52 -05:00
James Agnew d072357c2a
Move graphql provider (#3214)
* Move graphql provider

* Version bump
2021-12-05 17:22:20 -05:00
katiesmilecdr 2681560598
fixed (#3217)
* fixed

* Add test

* Update test

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
2021-12-04 00:38:51 +00:00
Ken Stevens 0656037c8d
Ks 20211203 mdm possible match (#3216)
* begin with failing test

* fix issue

* change log

* code review
2021-12-03 19:44:25 +00:00
Ken Stevens 2fbbf31431
Ks 20211202 fix major reindex bug (#3211)
* begin with failing test

* fix bug

* change log

* change log
2021-12-02 21:38:54 +00:00
James Agnew aa09e59255
Migrate to OpenAPI (#3206)
* Migrate to OpenAPI

* Update spring

* Test fix
2021-12-02 13:01:50 -05:00
James Agnew aae53d6ec7
Improve loading performance (#3197)
* Synthea perf work

* Cleanup

* Work on performance

* Ongoing perf work

* More perf work

* Perf work

* Test fixes

* Updates

* Test fix

* Test fixes

* Clean up tests

* Test cleanup

* Cleanup

* Add test

* One more perf tweak

* Fixes

* Add changelog

* Add changelog

* License header update

* License header updates
2021-11-28 10:47:30 -05:00
Tadgh 7ef1d159ee
Fix bug loading packages in non-database mode (#3199)
* Add implementation

* Add changelog
2021-11-26 20:17:51 -05:00
Patrick 3363807931
Support https with elastic (#3192)
* 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

* Support HTTPs

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>
Co-authored-by: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: ppalacin <patrick.palacin@i-atros.com>
2021-11-26 15:08:38 -05:00
jmarchionatto d496ca98ad
Issue 3172 support member match operation (#3187)
* Suppress unresolved maven properties errors to avoid IntelliJ complains

* Support for $member-match operation

* Add more reference cases

* Adjust tests

* Add test and handle missed condition

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2021-11-26 14:20:14 -05:00
Kevin Dougan SmileCDR 10cad65534
Add NULL-safe check on the myValidationSupportChain as well as a setter method in case it needs to be injected. (#3190) 2021-11-25 07:59:35 -05:00
Kevin Dougan SmileCDR 3c2b4bb397
3136 - Provide RemoteTerminologyServiceValidationSupport Implementation For Operation $validate-code (#3142)
* 3136 - Send validate-code requests to an Instance of IValidationSupport instead of directly to the DAO.

* 3136 - Added support for R4 validate-code calls to a Remote Terminology Server.

* Added more Unit Tests.

* Added NULL checks based on code analysis.

* Adding some cleanup code to the Unit Tests since some other unrelated Unit Tests were failing when running in an Azure Pipeline.

* Adding @Ignore to both of my Unit Test classes to try and see if this is the cause of other unrelated Unit Test failures in the Azure Pipeline.

* Commented out ALL CODE in my Unit Tests to see if this fixes the other Unit Tests.

* Added 1 Unit Tester called RemoteTerminologyServiceResourceProviderR4Test to see if it causes other Unit Test failures.

* Added a Unit Tester called ResourceProviderR4RemoteTerminologyTest with the code that creates a RemoteTerminologyServiceValidationSupport instance commented out for now, just to see if this allows all other Unit Tests to pass.

* Added a Unit test back in to verify how the RemoteTerminologyServiceValidationSupport works when inserted into the front of the IValidation chain. Lets see if this will mess up any other Unit Tests in the Azure Pipeline...

* Added an @AfterEach method to remove the RemoteTerminologyServiceValidationSupport instance from the ValidationSupportChain to see if it allows all the other Unit Tests to work as before.

* Added more Unit tests.

* Added more Unit Tests to increase code coverage.

* Added some NULL checks.

* Added a changelog for this feature add.

* Removed the decision logic in the REST APIs and also the isRemoteTerminologyServiceConfigured() method, and letting the ValidationSupportChain figure out how to perform the validate-code Operation.

* Removed a NULL check that was not needed.

* Reverting the previous change where I tried using the IValidationSupportChain for each and every incoming Operation request. Splitting the implementation between local and remote seems to be required at this time.
2021-11-23 10:39:56 -05:00
Tadgh 0a64294467
Release 5.6.0 (#3174)
* 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

Co-authored-by: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2021-11-19 15:24:44 +00:00
jmarchionatto 175958de5e
Issue 3108 terminology large codesystem deletion takes days to complete (#3160)
* Add indexes to foreign keys

* Add new version enum

* Add TermCodeSystem and TermCodeSystemVersion deletion job artifacts

* Add Propagation.NOT_SUPPORTED to allow starting jobs from transactional code

* New jobs artifacts

* Improve comments

* Restructure job configurations to avoid bean name collisions

* Restructure job configurations to avoid bean name collisions

* Use new offline deletion by job

* Test using multiple versions

* Retrieve only Pids

* Revert to master

* Maintain deferred functions synchronization as similar as possible to the way it was

* Bypass validations to allow calling an index same as a foreign key to make SchemaMigrationTest happy as H2 adds FK indexes automatically

* Adjust tests

* Add copyrights

* Add test

* Revert to delete CodeSystemVersions using deferred ITermDeferredStorageSvc

* Allow to wait for jobs tentatively

* Organize imports

* Fix tests

* Increase timeout to cover for possible additional heavy DB activity

* Add indexes to two remaining non-indexed foreign key fields to avoid much longer transactions which produce locks on heavy DB load

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/3108-terminology-large-code-system-deletion-performance.yaml

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

* Remove opening stars from logging messages

* Relax index name checking logic to allow for indexes on FK columns to be called same as the FKs, to make SchemaMigrationTest happy even when H2 adds indexes to FKs automatically.

* Use static array to enumerate platforms which doesn't add indexes to foreign keys automatically.

* Cleanup also job executions when performing test artifact cleanup

* Adjust to property name change

* Add ABANDONED status to the list of waited job statuses to avoid test failures due to wait timeouts

* Add also UNKNOWN status to the list of waited job statuses to avoid test failures due to wait timeouts

* Filter job executions to be stopped

* Set trace to debug test problem

* Add STOPPED status to the list of waited job statuses to avoid test failures due to wait timeouts

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: James Agnew <jamesagnew@gmail.com>
2021-11-18 09:49:16 -05:00
IanMMarshall 843517f7ba
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>
2021-11-15 16:36:30 -05:00
TipzCM 1478abac3a
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>
2021-11-12 20:13:42 +00:00
jamesagnew 2e6fb10df3 Merge branch 'master' of github.com:hapifhir/hapi-fhir 2021-11-11 15:05:37 -05:00
michaelabuckley 7d7865ab17
Mb share jpa date tests (#3154)
* publish test-jar from hapi-fhir-storage

* Extract BaseDateSearchDaoTests up to hapi-fhir-storage.

Share a date search tests between JPA and Mongo.

* Use ITestDataBuilder for setup

* Move Mongo date cases into common set

* cleanup

* More cleanup

* naming
2021-11-10 21:07:36 +00:00
TipzCM 25c025cdee
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>
2021-11-10 16:06:09 -05:00
jamesagnew 1abd046cc9 Add test 2021-11-09 15:02:01 -05:00
jamesagnew 5de955c3c2 Licence header updates 2021-11-09 08:44:18 -05:00
TipzCM 59bf8b836f
Issue 3120 support adding retry extension (#3137)
* issue-1134 initial work on adding retry handler

* issue-1134 subdscription creation fixes

* issue-1134 update the test

* issue-1134 retry policy off canonicalsubscription

* issue 1134 base subscription changes

* add failing test

* issue 1134 retry configs on base parameters

* issue 1134 passing forward params

* issue-1134 added more tests for making sure subscriptions create their channels correctly

* issue-1134 updates to get the retry to channels

* issue-1134 updating channel factory

* issue-1134 remove the dlq since it's not defineable

* issue-3120 changelog added

* issue-3120 cleaning up

* issue-3120 test fix

* issue-3120 review fixes

* issue-3120 fixed bad master merge

* issue-3120 updates for new release

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
2021-11-03 18:21:10 -04:00
Tadgh a10c58e839
Bump version, add version to versionenum (#3135) 2021-11-02 09:40:56 -04:00
michaelabuckley 1a822178b2
Docs and cleanup for #2997 (#3126)
* Docs and cleanup for #2997

Auto-merge triggered too soon.

* Change link extraction to support multi-paths.

Cleanup naming.

* Remove this != null check

* Cleanup and comments

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

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/docs/server_jpa_partitioning/partitioning.md

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>

* Reformat and comments

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: Tadgh <tadgh@cs.toronto.edu>
2021-11-01 15:31:23 +00:00
Tadgh 7c63441663
Revert "Issue 1134 retry mechanic on subscriptions (#3121)" (#3128)
This reverts commit 9b23e9e825.
2021-10-30 19:46:42 +00:00
StevenXLi 39577ebe11
Spring batch param migration (#3124)
* small change to support change to string length of spring batch execution parameters

* added comment to indicate function is empty on purpose

* added javadoc for this method to note it's for overriding purpose

Co-authored-by: Steven Li <steven@smilecdr.com>
2021-10-29 12:46:36 -04:00
TipzCM 9b23e9e825
Issue 1134 retry mechanic on subscriptions (#3121)
* issue-1134 initial work on adding retry handler

* issue-1134 subdscription creation fixes

* issue-1134 update the test

* issue-1134 retry policy off canonicalsubscription

* issue 1134 base subscription changes

* add failing test

* issue 1134 retry configs on base parameters

* issue 1134 passing forward params

* issue-1134 added more tests for making sure subscriptions create their channels correctly

* issue-1134 updates to get the retry to channels

* issue-1134 updating channel factory

* issue-1134 remove the dlq since it's not defineable

* issue-3120 changelog added

* issue-3120 cleaning up

* issue-3120 test fix

* issue-3120 review fixes

* issue-3120 fixed bad master merge

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <khstevens@gmail.com>
2021-10-29 11:21:43 -04:00
Tadgh 8a7b5c1b2f
Multiple improvements (#2997)
* Add failing test

* Tidy test for new tokenparam style

* Add removeByQualifier to SearchParameterMap

* Add new property binder for search terms

* Member move, add test for new parser

* whoops missed an add

* Passing test.

Introduced SearchParamTextWrapper to give a type for the binder.
Enhance FulltextSearchSvcImpl to understand TokenParams as well as StringParams.

* Add more to test, change analyzer for template

* Optimize imports

* Minor refactoring

* added eq and gt test cases

* added missing gt search param tests

* Search all CodeableConcepts

* Extract new LuceneRuntimeSearchParam to mediate indexing and searching.

* Fix up broken test with mock

* Add support for identifier type

* Bump for special maven package

* fix-me to todo

* Prevent version check

* FIx version for test

* DSTU2 does not support fluent path

* Don't accidentally strip SPs in DSTU2

* added lt tests

* Add some high-bound test cases

* More test cases and new compressed format

* More test cases

* More test cases

* Re-order columns for easier reading

* Comments

* Cleanup and comments

* Make support :text for all token SPs

* Make support :text for all token SPs

* Fixed incomplete date issue

* Set to the last millisecond 23:59:59.999

* Disabled 4 failed JVM/TZ related test cases

* add test for failing batch bug, remove bounding on queue

* remove parallelism from non-get batch operations

* Fix count for test

* New index layout

* Notes and cleanup

* Notes and cleanup

* remove the jetbrains

* Demote FIXME to WIP

* Change :text search to be lucene simple search and use standardAnalyzer.

* Change :text to require * for prefix match.

* add prefix negative test

* Bump version

* Added changelog

* Add more search parameters to lucene indexing (#3000)

* dirty the branch

* Add oversight to changelog

* Start using jpa indexing for es

* Correct negative search test

* Update templates, index tokens, write new test. TODO gotta modify SB

* Add test for code token search

* add comment

* Flesh out token search

* minor cleanup and comments

* Extract index handling from FulltextSearchSvcImpl

* D'oh.  Actually use elastic to search.

* Move supported query check closer to query builder

* String search test before activating lucene

* Add string:exact to hibernate search.

* Add string:contains search

* cleanup

* demote fixmes to allow build to run.

* Add unmodified string search.

* empty stubs for quantity and reference

* Ignore magic search params in lucene index

* Support full-text on all FHIR releases

* Include reference lookups in ES

* Fix and/or logic in _text

* Test for string with space

* Cherry-pick the NoFT fix

* Disable advanced indexing in a bunch of tests of emitted sql.

* Stub changelog

* Fix :missing flag

* Move DaoConfig up to BaseJpaTest to share teardown

* Disable new indexing for partition test

* Add a different analyzer and field for default string search vs text

* checkstyle for a pre-build

* Index full prefix for string search when using Lucene

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3000-Extend-lucene-indexing.yaml

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>

* Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HibernateSearchQueryBuilder.java

Co-authored-by: Tadgh <tadgh@cs.toronto.edu>

* Review feedback.

Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: Tadgh <tadgh@cs.toronto.edu>

* Remove double-check

* Version bump

* Fix typo

Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com>
Co-authored-by: Long Ma <longma@Longs-MacBook-Pro.local>
Co-authored-by: Frank Tao <frankjtao@gmail.com>
Co-authored-by: michaelabuckley <michaelabuckley@gmail.com>
2021-10-28 15:13:16 -04:00
James Agnew 05f470db18
Paging queries can generate invalid Oracle SQL (#3123)
* Test fix

* Add docs

* Add changelog
2021-10-28 14:42:06 -04:00
longma1 2067ba83ee
minor refactor to extract static string variables into a singel constants class in bulk export (#3117)
Co-authored-by: Long Ma <longma@Longs-MBP.hitronhub.home>
2021-10-28 16:04:31 +00:00
katiesmilecdr 5ee823e829
[3109] fix bug (#3112)
* [3109] fix bug

* [3109] add unit tests for BinaryAccessProvider
2021-10-27 19:52:57 +00:00
James Agnew 9e057574a6
Allow multi-resource Subscription criteria (#3110)
* Allow start criteria subscriptions

* Rework subscription tests

* Subscription cleanup

* Add changelog

* Test fixes

* Test fix
2021-10-26 16:48:13 -04:00
michaelabuckley 2cf8e74414
Introduce standard date search test cases (#3096)
* Introduce standard date search test cases
2021-10-26 19:15:06 +00:00
JasonRoberts-smile 20f31e4854
Jr 20211021 chained references 3 (#3107)
* Create index entries for outbound references of contained resources

* build query for chained reference

* fix case where the contained reference is an explicit id rather than a continued chain

* fix contained index to use path names not search param names

* make qualified search work

* cleanup and changelog

* recurse while creating indexes on contained resources

* double link both contained

* longer contained subchains

* adding some failing test cases to illustrate the limitations of qualified searches

* clean up merge cruft

* changelog

* create recursive resource links

* add test coverage for a more complicated case

* changelog

* remove unnecessary check for _contained flag

* fix broken tests
2021-10-25 10:16:10 -04:00
JasonRoberts-smile b267fdb752
Jr 20211018 chained references 2 (#3099)
* Create index entries for outbound references of contained resources

* build query for chained reference

* fix case where the contained reference is an explicit id rather than a continued chain

* fix contained index to use path names not search param names

* make qualified search work

* cleanup and changelog

* recurse while creating indexes on contained resources

* double link both contained

* longer contained subchains

* adding some failing test cases to illustrate the limitations of qualified searches

* clean up merge cruft

* changelog
2021-10-22 12:41:05 +00:00
Tadgh 2d55af1ec4
Fix postgresql regression (#3101)
* Bump elastic version

* Fix broken types for sql builder in postgres

* Add changelog

* Fix changelog
2021-10-21 16:23:41 -04:00
michaelabuckley f98f3cdaa9
Extend ordinal date search to year and month precision (#3102)
* added eq and gt test cases

* added missing gt search param tests

* added lt tests

* Add some high-bound test cases

* More test cases and new compressed format

* More test cases

* More test cases

* Re-order columns for easier reading

* Comments

* Cleanup and comments

* Fixed incomplete date issue

* Set to the last millisecond 23:59:59.999

* Disabled 4 failed JVM/TZ related test cases

* Added changelog

Co-authored-by: Long Ma <longma@Longs-MacBook-Pro.local>
Co-authored-by: Frank Tao <frankjtao@gmail.com>
2021-10-21 15:32:26 -04:00
jmarchionatto b93f33d4ff
When uploading loinc CodeSystem take copyright from loinc.xml input file. (#3092)
Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2021-10-20 15:05:04 +00:00
JasonRoberts-smile d07764e8e5
Jr 20211013 chained references (#3079)
* Create index entries for outbound references of contained resources

* build query for chained reference

* fix case where the contained reference is an explicit id rather than a continued chain

* fix contained index to use path names not search param names

* make qualified search work

* cleanup and changelog

* code review

* fix broken tests
2021-10-19 18:07:29 +00:00
StevenXLi 34010fa78d
Batch job refactor (#3087)
* added AbstractResourceToFileWriter

* Added AbstractBaseBulkItemReader

* added bulkExportStatusEnum fromBatchStatus test

* Code review name change

Co-authored-by: Long Ma <longma@Longs-MBP.hitronhub.home>
Co-authored-by: Steven Li <steven@smilecdr.com>
2021-10-19 09:07:05 -04:00
JasonRoberts-smile b5e31abf9b
add authorization check to inline matches (#3048)
* add authorization check to inline matches

* code review feedback: cached results case

* Add query count test

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3047-inline-match-security.yaml

Accept code review suggestion

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

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2021-10-18 12:21:26 +00:00
Tadgh b427135b04
Patient/$everything _id parameter (#3077)
* Add tests. Add implementation in R4. Add changelog

* Wip partial fixup of other STU versions

* Updated usages of new patient type everything api

* Partial commit of incomplete documentation

* Remove docs

* Cut to token instead of string

* Bump hapi version due to breaking api changes
2021-10-17 14:34:33 +00:00
Tadgh 120443e561
Bump core version (#3067)
* Bump core version

* Changes for version bump

* Resolve NPE:

* Test fix

Co-authored-by: jamesagnew <jamesagnew@gmail.com>
2021-10-16 14:13:13 -04:00
Jing Tang b25b186044
Remove the unused dependency on net.sf.saxon:Saxon-HE (#3043)
* Remove the unused dependency on net.sf.saxon:Saxon-HE

* Remove Saxon-HE dependency in hapi-fhir-jpaserver-base

* Remove unused comment in hapi-fhir-structures-dstu2.1/pom.xml
2021-10-14 16:34:48 -04:00
jamesagnew 818c54f0b9 Squashed commit of the following:
commit 408f2d82b762900de53ebe66dde8eec082e7bae7
Merge: 8da38d1a9e be19acb7c3
Author: jamesagnew <jamesagnew@gmail.com>
Date:   Tue Oct 12 12:00:56 2021 -0400

    Merge branch 'master' into ja_20211011_fix_intermittent

commit 8da38d1a9e
Author: jamesagnew <jamesagnew@gmail.com>
Date:   Mon Oct 11 21:31:42 2021 -0400

    Test fixes

commit c73fd288f0
Author: jamesagnew <jamesagnew@gmail.com>
Date:   Mon Oct 11 20:53:04 2021 -0400

    Fix intermittent failure
2021-10-12 12:01:34 -04:00
jamesagnew b2a4ff2f29 Try to avoid intermittent 2021-10-11 19:14:01 -04:00
jamesagnew a54ebd1d30 License header updates 2021-10-11 17:22:54 -04:00
James Agnew 310a4cdb58
Migrate CLOB columns to LOB (SMILE-3072) (#3016)
* Migration finished

* Work on LOBS

* Add to ClobMigrated annotation

* Deal with lobs

* Work on new approach

* HAPI FHIR version bump

* Add changelog

* Add license header

* Fix intermittent

* CLeanup

* Cleanup
2021-10-11 16:47:37 -04:00
James Agnew 756b0fdc7b
Fix transaction scoping (#2799)
* Work on transaction boundaries

* Test fixes

* Test fixes

* Test fix

* Resolve FIXME

* Test fix

* Test fix

* Test fix

* Test fixes

* Test fix

* Adjust changelog

* Remove unneeded changelog

* Test fix

* Test fixes

* Test fixes

* Test fixes

* Test fixes

* Test fix

* Fixes

* Test fix
2021-10-11 16:45:22 -04:00
James Agnew aed718bd6f
Avoid redundant PID lookups in transaction processing (#3061)
* Avoid redundant PID lookups in transaction processing

* Add changelog

* Test fix
2021-10-11 13:45:57 -04:00
TipzCM a474e88ed4
issue-2397 implementing the mdm expansion on everything and searches (#3044)
* issue-2397 implementing the mdm expansion on everything and searches

* issue-2397 code cleanup and removal of test code

* issue-2397 some tests

* issue-2397 changelog added

* issue-2397 review fixes

* issue-2397 updated change log with example and fixed failing tests

* issue-2397 test fixing

* issue-2397 fixing test

* issue-2397 review fix

* issue 2397 fixing changelog file

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Tadgh <tadgh@cs.toronto.edu>
2021-10-07 10:46:23 -04:00
jmarchionatto 71e2b82128
Issue 2851 upload terminology valueset parallel versioning (#3051)
* Fix operations for 'loinc-all' ValueSet

* Fix tests

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
2021-10-06 20:56:30 +00:00
Tadgh 59afbe086c
Allow canonical references to support treating given base URLs as local. (#3050)
* Add failling test, works on #2843

* Partial hack to get this working

* Move implementation into pre-processing

* Add changelog

* Move implementation

* Minify Test

* Remove fixmes

* Tidying

* Ensure this only operates on STU versions which support canonical
2021-10-05 11:09:49 -04:00
jamesagnew 2581cd1446 Bump postgres DB version 2021-10-04 10:54:33 -04:00
jamesagnew 15748f4d54 Add setters 2021-10-04 07:41:24 -04:00
James Agnew d320b78ae1
Improve synthea ingest performance (#3033)
* Improve synthea ingest performance

* Tweaks

* Fix param splitting

* Update to test

* Add changelog

* Test fix

* Add some runtime checks

* Remove useless test

* Test fix
2021-10-04 05:46:06 -04:00
James Agnew eca725afa4
Improve versioned URL support for ValueSet expansion (#2994)
* Add test

* Test fixes

* Work on expansion errors

* Fixes

* Test fixes

* Test fixes

* Test fixes

* Test fixes

* Test fixes

* Test fixes

* Test fixes

* Work on fix

* Test fixes

* Test fixes

* Test fix

* Cleanup

* Test fixes

* Remove accidental commit

* Test fixes

* Version bump

* Add changelog

* Fixes

* Test fix

* Fix conflicts
2021-10-03 19:47:23 -04:00
Tadgh cd1a4154c1 Merge branch 'remove-parallel-non-gets' of github.com:hapifhir/hapi-fhir into remove-parallel-non-gets 2021-09-28 09:55:13 -04:00
Tadgh 072c030c2d Remove modifications, defaults work 2021-09-28 09:55:06 -04:00
Tadgh ad05a5ec09
Merge branch 'master' into remove-parallel-non-gets 2021-09-28 09:43:01 -04:00
Tadgh dde0529b07 Remove extra semicolon 2021-09-27 15:36:17 -04:00
Tadgh 0c123384c7 add test for failing batch bug, remove bounding on queue 2021-09-27 15:34:19 -04:00
katie_smilecdr d121f6eff1 Merge branch 'master' into 3020_Add_documentation_for_$partition-management-create-partition 2021-09-27 15:10:19 -04:00
juan.marchionatto 2dec5f0821 Add explicit brackets 2021-09-27 13:47:23 -04:00
juan.marchionatto b4343a9823 Merge branch 'master' into issue-2851-upload-terminology-valueset-parallel-versioning 2021-09-27 09:48:15 -04:00
juan.marchionatto 00ceb3f35d Add tests 2021-09-27 09:47:05 -04:00
michaelabuckley 5ee5b08b50
Merge branch 'master' into mb-fix-NoFt-tests 2021-09-24 16:38:05 -04:00
Ken Stevens b1dd40fdba
Try commenting out clearAllStaticFieldsForUnitTest to see what happens (#3034)
* Try commenting out clearAllStaticFieldsForUnitTest to see what happens

* Rename clearAllStaticFieldsForUnitTest to randomizeLocaleAndTimezone and only do that
2021-09-24 16:01:28 -04:00
juan.marchionatto d03f9cb35b Merge branch 'master' into issue-2851-upload-terminology-valueset-parallel-versioning 2021-09-24 15:40:22 -04:00
juan.marchionatto eb9f29b3f3 Simplify code 2021-09-24 15:05:06 -04:00
katie_smilecdr d067586607 [3020] add documentation/changelog 2021-09-24 14:49:07 -04:00
Michael Buckley 11c5f7ee87 Some configs don't publish and FullText service at all. Make it optional. 2021-09-24 14:32:34 -04:00
Michael Buckley 79e2800f3e Fix cut-n-paste glitch in dstu2 NoFt 2021-09-24 13:48:01 -04:00
katie_smilecdr 8c145d1212 Merge branch 'master' into 3020_Add_documentation_for_$partition-management-create-partition 2021-09-24 13:01:38 -04:00
katie_smilecdr 6431ae4401 [3020] fix implementation/add tests 2021-09-24 13:00:05 -04:00
Michael Buckley db55837c3c Make our NoFt tests actually run without Ft.
Hibernate search was always configured with a lucene heap engine in all JPA tests.
Added a new config param - hapi_test.enable_lucene - to disable with config params on the NoFt tests.
2021-09-24 12:05:16 -04:00
jmarchionatto 4ab60e2f9b
Merge branch 'master' into issue-3017-remove-loincxml-file-from-application-used-as-fallback-when-loading-loinc-terminology 2021-09-24 08:59:15 -04:00
Ken Stevens 0db40c6118 support non-jpa batch 2021-09-24 00:39:15 -04:00
Ken Stevens 53c7476dae
hapi storage (#3024)
* first pass moving core storage classes to storage-api

* move term service apis

* nearly done

* rename hapi-fhir-storage-api to hapi-fhir-storage and move transaction processor

* rename hapi-fhir-storage-api to hapi-fhir-storage and move transaction processor

* create new SearchConstants class to store platform independent search constants

* move a couple of subscription services

* move transaction processor adapter to storage

* version bump

* move searchparam

* fix test

* fix compile includes

* fix text

* fix docs
2021-09-23 22:04:46 -04:00
katie_smilecdr 8bd14ae024 [3020] add $partition-management-lists-partitions 2021-09-23 16:08:56 -04:00
juan.marchionatto 91d9101785 Merge branch 'master' into issue-3017-remove-loincxml-file-from-application-used-as-fallback-when-loading-loinc-terminology 2021-09-23 13:45:28 -04:00
juan.marchionatto d1e9c23c13 Remove loinc.xml file from application. Now it required as input for loinc upload. 2021-09-23 13:43:27 -04:00
juan.marchionatto 9c8fd26692 Merge branch 'master' into issue-2851-upload-terminology-valueset-parallel-versioning 2021-09-23 11:56:44 -04:00
juan.marchionatto 751c5d0d05 Implement revision suggestions. Add changelog. 2021-09-23 11:55:50 -04:00
Tadgh ad9e0f1c9a
Merge branch 'master' into 3014-prevent-delete-expunge-cascade 2021-09-23 09:33:04 -04:00
Jimmy Deng 2436f748aa fix test 2021-09-22 14:38:53 -04:00
Jimmy Deng f9796b9e2a fix test 2021-09-22 12:52:28 -04:00
Jimmy Deng 26ac649946 changelog 2021-09-22 11:11:10 -04:00
Jimmy Deng 9a18422173 fix review 2021-09-22 11:09:50 -04:00
Jimmy Deng 48f73fa1d1 typo 2021-09-22 10:25:57 -04:00
Jimmy Deng c913707599 added header check 2021-09-22 10:15:22 -04:00
juan.marchionatto 81a4f0c78f Rename method for clarity. Increase test coverage. 2021-09-22 09:40:25 -04:00
juan.marchionatto fdf639d353 Merge branch 'master' into issue-2851-upload-terminology-valueset-parallel-versioning 2021-09-22 09:25:48 -04:00
Justin Dar ad5297b714 fix for issue #3014 2021-09-21 13:09:08 -07:00
Ken Stevens 060791aeb4
hapi-fhir-storage-api (#3006)
* rename hapi-fhir-jpaserver-migrate to hapi-fhir-sql-migrate and move hapi-tasks into jpaserver-persistence

* rename hapi-fhir-jpaserver-api to hapi-fhir-storage-api

* move bulk import apis

* create hapi-fhir-jpa

* create hapi-fhir-jpa

* move CircularQueueCaptureQueriesListener to japi-fhir-jpa

* move mdm logs to storage-api

* move gziputil to storage-api

* move quartz scheduling to hapi-fhir-jpa

* move default subscription channel factory to storage-api

* consolidated batch constants

* correct accidental Logs change

* remove dependency of cdr-api on cdr-persistence

* fix javadoc

* pom descriptions

* review feedback
2021-09-21 15:36:08 +00:00
juan.marchionatto 371484a4ea Fix test to add now required id to loinc CodeSystem creation 2021-09-20 17:19:31 -04:00
juan.marchionatto 3d5c863276 Revert creation of test utility class finally not needed 2021-09-20 17:18:45 -04:00
juan.marchionatto 9c790a7374 Revert creation of test utility class finally not needed 2021-09-20 17:18:11 -04:00
juan.marchionatto 8a1d95f348 Add service to get CodeSystem from its forcedId without forcing rollback by ResourceNotFoundException in case not found 2021-09-20 17:14:42 -04:00
Johnson Lu f1f9c672ad
3110 zh disallow unknown extensions (#3009)
* Added allowKnownExtensionsOnly() method such which calls setAnyExtensionsAllowed() to set myAnyExtensionsAllowed to false and modified changelogs to add entry for this ticket.

* Modified docs to remove description for .allowAnyExtensions() and included it within a description for .allowKnownExtensionsOnly() and also added test for .allowKnownExtensionsOnly()

* refactored allowKnownExtensionsOnly() to rejectUnknownExtensions()
2021-09-20 15:40:56 -04:00
juan.marchionatto 1492b9220a Add test comment 2021-09-20 11:15:53 -04:00
juan.marchionatto d706caf949 merge master in 2021-09-20 11:08:17 -04:00
juan.marchionatto d372371f36 Make sure a loinc CodeSystem always has a ForcedId 2021-09-20 08:51:51 -04:00
Tadgh 3b1bf7aa09
Merge branch 'master' into 2849_add_new_mdm_param 2021-09-17 13:27:09 -04:00
Jaison B 8bb9aca8df Merge branch 'master' into 2849_add_new_mdm_param 2021-09-17 10:18:24 -06:00
jmarchionatto 115056800c
Merge branch 'master' into issue-2995-valuesetcomposeincludeversion-is-not-set-when-uploading-terminology 2021-09-17 11:32:18 -04:00
juan.marchionatto 18e3ed68eb Revert loinc.xml deletion until current work gets completed 2021-09-16 15:14:43 -04:00
juan.marchionatto fbd23498fc Adjust test data and fix all test cases implemented so far 2021-09-16 13:41:05 -04:00
juan.marchionatto c9162cba6d Merge in fix for ISSUE-2995 2021-09-16 13:20:00 -04:00
juan.marchionatto 0dfc716a82 Adjust code validation to properly obtain CodeSystem's current version 2021-09-16 13:18:49 -04:00
James Agnew a56c85f780
Eliminate Search Coordinator ThreadPool (#2991)
* Add test

* Remove search coordinator thread pool

* Add changelog

* Add docs

* Test fixes

* Test fixes

* Test fixes

* Test fix
2021-09-16 16:37:34 +00:00
juan.marchionatto 3d3bab5102 merge master into branch 2021-09-16 11:02:17 -04:00
juan.marchionatto 16e329e40c Add version to ValueSet.compose.include when uploading terminology 2021-09-15 14:40:21 -04:00
Tadgh 724e4b37da Fix up test to actually match 2021-09-15 11:24:01 -04:00
Tadgh 171f0f8724 fix rulebuilder 2021-09-15 09:04:45 -04:00
Tadgh a0c8cc4279 fix test 2021-09-15 01:23:43 -04:00
Tadgh 8f0e8b9e51 remove useless DB calls 2021-09-14 18:44:55 -04:00
Tadgh 9bb1558b71 Update query count ttest 2021-09-14 17:45:09 -04:00
Tadgh bb5e04e706 Fix broken test 2021-09-14 17:22:25 -04:00
Tadgh b25bdc1169 Remove crazy double encoding 2021-09-14 13:48:37 -04:00
Tadgh 9771210553 Prefer non-lazy outcomes in map 2021-09-14 13:40:53 -04:00
Tadgh 49debec36a Fix problem with null conditionals 2021-09-14 10:48:56 -04:00
juan.marchionatto bd456dfff2 Enhance test by adding operations use cases. Improve test data with more version differentiators. 2021-09-14 10:00:15 -04:00
juan.marchionatto 8288d12e97 Obtain current CodeSystem from null-pointed ForcedId, as done for ValueSet 2021-09-14 09:58:32 -04:00
Tadgh 9d982c5e08
Merge branch 'master' into conditional-bug 2021-09-14 08:51:58 -04:00
Tadgh 1ca313f8ad lower logging 2021-09-13 21:27:05 -04:00
Tadgh b4e2679872 Remove jetbrains 2021-09-13 21:15:23 -04:00
Tadgh a0cd83398b Bump test java to 16 2021-09-13 20:52:14 -04:00
Tadgh 3ccadd636e
Merge branch 'master' into 2958-consistent-error-handling 2021-09-13 19:38:57 -04:00
Justin Dar 876768718d Remove log 2021-09-13 11:29:36 -07:00
Justin Dar 3ca73f1067 Merge remote-tracking branch 'origin/2958-consistent-error-handling' into 2958-consistent-error-handling 2021-09-13 11:26:39 -07:00
Justin Dar 46936e1704 Fixed code formatting and better way of fixing issue 2021-09-13 11:26:21 -07:00
Tadgh 5f86370c98 Merge branch 'master' into conditional-bug 2021-09-13 13:04:10 -04:00
Tadgh 59c8765e6a Add implementation to validate conditional URLs post-transaction 2021-09-13 13:03:44 -04:00
Ken Stevens eee7d7e455
code cleanup (#2986)
* failed attempt to get it to work

* Use simplified FhirContext.forCached methods

* Update hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java

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

Co-authored-by: James Agnew <jamesagnew@gmail.com>
2021-09-13 03:09:18 +00:00
James Agnew 5554431146
Avoid dead SearchParameter links in CapabilityStatement (#2790)
* Avoid dead SearchParameter links in CapabilityStatement

* Resolve fixmes

* Build fix

* Test fix

* Test fix

* Test fix

* Work on metadata

* Fixes

* Test fixes

* Test fix

* Test fix

* Test fixes

* Test fix

* Work on test fixes

* Test fixes

* Test fixes

* Test fixes

* Test fix

* Fix params

* Resolve fixme

* Adjust changelogs

* Version bump to 5.6.0-PRE7

* Add license header

* Bump version to 5.6.0-PRE5-SNAPSHOT
2021-09-11 18:27:18 -04:00
Tadgh 94f157a4ac Start refactoring of basetransactionprocessor 2021-09-11 15:13:05 -04:00
Tadgh b224463d35 add broken test 2021-09-10 22:46:35 -04:00
jdar8 a02a9e0254
Merge branch 'master' into 2958-consistent-error-handling 2021-09-10 17:02:31 -07:00
Justin Dar 2163e6e548 Fixed error that previous fix caused 2021-09-10 12:36:11 -07:00
Justin Dar 77845d66f7 Improved code formatting 2021-09-10 10:54:33 -07:00
juan.marchionatto 5b6ac3e6d6 Refactor to eliminate duplication 2021-09-10 11:22:04 -04:00
Dušan Markovič d6d862015b Address concerns in review for issue 2975 2021-09-10 15:46:27 +02:00
juan.marchionatto d7fde3f984 Simplify implementation. Add tests. 2021-09-10 09:32:47 -04:00
Dušan Markovič cfc0c7e6b3 Add test for validation of multiple hosts in ElasticsearchHibernatePropertiesBuilder 2021-09-10 11:44:15 +02:00
Dušan Markovič 032a9155f0 Merge branch 'master' of https://github.com/hapifhir/hapi-fhir into issue_2975 2021-09-10 09:11:06 +02:00
Justin Dar 836948010f Fixes issue (#2958) where Procedure?patient caused inconsistent results and ensured that such requests gave http 400 2021-09-09 16:10:09 -07:00
Dušan Markovič ed325e9e11 Enable multiple hosts in ElasticsearchHibernatePropertiesBuilder 2021-09-10 00:14:21 +02:00
Tadgh a4ba65a9fd Don't wrap known errors 2021-09-09 12:27:34 -04:00
Tadgh d5f3b5db18 Merge branch 'master' into fix-batch-pool-breaking 2021-09-09 11:28:44 -04:00
Tadgh 41d5e2b8e7 Add failing test, implementation 2021-09-09 10:50:54 -04:00
Ken Stevens 661ca02a6a revert clobbered code 2021-09-09 09:28:01 -04:00
Dušan Markovič c6aa21b915 Enable empty username and password in ElasticsearchHibernatePropertiesBuilder 2021-09-09 12:55:04 +02:00
Ken Stevens 5bc571d97d fix test 2021-09-09 01:00:12 -04:00
Ken Stevens 519244a2ea unit test passes 2021-09-08 19:14:50 -04:00
Tadgh 0ccd71faf8
Merge pull request #2963 from hapifhir/custom-elastic-index
Custom elastic index
2021-09-08 14:29:58 -04:00
Tadgh fbf6b35d2e
Merge branch 'master' into custom-elastic-index 2021-09-08 08:49:26 -04:00
Tadgh 5d5c45e357 Add whitespace 2021-09-08 08:49:19 -04:00
Tadgh f04cf02be7
Merge branch 'master' into issue-2901-npe-in-bundle-transaction 2021-09-08 08:45:47 -04:00
Tadgh c2414d2cae Throw error if misconfigured 2021-09-07 18:35:59 -04:00
Tadgh 436c74616b
Merge branch 'master' into custom-elastic-index 2021-09-07 18:19:35 -04:00
Jason Roberts 34075911ce Merge branch 'master' into jr-20210831-contained-chained-search 2021-09-07 17:28:24 -04:00
Jason Roberts 207558dba3 code review feedback 2021-09-07 17:27:22 -04:00
Kevin Dougan SmileCDR 2dcc4f534f
Resolve Search Causing JOINs on HFJ_RESOURCE Checking RES_TYPE and RES_DELETED_AT Columns (#2964) 2021-09-07 19:38:08 +00:00
jamesagnew a3743fbcca Add utility method 2021-09-07 14:21:50 -04:00
Tadgh 3ec47cb0ba Bump version as we break the localcontainerentitymanagerfactory bean constructors args 2021-09-07 13:58:22 -04:00
Tadgh 6a2a5d5097 Merge branch 'master' into custom-elastic-index 2021-09-07 13:56:56 -04:00
Tadgh eabe3e7c74 Merge branch 'master' into custom-elastic-index 2021-09-07 13:56:44 -04:00
Tadgh ecd93c9e8a Add changelog 2021-09-07 13:54:28 -04:00
Tadgh 16752f393c Finalize implementation 2021-09-07 13:33:03 -04:00
leif stawnyczy 4d7f53851c issue-2901 cleanup of code/imports 2021-09-07 12:08:32 -04:00
leif stawnyczy 69287b6bc3 issue-2901 review fixes - moving methods to idhelperservice 2021-09-07 11:52:11 -04:00
Jari Maijenburg d3d7c6e97e
Merge branch 'master' into npe_fix 2021-09-07 17:36:05 +02:00
Nick Goupinets 35aaa98431 Merge branch 'master' into 2849_add_new_mdm_param 2021-09-07 11:27:49 -04:00