Skip to content

Commit

Permalink
Merge pull request #118 from hl7au/migrate-to-hl7-validator
Browse files Browse the repository at this point in the history
Migrate to the HL7 official validator
  • Loading branch information
projkov authored Jun 23, 2024
2 parents d126a23 + c74196d commit d01e426
Show file tree
Hide file tree
Showing 16 changed files with 119 additions and 169 deletions.
6 changes: 1 addition & 5 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
V311_VALIDATOR_URL=http://localhost/validatorapi
V400_VALIDATOR_URL=http://localhost/validatorapi
V501_VALIDATOR_URL=http://localhost/validatorapi
V610_VALIDATOR_URL=http://localhost/validatorapi
V700_BALLOT_VALIDATOR_URL=http://localhost/validatorapi
FHIR_RESOURCE_VALIDATOR_URL=http://localhost/hl7validatorapi
REDIS_URL=redis://localhost:6379/0
7 changes: 2 additions & 5 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
REDIS_URL=redis://redis:6379/0
V311_VALIDATOR_URL=http://validator-service:4567
V400_VALIDATOR_URL=http://validator-service:4567
V501_VALIDATOR_URL=http://validator-service:4567
V610_VALIDATOR_URL=http://validator-service:4567
V700_BALLOT_VALIDATOR_URL=http://validator-service:4567

FHIR_RESOURCE_VALIDATOR_URL=http://validator-api:3500
110 changes: 52 additions & 58 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionview (6.1.7.6)
activesupport (= 6.1.7.6)
actionview (6.1.7.8)
activesupport (= 6.1.7.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (6.1.7.6)
activesupport (6.1.7.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -39,23 +39,24 @@ GEM
bigdecimal (3.1.8)
bindata (2.5.0)
blueprinter (0.25.2)
builder (3.2.4)
builder (3.3.0)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
crack (0.4.5)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
database_cleaner (1.99.0)
database_cleaner-sequel (1.99.0)
database_cleaner (~> 1.99.0)
sequel
date_time_precision (0.8.1)
debug (1.6.3)
irb (>= 1.3.6)
reline (>= 0.3.1)
diff-lcs (1.5.0)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.1)
domain_name (0.6.20240107)
dotenv (2.8.1)
dry-auto_inject (1.0.1)
Expand All @@ -77,8 +78,8 @@ GEM
dry-inflector (~> 1.0, < 2)
dry-transformer (1.0.1)
zeitwerk (~> 2.6)
erubi (1.12.0)
factory_bot (6.2.1)
erubi (1.13.0)
factory_bot (6.4.6)
activesupport (>= 5.0.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
Expand Down Expand Up @@ -146,12 +147,12 @@ GEM
dry-core (~> 1.0, < 2)
dry-transformer (~> 1.0, < 2)
hansi (0.2.1)
hashdiff (1.0.1)
hashdiff (1.1.0)
http-accept (1.7.0)
http-cookie (1.0.6)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.4)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
inferno_core (0.4.38)
activesupport (~> 6.1.7.5)
Expand Down Expand Up @@ -179,9 +180,10 @@ GEM
sqlite3 (~> 1.4)
thor (~> 1.2.1)
tty-markdown (~> 0.7.1)
io-console (0.5.11)
irb (1.4.2)
reline (>= 0.3.0)
io-console (0.7.2)
irb (1.13.2)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
json-jwt (1.15.3.1)
activesupport (>= 4.2)
Expand All @@ -200,8 +202,7 @@ GEM
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0604)
mini_portile2 (2.8.6)
minitest (5.22.3)
minitest (5.24.0)
multi_json (1.15.0)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
Expand All @@ -213,14 +214,7 @@ GEM
mustermann (= 1.1.2)
netrc (0.11.0)
nio4r (2.7.3)
nokogiri (1.16.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.4-x86_64-linux)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
Expand All @@ -229,8 +223,8 @@ GEM
multi_xml (~> 0.5)
rack (>= 1.2, < 4)
oj (3.11.0)
parallel (1.24.0)
parser (3.3.0.5)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
racc
pastel (0.8.0)
Expand All @@ -242,10 +236,12 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
public_suffix (5.0.5)
psych (5.1.2)
stringio
public_suffix (5.1.1)
puma (5.6.8)
nio4r (~> 2.0)
racc (1.7.3)
racc (1.8.0)
rack (2.2.9)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
Expand All @@ -256,32 +252,35 @@ GEM
nokogiri (~> 1.14)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.0)
reline (0.3.1)
regexp_parser (2.9.2)
reline (0.5.9)
io-console (~> 0.5)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.6)
rexml (3.3.0)
strscan
rouge (4.3.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.63.2)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.63.5)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -292,8 +291,8 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-erb (0.3.1)
better_html
rubocop (~> 1.45)
Expand All @@ -311,16 +310,14 @@ GEM
jwt (~> 2.6)
tls_test_kit (~> 0.2.0)
smart_properties (1.17.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
stringio (3.1.1)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
strscan (3.1.0)
thor (1.2.2)
tilt (2.3.0)
tls_test_kit (0.2.2)
Expand All @@ -338,16 +335,13 @@ GEM
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode_utils (1.4.0)
webmock (3.18.1)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
zeitwerk (2.6.13)
zeitwerk (2.6.16)

PLATFORMS
arm64-darwin-21
ruby
x86_64-darwin-20
x86_64-linux

DEPENDENCIES
Expand All @@ -363,4 +357,4 @@ DEPENDENCIES
webmock (~> 3.11)

BUNDLED WITH
2.3.23
2.5.13
16 changes: 4 additions & 12 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ services:
- ./lib/:/opt/inferno/lib
- ./:/opt/inferno/
depends_on:
validator-api:
condition: service_started
redis:
condition: service_started
postgres:
Expand All @@ -19,6 +17,7 @@ services:
POSTGRES_PASSWORD: password
POSTGRES_DB: inferno
POSTGRES_USER: postgres
TX_SERVER_URL: https://tx.dev.hl7.org.au/fhir
inferno-worker:
build:
context: ./
Expand All @@ -36,19 +35,12 @@ services:
POSTGRES_DB: inferno
POSTGRES_USER: postgres
validator-api:
image: infernocommunity/fhir-validator-service
# image: infernocommunity/inferno-resource-validator:1.0.52
image: pavelrozhkov/wrapper:6.3.11
environment:
TX_SERVER_URL: https://tx.dev.hl7.org.au/fhir
SESSION_CACHE_DURATION: -1
volumes:
- ./lib/au_core_test_kit/igs:/home/igs
validator-web:
image: infernocommunity/fhir-validator-app
depends_on:
validator-api:
condition: service_started
environment:
EXTERNAL_VALIDATOR_URL: http://localhost/validatorapi
VALIDATOR_BASE_PATH: /validator
nginx:
image: nginx
ports:
Expand Down
20 changes: 3 additions & 17 deletions config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ http {
proxy_pass http://inferno:4567;
}

location /validator {
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;
Expand All @@ -79,23 +79,9 @@ http {
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 600s;

proxy_pass http://validator-web;
}

location /validatorapi/ {
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_pass http://validator-api:4567/;
proxy_pass http://validator-api:3500/;
}
}
}
2 changes: 2 additions & 0 deletions docs/validator_instructions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Step-by-Step Guide to Using the FHIR Resources Validator

The validator is available at this [link](https://inferno.hl7.org.au/hl7validatorapi/).

1. Paste the complete target resource in **JSON** format into the text input field.
![Past the complete target resource](/docs/assets/1_validator_paste_resource.png "Past the complete target resource")
2. Click the **"Advanced"** button to open advanced options for the validator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 4567
env:
- name: TX_SERVER_URL
value: ${terminology_server}
envFrom:
- secretRef:
name: postgres-database
- configMapRef:
name: postgres
- configMapRef:
name: inferno

Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ spec:
- name: validator-api
image: infernocommunity/fhir-validator-service:latest
imagePullPolicy: Always
env:
- name: TX_SERVER_URL
value: ${terminology_server}
ports:
- containerPort: 4567
volumeMounts:
Expand Down
Loading

0 comments on commit d01e426

Please sign in to comment.