Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit c7c6341

Browse files
authored
chore: normalize all the line endings (#434)
1 parent 3a55bf3 commit c7c6341

23 files changed

+4000
-4000
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Issue #, if available:
2-
3-
Description of changes:
4-
5-
6-
Checklist:
7-
8-
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
9-
10-
* [ ] Have you successfully deployed to an AWS account with your changes?
11-
* [ ] Have you written new tests for your core changes, as applicable?
12-
13-
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1+
Issue #, if available:
2+
3+
Description of changes:
4+
5+
6+
Checklist:
7+
8+
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
9+
10+
* [ ] Have you successfully deployed to an AWS account with your changes?
11+
* [ ] Have you written new tests for your core changes, as applicable?
12+
13+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/no-response.yaml

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#
2-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
# SPDX-License-Identifier: Apache-2.0
4-
#
5-
6-
# Configuration for probot-no-response - https://github.com/probot/no-response
7-
8-
# Number of days of inactivity before an Issue is closed for lack of response
9-
daysUntilClose: 7
10-
# Label requiring a response
11-
responseRequiredLabel: closing-soon-if-no-response
12-
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
13-
closeComment: >
14-
This issue has been automatically closed because there has been no response
15-
to our request for more information from the original author. With only the
16-
information that is currently in the issue, we don't have enough information
17-
to take action. Please reach out if you have or find the answers we need so
18-
that we can investigate further.
1+
#
2+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
6+
# Configuration for probot-no-response - https://github.com/probot/no-response
7+
8+
# Number of days of inactivity before an Issue is closed for lack of response
9+
daysUntilClose: 7
10+
# Label requiring a response
11+
responseRequiredLabel: closing-soon-if-no-response
12+
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
13+
closeComment: >
14+
This issue has been automatically closed because there has been no response
15+
to our request for more information from the original author. With only the
16+
information that is currently in the issue, we don't have enough information
17+
to take action. Please reach out if you have or find the answers we need so
18+
that we can investigate further.

.npmrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Helps with using npm package-locally, while in a yarn workflow (avoids coupling scripts to yarn).
2-
# This is needed because yarn goes out of it's way to ensure it controls what `node` binary is used (for good!)
1+
# Helps with using npm package-locally, while in a yarn workflow (avoids coupling scripts to yarn).
2+
# This is needed because yarn goes out of it's way to ensure it controls what `node` binary is used (for good!)
33
scripts-prepend-node-path=auto

.prettierrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*
2-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
* SPDX-License-Identifier: Apache-2.0
4-
*/
5-
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
66
module.exports = {
77
semi: true,
88
trailingComma: 'all',

CHANGELOG.md

+170-170
Large diffs are not rendered by default.

CUSTOMIZE.md

+69-69
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
# FHIR Works on AWS customization
2-
3-
## API customization
4-
5-
To change what this FHIR server supports, both in terms of operations and in resource types, please check out the [config.ts](src/config.ts) file.
6-
7-
### Resource types
8-
9-
We split the resource types into two buckets 'genericResource' and 'resources'.
10-
11-
#### Generic resources
12-
13-
_genericResource_ are resources that should all be treated the same, in terms of how the resource type is operated on. For example, this implementation says all `genericResources` should use the `dynamoDbDataService` persistence component and the `esSearch` for typeSearching. In _genericResource_ you can modify the component you would like to use AND what operations you want to support.
14-
15-
Ways of customization:
16-
17-
- `profile.genericResource`
18-
- `genericResource.operations` is the list of valid operations this FHIR server will support in relation to ALL generic resource types.
19-
- `genericResource.excluded<Version>Resources` removes these resources from being supported for the specified \<Version\>.
20-
- `genericResource.fhirVersions` is the FHIR versions that this genericResource definition supports.
21-
- `genericResource.persistence` is the persistence component you want to use with these generic resources.
22-
- `genericResource.typeHistory` is the history component you want to use with these generic resources.
23-
- `genericResource.typeSearch` is the search component you want to use with these generic resources.
24-
25-
#### Resources
26-
27-
_resources_ are the 'special' resources that should be treated differently than the generic ones. For example, this implementation has `Binary` as a 'special' resource, meaning it will be using the `s3DataService` persistence component and no search component. Much like in _genericResource_ in these _resources_ you can modify the component you would like to use AND what operations you want to support.
28-
29-
Ways of customization:
30-
31-
- `profile.resources.<Type>`
32-
- `<Type>.operations` is the list of valid operations this FHIR server will support for this specific resource type.
33-
- `<Type>.fhirVersions` is the FHIR versions that this resource type supports.
34-
- `<Type>.persistence` is the persistence component you want to use with this resource type.
35-
- `<Type>.typeHistory` is the history component you want to use with this resource type.
36-
- `<Type>.typeSearch` is the search component you want to use with this resource type.
37-
38-
### FHIR versions
39-
40-
This FHIR Works on AWS supports FHIR R4 out of the box. To change the version of support you must change the `profile.fhirVersion`, the `profile.genericResource.fhirVersions` and the 'special' `profile.resources.<Type>.fhirVersions`
41-
42-
## Authorization (RBAC) customization
43-
44-
This FHIR Works on AWS deployment supports role based access control (RBAC) for authorization. To modify the rules please see [RBACRules.ts](src/RBACRules.ts) file. This file is structured by Cognito User Groups. For example the `practitioner` User Group can do ['create', 'read', 'update', 'delete', 'vread', 'search-type', 'transaction'] operations on all R4 resource types.
45-
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-
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
54-
```ts
55-
const corsOptions: CorsOptions = {...};
56-
...
57-
generateServerlessRouter(fhirConfig, genericResources, corsOptions)
58-
```
59-
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.
62-
63-
## Supporting other FHIR implementation guides or profiles
64-
65-
FHIR has this concept of [profiling](https://www.hl7.org/fhir/profiling.html). FHIR Works on AWS does not explicitly support it, but it does not explicitly restrict users from adapting the [FHIR Works router](https://github.com/awslabs/fhir-works-on-aws-routing) to fit their needs.
66-
67-
To add support for profiles you will need to modify the router's json validation schema found [here](https://github.com/awslabs/fhir-works-on-aws-routing/tree/mainline/src/router/validation/schemas). Inside of the schema you can add/remove resource types and modify the expected parameters for each type.
68-
69-
If you are adding/removing a new resource type you will most likely want to adjust what resource types are defined as 'generic'. This can be done in the [constants.ts](src/constants.ts) file.
1+
# FHIR Works on AWS customization
2+
3+
## API customization
4+
5+
To change what this FHIR server supports, both in terms of operations and in resource types, please check out the [config.ts](src/config.ts) file.
6+
7+
### Resource types
8+
9+
We split the resource types into two buckets 'genericResource' and 'resources'.
10+
11+
#### Generic resources
12+
13+
_genericResource_ are resources that should all be treated the same, in terms of how the resource type is operated on. For example, this implementation says all `genericResources` should use the `dynamoDbDataService` persistence component and the `esSearch` for typeSearching. In _genericResource_ you can modify the component you would like to use AND what operations you want to support.
14+
15+
Ways of customization:
16+
17+
- `profile.genericResource`
18+
- `genericResource.operations` is the list of valid operations this FHIR server will support in relation to ALL generic resource types.
19+
- `genericResource.excluded<Version>Resources` removes these resources from being supported for the specified \<Version\>.
20+
- `genericResource.fhirVersions` is the FHIR versions that this genericResource definition supports.
21+
- `genericResource.persistence` is the persistence component you want to use with these generic resources.
22+
- `genericResource.typeHistory` is the history component you want to use with these generic resources.
23+
- `genericResource.typeSearch` is the search component you want to use with these generic resources.
24+
25+
#### Resources
26+
27+
_resources_ are the 'special' resources that should be treated differently than the generic ones. For example, this implementation has `Binary` as a 'special' resource, meaning it will be using the `s3DataService` persistence component and no search component. Much like in _genericResource_ in these _resources_ you can modify the component you would like to use AND what operations you want to support.
28+
29+
Ways of customization:
30+
31+
- `profile.resources.<Type>`
32+
- `<Type>.operations` is the list of valid operations this FHIR server will support for this specific resource type.
33+
- `<Type>.fhirVersions` is the FHIR versions that this resource type supports.
34+
- `<Type>.persistence` is the persistence component you want to use with this resource type.
35+
- `<Type>.typeHistory` is the history component you want to use with this resource type.
36+
- `<Type>.typeSearch` is the search component you want to use with this resource type.
37+
38+
### FHIR versions
39+
40+
This FHIR Works on AWS supports FHIR R4 out of the box. To change the version of support you must change the `profile.fhirVersion`, the `profile.genericResource.fhirVersions` and the 'special' `profile.resources.<Type>.fhirVersions`
41+
42+
## Authorization (RBAC) customization
43+
44+
This FHIR Works on AWS deployment supports role based access control (RBAC) for authorization. To modify the rules please see [RBACRules.ts](src/RBACRules.ts) file. This file is structured by Cognito User Groups. For example the `practitioner` User Group can do ['create', 'read', 'update', 'delete', 'vread', 'search-type', 'transaction'] operations on all R4 resource types.
45+
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+
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
54+
```ts
55+
const corsOptions: CorsOptions = {...};
56+
...
57+
generateServerlessRouter(fhirConfig, genericResources, corsOptions)
58+
```
59+
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.
62+
63+
## Supporting other FHIR implementation guides or profiles
64+
65+
FHIR has this concept of [profiling](https://www.hl7.org/fhir/profiling.html). FHIR Works on AWS does not explicitly support it, but it does not explicitly restrict users from adapting the [FHIR Works router](https://github.com/awslabs/fhir-works-on-aws-routing) to fit their needs.
66+
67+
To add support for profiles you will need to modify the router's json validation schema found [here](https://github.com/awslabs/fhir-works-on-aws-routing/tree/mainline/src/router/validation/schemas). Inside of the schema you can add/remove resource types and modify the expected parameters for each type.
68+
69+
If you are adding/removing a new resource type you will most likely want to adjust what resource types are defined as 'generic'. This can be done in the [constants.ts](src/constants.ts) file.

0 commit comments

Comments
 (0)