Skip to content

Commit

Permalink
FI-3037: SMART User Access Brands Suite (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
emichaud998 authored Oct 4, 2024
1 parent 462217c commit c28acda
Show file tree
Hide file tree
Showing 31 changed files with 2,436 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
INFERNO_HOST=http://localhost:4567
VALIDATOR_URL=http://localhost/validatorapi
FHIR_RESOURCE_VALIDATOR_URL=http://localhost/hl7validatorapi
REDIS_URL=redis://localhost:6379/0
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
INFERNO_HOST=http://localhost
REDIS_URL=redis://redis:6379/0
VALIDATOR_URL=http://validator_service:4567
VALIDATOR_URL=http://validator_service:4567
FHIR_RESOURCE_VALIDATOR_URL=http://hl7_validator_service:3500
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VALIDATOR_URL=https://example.com/validatorapi
FHIR_RESOURCE_VALIDATOR_URL=https://example.com/hl7validatorapi
ASYNC_JOBS=false
15 changes: 15 additions & 0 deletions config/nginx.background.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,20 @@ http {
#
# proxy_pass http://validator_service:4567/;
# }
location /hl7validatorapi/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_redirect off;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 600s;

proxy_pass http://hl7_validator_service:3500/;
}
}
}
15 changes: 15 additions & 0 deletions config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,20 @@ http {
#
# proxy_pass http://validator_service:4567/;
# }
location /hl7validatorapi/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_redirect off;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 600s;

proxy_pass http://hl7_validator_service:3500/;
}
}
}
13 changes: 13 additions & 0 deletions config/presets/smart_access_brands.json.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "Inferno Example SMART Access Brands Bundle",
"id": "smart_access_brands_bundle_example_inferno",
"test_suite_id": "smart_access_brands",
"inputs": [
{
"name": "smart_access_brands_publication_url",
"value": "<%= Inferno::Application['base_url'] %>/custom/smart_access_brands/examples/smart_access_brands_example.json",
"title": "SMART Access Brands Bundle URL",
"type": "text"
}
]
}
37 changes: 37 additions & 0 deletions config/presets/smart_access_brands_example_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"title": "Labs with Locations Nationwide IG Example SMART Access Brands Bundle",
"id": "smart_access_brands_bundle_example_1",
"test_suite_id": "smart_access_brands",
"inputs": [
{
"name": "user_access_brands_publication_url",
"value": "https://hl7.org/fhir/smart-app-launch/STU2.2/Bundle-example1.json",
"title": "User Access Brands Publication URL",
"type": "text"
},
{
"name": "endpoint_availability_success_rate",
"default": "all",
"description": "Select an option to choose how many Endpoints have to be available and send back a valid capability statement for the Endpoint validation test to pass.",
"options": {
"list_options": [
{
"label": "All",
"value": "all"
},
{
"label": "At Least 1",
"value": "at_least_1"
},
{
"label": "None",
"value": "none"
}
]
},
"title": "Endpoint Availability Success Rate",
"type": "radio",
"value": "none"
}
]
}
37 changes: 37 additions & 0 deletions config/presets/smart_access_brands_example_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"title": "Regional Health System IG Example SMART Access Brands Bundle",
"id": "smart_access_brands_bundle_example_2",
"test_suite_id": "smart_access_brands",
"inputs": [
{
"name": "user_access_brands_publication_url",
"value": "https://hl7.org/fhir/smart-app-launch/STU2.2/Bundle-example2.json",
"title": "User Access Brands Publication URL",
"type": "text"
},
{
"name": "endpoint_availability_success_rate",
"default": "all",
"description": "Select an option to choose how many Endpoints have to be available and send back a valid capability statement for the Endpoint validation test to pass.",
"options": {
"list_options": [
{
"label": "All",
"value": "all"
},
{
"label": "At Least 1",
"value": "at_least_1"
},
{
"label": "None",
"value": "none"
}
]
},
"title": "Endpoint Availability Success Rate",
"type": "radio",
"value": "none"
}
]
}
37 changes: 37 additions & 0 deletions config/presets/smart_access_brands_example_3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"title": "Different EHRs IG Example SMART Access Brands Bundle",
"id": "smart_access_brands_bundle_example_3",
"test_suite_id": "smart_access_brands",
"inputs": [
{
"name": "user_access_brands_publication_url",
"value": "https://hl7.org/fhir/smart-app-launch/STU2.2/Bundle-example3.json",
"title": "User Access Brands Publication URL",
"type": "text"
},
{
"name": "endpoint_availability_success_rate",
"default": "all",
"description": "Select an option to choose how many Endpoints have to be available and send back a valid capability statement for the Endpoint validation test to pass.",
"options": {
"list_options": [
{
"label": "All",
"value": "all"
},
{
"label": "At Least 1",
"value": "at_least_1"
},
{
"label": "None",
"value": "none"
}
]
},
"title": "Endpoint Availability Success Rate",
"type": "radio",
"value": "none"
}
]
}
37 changes: 37 additions & 0 deletions config/presets/smart_access_brands_example_4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"title": "Co-equal Brands IG Example SMART Access Brands Bundle",
"id": "smart_access_brands_bundle_example_4",
"test_suite_id": "smart_access_brands",
"inputs": [
{
"name": "user_access_brands_publication_url",
"value": "https://hl7.org/fhir/smart-app-launch/STU2.2/Bundle-example4.json",
"title": "User Access Brands Publication URL",
"type": "text"
},
{
"name": "endpoint_availability_success_rate",
"default": "all",
"description": "Select an option to choose how many Endpoints have to be available and send back a valid capability statement for the Endpoint validation test to pass.",
"options": {
"list_options": [
{
"label": "All",
"value": "all"
},
{
"label": "At Least 1",
"value": "at_least_1"
},
{
"label": "None",
"value": "none"
}
]
},
"title": "Endpoint Availability Success Rate",
"type": "radio",
"value": "none"
}
]
}
14 changes: 12 additions & 2 deletions docker-compose.background.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
version: '3'
services:
hl7_validator_service:
image: infernocommunity/inferno-resource-validator
environment:
# Defines how long validator sessions last if unused, in minutes:
# Negative values mean sessions never expire, 0 means sessions immediately expire
SESSION_CACHE_DURATION: -1
# To let the service share your local FHIR package cache,
# uncomment the below line
# - ~/.fhir:/home/ktor/.fhir
# validator_service:
# image: infernocommunity/fhir-validator-service
# # Update this path to match your directory structure
Expand All @@ -19,8 +28,9 @@ services:
ports:
- "80:80"
command: [nginx, '-g', 'daemon off;']
# depends_on:
# - fhir_validator_app
depends_on:
- hl7_validator_service
# - fhir_validator_app
redis:
image: redis
ports:
Expand Down
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ services:
context: ./
volumes:
- ./data:/opt/inferno/data
# depends_on:
# - validator_service
depends_on:
# - validator_service
- hl7_validator_service
worker:
build:
context: ./
Expand All @@ -15,6 +16,10 @@ services:
command: bundle exec sidekiq -r ./worker.rb
depends_on:
- redis
hl7_validator_service:
extends:
file: docker-compose.background.yml
service: hl7_validator_service
# validator_service:
# extends:
# file: docker-compose.background.yml
Expand Down
Loading

0 comments on commit c28acda

Please sign in to comment.