Commit Graph

2077 Commits

Author SHA1 Message Date
jamesagnew e76b1dacb3 License header updates 2019-06-22 18:31:16 -04:00
jamesagnew 8bb010bb18 Test fixes 2019-06-22 17:42:02 -04:00
jamesagnew 3ba194acbe Reject subscriptions in JPA server if status field is not set 2019-06-22 17:03:22 -04:00
jamesagnew 0fbde2a4e5 Fix #1352 - Don't fail to create observation with a value type of
SampledData
2019-06-22 16:43:25 -04:00
James Agnew 4ad1808da3
Propagate RequestDetails to everything in JPA server (#1358) 2019-06-22 15:18:06 -05:00
jamesagnew 58e6b7f6aa Fix #1011 - Was resolved in #1355 2019-06-22 16:03:35 -04:00
jamesagnew 989e26fdb4 Fix #1355 - Failed to call access method: java.lang.NullPointerException in case of bundle entry without resource 2019-06-22 15:51:56 -04:00
James Agnew 2543f27697 Add a test 2019-06-21 15:38:16 -04:00
Diederik Muylwyk 266384b536 Evaluation of PartTypeName in LoincRsnaPlaybookHandler is not case insensitive. 2019-06-21 15:36:51 -04:00
jamesagnew 9e9be00088 License eader updates 2019-06-17 21:59:03 -04:00
James Agnew 6724fd0348
Implement the $subsumes operation (#1344)
* Implement the $subsumes operation

* Fix #976
2019-06-17 17:31:24 -04:00
jvi 8b4ceb8d5f changed json patch framework to slightly more maintained fork 2019-06-17 16:45:17 -04:00
James Agnew b2e99cf035
Add support for conditional patch (#1348)
* Add support for conditional patch

* Add changelog

* Test fix
2019-06-17 16:12:05 -04:00
jamesagnew 087c53286c License header updates 2019-06-14 18:43:55 -04:00
Stig Rohde Døssing b56f59542a Move JettyUtil to new module 2019-06-14 18:34:45 -04:00
Stig Rohde Døssing aab7bb6b64 Issue-1325: Let OS assign random ports to servers during testing, and let tests get the port of the running server once the OS has assigned a port. Delete PortUtil and similar utilities. 2019-06-14 18:34:45 -04:00
Ken Stevens 19dd7ebc2e try excluding stress tests from build 2019-06-13 15:21:03 -04:00
Ken Stevens 2bf680509b
DeleteConflict hook, SearchableHashMapResourceProvider, and in-memory searching (#1341)
* Make IBundle list interface more flexible

* Make matchResourceLinks visible

* Make matchResourceLinks visible

* Pull in-memory matching functionality out of subscription module into dedicated classes in searchparam module

* Added more accessors to version independent resource classes

* improved forcedid matching (needs to be verified by James)
filter out nulls from HashMapProvider.searchAll() (hopefully no tests depend on this)

* add AnyComposition

* cleanup of Any classes

* create searchparam config so people can use that module without using subscriptions

* create searchparam config so people can use that module without using subscriptions

* fix broken test

* added derivedFrom

* renamed daoRegistry.getResourceDaoIfExists to getResourceDaoOrNull
also added method to add a new dao to the registry and retrieve registered types

* TokenParam.equals

* add error check to searchable hashmap resource provider

* added support for R4

* add successor to measure

* delete conflict hook
start with failing test

* test passes.
hook is called.

* added delete conflict hook
all delete conflict tests pass

* added javadoc

* Performance test

* test bad interceptor case

* typo

* rename criteria matcher

* added support for multiple topics

* fix method name

* add effective period

* Temporarily excluding StressTest from build to try to get Travis under time limit

* change log

* review feedback

* review feedback

* review feedback
2019-06-13 13:59:51 -04:00
James Agnew c2aec5c1a9 Respect the _total parameter for all JPA searches 2019-06-09 05:44:49 -04:00
jamesagnew b72f1c4555 Roll back derby upgrade 2019-06-08 09:27:28 -04:00
James Agnew 517b68882c Fix derby dependencies for tests 2019-06-07 11:11:25 -04:00
Ken Stevens 5752a6e2b3 reported issue with proposed fix that breaks tests (#1243)
* reported issue with proposed fix that breaks tests

* Fix spelling

* Merge my changes into this

* Correctly check referential integrity on deletes

* Add one more test
2019-06-04 20:40:20 -04:00
James Agnew be06c2ee19 Correctly index timing events 2019-05-31 16:42:45 -04:00
James Agnew f6c7ff1dbb Modify expunge everything to use small batches of deletes 2019-05-31 11:05:17 -04:00
James Agnew 95af87f658 Test fix 2019-05-30 21:46:05 -04:00
James Agnew f2be9f47a0 Add 4.0.0 version enum 2019-05-30 20:59:23 -04:00
James Agnew 50a8c66bf5 Version bump to 4.0.0-SNAPSHOT 2019-05-30 17:13:03 -04:00
jamesagnew 73aa53be8f Release 3.8.0 2019-05-30 16:50:04 -04:00
James Agnew cb8634f26f
Ja interceptor callback fix (#1308)
* Interceptor callback fix

* Ensure that interceptor methods are called after a transaction
2019-05-14 18:47:11 -04:00
James Agnew d4d3178621 A couple of test fixes 2019-05-11 15:04:44 -04:00
James Agnew 444730373b Fix an NPE in validation 2019-05-10 12:49:34 -04:00
James Agnew 92bd2c7173 Fix regression in validator when validating codesystems explicitly
defined in the JPA database
2019-05-10 12:08:40 -04:00
James Agnew 6b37525f2d
Clean up redundant dependencies (#1306)
* Remove a bunch of unneedd deps

* Test fix

* Disable useless test
2019-05-09 12:51:13 -04:00
James Agnew 702ffd631d Fix #1299 - Return an HTTP 201 when creating a previously deleted
resource
2019-05-06 16:33:23 -04:00
James Agnew 61902da527 Tweak to validator 2019-05-06 10:18:55 -04:00
James Agnew 64f57b9736 Fix broken R4 serrver 2019-05-05 09:12:26 -04:00
James Agnew 7a320729a0 One more test fix 2019-05-04 14:57:18 -04:00
James Agnew 9353ea5b06 Enable websockets on public HAPI server 2019-05-04 10:06:10 -04:00
Ken Stevens b860269eb9 fix broken test 2019-04-29 11:12:08 -04:00
Ken Stevens 10f7eb31eb fixed delete reference error message 2019-04-29 10:20:45 -04:00
jamesagnew ddf12e7c28 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-04-28 11:17:18 -04:00
jamesagnew c1bf6d0b3c License headers 2019-04-28 10:46:52 -04:00
James Agnew 828df1528f Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-04-26 11:24:00 -04:00
James Agnew 685adf7754 Revert Jetty upgrade, and improve patch error messages 2019-04-26 11:23:22 -04:00
Ken Stevens 130e879d04
Delete performance (#1286)
* move expunge out

* move to prototype

* turns parameters into fields

* cleanup control flow

* moved transactions outside of loops

* add expungeeverything

* moved daos out

* add expungeThreadCount

* add expungeBatchSize

* added partition runner to run in separate threads

* all done.  just need to consolidate test code.

* Moar tests

* consolidated pointcutlatch into hapi-fhir-jpaserver-model

* final cleanup

* update javadoc

* change log

* failing test

* added delete
also @Transactional

* remove unused parameter

* fix compile

* race condition

(cherry picked from commit e1940d2fb20838859a205f2b96c833b0ce9f05eb)

# Conflicts:
#	hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunnerTest.java

* ja feedback

* ja feedback
2019-04-25 15:38:37 -04:00
jamesagnew abd53c0cbe License header updates 2019-04-24 21:20:11 -04:00
James Agnew c8c81c2ebc FIx invalid patch syntax 2019-04-24 15:00:03 -04:00
James Agnew da962b8c10 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-04-24 14:33:28 -04:00
James Agnew 738c2c1797
Interceptor framework refactoring (#1287)
Interceptor framework overhaul
2019-04-24 14:32:30 -04:00
James Agnew f2e382a132 Swap JSON Patch provider 2019-04-24 14:10:21 -04:00
Ken Stevens a57e50317d
Websocket cleanup (#1275)
* fix bug in websocket subscription (It wasn't destroying the channel when there are no subscribers)

* add support for removing channel.  Also synchronize removal (there was a race condition between sync and queue)

* keep deprecated method for backwards compatibility

* make websocket endpoint configurable

* make websocket context path configurable

* make websocket context path configurable

* trying mvn clean test instead of mvn clean install to see if the build goes faster

* that didn't work at all.  reverting.

* change log
2019-04-17 15:03:35 -04:00
jamesagnew 08a9844066 Work on #1280 2019-04-17 09:10:17 -04:00
James Agnew 311246e5f0
Merge pull request #1255 from jamesagnew/addFetchValueSet
added fetchValueSet to IValidationSupport and made it public
2019-04-15 17:03:56 -04:00
James Agnew 1e4a497181 Add some tests 2019-04-15 14:44:25 -04:00
jamesagnew a9cfce3615 Header updates 2019-04-15 12:31:11 -04:00
James Agnew f7ad0bc0d8 Fix a test regression 2019-04-15 11:34:13 -04:00
James Agnew 0848fdf1eb Fix broken test 2019-04-15 10:29:55 -04:00
James Agnew c8f2e4bbc9 Return HTTP 400 for missing body on POST and PUT 2019-04-14 12:32:09 -04:00
James Agnew 380644d19d Add a bit of logging for search parameters when they can't be found 2019-04-14 12:32:09 -04:00
Ken Stevens bb98ded1fa
Websocket improvements (#1272)
* subscription loader now only pulls active subscriptions
only allow websocket connections to subscriptions of type websocket

* Added a "flag for deletion" to ActiveSubscription in the SubscriptionRegistry to handle the race condition of a scheduled sync overlapping with a subscription creation.  We could have used a package-scoped semaphore or a pre-remove FHIR read, but this seemed like the safest, simplest and most performant way to handle it.

* ActiveSubscriptionCacheTest

* WebsocketConnectionValidatorTest

* fix compile error in jpa example
2019-04-12 08:36:49 -04:00
jamesagnew ca8b6acdf9 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-04-07 07:52:40 -04:00
jamesagnew 884b80c1d7 Improve ability to select active resources 2019-04-07 07:52:21 -04:00
James Agnew 706af5d579 Don't update modified time when performing NOOP update in JPA 2019-04-05 14:36:18 -04:00
Ken Stevens 5299479143 fix broken test 2019-04-04 10:26:09 -04:00
jamesagnew 859bc7d71b Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-04-03 20:15:19 -04:00
jamesagnew 54e3c50ad7 FIx a build failure 2019-04-03 20:15:07 -04:00
Ken Stevens 1d5f648070 fixed second expunge bug reported by FMCNA 2019-04-03 13:32:10 -04:00
Ken Stevens de4cc89568 bug fixed 2019-04-03 12:20:49 -04:00
Ken Stevens 28ea97ee9a reproduced failure reported by FMCNA 2019-04-03 11:42:21 -04:00
James Agnew 767a84bddb Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-04-02 10:56:43 -04:00
James Agnew 8065f0f5fc Revert one accidental change 2019-04-02 10:56:26 -04:00
jamesagnew 8b5143f436 License header updates 2019-04-02 10:44:41 -04:00
James Agnew 588082aee2 Fix broken test 2019-04-02 10:00:56 -04:00
James Agnew 90d163a4e9 Merge branch 'ja_interceptor_jpa_queries' of github.com:jamesagnew/hapi-fhir into ja_interceptor_jpa_queries 2019-04-02 09:33:22 -04:00
James Agnew 7359b77d99 Address review comments 2019-04-02 09:33:01 -04:00
jamesagnew 835b89f449 Build fixes 2019-04-01 18:55:55 -04:00
James Agnew 3eeca4a8fd Merge branch 'master' into ja_interceptor_jpa_queries 2019-04-01 09:59:03 -04:00
patrick-werner 1aeb54e94e added all fetchValueSet Implementations 2019-03-30 21:02:24 +01:00
jamesagnew 8791ed5793 Test tweaks 2019-03-29 17:13:41 -04:00
Ken Stevens b1d41a8211 named interceptor registries 2019-03-29 14:29:36 -04:00
James Agnew cf7cd40336 Make sure we properly scope reference queries on external URLs 2019-03-27 13:10:24 -04:00
James Agnew e85bec2858
Ja inline references (#1252)
* Use a single IN clause for OR reference searches

* Add changelog

* One more attempt at getting the free port util to actually work... sigh

* One more tweak to free ports

* Bundle fix
2019-03-26 10:42:42 +01:00
Ken Stevens 9a54d7086e Fix a couple of bugs (#1251)
* might keep this

* might keep this

* undoing start in interface

* fixed bug that only supported resources with ResourceType/id prefixes

* added standalone subscription support for Dstu2.  untested.

* failing test

* fixed cannonicalsubscription.equals for email

* final cleanup
2019-03-26 10:39:40 +01:00
James Agnew 87c0b3778b More work on threadlocal interceptors 2019-03-22 09:54:02 -04:00
James Agnew c701de2861 Create a performance interceptor framework for HAPI FHIR 2019-03-22 01:06:03 +01:00
James Agnew d1667487c2 Clean up unique composite search params 2019-03-21 21:57:38 +01:00
James Agnew 8d49b4e6d2 Add a test (currently ignored) 2019-03-21 15:59:59 +01:00
jamesagnew 037ed27497 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-03-17 14:09:37 -04:00
jamesagnew 3e57fdb491 Improvements to PortUtil to avoid reusing ports 2019-03-17 14:09:21 -04:00
James Agnew 08c7afb804 Reduce logging in JPA server 2019-03-14 17:42:13 -04:00
jamesagnew 6ff92abecc License header 2019-03-14 13:32:32 -04:00
James Agnew e15afbc4f0 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-03-14 13:32:03 -04:00
James Agnew a8c76450e5 Re-enable contains searches on the public HAPI FHIR server and improve
message formatting in HapiLocalizer
2019-03-14 13:19:26 -04:00
jamesagnew a1046f7729 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-03-12 17:46:03 -04:00
jamesagnew 7b1950aeed License headers 2019-03-12 17:45:51 -04:00
James Agnew ed4da7c414 Add setting to disable resource type target validation in JPA 2019-03-12 17:45:19 -04:00
James Agnew 6597a928d5 Fix broken test 2019-03-12 15:45:53 -04:00
James Agnew 00a8f8c759 Fix broken build 2019-03-12 13:13:13 -04:00
James Agnew f934f76c96
Several JPA search fixes (#1231)
* Search fixes

* Add some tests

* CHangelog

* Some cleanup of the query tracker

* FIx XML issue in changelog

* Test fixes

* SOme test fixes

* Address review comments

* Fix test breakage
2019-03-11 15:49:34 -04:00
Ken Stevens dcfacfea49
Has param no in (#1232) 2019-03-10 20:50:24 -04:00
James Agnew 5dccf93506 Fix broken test 2019-03-06 17:15:30 -05:00
James Agnew f8b8f2d1b0 Move process-message to the correct level 2019-03-06 16:12:43 -05:00
Ken Stevens a2d4c93922 Subscription matcher transactions (#1229)
* fix bug in ResourceIndexSearchParamQuantity
Move transaction boundary around SubscriptionMatcherInterceptor so it can be overridden in subclass
Lots of CRLF changes from a mvn -P DIST

* FIXME
2019-03-06 16:12:04 -05:00
James Agnew fd401165a9 Fix an occassional failure in the stress test 2019-03-06 09:32:37 -05:00
James Agnew 9bc0f6784d
Search paging timeout with 1500 < n < 2000 results (#1221)
* Avoid paging links when offset is artificially set very high

* Ongoing fixes

* Adding logging and clean up transaction processing

* Add changelog

* More work on queries

* Keep working on getting tests passing

* More test fixes

* More work on tests

* More test works

* One more test attempt

* Ongoing fixes

* One more change

* FIxes to search algorithm

* Add changelog

* Clean up for review

* Fixed NPE in token matcher when system is not null and value is null

* test opposite (null system not null value)

* added null protection to all matchers

* Address review comments

* Address broken test

* Trying to resolve DB ordering issues
2019-03-06 05:45:05 -05:00
James Agnew 7896887f67 Updates to transaction processing 2019-02-28 12:23:48 -05:00
James Agnew 48c10bddc5
Narrative Generator refactoring (#1219)
* Starting work on this

* Working on narrative templates

* Work on new narrative system

* Account for some failing tests due to refactoring of narrative mode

* Another test fix

* More test fixes

* One more test fix

* Work on searches

* Address review comments
2019-02-27 14:59:57 -05:00
James Agnew 94f9ffa977 Avoid paging links when offset is artificially set very high 2019-02-25 20:44:22 -05:00
James Agnew fb06664f70 Clean up paging query 2019-02-25 19:05:19 -05:00
James Agnew 820a3d2296 Collapse conditional UPDATES as well in JPA transactions 2019-02-22 13:49:38 -05:00
James Agnew 43c07077be Automatically remove duplicate conditional creates in JPA 2019-02-22 12:57:07 -05:00
James Agnew 89b08cd627
Improve SQL IN(..) queries (#1214)
* First attempt, probably has compile issues

* Fix qualified searches

* Another test fix

* More test fixes

* Add changelog

* Two more fixes

* Revert SQL logging
2019-02-20 16:38:51 -05:00
James Agnew 28b4b812ac Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-02-20 15:07:08 -05:00
James Agnew e7b7ba1a6d Add caching test 2019-02-20 11:18:02 -05:00
Ken Stevens 01568ab0b5 Fix test race condition. 2019-02-19 21:14:11 -05:00
Ken Stevens 3af0bc7206 changes needed to support different number of consumers in matching vs delivery 2019-02-17 15:23:01 -05:00
James Agnew c6fcb4fcbf Allow canonical subscription to hold multiple extensions with the same
URL
2019-02-16 15:28:39 -05:00
jamesagnew 1311ded7de Fix compile issue 2019-02-15 14:55:25 -05:00
James Agnew c0970ed46d Fix typo in test 2019-02-15 14:30:38 -05:00
James Agnew a35f30b18e
Merge pull request #1208 from jamesagnew/reuse-subscription-channels
Reuse subscription channels
2019-02-15 13:42:54 -05:00
James Agnew 485335e975 Allow terminology service to work without having Lucene enabled for
simple ValueSet expansions
2019-02-14 20:47:28 -05:00
Ken Stevens ffc5966aa3 Merge branch 'master' into reuse-subscription-channels
# Conflicts:
#	src/changes/changes.xml
2019-02-14 19:42:00 -05:00
James Agnew 10c348d44f Tweak to elements parametr support 2019-02-14 19:30:10 -05:00
Ken Stevens 508e15956e added a couple of subscription tests and un@Ignored another 2019-02-14 15:30:25 -05:00
Ken Stevens 7b3fedc642 sonar 2019-02-13 20:41:11 -05:00
Ken Stevens f34926bb18
fixed a bug matching long ids in searchparams (#1203)
* fixed a bug matching long ids in searchparams
2019-02-09 13:45:51 -05:00
James Agnew a5e10740c0
Merge pull request #1194 from jamesagnew/ja_more_subscription_logger
More subscription logger work
2019-02-09 11:45:25 -05:00
Ken Stevens f40614a1aa fixed bug in in-memory matching for reference id when searchparam has two components 2019-02-08 16:37:08 -05:00
Ken Stevens 52c62884fb Merge branch 'master' into reuse-subscription-channels 2019-02-08 10:39:00 -05:00
James Agnew ce840ecb6e Fix broken test 2019-02-07 17:48:08 -05:00
James Agnew 810f1ad969 Improvements to elements parameter as well as adding attributes to
RequestDetails
2019-02-07 16:45:59 -05:00
Ken Stevens b3e80f8da7 Merge branch 'master' into reuse-subscription-channels 2019-02-07 10:10:10 -05:00
Ken Stevens 4592184c34 fixed typo in logs 2019-02-07 10:06:41 -05:00
James Agnew 0f8c8d18e2 Bump version to 3.8.0-SNAPSHOT 2019-02-06 20:02:28 -05:00
jamesagnew 207015c3af Version bump to 3.7.0 2019-02-05 21:36:38 -05:00
James Agnew e3dd296db7 Fix flaky test hopefully? 2019-02-05 15:36:21 -05:00
James Agnew 87a6c24bde More subscription logger work 2019-02-04 13:49:10 -05:00
James Agnew e401ec86e4
Enhanced elements (#1192)
Squashed merge: Add elements exclude mode

* Start working on elements enhancement

* Work on elements projection

* Work on elements filter

* Feature is now working

* Just some cleanup

* Address compile issues
2019-02-03 16:41:33 -05:00
James Agnew 447c394cac
Ja subscription debug logger (#1190)
Squashed commit adding subscription debug logger

* Work on subscription debug logger

* Add subscription logging interceptor

* Remove unneeded variables

* A bit of cleanup

* Tweak the output logs a bit

* Address review comments
2019-02-03 16:33:54 -05:00
Ken Stevens 9280cde491
Subscription only registers active (#1189)
* Fixed a bug in standalone subscription subscriber:  It was adding REQUESTED subscriptions to the active subscription registry.  (Only ACTIVE subscriptions should be added.)
2019-02-01 10:14:46 -05:00
jamesagnew 5f29e4fbf3 Fix #1174 - Prevent serialization exception 2019-01-30 05:49:45 -05:00
jamesagnew 5d540d9208 Query optimization in JPA 2019-01-27 20:03:48 -05:00
Ken Stevens 10c59fceeb
Subscription strategy tag (#1178)
tests pass
2019-01-25 13:01:04 -05:00
James Agnew f55be0b6d0 Test fix 2019-01-25 10:56:17 -05:00
James Agnew 38d03ea99a
Invalid ids in subscription queue (#1175)
* Start work on this

* Work on interceptors

* Attempt fix

* Avoid environment dependency

* Test fixes

* One more test fix

* One more build tweak

* Lots of cleanup

* A bit more cleanup

* Still more cleanup

* Some test fixes

* Add legacy methods temporarily

* Don't auto-scan interceptor beans

* One more test fix

* rsolve merge conflicts

* Address review comments
2019-01-23 21:17:47 -05:00
Ken Stevens 67eaeb8af1 Merge remote-tracking branch 'origin/windows-fixes' into windows-fixes 2019-01-23 17:14:51 -05:00
James Agnew e819b83a94 Make busywait more clear 2019-01-23 16:21:13 -05:00
Ken Stevens cfd67d88c7 Merge remote-tracking branch 'origin/windows-fixes' into windows-fixes 2019-01-23 16:17:48 -05:00
Ken Stevens 5c7907dfea magic number 2019-01-23 16:17:41 -05:00
James Agnew 7d1d5a102c Attempt to fix a weird lucene indexing issue 2019-01-23 16:14:53 -05:00
Ken Stevens 2c7eb39b29 final batch of windows fixes (to deal with jumpy windows clock)
also added semaphore to PointcutLatch
2019-01-22 18:53:54 -05:00
Ken Stevens 6b22977d7c fixing more tests for Windows 2019-01-21 22:28:48 -05:00
Ken Stevens 00320da9dc Merge branch 'master' into windows-fixes 2019-01-21 20:34:01 -05:00
James Agnew 9cf64f78d0 Deprecate a bad setter on RetfulServer, fix a paging issue, and add a
disabled unit test to the subscription matcher
2019-01-21 14:46:17 -05:00
Ken Stevens 29f483d7b4 Merge branch 'master' into windows-fixes 2019-01-21 11:06:42 -05:00
Ken Stevens b4350bbdae Working through failed tests. Consolidating sleep calls 2019-01-21 11:05:53 -05:00
James Agnew 17f03ac843 Allow null return type for interceptors 2019-01-20 19:44:18 -05:00
James Agnew c3c7d156e9 Interceptor cleanup 2019-01-20 10:16:18 -05:00
jamesagnew b878925884 Try to avoid intermittent test failure 2019-01-19 18:44:09 -05:00
jamesagnew cd1e0e881c Add headers 2019-01-19 18:31:17 -05:00
jamesagnew b0cbd52ae9 Interceptor cleanup 2019-01-19 18:01:00 -05:00
James Agnew 29c3cee287
Merge pull request #1172 from jamesagnew/ja-subscription-interceptors
Ja subscription interceptors
2019-01-19 07:13:14 -06:00
James Agnew 3e84173180 Merge branch 'master' into ja-subscription-interceptors 2019-01-18 17:52:23 -05:00
Ken Stevens 3d07fc1c22
fixed null subscription id (#1170)
* fixed null subscription id
2019-01-18 10:39:35 -05:00
James Agnew 5ce9d444e9 Work on interceptors 2019-01-18 09:04:45 -05:00
jamesagnew 5fd084d7cf Fix a couple of merge conflicts 2019-01-18 05:47:37 -05:00
Volker Schmidt 432ad8e5bc Subscription without Payload did not contain header. 2019-01-18 05:41:47 -05:00
Ken Stevens 66dc7f82d5 organize imports 2019-01-15 20:55:00 -05:00
Ken Stevens 19afcb7e09 all tests pass 2019-01-15 18:22:08 -05:00
jamesagnew a584e15251 Add headers 2019-01-14 14:58:27 -05:00
Ken Stevens 4f5640e541
Resilient searchparamregistry (#1165)
SearchParamRegistry and SubscriptionRegistry now both poll retrying connection to the server. This will help in particular in the scenario where the subscriptions are managed in a standalone server that depends on a FHIR Server being available to pull search parameters and subscriptions from.
2019-01-14 11:39:28 -05:00
James Agnew 4b48eebe8b Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-01-13 12:27:40 -06:00
James Agnew 63b8a70e8a Allow storing ConceptMap with StructureDefinition as a source or target 2019-01-13 12:24:51 -06:00
James Agnew 068117138e
Merge branch 'master' into subscription-bugfix 2019-01-11 09:05:37 -06:00
Ken Stevens 860a8fb7a6 Emergency fix.
Normally I'd write a test for this, but this startup behaviour is changing in my next PR.
2019-01-11 09:49:40 -05:00
James Agnew aee7b2b882 Make sure that sub-request transaction searches and reads preserve HTTP
headers
2019-01-10 07:26:04 -07:00
James Agnew d091665ab6 Test fix 2019-01-09 14:40:43 -05:00
James Agnew f241457bc1 Merge branch 'master' into test-openjdk-11 2019-01-09 13:42:50 -05:00
Ken Stevens 66dd6dc96c updated documentation 2019-01-09 13:39:32 -05:00
Ken Stevens cdf1cd9144 undoing inadvertent comment changes 2019-01-09 13:39:32 -05:00
Ken Stevens 3142ebb892 Fixed typo in class name
Added channel extensions to CanonicalSubscription
2019-01-09 13:39:32 -05:00
Ken Stevens d809569a2d Added new DaoConfig parameter to control whether subscription matching happens on this server. 2019-01-09 13:39:32 -05:00
James Agnew 8beccab9ab Merge branch 'master' into test-openjdk-11 2019-01-09 10:48:57 -05:00
James Agnew 62ae71c1c6 Allow authorizing delete operations via a transaction in
AuthorizationInterceptor
2019-01-07 15:43:36 -05:00
jamesagnew a8a97ae6b2 Two test fixes 2019-01-07 09:18:11 -05:00
James Agnew c104923855 Add an additional test for transaction processing 2019-01-07 09:17:19 -05:00
jamesagnew 8f8385627f Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2019-01-05 11:33:08 -05:00
jamesagnew 98d93df12a License header updates 2019-01-04 16:22:15 -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 ba76492865 Another test fix 2019-01-04 14:04:26 -05:00
James Agnew 137d39e80f Another test fix 2019-01-04 13:53:24 -05:00
James Agnew 051074d0bc Work on tests 2019-01-04 13:05:39 -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 31b8a392b7 Better CLI error handling for unit tests 2019-01-03 12:57:18 -05:00
James Agnew 14a132a937 Squashed commit of the following:
commit 9659655830
Author: James Agnew <jamesagnew@gmail.com>
Date:   Thu Dec 27 17:54:25 2018 -0500

    Finish sync

commit 70da25b76f
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
jamesagnew 28218c9bba Version bump for build JDK 2018-12-23 15:14:43 -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
James Agnew 1311ef4157 Revert to JDK9 to build on travis temporarily 2018-12-21 09:26:19 -05:00
James Agnew f5f9dff391 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-12-18 14:09:20 -05:00
James Agnew bca958564f Just a javadoc change 2018-12-18 14:09:11 -05:00
jamesagnew 86b3e45a32 License header updates 2018-12-18 14:08:01 -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 dc1f48ffed Test fix 2018-12-14 14:13:02 -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
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 a5b1f684f7 Try to prevent intermittent test failure 2018-12-05 19:28:37 -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 d150340d53 One more test fix 2018-12-04 19:55:14 -05:00
James Agnew 29af6160d6 Fix typo 2018-12-04 18:54:26 -05:00
James Agnew 1d3bcd9e8f Fix indexing bug 2018-12-04 18:50:49 -05:00
James Agnew d9ce0ebf7c Unit test fix 2018-12-04 18:24:19 -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
jamesagnew 82f40f0423 License header updates 2018-12-03 05:22:10 -05:00
Ken Stevens 6baee4dc3f
Standalone subscription (#1125) 2018-11-30 17:19:16 -05:00
James Agnew b2179b1696 Syntax fixes for the JPA migrator 2018-11-30 12:39:37 -05:00
James Agnew 364b6cc5fd One more test fix 2018-11-22 18:40:39 -05:00
James Agnew 055478e1f1 Test fixes 2018-11-22 18:22:33 -05:00
James Agnew ce3b7c82ce Avoid issues when using subscription delivery in a serializing/queuing
environment
2018-11-22 17:53:42 -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
James Agnew e8482f5c87 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-20 13:59:51 -05:00
James Agnew 7cbad7f4e3 A bit of cleanup around subscription wiring following in-memory matcher
landing
2018-11-20 13:59:31 -05:00
jamesagnew 4c84b8fc89 Add a bit more test logging 2018-11-20 05:33:32 -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 45a5db6fd8 One more fix 2018-11-19 13:31:01 -05:00
James Agnew 719339fc14 One more test fix 2018-11-19 10:27:16 -05: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 6a6451f694 Reduce number of queries on some DB operations 2018-11-16 12:41:50 +01:00
James Agnew 1de0ef405c Clean up test compile and reenable GraphQL on hapi.fhir.org 2018-11-16 11:15:44 +01:00
James Agnew 84acafe3af Streamline expunge operation 2018-11-15 11:37:16 +01:00
James Agnew 75210d614b Bump to 3.7.0-SNAPSHOT 2018-11-12 22:37:52 -05:00
James Agnew 63af04a7b4 Prepare for 3.6.0 release 2018-11-12 05:40:55 -05:00
jamesagnew 030b33a0f2 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-09 15:59:34 -05:00
jamesagnew 4a0c45a494 License updates 2018-11-09 15:59:23 -05:00
James Agnew c81a59bb9a Only use FHIRPath to validate searchparameterr paths in R4 2018-11-09 15:57:34 -05:00
James Agnew 7f6f06dddf Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-09 15:47:22 -05:00
James Agnew 5834e6aa62 Test fixes 2018-11-09 15:32:55 -05:00
jamesagnew 3942f1bb29 License header updates 2018-11-09 14:41:57 -05:00
James Agnew f61df5c3fe Use FHIRPath expression parser for custom SP validation 2018-11-09 14:41:20 -05:00
jamesagnew a3e79b5759 License updates only 2018-11-08 15:28:09 -05:00
James Agnew 3ae5f9a3b7 Build tweak 2018-11-08 14:04:21 -05:00
James Agnew cca49425ae Some work on collection processing 2018-11-08 08:56:51 -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
James Agnew 62145e1b74 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-11-07 11:02:02 +01:00
James Agnew 4b790eddb6 Add additional authorization test 2018-11-07 11:01:29 +01:00
jamesagnew 896568c0f7 License updates 2018-11-04 16:06:53 -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 1b877ac03e Add licene headers 2018-11-01 09:15:51 -04:00
James Agnew 4315900ac0 Merge branch 'philips-3.6.0' 2018-11-01 09:15:27 -04:00
James Agnew 3bfdc61866 Fix a couple of test failures 2018-11-01 09:15:03 -04:00
jamesagnew 3f6960d82b Add multithreaded migrator tool 2018-11-01 05:42:51 -04:00
James Agnew c8834cd29a Merge branch 'philips-3.6.0' of github.com:jamesagnew/hapi-fhir into philips-3.6.0 2018-10-31 17:19:28 -04:00
James Agnew 041a4c4018 Fix SearchCoordinator tests 2018-10-31 12:36:27 -04:00
jamesagnew 31ef4c68e1 Merge branch 'philips-3.6.0' of github.com:jamesagnew/hapi-fhir into philips-3.6.0 2018-10-31 05:51:13 -04:00
jamesagnew 8955a9e54d Add threading to migrator 2018-10-31 05:50:50 -04:00
James Agnew 7acba90d15 Update search logic 2018-10-30 22:43:16 -04:00
Ken Stevens 3d008aee5d
Make test observation lists thread safe (#1105)
* Initial refactoring to move database matcher out into its own class

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

* made observations lists thread safe to stop intermittent test failures
2018-10-29 15:56:47 -04:00
James Agnew b66e01ce65 Allow plain server @Operation methods to declare a wildcard so that any
opeeration invocations will be direected to them
2018-10-29 10:36:32 -04:00
James Agnew 794d9145e9 Move query count tests to consolidate them, and avoid an accidental
rewrite of existing indexes in some conditions
2018-10-24 17:54:58 -03:00
James Agnew f601b212ad Performance enhancements to the JPA server and better retry logic in
$trigger-subscription
2018-10-20 14:47:37 -04:00
James Agnew c8db7fe035 Add a test 2018-10-18 15:12:22 -04:00
James Agnew e00ff641b2 Increase visibility of two methods needed by the HSPC sandbox 2018-10-18 10:17:55 -04:00
James Agnew da2763d8c8 Merge branch 'master' into philips-3.6.0 2018-10-17 22:38:27 -04:00
James Agnew f571fc4f92 Rename DAO registry 2018-10-17 22:37:43 -04:00
James Agnew b78aaea415 FIx up subscription processing 2018-10-17 21:23:52 -04:00
James Agnew de76f37845 Try to fix an intermittent test failure 2018-10-17 15:49:26 -04:00
James Agnew 99cd4ce5f7 Allow for _total parameter 2018-10-17 09:47:35 -04:00
James Agnew 4b5dcce021 Add a bit of logging to subscription triggering 2018-10-17 08:32:57 -04:00
James Agnew b220154e9c Fix error in retriggeer logic 2018-10-17 07:02:51 -04:00
jamesagnew aa1f624132 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-10-17 05:53:46 -04:00
James Agnew 8130700d68 One more optimization to the subscription retriggering logic 2018-10-17 05:53:07 -04:00
jamesagnew d129d43635 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-10-16 21:51:50 -04:00
James Agnew 2c05d9c5db Test cleanup 2018-10-16 21:51:33 -04:00
jamesagnew e2dfaa517f Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-10-16 20:38:21 -04:00
James Agnew 388bda1fec Avoid transaction isolation level not supported by Oracle 2018-10-16 20:31:43 -04:00
jamesagnew 47a5763fb5 Merge branch 'master' of github.com:jamesagnew/hapi-fhir 2018-10-16 20:25:12 -04:00
James Agnew 5d7142a972 Avoid intermittent test failures 2018-10-16 20:23:32 -04:00
jamesagnew 1c1f601332 License header updates 2018-10-16 19:56:52 -04:00
James Agnew 0fbe897ca4 Add named beans to JPA config 2018-10-16 17:24:17 -04:00
James Agnew 755060f91e Allow subscription triggering on a block of resources 2018-10-16 15:29:41 -04:00
James Agnew ba6df6d55a Handle unqualified ID in delete box for testpage overlay 2018-10-15 10:23:21 -04:00
jamesagnew 93c545c42c License header updates 2018-10-15 09:54:00 -04:00
James Agnew 483c9bff3a Auto detect whether the appropriate dialect is selected 2018-10-15 09:53:04 -04:00
James Agnew b44e96a5cd Merge branch 'philips-3.6.0' 2018-10-15 08:37:00 -04:00
James Agnew b75226914d Fix intermittent test failure 2018-10-15 08:19:23 -04:00
James Agnew 6dc2dc1d6f One more test fix 2018-10-15 07:11:10 -04:00
James Agnew 796b12e33e Fix bug in $everything processing 2018-10-15 05:44:53 -04:00
James Agnew 8b46257423 Add warm cache module 2018-10-14 09:32:07 -04:00
James Agnew 51a69f0dc9 Fixes to migrator and count logic 2018-10-13 12:02:19 -04:00
James Agnew a9fcfaf79a Add a test 2018-10-10 19:11:57 -04:00
James Agnew 0837daecc2 One more recurring failure fix 2018-10-10 13:36:50 -04:00
James Agnew e47cff2712 Fix an intermitttent test failure 2018-10-10 11:57:30 -04:00