You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact [email protected] with any additional questions or comments.
Copy file name to clipboardexpand all lines: CUSTOMIZE.md
+14-13
Original file line number
Diff line number
Diff line change
@@ -45,19 +45,20 @@ This FHIR Works on AWS deployment supports role based access control (RBAC) for
45
45
46
46
To assign users to specific user groups please log into the AWS console and navigate to the Cognito service. Once there select on your FHIR User Pool and find the user you want to modify. From there add that user to the desired user group.
47
47
48
-
## CORS customization
49
-
50
-
The FHIR Works on AWS deployment can be customized to provide CORS support for brower-based applications. The following configuration steps are required:
51
-
* Supply a [CorsOptions](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/cors/index.d.ts) configuration when building the [serverless router](src/index.ts). For example
Please see the available [configuration options](https://www.npmjs.com/package/cors#configuration-options).
58
-
59
-
* For pre-flight request support, add an OPTIONS method to the API Gateway `{proxy+}` route within the Serverless template. The request should be handled by the Lambda handler. The method should not use authorization.
60
-
* If using a custom authorizer, then rejected requests also need to provide CORS headers, otherwise it is tricky to interpret the unauthorized response in the browser. The following [blog](https://www.serverless.com/blog/cors-api-gateway-survival-guide) describes how a `GatewayResponse` resource may be added to the Serverless template to provide these headers.
48
+
## CORS customization
49
+
50
+
The FHIR Works on AWS deployment can be customized to provide CORS support for browser-based applications. The following configuration steps are required:
51
+
52
+
53
+
- Supply a [CorsOptions](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/cors/index.d.ts) configuration when building the [serverless router](src/index.ts). For example
Please see the available [configuration options](https://www.npmjs.com/package/cors#configuration-options).
60
+
- For pre-flight request support, add an OPTIONS method to the API Gateway `{proxy+}` route within the Serverless template. The request should be handled by the Lambda handler. The method should not use authorization.
61
+
- If using a custom authorizer, then rejected requests also need to provide CORS headers, otherwise it is tricky to interpret the unauthorized response in the browser. The following [blog](https://www.serverless.com/blog/cors-api-gateway-survival-guide) describes how a `GatewayResponse` resource may be added to the Serverless template to provide these headers.
61
62
62
63
## Supporting other FHIR implementation guides or profiles
Copy file name to clipboardexpand all lines: DEVELOPMENT.md
+9-10
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ In this guide we will go over how to develop and run the code locally. We will a
11
11
12
12
Please download all the `fhir-works-on-aws` package and place them inside one directory. Your parent directory should have these folders inside of them
13
13
14
-
```
14
+
```sh
15
15
./fhir-works-on-aws-deployment
16
16
./fhir-works-on-aws-interface
17
17
./fhir-works-on-aws-persistence-ddb
@@ -53,23 +53,23 @@ Run this command to deploy your code to AWS:
53
53
54
54
## Troubleshooting
55
55
56
-
####Runtime.ImportModuleError on other FWoA package
56
+
### Runtime.ImportModuleError on other FWoA package
57
57
58
-
If you run into error type `Runtime.ImportModuleError` with error message stating the offending method comes from another FWoA package, check the versions of local FWoA packages match the versions specified in `package.json`. If you see a mismatch, update the version number in `package.json` to match your local packages and commit the change should fix the issue.
58
+
If you run into error type `Runtime.ImportModuleError` with error message stating the offending method comes from another FWoA package, check the versions of local FWoA packages match the versions specified in `package.json`. If you see a mismatch, update the version number in `package.json` to match your local packages and commit the change should fix the issue.
59
59
60
-
As an example, if your local packages have versions specified as:
60
+
As an example, if your local packages have versions specified as:
Copy file name to clipboardexpand all lines: README.md
+16-18
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# fhir-works-on-aws-deployment
2
2
3
-
FHIR Works on AWS is a framework to deploy a [FHIR](https://www.hl7.org/fhir/overview.html) server on AWS. This package is an example implementation of this framework. The power of this framework is being able to customize and add in additional FHIR functionality for your unique use-case. An example of this, is this implementation uses [DynamoDB](https://github.com/awslabs/fhir-works-on-aws-persistence-ddb). Say you don't want to use DynamoDB, you could implement your own persistence component and plug it into your deployment package. With FHIR Works on AWS you control how your FHIR server will work!
3
+
FHIR Works on AWS is a framework to deploy a [FHIR](https://www.hl7.org/fhir/overview.html) server on AWS. This package is an example implementation of this framework. The power of this framework is being able to customize and add in additional FHIR functionality for your unique use-case. An example of this, is this deployment uses [Cognito and role based access control](https://github.com/awslabs/fhir-works-on-aws-authz-rbac). Say you would rather support [SMART on FHIR](https://github.com/awslabs/fhir-works-on-aws-authz-smart), you could swap out the authorization component and plug it into your deployment package. A sample of this swap out can be found on the [smart-mainline branch](https://github.com/awslabs/fhir-works-on-aws-deployment/tree/smart-mainline) of this repository. With FHIR Works on AWS you control how your FHIR server will work!
4
4
5
5
## Capabilities
6
6
@@ -13,7 +13,7 @@ This deployment implementation utilizes Lambda, DynamoDB, S3 and Elasticsearch t
13
13
14
14
## Quick start/installation
15
15
16
-
Do you want to just try it out? Please follow the instructions below:
16
+
The easiest and quickest way to experience FHIR Works on AWS is through [AWS solutions](https://aws.amazon.com/solutions/implementations/fhir-works-on-aws/). If you are interested in modifying the code and setting up your developer environment we recommend you following the below instructions:
[Instructions for making local code changes](./DEVELOPMENT.md)
38
-
37
+
39
38
## Architecture
40
39
41
40
The system architecture consists of multiple layers of AWS serverless services. The endpoint is hosted using API Gateway. The database and storage layer consists of Amazon DynamoDB and S3, with Elasticsearch as the search index for the data written to DynamoDB. The endpoint is secured by API keys and Cognito for user-level authentication and user-group authorization. The diagram below shows the FHIR server’s system architecture components and how they are related.
@@ -97,10 +96,10 @@ Instructions for importing the environment JSON is located [here](https://thinks
97
96
98
97
The variables required in the POSTMAN collection can be found in `Info_Output.yml` or by running `serverless info --verbose`
99
98
100
-
API_URL: from Service Information:endpoints: ANY
101
-
API_KEY: from Service Information: api keys: developer-key
102
-
CLIENT_ID: from Stack Outputs: UserPoolAppClientId
To know what all this FHIR API supports please use the `GET Metadata` postman to generate a [Capability Statement](https://www.hl7.org/fhir/capabilitystatement.html).
106
105
@@ -123,7 +122,7 @@ In order to access the FHIR API, an `ACCESS_TOKEN` is required. This can be obta
123
122
4. A sign in page should pop up where you should put in your username and password (if you don't know it look at the [init-auth.py](scripts\init-auth.py) script)
124
123
5. Once signed in the access token will be set and you will have access for ~1 hour
125
124
126
-
#### Retrieving an access token via script (scope = aws.cognito.signin.user.admin)
125
+
#### Retrieving an access token via script (scope = aws.cognito.signin.user.admin)
127
126
128
127
A Cognito OAuth access token can be obtained using the following command substituting all variables with their values from `INFO_OUTPUT.yml` or the previously mentioned `serverless info --verbose` command.
129
128
@@ -139,25 +138,24 @@ For Mac:
139
138
python3 scripts/init-auth.py <CLIENT_ID><REGION>
140
139
```
141
140
142
-
The return value is an `ACCESS_TOKEN` that can be used to hit the FHIR API without going through the Oauth Sign In page. In POSTMAN, instead of clicking the `Get New Access Token` button, you can paste the `ACCESS_TOKEN` value into the Available Tokens text field.
141
+
The return value is an `ACCESS_TOKEN` that can be used to hit the FHIR API without going through the Oauth Sign In page. In POSTMAN, instead of clicking the `Get New Access Token` button, you can paste the `ACCESS_TOKEN` value into the Available Tokens text field.
143
142
144
143
### Accessing Binary resources
145
144
146
145
Binary resources are FHIR resources that consist of binary/unstructured data of any kind. This could be X-rays, PDF, video or other files. This implementation of the FHIR API has a dependency on the API Gateway and Lambda services, which currently have limitations in request/response sizes of 10MB and 6MB respectively. This size limitation forced us to look for a workaround. The workaround is a hybrid approach of storing a Binary resource’s _metadata_ in DynamoDB and using S3's get/putPreSignedUrl APIs. So in your requests to the FHIR API you will store/get the Binary's _metadata_ from DynamoDB and in the response object it will also contain a pre-signed S3 URL, which should be used to interact directly with the Binary file.
147
146
148
147
### Testing Bulk Data Export
149
148
150
-
Bulk Export allows you to export all of your data from DDB to S3. We currently only support [System Level](https://hl7.org/fhir/uv/bulkdata/export/index.html#endpoint---system-level-export) export.
151
-
For more information about Bulk Export, please refer to this [implementation guide](https://hl7.org/fhir/uv/bulkdata/export/index.html).
149
+
Bulk Export allows you to export all of your data from DDB to S3. We currently only support [System Level](https://hl7.org/fhir/uv/bulkdata/export/index.html#endpoint---system-level-export) export. For more information about Bulk Export, please refer to this [implementation guide](https://hl7.org/fhir/uv/bulkdata/export/index.html).
152
150
153
-
The easiest way to test this feature on FHIR Works on AWS is to make API requests using the provided [Fhir.postman_collection.json](./postman/Fhir.postman_collection.json).
151
+
The easiest way to test this feature on FHIR Works on AWS is to make API requests using the provided [Fhir.postman_collection.json](./postman/Fhir.postman_collection.json).
154
152
155
-
1. In the collection, under the "Export" folder, use `GET System Export` request to initiate an Export request.
156
-
2. In the response, check the header field `Content-Location` for a URL. The url should be in the format `<base-url>/$export/<jobId>`.
157
-
3. To get the status of the export job, in the "Export" folder used the `GET System Job Status` request. That request will ask for the `jobId` value from step 2.
153
+
1. In the collection, under the "Export" folder, use `GET System Export` request to initiate an Export request.
154
+
2. In the response, check the header field `Content-Location` for a URL. The url should be in the format `<base-url>/$export/<jobId>`.
155
+
3. To get the status of the export job, in the "Export" folder used the `GET System Job Status` request. That request will ask for the `jobId` value from step 2.
158
156
4. Check the response that is returned from `GET System Job Status`. If the job is in progress you will see a header with the field `x-progress: in-progress`. Keep polling that URL until the job is complete. Once the job is complete you'll get a JSON body with presigned S3 URLs of your exported data. You can download the exported data using those URLs.
159
-
160
-
Note: To cancel an export job that is in progress, you can use the `Cancel Export Job` request in the "Export" folder in POSTMAN collections.
157
+
158
+
Note: To cancel an export job that is in progress, you can use the `Cancel Export Job` request in the "Export" folder in POSTMAN collections.
0 commit comments