ips_test_kit 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ips/ips_resource_validation.rb +38 -0
- data/lib/ips_test_kit.rb +49 -27
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58953a601ac484d36b51cd1e52e42d856ce07ad9e1d91f40e1d6f50aab8c1f46
|
4
|
+
data.tar.gz: 0bf259cef836ccbaa4239398b5e0685a4d83a4646a214c11f058aaa456fd9e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1f9122787140d5267bd8924c1b721ff83c324e21ddf3d2885e6aa6afcd40f8bd2bdaec0226e6a09e05b14a08fda3d65f2b4582c6ed5b1ba1e15a531760bf339
|
7
|
+
data.tar.gz: de95f83c856a454b4acea54958f1722eec71f9a3717244fc256cddcaee6463882b38ce54862325018251d8d9b9297cf21b31924945b05396efd919de059f01eb
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module IPS
|
2
|
+
class IPSResourceValidation < Inferno::TestGroup
|
3
|
+
title 'IPS Resource Validation Tests'
|
4
|
+
id :ips_resource_validation
|
5
|
+
|
6
|
+
group do
|
7
|
+
title 'IPS Bundle with no other constraints'
|
8
|
+
|
9
|
+
test do
|
10
|
+
title 'Valid IPS Bundle'
|
11
|
+
description %(
|
12
|
+
This test will validate the content of an IPS bundle to ensure it is valid.
|
13
|
+
)
|
14
|
+
input :bundle_content, title: 'IPS Bundle', type: 'textarea'
|
15
|
+
|
16
|
+
run do
|
17
|
+
|
18
|
+
resource_instance = FHIR.from_contents(bundle_content)
|
19
|
+
|
20
|
+
assert_resource_type(:bundle, resource: resource_instance)
|
21
|
+
assert_valid_resource(resource: resource_instance, profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips')
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# You could have extra context-sensitive groups e.g. "show me a bundle
|
28
|
+
# that has this, or that" That way you can have a list of all the
|
29
|
+
# different kinds of variants you would like to see in order to say that a
|
30
|
+
# system can fully support IPS (assuming that a single valid example isn't
|
31
|
+
# good enough)
|
32
|
+
|
33
|
+
# group do
|
34
|
+
# title 'IPS Bundle that has at least XYZ'
|
35
|
+
|
36
|
+
# end
|
37
|
+
end
|
38
|
+
end
|
data/lib/ips_test_kit.rb
CHANGED
@@ -7,50 +7,72 @@ module IPS
|
|
7
7
|
|
8
8
|
id 'ips'
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
fhir_client do
|
13
|
-
url :url
|
10
|
+
validator do
|
11
|
+
url ENV.fetch('VALIDATOR_URL', 'http://validator_service:4567')
|
14
12
|
end
|
13
|
+
|
14
|
+
# Comment this out to remove
|
15
|
+
group from: :ips_resource_validation
|
15
16
|
|
16
17
|
group do
|
17
18
|
title 'IPS Operations'
|
18
19
|
|
20
|
+
input :url
|
21
|
+
|
22
|
+
fhir_client do
|
23
|
+
url :url
|
24
|
+
end
|
25
|
+
|
19
26
|
group from: :ips_document_operation
|
20
27
|
group from: :ips_summary_operation
|
21
28
|
end
|
22
29
|
|
23
30
|
group do
|
24
|
-
title 'IPS Profiles'
|
31
|
+
title 'IPS Read and Validate Profiles'
|
32
|
+
|
33
|
+
input :url
|
34
|
+
|
35
|
+
fhir_client do
|
36
|
+
url :url
|
37
|
+
end
|
25
38
|
|
26
|
-
group from: :ips_observation_alcohol_use
|
27
|
-
group from: :ips_practitioner
|
28
|
-
group from: :ips_observation_results_radiology
|
29
|
-
group from: :ips_device
|
30
|
-
group from: :ips_observation_results_laboratory
|
31
|
-
group from: :ips_bundle
|
32
|
-
group from: :ips_observation_results
|
33
39
|
group from: :ips_allergy_intolerance
|
34
|
-
group from: :
|
35
|
-
group from: :ips_observation_pregnancy_status
|
36
|
-
group from: :ips_medication_statement
|
37
|
-
group from: :ips_patient
|
38
|
-
group from: :ips_observation_pregnancy_edd
|
39
|
-
group from: :ips_specimen
|
40
|
-
group from: :ips_immunization
|
41
|
-
group from: :ips_device_observer
|
40
|
+
group from: :ips_bundle
|
42
41
|
group from: :ips_composition
|
43
|
-
group from: :ips_organization
|
44
|
-
group from: :ips_imaging_study
|
45
|
-
group from: :ips_media_observation
|
46
|
-
group from: :ips_device_use_statement
|
47
42
|
group from: :ips_condition
|
48
|
-
group from: :ips_observation_tobacco_use
|
49
|
-
group from: :ips_observation_results_pathology
|
50
43
|
group from: :ips_diagnostic_report
|
44
|
+
group from: :ips_device
|
45
|
+
group from: :ips_device_observer
|
46
|
+
group from: :ips_device_use_statement
|
47
|
+
group from: :ips_imaging_study
|
48
|
+
group from: :ips_immunization
|
49
|
+
group from: :ips_media_observation
|
51
50
|
group from: :ips_medication
|
51
|
+
group from: :ips_medication_statement
|
52
|
+
group do
|
53
|
+
title 'Observation Profiles'
|
54
|
+
|
55
|
+
group from: :ips_observation_alcohol_use
|
56
|
+
group from: :ips_observation_pregnancy_edd
|
57
|
+
group from: :ips_observation_pregnancy_outcome
|
58
|
+
group from: :ips_observation_pregnancy_status
|
59
|
+
group from: :ips_observation_tobacco_use
|
60
|
+
end
|
61
|
+
group do
|
62
|
+
title 'Observation Result Profiles'
|
63
|
+
|
64
|
+
group from: :ips_observation_results
|
65
|
+
group from: :ips_observation_results_laboratory
|
66
|
+
group from: :ips_observation_results_pathology
|
67
|
+
group from: :ips_observation_results_radiology
|
68
|
+
end
|
69
|
+
group from: :ips_organization
|
70
|
+
group from: :ips_patient
|
71
|
+
group from: :ips_practitioner
|
72
|
+
group from: :ips_practitioner_role
|
52
73
|
group from: :ips_procedure
|
53
|
-
group from: :
|
74
|
+
group from: :ips_specimen
|
75
|
+
|
54
76
|
end
|
55
77
|
end
|
56
78
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ips_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- MITRE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.4.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.4.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: database_cleaner-sequel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,8 +80,7 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.11'
|
83
|
-
description:
|
84
|
-
Guide
|
83
|
+
description: IPS Tests
|
85
84
|
email:
|
86
85
|
- inferno@groups.mitre.org
|
87
86
|
executables: []
|
@@ -100,6 +99,7 @@ files:
|
|
100
99
|
- lib/ips/document_operation.rb
|
101
100
|
- lib/ips/imaging_study.rb
|
102
101
|
- lib/ips/immunization.rb
|
102
|
+
- lib/ips/ips_resource_validation.rb
|
103
103
|
- lib/ips/media_observation.rb
|
104
104
|
- lib/ips/medication.rb
|
105
105
|
- lib/ips/medication_statement.rb
|
@@ -121,12 +121,12 @@ files:
|
|
121
121
|
- lib/ips/summary_operation.rb
|
122
122
|
- lib/ips/version.rb
|
123
123
|
- lib/ips_test_kit.rb
|
124
|
-
homepage: https://github.com/
|
124
|
+
homepage: https://github.com/inferno-framework/ips-test-kit
|
125
125
|
licenses:
|
126
126
|
- Apache-2.0
|
127
127
|
metadata:
|
128
|
-
homepage_uri: https://github.com/
|
129
|
-
source_code_uri: https://github.com/
|
128
|
+
homepage_uri: https://github.com/inferno-framework/ips-test-kit
|
129
|
+
source_code_uri: https://github.com/inferno-framework/ips-test-kit
|
130
130
|
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
@@ -135,16 +135,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 3.1.2
|
139
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
rubygems_version: 3.
|
145
|
+
rubygems_version: 3.3.7
|
146
146
|
signing_key:
|
147
147
|
specification_version: 4
|
148
|
-
summary:
|
149
|
-
Guide
|
148
|
+
summary: IPS Tests
|
150
149
|
test_files: []
|