ips_test_kit 0.0.2 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0b76b6e2dad28aadeba36bd9b2f4e3b324d38f02f43a3ef0d0c68d2732df329
4
- data.tar.gz: 1d9891644803e4ff59580d2696bcc8d666cae98381ca1d4993c94bc1a97557ca
3
+ metadata.gz: 650a85c007fb04d840c6f168157bd88aba95322bc9519842f0b4ecd787c11754
4
+ data.tar.gz: '0518d25606072dd83c41d44699f4af1943275e67e1357ebe5086ac453c8b237e'
5
5
  SHA512:
6
- metadata.gz: 73f07105152811fdd25257ec1bc52e2717acb9e99ace93c4a64350ff9190b9db28b0d2d51e2ca0422f0b1b792fbfccbf0ad07b5c52b3190d1b7f033aa57646fa
7
- data.tar.gz: b29b5e0e7629531201f871f98de3d07a3b1a77c6db8cd52b3dc1e8477ebf7daf62350cdab3ab91f46e867260597c4826d7190b7eec69a3865d6f379a2244ea8e
6
+ metadata.gz: 50def57c91637dbbc72792d5fa23632bde5f4739a5f5498db9e5f893d01dc90b4c747a5d91d2f00963bcb88abb78c602cabe97bc015a3e9f173881595f442f19
7
+ data.tar.gz: 516bc1507f00364e7ad0c7ccc11cc461f814126c4db5e0c5d230f914b7edc53df5968ced71b770b92c1ee1b2068955aa52fa939d2316463a14ca8b5a50b5821d
@@ -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
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class MedicationRequest < Inferno::TestGroup
3
+ title 'MedicationRequest (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the MedicationRequest (IPS) profile.'
5
+ id :ips_medication_request
6
+
7
+ test do
8
+ title 'Server returns correct MedicationRequest resource from the MedicationRequest read interaction'
9
+ description %(
10
+ This test will verify that MedicationRequest resources can be read from the server.
11
+ )
12
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationRequest-uv-ips'
13
+
14
+ input :medication_request_id
15
+ makes_request :medication_request
16
+
17
+ run do
18
+ fhir_read(:medication_request, medication_request_id, name: :medication_request)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:medication_request)
22
+ assert resource.id == medication_request_id,
23
+ "Requested resource with id #{medication_request_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns MedicationRequest resource that matches the MedicationRequest (IPS) profile'
29
+ description %(
30
+ This test will validate that the MedicationRequest resource returned from the server matches the MedicationRequest (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationRequest-uv-ips'
33
+ uses_request :medication_request
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationRequest-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
data/lib/ips/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module IPS
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/lib/ips_test_kit.rb CHANGED
@@ -7,50 +7,73 @@ module IPS
7
7
 
8
8
  id 'ips'
9
9
 
10
- input :url
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: :ips_practitioner_role
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_request
52
+ group from: :ips_medication_statement
53
+ group do
54
+ title 'Observation Profiles'
55
+
56
+ group from: :ips_observation_alcohol_use
57
+ group from: :ips_observation_pregnancy_edd
58
+ group from: :ips_observation_pregnancy_outcome
59
+ group from: :ips_observation_pregnancy_status
60
+ group from: :ips_observation_tobacco_use
61
+ end
62
+ group do
63
+ title 'Observation Result Profiles'
64
+
65
+ group from: :ips_observation_results
66
+ group from: :ips_observation_results_laboratory
67
+ group from: :ips_observation_results_pathology
68
+ group from: :ips_observation_results_radiology
69
+ end
70
+ group from: :ips_organization
71
+ group from: :ips_patient
72
+ group from: :ips_practitioner
73
+ group from: :ips_practitioner_role
52
74
  group from: :ips_procedure
53
- group from: :ips_observation_pregnancy_outcome
75
+ group from: :ips_specimen
76
+
54
77
  end
55
78
  end
56
79
  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.2
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - Stephen MacVicar
7
+ - MITRE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-17 00:00:00.000000000 Z
11
+ date: 2023-05-03 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.0.5
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.0.5
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: A collection of tests for the International Patient Summary FHIR Implementation
84
- Guide
83
+ description: IPS Tests
85
84
  email:
86
85
  - inferno@groups.mitre.org
87
86
  executables: []
@@ -100,8 +99,10 @@ 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
+ - lib/ips/medication_request.rb
105
106
  - lib/ips/medication_statement.rb
106
107
  - lib/ips/observation_alcohol_use.rb
107
108
  - lib/ips/observation_pregnancy_edd.rb
@@ -121,12 +122,12 @@ files:
121
122
  - lib/ips/summary_operation.rb
122
123
  - lib/ips/version.rb
123
124
  - lib/ips_test_kit.rb
124
- homepage: https://github.com/inferno_community/ips-test-kit
125
+ homepage: https://github.com/inferno-framework/ips-test-kit
125
126
  licenses:
126
127
  - Apache-2.0
127
128
  metadata:
128
- homepage_uri: https://github.com/inferno_community/ips-test-kit
129
- source_code_uri: https://github.com/inferno_community/ips-test-kit
129
+ homepage_uri: https://github.com/inferno-framework/ips-test-kit
130
+ source_code_uri: https://github.com/inferno-framework/ips-test-kit
130
131
  post_install_message:
131
132
  rdoc_options: []
132
133
  require_paths:
@@ -135,16 +136,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
136
  requirements:
136
137
  - - ">="
137
138
  - !ruby/object:Gem::Version
138
- version: 2.7.0
139
+ version: 3.1.2
139
140
  required_rubygems_version: !ruby/object:Gem::Requirement
140
141
  requirements:
141
142
  - - ">="
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  requirements: []
145
- rubygems_version: 3.1.4
146
+ rubygems_version: 3.3.7
146
147
  signing_key:
147
148
  specification_version: 4
148
- summary: A collection of tests for the International Patient Summary FHIR Implementation
149
- Guide
149
+ summary: IPS Tests
150
150
  test_files: []