From d13198db496f40ef31255a5a6d39a26d61fb71be Mon Sep 17 00:00:00 2001 From: ssvegaraju Date: Wed, 6 Apr 2022 17:37:02 +0000 Subject: [PATCH] version bump and doc update --- README.md | 2 +- package.json | 4 ++-- serverless.yaml | 2 -- src/config.ts | 6 ------ yarn.lock | 28 ++++++++++++++++++---------- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e46fe6d9..c9aea840 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ FHIR Works on AWS is powered by single-function components. These functions prov + [Routing](https://github.com/awslabs/fhir-works-on-aws-routing) - Accepts HTTP FHIR requests, routes it to the other components, logs the errors, transforms output to HTTP responses and generates the [Capability Statement](https://www.hl7.org/fhir/capabilitystatement.html). + [Authorization](https://github.com/awslabs/fhir-works-on-aws-authz-rbac) - Accepts the access token found in HTTP header and the action the request is trying to perform. It then determines if that action is permitted. + [Persistence](https://github.com/awslabs/fhir-works-on-aws-persistence-ddb) - Contains the business logic for creating, reading, updating, and deleting the FHIR record from the database. FHIR also supports ‘conditional’ CRUD actions and patching. - + Bundle - Supports multiple incoming requests as one request. Think of someone wanting to create five patients at once instead of five individual function calls. There are two types of bundles, batch and transaction. We currently only support transaction bundles. + + Bundle - Supports multiple incoming requests as one request. Think of someone wanting to create five patients at once instead of five individual function calls. There are two types of bundles, batch and transaction. We currently only support transaction bundles of size 25 entries or fewer, but support batch bundles of up to 750 entries. This 750 limit was drawn from the Lambda payload limit of 6MB and an average request size of 4KB, divided in half to allow for flexibility in request size. This limit can also be configured in the `config.ts`, by specifying the `maxBatchSize` when constructing the `DynamoDBBundleService`. + [Search](https://github.com/awslabs/fhir-works-on-aws-search-es) - Enables system-wide searching (/?name=bob) and type searching (/Patient/?name=bob). + History - (*Not implemented*) Searches all archived/older versioned resources. This can be done at a system, type or instance level. diff --git a/package.json b/package.json index 7772ce1f..e14fb5d1 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "axios": "^0.21.4", "fhir-works-on-aws-authz-rbac": "5.0.0", "fhir-works-on-aws-interface": "12.0.0", - "fhir-works-on-aws-persistence-ddb": "3.10.1", - "fhir-works-on-aws-routing": "6.4.1", + "fhir-works-on-aws-persistence-ddb": "3.11.0", + "fhir-works-on-aws-routing": "6.5.0", "fhir-works-on-aws-search-es": "3.12.0", "lodash": "^4.17.21", "p-settle": "^4.1.1", diff --git a/serverless.yaml b/serverless.yaml index feb30343..12d40917 100644 --- a/serverless.yaml +++ b/serverless.yaml @@ -19,7 +19,6 @@ custom: enableSubscriptions: ${opt:enableSubscriptions, 'false'} logLevel: ${opt:logLevel, 'error'} enableESHardDelete: ${opt:enableESHardDelete, 'false'} - maxBatchEntries: ${opt:maxBatchEntries, '750'} patientCompartmentFileV3: 'patientCompartmentSearchParams.3.0.2.json' patientCompartmentFileV4: 'patientCompartmentSearchParams.4.0.1.json' bundle: @@ -68,7 +67,6 @@ provider: ENABLE_MULTI_TENANCY: !Ref EnableMultiTenancy ENABLE_SUBSCRIPTIONS: !Ref EnableSubscriptions LOG_LEVEL: '${self:custom.logLevel}' - MAX_BATCH_ENTRIES: '${self.custom.maxBatchEntries}' apiKeys: - name: 'developer-key-${self:custom.stage}' # Full name must be known at package-time description: Key for developer to access the FHIR Api diff --git a/src/config.ts b/src/config.ts index 664ff7b5..90554f54 100644 --- a/src/config.ts +++ b/src/config.ts @@ -40,12 +40,6 @@ const dynamoDbBundleService = new DynamoDbBundleService(DynamoDb, undefined, und enableMultiTenancy, }); -// Lambda payload limit is 6MB, assuming an average request of 4KB, -// we have 6MB / 4Kb = 1500. Dividing by half to allow for contingencies, we get 750. -// This value is customizable during deployment by appending --maxBatchEntries -// if no param is defined during deployment, we use this default -export const maxBatchSize: Number = 750; - // Configure the input validators. Validators run in the order that they appear on the array. Use an empty array to disable input validation. const validators: Validator[] = []; if (process.env.VALIDATOR_LAMBDA_ALIAS && process.env.VALIDATOR_LAMBDA_ALIAS !== '[object Object]') { diff --git a/yarn.lock b/yarn.lock index 25f9515a..3a9113bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6280,27 +6280,35 @@ fhir-works-on-aws-interface@^10.0.0: winston "^3.3.3" winston-transport "^4.4.0" -fhir-works-on-aws-persistence-ddb@3.10.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/fhir-works-on-aws-persistence-ddb/-/fhir-works-on-aws-persistence-ddb-3.10.1.tgz#1bcfa13a8ba791e6904b1c8a0a57169254e3b3a9" - integrity sha512-ry0qivUYVXM+0e3xMsRN193+eFkw0fnir1qNhXKwwiOs953pDIzlG6MB7Er5OiHnvOL8KaqM/QRSgUdujsc9dw== +fhir-works-on-aws-interface@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/fhir-works-on-aws-interface/-/fhir-works-on-aws-interface-12.1.0.tgz#74ff054cdf22eae0122c9ec32562475bcdd2cccf" + integrity sha512-LYbmbNz+CzPvH0QH+Sn8zEFzdfSUDd17hC5xjbMrxHOzQSuNEpIELbQ/rdtiNXc+V3xFsQubYsXoHl69wHZN3w== + dependencies: + winston "^3.3.3" + winston-transport "^4.4.0" + +fhir-works-on-aws-persistence-ddb@3.11.0: + version "3.11.0" + resolved "https://registry.yarnpkg.com/fhir-works-on-aws-persistence-ddb/-/fhir-works-on-aws-persistence-ddb-3.11.0.tgz#517d3039cc0f09ade43d5768cf28e3a731067067" + integrity sha512-UIEyBuCxR1XfuMrNyzVbq/LGJg2uDJrNFa3R4USt0lMomP4ZlTDIu7s4n3/vvcEHgewFPmyzNqvfgzRdH7UJpg== dependencies: "@elastic/elasticsearch" "7.13.0" "@types/aws-lambda" "^8.10.83" aws-elasticsearch-connector "^8.2.0" aws-sdk "^2.1000.0" aws-xray-sdk "^3.3.3" - fhir-works-on-aws-interface "^12.0.0" + fhir-works-on-aws-interface "^12.1.0" flat "^5.0.2" lodash "^4.17.20" mime-types "^2.1.26" promise.allsettled "^1.0.2" uuid "^3.4.0" -fhir-works-on-aws-routing@6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/fhir-works-on-aws-routing/-/fhir-works-on-aws-routing-6.4.1.tgz#f2fcdc031015b2fc67f6284995b34c72fc3f030e" - integrity sha512-j4CxZQ7tB11QXqSVClGv2qsAORYlQmNl5OIC1G3m2zUR/XQ877tOBaxvXuJoQowQm86dCMTp2GAZprBU/NBirw== +fhir-works-on-aws-routing@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/fhir-works-on-aws-routing/-/fhir-works-on-aws-routing-6.5.0.tgz#98ed2e765b729337d3f932853140e97c7933313b" + integrity sha512-PBe09TZ+SsZ78GxgZDlZb7jXF0y2oAtZDveGvdfg/MRlATlYZLo2OBO+nBSIj4Ag6S92H3LGPV3mq+XFQjvhMQ== dependencies: "@types/cors" "^2.8.7" "@types/express-serve-static-core" "^4.17.2" @@ -6311,7 +6319,7 @@ fhir-works-on-aws-routing@6.4.1: cors "^2.8.5" errorhandler "^1.5.1" express "^4.17.1" - fhir-works-on-aws-interface "^12.0.0" + fhir-works-on-aws-interface "^12.1.0" flat "^5.0.0" http-errors "^1.8.0" lodash "^4.17.15"