Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Version 2.10.0 #481

Merged
merged 215 commits into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
bf3dcde
add test for including medications with medication requests
Jammjammjamm Jan 3, 2020
6a96329
add status to search params
Jammjammjamm Jan 4, 2020
aaaf2a2
remove commented-out code
Jammjammjamm Jan 6, 2020
02d1f41
First pass at a validate-code operation
Dec 12, 2019
f387ed1
Add several valuesets
Dec 16, 2019
10dda64
Add a MRSAT table, populate it, use it to populate Bloom filters, and…
Dec 26, 2019
cc86763
Add informational messages from validators to the UI, separately from…
Jan 7, 2020
a27cc3f
test including medications on every medicationrequest search
Jammjammjamm Jan 14, 2020
bdee23a
add unit tests for include medication tests
Jammjammjamm Jan 15, 2020
323f7e4
remove medication list guidance sequence
Jammjammjamm Jan 15, 2020
58c015a
regenerate us core sequences
Jammjammjamm Jan 15, 2020
cdec3c4
Merge pull request #408 from onc-healthit/fi-567-add-include-medicati…
arscan Jan 15, 2020
99e046c
add chained search info to metadata
Jammjammjamm Jan 4, 2020
1f88afc
add chained search to generator
Jammjammjamm Jan 4, 2020
fcc502b
regenerate us core sequences
Jammjammjamm Jan 6, 2020
ab61e33
remove duplicated request stubs
Jammjammjamm Jan 6, 2020
39f8ba9
raise an error if chained searches are generated for resources other …
Jammjammjamm Jan 16, 2020
ff6cdbc
Store informational messages for now, but don't display them.
Jan 16, 2020
5a43465
Merge pull request #411 from onc-healthit/fi-569-add-chained-search-t…
arscan Jan 17, 2020
d50148d
Minor updates to allow for multiple urls.
arscan Jan 19, 2020
0fe9033
Merge pull request #417 from onc-healthit/fi-505-enable-multi-url
arscan Jan 20, 2020
4d6b310
Merge pull request #412 from onc-healthit/FI-575-informational-valida…
arscan Jan 20, 2020
87dfc76
add test and unit tests for codeable concepts with required valueset
Jammjammjamm Jan 13, 2020
c252705
regenerate us core sequences
Jammjammjamm Jan 13, 2020
290dfd4
remove commented code
Jammjammjamm Jan 16, 2020
8e4a6ca
Regenerate uscore.
arscan Jan 20, 2020
b50b97b
Merge pull request #415 from onc-healthit/fi-564-test-required-concepts
arscan Jan 20, 2020
31604da
Add URL into us core unit test instances.
arscan Jan 20, 2020
b25494c
Update method client is created in us core tests.
arscan Jan 20, 2020
3bfb77e
Fix incorrect version setter.
arscan Jan 20, 2020
5af598d
Initial multi-patient update to uscore.
arscan Jan 21, 2020
b9d171e
Update generator/uscore/uscore_generator.rb
arscan Jan 22, 2020
2c1cb75
Added integration tests, and made updates to lib files
Jan 22, 2020
a27fd31
Fixed Rubocop errors
Jan 22, 2020
876e9ee
Additional valuesets and codesystems
Jan 22, 2020
d24db47
Readd uscore fixtures.
arscan Jan 23, 2020
68ac26e
Fix a number of PR review comments
Jan 23, 2020
bb65fd7
Fix typos, and use .present? instead of obj && obj.empty?
Jan 23, 2020
ee5bab1
Move CapabilityStatement/TerminologyCapabilities generation to a util…
Jan 23, 2020
dc775a3
Merge changes from original FI-533
yunwwang Jan 24, 2020
4d2b794
Fix unit test
yunwwang Jan 24, 2020
8961b1b
fix rubocop issues and remove unit tests
Jan 24, 2020
7de4448
Merge pull request #424 from onc-healthit/clean-up-multi-patient-changes
arscan Jan 24, 2020
a2ffbde
Merge pull request #419 from onc-healthit/FI-601-mutli-patient-uscore
arscan Jan 24, 2020
bfb2857
Temporarily skip tests, and fix some error messages
Jan 24, 2020
33e63e3
Merge pull request #420 from onc-healthit/validate_code_endpoint
arscan Jan 24, 2020
64522ff
check for existence of all composite or values
Jan 23, 2020
2c289c7
update umls, update terminologies, and fix a minor bug
radamson Jan 26, 2020
e4ec011
Fix test helper that wraps bundles in wrong fhir versions.
arscan Jan 27, 2020
da03113
Merge pull request #428 from onc-healthit/fi-600-another-build-fix
arscan Jan 27, 2020
0ebc63d
fix typo in generator
Jammjammjamm Jan 27, 2020
d5603bc
comment out chained search generation
Jammjammjamm Jan 27, 2020
aceca5c
regenerate us core sequences
Jammjammjamm Jan 27, 2020
2ea3869
add additional comment regarding commented code
Jammjammjamm Jan 27, 2020
d563ade
Merge pull request #429 from onc-healthit/fix-generator-typo
Jammjammjamm Jan 27, 2020
a59dcaf
Fix minor generator bugs, cache ref resolution, cap max resolutions p…
arscan Jan 25, 2020
f96c022
Rubocop fixes.
arscan Jan 25, 2020
542c7a0
Use a concrete number instead of Float::Infinity
arscan Jan 25, 2020
846dcfa
Rubocop style fixes.
arscan Jan 25, 2020
7702820
regenerate us core sequences
Jammjammjamm Jan 27, 2020
5c021e5
stop checking resources if limit has been reached
Jammjammjamm Jan 27, 2020
2675661
Update lib/modules/us_core_guidance/clinicalnotes_sequence.rb
yunwwang Jan 28, 2020
c27f901
Update lib/modules/us_core_guidance/clinicalnotes_sequence.rb
yunwwang Jan 28, 2020
6f00089
show assertion failure message
Jan 28, 2020
938b2c5
Merge pull request #425 from onc-healthit/fi-607-cache-ref-resolution
Jammjammjamm Jan 28, 2020
adcd951
check for matching resource id
Jan 14, 2020
b29da4a
add unit tests and change assertion location
Jan 14, 2020
44a00f7
remove reference logic since it's not being used
Jan 21, 2020
cb954fb
adding reference check back in
Jan 28, 2020
8b257d0
Merge pull request #416 from onc-healthit/fi-540-check-resource-id-fr…
Jan 28, 2020
6968f25
rework must support
Dec 27, 2019
6d45970
remove duplicates and add more fixed values
Jan 8, 2020
834e982
fix rebase error and skip message
Jan 8, 2020
4573355
removing choice types and fixed values when empty
Jan 13, 2020
e6c5385
progress
Jan 17, 2020
83f12f6
add slices to descriptions and fix bug for patternCodeableConcept
Jan 22, 2020
7fab716
removing component elements from vital-sign profiles
Jan 28, 2020
85e5546
rebasing for multi-patient
Jan 29, 2020
d7a4d6c
Merge pull request #426 from onc-healthit/umls_update
Jan 30, 2020
b2c8fde
Merge pull request #422 from onc-healthit/fi-598-check-all-composite-…
Jan 30, 2020
7deae11
fix capitalization issue and array in delayed sequence issue
Jan 30, 2020
c325bb9
Merge pull request #423 from onc-healthit/FI-533-PR
yunwwang Feb 3, 2020
32ea6e3
add method to check whether a resource's search interaction has docum…
Jammjammjamm Jan 16, 2020
feb98a4
fix search param descriptions
Jammjammjamm Jan 17, 2020
7c2b85e
add status search support to us core generator
Jammjammjamm Jan 22, 2020
96e1436
disable search unit tests
Jammjammjamm Jan 27, 2020
2388d58
regenerate us core sequences
Jammjammjamm Jan 27, 2020
d42e77e
Merge pull request #421 from onc-healthit/fi-565-status-searches
Jammjammjamm Feb 4, 2020
a9cf6e9
add unit tests back in
Feb 4, 2020
b42b563
rebasing
Feb 4, 2020
326d19c
fix rubocop errors
Feb 4, 2020
30dbe77
fix delayed must support error
Feb 4, 2020
782948d
add capability statement validation
Jammjammjamm Feb 5, 2020
e56461b
fix argonaut conformance test
Jammjammjamm Feb 5, 2020
6475279
change hardcoded name to instance variable
plump-pinniped Feb 6, 2020
fd81271
Merge pull request #436 from onc-healthit/fi-584-validate-capability-…
Jammjammjamm Feb 6, 2020
ebe6b08
Merge pull request #435 from onc-healthit/fi-612-fix-tests-for-multi-…
arscan Feb 7, 2020
548e1d4
Merge pull request #413 from onc-healthit/FI-497-must-support-slices
arscan Feb 9, 2020
5ce9dad
add checking for data absent reasons to search tests
Jammjammjamm Jan 30, 2020
c21ec19
add data absent reason checking to read tests
Jammjammjamm Jan 30, 2020
cdc2a26
add data absent reason sequence
Jammjammjamm Jan 30, 2020
46d807a
add test for data absent reason checker
Jammjammjamm Jan 30, 2020
3785903
make dar code checking more rigorous
Jammjammjamm Jan 30, 2020
b3e010a
add unit test for dar sequence
Jammjammjamm Jan 30, 2020
213edb0
refactor data absent reason checker
Jammjammjamm Jan 30, 2020
cf008d3
update generator to incorporate changes from rebase
Jammjammjamm Feb 7, 2020
54d9e98
update fetch_all_bundled_resources calls in clinical notes sequence
Jammjammjamm Feb 7, 2020
176f659
regenerate us core sequences
Jammjammjamm Feb 7, 2020
7a37bcf
Merge pull request #432 from onc-healthit/fi-582-dar-tests
arscan Feb 10, 2020
cf33995
omit invalid client id token refresh test for public clients
Jammjammjamm Feb 4, 2020
8b3c3b3
check exception messages in token refresh unit tests
Jammjammjamm Feb 4, 2020
a19420f
remove client id from refresh params
Jammjammjamm Feb 10, 2020
2562356
refactor save_resource_ids_in_bundle
Jammjammjamm Feb 3, 2020
65106f5
update generator to check for type on devices
Jammjammjamm Feb 3, 2020
9301989
add input for device type code and system
Jammjammjamm Feb 3, 2020
4d47999
remove device system and allow multiple device codes
Jammjammjamm Feb 10, 2020
53f3459
make tests skip consistently
Jammjammjamm Feb 12, 2020
eba902b
regenerate us core sequences
Jammjammjamm Feb 12, 2020
dc9158f
Merge pull request #433 from onc-healthit/fi-590-device-types
arscan Feb 12, 2020
b56413c
Minor wording update and added refresh and openid tests to US Core.
arscan Feb 12, 2020
3b25266
Reverting addition of Token and OpenID Connect to US Core because not…
arscan Feb 12, 2020
8a498f2
Remove client_id from token refresh exchange.
arscan Feb 12, 2020
997353e
Fix test to not expect client_id in token refresh.
arscan Feb 12, 2020
9371fdf
Fix rubocop issue.
arscan Feb 13, 2020
f34521c
Merge pull request #434 from onc-healthit/fi-563-omit-tr02-public-cli…
arscan Feb 13, 2020
fcb9eba
Update to v2.10.0
arscan Feb 13, 2020
932c0a8
Merge pull request #439 from onc-healthit/update-version
arscan Feb 13, 2020
e598c7a
unescape unicode in responses
Jammjammjamm Mar 20, 2020
1244d75
refactor save_resource_reference to improve performance
Jammjammjamm Mar 20, 2020
df54e72
regenerate us core sequences
Jammjammjamm Mar 20, 2020
05a0e86
move unbulleted list to a class selector
Jammjammjamm Mar 24, 2020
028b871
update templates
Jammjammjamm Mar 26, 2020
f1ac59c
update styles
Jammjammjamm Mar 26, 2020
a22579c
Merge pull request #442 from onc-healthit/fi-508-prevent-html-in-resp…
arscan Apr 3, 2020
943a018
Merge pull request #445 from onc-healthit/fi-482-format-error-messages
arscan Apr 3, 2020
8cdd8ae
Sync bdt sequence with lastest bdt service
yunwwang May 15, 2020
2c6bb90
remove local changes
yunwwang May 15, 2020
4e536f3
Add Metadata test description
yunwwang May 18, 2020
3289c38
Merge pull request #454 from onc-healthit/connectathon-24
yunwwang Jun 10, 2020
56be3ec
initial generic generator from IG
plump-pinniped Jul 8, 2020
1165e09
ignore unuseful resource files
plump-pinniped Jul 8, 2020
b5fcfb6
fix rubocop and rake issues
plump-pinniped Jul 9, 2020
b722261
refactor generic generator
Jammjammjamm Jul 15, 2020
ae07d8d
add TestMetadata class
Jammjammjamm Jul 15, 2020
435e992
fix file/class names
Jammjammjamm Jul 15, 2020
4a38743
cleanup
Jammjammjamm Jul 15, 2020
440f69d
make module file path its own method
Jul 23, 2020
ff81cb2
Merge pull request #468 from onc-healthit/FI-886
radamson Jul 24, 2020
b76b98a
Bump rack from 2.0.8 to 2.2.3
dependabot[bot] Jul 31, 2020
416a6a0
Bump nokogiri from 1.10.4 to 1.10.10
dependabot[bot] Jul 31, 2020
e84ab40
Bumps Activesupport to v5.2.4.3
Jul 31, 2020
4c01b43
Merge pull request #473 from onc-healthit/dependabot/bundler/rack-2.2.3
dependabot[bot] Jul 31, 2020
9120f54
Merge pull request #474 from onc-healthit/dependabot/bundler/nokogiri…
dependabot[bot] Jul 31, 2020
d6abae8
move module loading to new StartupTasks module
Jammjammjamm Jul 28, 2020
45ad222
check that external validator is available when starting Inferno
Jammjammjamm Jul 28, 2020
87ef95b
upload ig resources to validator
Jammjammjamm Jul 30, 2020
55f0b0b
skip ig upload if no package.json is present
Jammjammjamm Jul 31, 2020
e0cbdb0
Merge pull request #475 from onc-healthit/bump_activesupport_5243
radamson Jul 31, 2020
b9c0ef1
Merge pull request #443 from onc-healthit/fi-640-improve-performance
radamson Jul 31, 2020
e1b2cb1
update fhir_models
radamson Jul 31, 2020
7f2d9ca
Merge pull request #465 from onc-healthit/update_fhir_models
radamson Aug 4, 2020
645decf
remove hardcoded directory
Jammjammjamm Aug 5, 2020
236162f
include hidden files in ig package
Jammjammjamm Aug 6, 2020
d08a5cf
Merge pull request #476 from onc-healthit/fi-928-integrate-generation…
radamson Aug 6, 2020
b36a376
proof of concept for generic UI fields and database changes
plump-pinniped Jul 16, 2020
de5a4c5
adding bearer token field back in
plump-pinniped Jul 16, 2020
1f464a9
fix whitespace
plump-pinniped Jul 16, 2020
edfb4bb
accidentally erased commas
plump-pinniped Jul 16, 2020
1dccc6d
add getters/setters and labels/descriptions in the module file
Jul 21, 2020
f70ea96
change new_requires to requires and fix crash when launching older mo…
plump-pinniped Aug 4, 2020
56f19cd
create requirements if not set and fix rake issues
plump-pinniped Aug 5, 2020
41c8751
add unique property to name in sequencerequirement
plump-pinniped Aug 5, 2020
cc72dfb
fix rubocop
plump-pinniped Aug 5, 2020
477d0bf
use create instead of new+push
radamson Aug 5, 2020
30566bd
update add checks to prevent errors with the unique constraint
radamson Aug 5, 2020
a41b870
fix some issues
plump-pinniped Aug 5, 2020
7e4c985
saving some progress
Jul 29, 2020
c751a7f
more progress
Jul 30, 2020
f1806c2
add interaction test
Jul 30, 2020
cfdf984
fix some interaction tests
plump-pinniped Aug 4, 2020
4621846
some fixes
plump-pinniped Aug 4, 2020
768698a
more fixes
plump-pinniped Aug 4, 2020
66223a3
get correct type for parameters
plump-pinniped Aug 4, 2020
87a3e75
add requirements to module file for generic ui
plump-pinniped Aug 4, 2020
2b19c8e
nil safety for multiple_and_expecation and multiple_or_expectation
radamson Aug 5, 2020
d487170
break out search combos and add some nil safety
radamson Aug 5, 2020
7a6efbb
move validation tests after read and search tests
radamson Aug 5, 2020
636fc73
Update generator/generic/generic_generator.rb
radamson Aug 5, 2020
467b335
rubocop and fix spacing
radamson Aug 5, 2020
e421cda
use capabilities attr_accessor instead of passing it around
radamson Aug 5, 2020
e045686
fix search combo change and change definitions module
plump-pinniped Aug 5, 2020
f8221c0
rename generic_utilities to sequence_utilities
radamson Aug 5, 2020
755a88c
use map in basic_searches_from_capability_statement
radamson Aug 5, 2020
31020e7
catch json parsing error
Aug 6, 2020
dc7f11b
don't duplicate patient_id field
Aug 6, 2020
79e3f16
support legacy patient_id
Aug 6, 2020
e9d87d4
update generator to test against correct profile
radamson Aug 6, 2020
84fab52
save resources with profile reference
radamson Aug 6, 2020
40c9969
us path when making sequence class name
plump-pinniped Aug 6, 2020
d70ceeb
use first_or_create
radamson Aug 6, 2020
cf18717
remove test_instance_id from first_or_create calls based on earlier P…
radamson Aug 6, 2020
da60a8e
default to external validator
radamson Aug 6, 2020
7273f2c
use fhir-validator-service
radamson Aug 6, 2020
eb58223
add config manager and use it to add generated sequence to config
radamson Aug 7, 2020
094c478
simply get_sequence_requirements based on PR feedback
radamson Aug 7, 2020
0afb701
Merge pull request #478 from onc-healthit/fi-955-default-to-external
radamson Aug 7, 2020
4387859
use setter methods and change variable name
Aug 7, 2020
e946a81
rename ProfileDefinitions to include module path
radamson Aug 7, 2020
ff99f47
Definitions -> ProfileDefinitions to match what previously existed
radamson Aug 7, 2020
f3240fc
fix indentation
radamson Aug 7, 2020
1c4f538
add logger line for json parsing error and fix profiledefinition modu…
Aug 7, 2020
467895f
fix rubocop spacing issue
Aug 7, 2020
8fcfc49
Merge pull request #470 from onc-healthit/fi-900-generic-ui-fields
radamson Aug 7, 2020
cb0f144
Merge pull request #479 from onc-healthit/fi-956-add-generated-module…
radamson Aug 7, 2020
1364e7b
Merge pull request #477 from onc-healthit/fi-898-generic-generator-fr…
radamson Aug 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ tmp/*
.vscode/*
resources/terminology/*
sequence_coverage.csv
fhir-pgdata/
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.3)
activesupport (5.2.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand All @@ -25,7 +25,7 @@ GEM
rake (< 13.0)
coderay (1.1.2)
colorize (0.8.1)
concurrent-ruby (1.1.5)
concurrent-ruby (1.1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.3.1)
Expand Down Expand Up @@ -101,7 +101,7 @@ GEM
date_time_precision (>= 0.8)
mime-types (>= 3.0)
nokogiri (>= 1.10.4)
fhir_models (4.0.2)
fhir_models (4.1.0)
bcp47 (>= 0.3)
date_time_precision (>= 0.8)
mime-types (>= 3.0)
Expand All @@ -115,26 +115,26 @@ GEM
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.7.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.3)
json (1.8.6)
json_pure (1.8.6)
jwt (2.2.1)
kramdown (2.1.0)
method_source (0.9.2)
mime-types (3.3)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0904)
mime-types-data (3.2020.0512)
mini_portile2 (2.4.0)
minitest (5.12.2)
minitest (5.14.1)
msgpack (1.3.1)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.1.1)
mustermann (1.0.3)
netrc (0.11.0)
nokogiri (1.10.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
Expand All @@ -152,7 +152,7 @@ GEM
byebug (~> 11.0)
pry (~> 0.10)
public_suffix (4.0.1)
rack (2.0.8)
rack (2.2.3)
rack-protection (2.0.7)
rack
rack-test (1.1.0)
Expand Down Expand Up @@ -208,7 +208,7 @@ GEM
tilt (2.0.10)
time_difference (0.7.0)
activesupport (~> 5.1)
tzinfo (1.2.5)
tzinfo (1.2.7)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
Expand Down Expand Up @@ -254,4 +254,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.0.2
2.1.4
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ include_extras: true
badge_text: Community

# Resource validator options: must be one of "internal" or "external". external_resource_validator_url is only used if resource_validator is set to external.
resource_validator: internal
resource_validator: external
external_resource_validator_url: http://validator_service:4567

# module options: one or more must be set. The first option in the list will be checked by default
Expand Down
38 changes: 36 additions & 2 deletions create_umls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,42 @@ fi
echo 'Populating mrrel table'
sqlite3 umls.db ".import MRREL.pipe mrrel"

echo 'Dropping existing mrsat table'
sqlite3 umls.db "drop table if exists mrsat;"

echo 'Creating mrsat table'
sqlite3 umls.db "create table mrsat (
CUI char(8) NOT NULL,
LUI char(8),
SUI char(8),
METAUI varchar(20),
STYPE varchar(50) NOT NULL,
CODE varchar(50),
ATUI varchar(10) NOT NULL,
SATUI varchar(10),
ATN varchar(50),
SAB varchar(20) NOT NULL,
ATV varchar(1000) NOT NULL,
SUPPRESS char(1),
CVF int
);"

# Remove the last pipe from each line, and quote all the fields/escape double quotes
# Because MRSAT has stray unescaped quotes in one of the fields
if [ ! -e MRSAT.pipe ]
then
echo 'Removing last pipe from RRF'
sed 's/|$//' ./resources/terminology/umls_subset/MRSAT.RRF | sed $'s/"/""/g;s/[^|]*/"&"/g' > MRSAT.pipe
fi

echo 'Populating mrsat table'
sqlite3 umls.db ".import MRSAT.pipe mrsat"

echo 'Indexing mrsat(ATN,ATV)'
sqlite3 umls.db "create index idx_at on mrsat(ATN,ATV);"

echo 'Indexing mrconso(tty)'
sqlite3 umls.db "create index idx_tty on mrconso (tty);"
sqlite3 umls.db "create index idx_tty on mrconso(tty);"

echo 'Indexing mrrel(rel,sab)'
sqlite3 umls.db "create index idx_isa on mrrel(REL,SAB);"
Expand All @@ -78,4 +112,4 @@ echo 'Indexing mrconso(aui)'
sqlite3 umls.db "CREATE INDEX idx_aui ON mrconso(AUI);"

echo 'Analyzing Database'
sqlite3 umls.db "ANALYZE;"
sqlite3 umls.db "ANALYZE;"
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
bdt_service:
image: infernocommunity/inferno-bdt-service
validator_service:
image: infernocommunity/fhir-validator-wrapper
image: infernocommunity/fhir-validator-service
nginx_server:
image: nginx
volumes:
Expand Down
73 changes: 68 additions & 5 deletions generator/bdt/bdt-structure.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,69 @@
],
"path": "4"
},
{
"name": "Metadata",
"type": "group",
"children": [
{
"name": "CapabilityStatement",
"type": "group",
"children": [
{
"id": "CapabilityStatement-1",
"name": "The CapabilityStatement instantiates the bulk-data CapabilityStatement",
"description": "To declare conformance with this IG, a server <b>should</b> include the following URL in its own <code>CapabilityStatement.instantiates</code>: <a target=\"_blank\" href=\"https://build.fhir.org/ig/HL7/bulk-data/CapabilityStatement-bulk-data.html\">http://hl7.org/fhir/uv/bulkdata/CapabilityStatement/bulk-data</a>. The <code>CapabilityStatement</code> should contain something like:<pre>\"instantiates\": [\n \"http://hl7.org/fhir/uv/bulkdata/CapabilityStatement/bulk-data\"\n]</pre>",
"type": "test",
"path": "5.0.0"
},
{
"id": "CapabilityStatement-2",
"name": "Includes the token endpoint in the CapabilityStatement",
"description": "If a server requires SMART on FHIR authorization for access, its metadata <b>must</b> support automated discovery of OAuth2 endpoints by including a “complex” extension (that is, an extension with multiple components inside) on the <code>CapabilityStatement.rest.security</code> element. Any time a client sees this extension, it must be prepared to authorize using SMART’s OAuth2-based protocol.<br/> This test is expecting to find the in CapabilityStatement an entry like:<pre>\"rest\": [\n {\n \"mode\": \"server\",\n \"security\": {\n \"extension\": [\n {\n \"url\": \"http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris\",\n \"extension\": [\n {\n \"url\": \"token\",\n \"valueUri\": \"https://someserver.org/auth/token\"\n }\n ]\n }\n ]\n }\n }\n]</pre>Having a CapabilityStatement is optional for bulk data servers, unless they are also FHIR servers (which they typically are). However, missing a CapabilityStatement will generate a warning here. ",
"type": "test",
"path": "5.0.1"
},
{
"id": "CapabilityStatement-3",
"name": "Check if \"export\" operation is defined in the CapabilityStatement",
"description": "This test expects to find in the CapabilityStatement an entry like:<pre>\"rest\": [\n {\n \"operation\": [\n {\n \"name\" : \"export\"\n }\n ]\n }\n]</pre>",
"type": "test",
"path": "5.0.2"
},
{
"id": "CapabilityStatement-4",
"name": "Check if \"patient-export\" operation is defined in the CapabilityStatement",
"description": "This test expects to find in the CapabilityStatement an entry like:<pre>\"rest\": [\n {\n \"operation\": [\n {\n \"name\" : \"patient-export\"\n }\n ]\n }\n]</pre>",
"type": "test",
"path": "5.0.3"
},
{
"id": "CapabilityStatement-5",
"name": "Check if \"group-export\" operation is defined in the CapabilityStatement",
"description": "This test expects to find in the CapabilityStatement an entry like:<pre>\"rest\": [\n {\n \"operation\": [\n {\n \"name\" : \"group-export\"\n }\n ]\n }\n]</pre>",
"type": "test",
"path": "5.0.4"
}
],
"path": "5.0"
},
{
"name": "Well Known SMART Configuration",
"type": "group",
"children": [
{
"id": "WellKnownSmartConfiguration-1",
"name": "Includes token_endpoint definition",
"description": "This test verifies that the server provides a <code>/.well-known/smart-configuration</code> and that a <code>token_endpoint</code> property is declared within that file.",
"type": "test",
"path": "5.1.0"
}
],
"path": "5.1"
}
],
"path": "5"
},
{
"name": "Status Endpoint",
"type": "group",
Expand All @@ -586,24 +649,24 @@
"name": "Responds with 202 for active transaction IDs",
"description": "<p>The status endpoint should return <b>202</b> status code until the export is completed.</p>See <a target=\"_blank\" href=\"https://github.com/HL7/bulk-data/blob/master/spec/export/index.md#response---in-progress-status\">https://github.com/HL7/bulk-data/blob/master/spec/export/index.md#response---in-progress-status</a>",
"type": "test",
"path": "5.0"
"path": "6.0"
},
{
"id": "Status-02",
"name": "Replies properly in case of error",
"description": "Runs a set of assertions to verify that:<ul><li>The returned HTTP status code is 5XX</li><li>The server returns a FHIR OperationOutcome resource in JSON format</li></ul><p>Note that even if some of the requested resources cannot successfully be exported, the overall export operation MAY still succeed. In this case, the Response.error array of the completion response MUST be populated (see below) with one or more files in ndjson format containing FHIR OperationOutcome resources to indicate what went wrong.</p>See <a target=\"_blank\" href=\"https://github.com/HL7/bulk-data/blob/master/spec/export/index.md#response---error-status-1\">https://github.com/HL7/bulk-data/blob/master/spec/export/index.md#response---error-status-1</a>",
"type": "test",
"path": "5.1"
"path": "6.1"
},
{
"id": "Status-03",
"name": "Generates valid status response",
"description": "Runs a set of assertions to verify that:<ul><li>The status endpoint should return <b>200</b> status code when the export is completed</li><li>The status endpoint should respond with <b>JSON</b></li><li>The <code>expires</code> header (if set) must be valid date in the future</li><li>The JSON response contains <code>transactionTime</code> which is a valid <a target=\"_blank\" href=\"http://hl7.org/fhir/datatypes.html#instant\">FHIR instant</a></li><li>The JSON response contains the kick-off URL in <code>request</code> property</li><li>The JSON response contains <code>requiresAccessToken</code> boolean property</li><li>The JSON response contains an <code>output</code> array in which:<ul><li>Every item has valid <code>type</code> property</li><li>Every item has valid <code>url</code> property</li><li>Every item may a <code>count</code> number property</li></ul></li><li>The JSON response contains an <code>error</code> array in which:<ul><li>Every item has valid <code>type</code> property</li><li>Every item has valid <code>url</code> property</li><li>Every item may a <code>count</code> number property</li></ul></li></ul>",
"type": "test",
"path": "5.2"
"path": "6.2"
}
],
"path": "5"
"path": "6"
}
]
}
}
1 change: 1 addition & 0 deletions generator/bdt/bdt_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class BDTGenerator < Generator::Base
'Patient-level export' => 'Verify the system is capable of performing a Patient-Level Export that conforms to the SMART Bulk Data IG.',
'System-level export' => 'Verify the system is capable of performing a System-Level Export that conforms to the SMART Bulk Data IG.',
'Group-level export' => 'Verify the system is capable of performing a Group-Level Export that conforms to the SMART Bulk Data IG.',
'Metadata' => 'Verify the CapabilityStatement conforms to the SMART Bulk Data IG.',
'Status Endpoint' => 'Verify the status endpoint conforms to the SMART Bulk Data IG for Export.'
}.freeze

Expand Down
11 changes: 10 additions & 1 deletion generator/generator_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@ def load_resources

# We should consider using the native Ruby models instead of JSON
# There were problems with round-tripping certain SearchParameters though
new_resource_json = JSON.parse(File.read(resource))

begin
new_resource_json = JSON.parse(File.read(resource))
rescue JSON::ParserError
Inferno.logger.debug("Failed to parse JSON: #{resource}")
next
end

new_resource = FHIR.from_contents(File.read(resource))
next unless new_resource.present?

resource_by_path[resource_path(new_resource)] = new_resource_json
type = new_resource.class.name.demodulize
type = 'CapabilityStatement' if type == 'Conformance'
Expand Down