-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
…-on-aws-routing into feat-addBundleSupport
Codecov Report
@@ Coverage Diff @@
## mainline #162 +/- ##
============================================
+ Coverage 75.76% 75.93% +0.17%
============================================
Files 47 47
Lines 1366 1384 +18
Branches 284 296 +12
============================================
+ Hits 1035 1051 +16
- Misses 331 333 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Some last changes for generateBatchBundle
and we're good to go.
src/router/bundle/bundleGenerator.ts
Outdated
}, | ||
}; | ||
// remove unnecessary fields from response | ||
if (bundleEntryResponse.error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this logic in Persistence instead of here? If etag and lastModified should not exist, it is Persistence's responsibility to remove them instead of depending on another package to handle it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible to remove the vid/lastmodified fields from the persistence response as they are a required property of the type. However, I removed the logic to explicitly remove them, and instead combined the logic with the transaction bundle generation.
Issue #, if available:
Description of changes:
Added logic to parse requests made to the root URL with a Batch request. Contains logic to validate the bundle according to https://www.hl7.org/fhir/http.html#brules, and adds unit tests for batch. This PR is in draft until the persistence changes are released and updated on the interface package.
We use a limit of 750 requests per bundle for the following reason:
Lambda has a payload limit of 6MB. Taking an average request size of 4KB, this gives us that 6MB/4KB = 1500 requests. To give some leeway, we divide by half to get 750.
TESTING:
tested through deployment and querying for various different bundle configurations such as:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.