ips_test_kit 0.0.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.
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class MedicationStatement < Inferno::TestGroup
3
+ title 'Medication Statement (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the Medication Statement (IPS) profile.'
5
+ id :ips_medication_statement
6
+
7
+ input :medication_statement_id
8
+
9
+ test do
10
+ title 'Server returns correct MedicationStatement resource from the MedicationStatement read interaction'
11
+ description %(
12
+ This test will verify that MedicationStatement resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationStatement-uv-ips'
15
+ makes_request :medication_statement
16
+
17
+ run do
18
+ fhir_read(:medication_statement, medication_statement_id, name: :medication_statement)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:medication_statement)
22
+ assert resource.id == medication_statement_id,
23
+ "Requested resource with id #{medication_statement_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns MedicationStatement resource that matches the Medication Statement (IPS) profile'
29
+ description %(
30
+ This test will validate that the MedicationStatement resource returned from the server matches the Medication Statement (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationStatement-uv-ips'
33
+ uses_request :medication_statement
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationStatement-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationAlcoholUse < Inferno::TestGroup
3
+ title 'Observation (SH: alcohol use) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation (SH: alcohol use) profile.'
5
+ id :ips_observation_alcohol_use
6
+
7
+ test do
8
+ title 'Server returns correct Observation resource from the Observation read interaction'
9
+ description %(
10
+ This test will verify that Observation resources can be read from the server.
11
+ )
12
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-alcoholuse-uv-ips'
13
+
14
+ input :observation_alcohol_use_id
15
+ makes_request :observation_alcohol_use
16
+
17
+ run do
18
+ fhir_read(:observation, observation_alcohol_use_id, name: :observation_alcohol_use)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_alcohol_use_id,
23
+ "Requested resource with id #{observation_alcohol_use_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation (SH: alcohol use) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation (SH: alcohol use) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-alcoholuse-uv-ips'
33
+ uses_request :observation_alcohol_use
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-alcoholuse-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationPregnancyEDD < Inferno::TestGroup
3
+ title 'Observation (Pregnancy: EDD) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation (Pregnancy: EDD) profile.'
5
+ id :ips_observation_pregnancy_edd
6
+
7
+ test do
8
+ title 'Server returns correct Observation resource from the Observation read interaction'
9
+ description %(
10
+ This test will verify that Observation resources can be read from the server.
11
+ )
12
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-edd-uv-ips'
13
+
14
+ input :observation_pregnancy_edd_id
15
+ makes_request :observation_pregnancy_edd
16
+
17
+ run do
18
+ fhir_read(:observation, observation_pregnancy_edd_id, name: :observation_pregnancy_edd)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_pregnancy_edd_id,
23
+ "Requested resource with id #{observation_pregnancy_edd_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation (Pregnancy: EDD) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation (Pregnancy: EDD) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-edd-uv-ips'
33
+ uses_request :observation_pregnancy_edd
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-edd-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationPregnancyOutcome < Inferno::TestGroup
3
+ title 'Observation (Pregnancy: outcome) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation (Pregnancy: outcome) profile.'
5
+ id :ips_observation_pregnancy_outcome
6
+
7
+ input :observation_pregnancy_outcome_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-outcome-uv-ips'
15
+ makes_request :observation_pregnancy_outcome
16
+
17
+ run do
18
+ fhir_read(:observation, observation_pregnancy_outcome_id, name: :observation_pregnancy_outcome)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_pregnancy_outcome_id,
23
+ "Requested resource with id #{observation_pregnancy_outcome_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation (Pregnancy: outcome) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation (Pregnancy: outcome) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-outcome-uv-ips'
33
+ uses_request :observation_pregnancy_outcome
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-outcome-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationPregnancyStatus < Inferno::TestGroup
3
+ title 'Observation (Pregnancy: status) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation (Pregnancy: status) profile.'
5
+ id :ips_observation_pregnancy_status
6
+
7
+ input :observation_pregnancy_status_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-status-uv-ips'
15
+ makes_request :observation_pregnancy_status
16
+
17
+ run do
18
+ fhir_read(:observation, observation_pregnancy_status_id, name: :observation_pregnancy_status)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_pregnancy_status_id,
23
+ "Requested resource with id #{observation_pregnancy_status_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation (Pregnancy: status) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation (Pregnancy: status) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-status-uv-ips'
33
+ uses_request :observation_pregnancy_status
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-pregnancy-status-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationResults < Inferno::TestGroup
3
+ title 'Observation Results (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation Results (IPS) profile.'
5
+ id :ips_observation_results
6
+
7
+ input :observation_results_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-uv-ips'
15
+ makes_request :observation
16
+
17
+ run do
18
+ fhir_read(:observation, observation_results_id, name: :observation)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_results_id,
23
+ "Requested resource with id #{observation_results_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation Results (IPS) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation Results (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-uv-ips'
33
+ uses_request :observation
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationResultsLaboratory < Inferno::TestGroup
3
+ title 'Observation Results: laboratory (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation Results: laboratory (IPS) profile.'
5
+ id :ips_observation_results_laboratory
6
+
7
+ input :observation_results_laboratory_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-laboratory-uv-ips'
15
+ makes_request :observation_lab
16
+
17
+ run do
18
+ fhir_read(:observation, observation_results_laboratory_id, name: :observation_lab)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_results_laboratory_id,
23
+ "Requested resource with id #{observation_results_laboratory_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation Results: laboratory (IPS) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation Results: laboratory (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-laboratory-uv-ips'
33
+ uses_request :observation_lab
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-laboratory-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationResultsPathology < Inferno::TestGroup
3
+ title 'Observation Results: pathology (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation Results: pathology (IPS) profile.'
5
+ id :ips_observation_results_pathology
6
+
7
+ input :observation_results_pathology_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-pathology-uv-ips'
15
+ makes_request :observation_pathology
16
+
17
+ run do
18
+ fhir_read(:observation, observation_results_pathology_id, name: :observation_pathology)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_results_pathology_id,
23
+ "Requested resource with id #{observation_results_pathology_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation Results: pathology (IPS) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation Results: pathology (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-pathology-uv-ips'
33
+ uses_request :observation_pathology
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-pathology-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationResultsRadiology < Inferno::TestGroup
3
+ title 'Observation Results: radiology (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation Results: radiology (IPS) profile.'
5
+ id :ips_observation_results_radiology
6
+
7
+ input :observation_results_radiology_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-radiology-uv-ips'
15
+ makes_request :observation_radiology
16
+
17
+ run do
18
+ fhir_read(:observation, observation_results_radiology_id, name: :observation_radiology)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_results_radiology_id,
23
+ "Requested resource with id #{observation_results_radiology_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation Results: radiology (IPS) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation Results: radiology (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-radiology-uv-ips'
33
+ uses_request :observation_radiology
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-radiology-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class ObservationTobaccoUse < Inferno::TestGroup
3
+ title 'Observation (SH: tobacco use) Tests'
4
+ description 'Verify support for the server capabilities required by the Observation (SH: tobacco use) profile.'
5
+ id :ips_observation_tobacco_use
6
+
7
+ input :observation_tobacco_use_id
8
+
9
+ test do
10
+ title 'Server returns correct Observation resource from the Observation read interaction'
11
+ description %(
12
+ This test will verify that Observation resources can be read from the server.
13
+ )
14
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-tobaccouse-uv-ips'
15
+ makes_request :observation_tobacco_use
16
+
17
+ run do
18
+ fhir_read(:observation, observation_tobacco_use_id, name: :observation_tobacco_use)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:observation)
22
+ assert resource.id == observation_tobacco_use_id,
23
+ "Requested resource with id #{observation_tobacco_use_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Observation resource that matches the Observation (SH: tobacco use) profile'
29
+ description %(
30
+ This test will validate that the Observation resource returned from the server matches the Observation (SH: tobacco use) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-tobaccouse-uv-ips'
33
+ uses_request :observation_tobacco_use
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-tobaccouse-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,40 @@
1
+ module IPS
2
+ class Organization < Inferno::TestGroup
3
+ title 'Organization (IPS) Tests'
4
+ description 'Verify support for the server capabilities required by the Organization (IPS) profile.'
5
+ id :ips_organization
6
+
7
+ test do
8
+ title 'Server returns correct Organization resource from the Organization read interaction'
9
+ description %(
10
+ This test will verify that Organization resources can be read from the server.
11
+ )
12
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips'
13
+
14
+ input :organization_id
15
+ makes_request :organization
16
+
17
+ run do
18
+ fhir_read(:organization, organization_id, name: :organization)
19
+
20
+ assert_response_status(200)
21
+ assert_resource_type(:organization)
22
+ assert resource.id == organization_id,
23
+ "Requested resource with id #{organization_id}, received resource with id #{resource.id}"
24
+ end
25
+ end
26
+
27
+ test do
28
+ title 'Server returns Organization resource that matches the Organization (IPS) profile'
29
+ description %(
30
+ This test will validate that the Organization resource returned from the server matches the Organization (IPS) profile.
31
+ )
32
+ # link 'http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips'
33
+ uses_request :organization
34
+
35
+ run do
36
+ assert_valid_resource(profile_url: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips')
37
+ end
38
+ end
39
+ end
40
+ end