1162 Commits

Author SHA1 Message Date
jamesagnew
3d94761bcb Improve response for transactions 2019-01-06 18:08:32 -05:00
James Agnew
5b8fee869e Add config options for default Prefer header and _total param on server 2019-01-04 16:12:45 -05:00
James Agnew
a1275874f8 Correct subscription delivery metadata 2019-01-04 10:56:21 -05:00
James Agnew
7ba07d9f02 Avoid search failure on Oracle when performing very large includes 2019-01-04 09:11:11 -05:00
James Agnew
1bfa29bbcc Site updates 2018-12-28 11:42:21 -05:00
James Agnew
14a132a937 Squashed commit of the following:
commit 96596558304d312d7d4c0d85ef82389ac10b12db
Author: James Agnew <jamesagnew@gmail.com>
Date:   Thu Dec 27 17:54:25 2018 -0500

    Finish sync

commit 70da25b76f1236cce4d59d420259695dd5b135d4
Author: jamesagnew <jamesagnew@gmail.com>
Date:   Thu Dec 27 10:32:51 2018 -0500

    Work on RI4 sync
2018-12-27 17:58:47 -05:00
Ken Stevens
fedc59a8d6 Subscription module startup changes (#1154)
* Reorganizing packages and dependencies to support standalone subscription running within a CDR container where all hapi modules are on the classpath.

* EXPERIMENTAL: Moved Subscription registry out of interceptor and introduced ISubscriptionLoader that will be either a Database or FhirClient loader.

5 tests fail.  Looks like we're getting too many matches--likely because there is now just one list of subscriptions instead of one list per interceptor.

* Created ActiveSubscription and moved cache bits into it

* Compiles.  Next step is get app context to load.

* Application context loads.  Now fix NullPointer.

* All subscription tests pass

* FIXME cleanup

* jpa-subscription tests

* fixed config so other module tests work

* MAJOR MILESTONE: All hapi-fhir tests pass.

updated READMEs in example projects

* Moved ExecutorQueue stuff out into its own class

* Organize Imports

* FIXME cleanup

* Null check -> Optional

* Add test and supporting code to validate SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION behaviour

* Added SubscriptionCheckingSubscriber test that works without a database

* Moved a few beans to @ComponentScan

* Replaced use of beanFactory with concrete factory classes

* Switched test to use subscribablechannel

* Added SubscriptionLoaderFhirClientTest

* Undid changes that caused SearchParamProviderFhirClientTest to revert to the Database version.  It's now calling the FhirClient version again.  (oops)

* Confirm that our SubscriptionProviderFhirClient works with a live fhir client

* Organize imports

* Organize imports

* Register interceptors with DaoConfig instead of RestServer.
Also, Rename @VisibleForTesting methods with ForUnitTest

* Ready to go

* organize imports

* add processing queue

* Fixed interface implementation names

* Fix triggering service so it uses new subscriptionmatcherinterceptor

* fixed example

* Renamed "Database" classes to "Dao"

* Tightened up StoppableSubscriber API

* final code review

* processing -> matching naming change

* fix required by CDR

* oops

* Updated changes.xml

* Renamed subscriptioncheckingsubscriber to subscriptionmatchingsubscriber

* Renamed subscriptioncheckingsubscriber to subscriptionmatchingsubscriber

* CDR integration now works

* Changing subscribable channel abstraction layer in preparation for supporting more types of subscribable channels

* Add interface over both types of messages put on queues

* cosmetic change

* added subscription support for r4

* fixed again

* oops

* self code-review
2018-12-23 13:52:26 -05:00
James Agnew
9d3904ef3e Fix #1142 - Upgrade Spring Boot to latest version 2018-12-23 13:10:03 -05:00
James Agnew
a0cb7edd08 Version bump a few dependencies 2018-12-22 20:13:03 -05:00
jamesagnew
ea80d03a74 Credit for #1051 2018-12-21 05:42:39 -05:00
jamesagnew
54bb1508db Changelog for #980 2018-12-20 06:08:10 -05:00
Ken Stevens
84a34eb3c9
Subscription module support (#1147)
* Reorganizing packages and dependencies to support standalone subscription running within a CDR container where all hapi modules are on the classpath.

Moved Subscription registry out of interceptor and introduced SubscriptionLoader

* Created ActiveSubscription and moved cache bits into it

* Moved ExecutorQueue stuff out into its own class

* Add test and supporting code to validate SubscriptionConstants.EXT_SUBSCRIPTION_RESTHOOK_DELIVER_LATEST_VERSION behaviour

* Added SubscriptionCheckingSubscriber

* Moved a few beans to @ComponentScan

* Replaced use of beanFactory with concrete factory classes

* Switched test to use subscribablechannel

* Added SubscriptionLoaderFhirClientTest

* Confirm that our SubscriptionProviderFhirClient works with a live fhir client

* Register interceptors with DaoConfig instead of RestServer.
Also, Rename @VisibleForTesting methods with ForUnitTest

* Fix triggering service so it uses new subscriptionmatcherinterceptor

* Renamed "Database" classes to "Dao"

* processing -> matching naming change
2018-12-18 13:09:06 -05:00
James Agnew
f978bc3039 Always apply new search params to any resource reindexing 2018-12-14 13:43:25 -05:00
James Agnew
11b8304cb4 Fix case sensitivity issue 2018-12-13 08:31:35 -05:00
jamesagnew
8d195aedf0 Credit for #917 2018-12-13 05:36:19 -05:00
James Agnew
b442982310 Add media interceptor 2018-12-08 18:49:58 -05:00
James Agnew
5a80e70d93 Correctly reindex string indexes 2018-12-06 14:44:42 -05:00
James Agnew
cbaa39fd63
Try to reuse index rows in JPA server (#1133)
* Try to reuse index rows in JPA server

* Address review comments

* One more test fix

* One more test
2018-12-05 19:25:59 -05:00
James Agnew
8c7f249a21 Migrator enhancements and adjust reindexer to account for missing
versions
2018-12-04 17:33:29 -05:00
James Agnew
c484c69664 Better error message for unqualified search parameter types 2018-12-03 13:14:10 -05:00
Ken Stevens
6baee4dc3f
Standalone subscription (#1125) 2018-11-30 17:19:16 -05:00
James Agnew
650872cd3e Address SQL syntax issue 2018-11-29 08:37:50 -05:00
James Agnew
b41c222880 Require explicit declaration of authorizationinterceptor operation rules
on whether the response is authorized or not
2018-11-23 14:25:46 -05:00
James Agnew
d0b194f9d7 Fix two test failures 2018-11-22 08:41:12 -05:00
James Agnew
2e030eebaa Make sure that reindexing happens correctly 2018-11-21 12:06:10 -05:00
Ken Stevens
03ebcafdf5
In-memory matcher (#1116)
* Initial refactoring to move database matcher out into its own class

* MAJOR REFACTOR: Pulled indexing code out of BaseHapiFhirDao into a new class ResourceIndexedSearchParams

* Moved calculateHashes

* Replaced @Bean definitions in BaseConfig.java with @ComponentScan

Annotated bean classes with either @Service (if it's stateless) or @Component (if it's stateful).  It doesn't really matter which annotation is used, but it's helpful to see at a glance whether a bean is stateful or stateless.

* Move services out of BaseHapiFhirDao

Moved services required by ResourceIndexedSearchParams out of BaseHapiFhirDao and into new classes called LogicalReferenceHelper, IdHelperService, MatchUrlService, and DaoProvider.

Converted SearchBuilder into Prototype Bean

Mark Spring components that depend on daos and entitymanagers with @Lazy so they aren't picked up by hapi-fhir-spring-boot-autoconfigure.

* Added SubscriptionMatcherInMemory

Moved static data out of BaseHapiFhirDao into ResourceMetaParams

Moved translateMatchUrl methods out of BaseHapiFhirDao into MatchUrlService bean

Simplified SubscriptionMatcherInMemory to not depend on entity or dao

Turned all subscribers into prototype beans

* Moved searchParam method out to mySearchParamProvider

Also removed dao and contest parameters from of myMatchUrlService methods

Moved code out of SearchBuilder into SearchParameterMap.clean() so it can be used by inMemoryMatcher

Introduced a new composite subscription matcher that tries to match in memory and if it finds a parameter in the criteria it doesn't support, it falls back to the database matcher.

* Added support for references

Also fixed a small bug in SearchParameterMap that was missing the ";" after "_has" when creating a normalized query from search params.

* Finished implementing all tests from FhirResourceDaoR4SearchNoFtTest

* Make in-memory matcher configurable, disabled by default

* Validate Subscription criteria when they're submitted

Send HTTP 422 UnprocessableEntityException if the criteria fail validation.

* fixed Sonar "Blocker" issues.

*  Don't reload the resource before sending it out

Since we can always force a reload using restHookDetails.isDeliverLatestVersion

* Added tests to cover Custom Search param.

* Split ResourceIndexedSearchParam into separate state and service classes

* Cleaned up SearchBuilder.

Removed uses of myCallingDao as an injection mechanism.
Left // FIXME KHS cookie crumbs to clean up

* Reduced dependencies on BaseHapiFhirDao

Removed methods from IDao interface that were used for injection

* Updated change log
2018-11-19 16:19:52 -05:00
James Agnew
58388bb614 Allow client to return methodoutcome instead of resdource for operation
call
2018-11-19 11:11:49 +01:00
James Agnew
67dbc802be Better detection of binary content in ResponseHighlighterInterceptor 2018-11-18 14:32:54 +01:00
James Agnew
fad53c6669 Fix a test 2018-11-16 13:15:14 +01:00
James Agnew
4b099cf057 Fix #944 - NPE when using a custom resource class that has a @Block
child
2018-11-15 16:11:55 +01:00
James Agnew
e75d2e1f10 Credit for #1117 2018-11-15 13:37:32 +01:00
James Agnew
84acafe3af Streamline expunge operation 2018-11-15 11:37:16 +01:00
jamesagnew
31bd2186ce Update changelog 2018-11-12 09:47:17 -05:00
jamesagnew
cbc6f22329 Documentation updates 2018-11-12 09:21:09 -05:00
James Agnew
63af04a7b4 Prepare for 3.6.0 release 2018-11-12 05:40:55 -05:00
James Agnew
cb00512522 Credit for #1047 2018-11-11 17:08:30 -05:00
James Agnew
e5b04710ea Version bump a few dependencies 2018-11-11 17:06:40 -05:00
James Agnew
f61df5c3fe Use FHIRPath expression parser for custom SP validation 2018-11-09 14:41:20 -05:00
James Agnew
82ec721c99 Allow client defined parameter style for _format param 2018-11-08 15:27:35 -05:00
James Agnew
7e2e53a354 Credit for #1071 2018-11-08 13:33:25 -05:00
James Agnew
9fee827398 Credit for #1103 2018-11-08 13:24:24 -05:00
jamesagnew
3121334bfd Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-07 18:28:28 -05:00
jamesagnew
ca9268970e Site updates 2018-11-07 18:27:08 -05:00
James Agnew
76cd3f6b47 Allow client assigned IDs to be purely numeric in JPA server if
configured to do so
2018-11-07 18:25:50 -05:00
jamesagnew
8796c1c5d2 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-04 14:01:17 -05:00
jamesagnew
053f4c3be7 Fix bad tag in file 2018-11-04 14:01:06 -05:00
James Agnew
bc72093555 Add reindexing support based on table instead of column 2018-11-04 20:00:27 +01:00
James Agnew
b1283791ca Allow JPA server to restore resources and link to them in a single
transaction
2018-11-02 16:45:21 -04:00
jamesagnew
3f6960d82b Add multithreaded migrator tool 2018-11-01 05:42:51 -04:00
jamesagnew
5849960a14 Add changelog 2018-10-31 05:52:15 -04:00