au_ps_inferno 0.1.0 → 0.2.0
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 +4 -4
- data/lib/au_ps_inferno/suite/au_ps_bundle_instance/au_ps_bundle_instance.rb +4 -0
- data/lib/au_ps_inferno/suite/au_ps_bundle_instance/bundle_acquisition.rb +16 -0
- data/lib/au_ps_inferno/suite/au_ps_bundle_instance/suite_au_ps_bundle_instance_bundle_provide.rb +21 -0
- data/lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_is_valid_test.rb +1 -1
- data/lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_supports_au_ps_profiles.rb +2 -1
- data/lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_supports_ips_recommended_ops.rb +1 -1
- data/lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_acquisition.rb +16 -0
- data/lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_validation/suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation_bundle_valid.rb +2 -4
- data/lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_validation/suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation_bundle_valid_ips.rb +2 -4
- data/lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/generate_au_ps_using_ips_summary_validation_tests.rb +4 -0
- data/lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/suite_generate_au_ps_using_ips_summary_validation_tests_bundle_generate.rb +20 -0
- data/lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_acquisition.rb +16 -0
- data/lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_validation/suite_retrieve_au_ps_bundle_validation_tests_bundle_validation_bundle_valid.rb +3 -5
- data/lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_validation/suite_retrieve_au_ps_bundle_validation_tests_bundle_validation_bundle_valid_ips.rb +3 -5
- data/lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/retrieve_au_ps_bundle_validation_tests.rb +4 -0
- data/lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/suite_retrieve_au_ps_bundle_validation_tests_bundle_retrieve.rb +21 -0
- data/lib/au_ps_inferno/utils/attester/basic_test_attester_identifier_slices.rb +1 -1
- data/lib/au_ps_inferno/utils/attester/basic_test_attester_resource.rb +3 -2
- data/lib/au_ps_inferno/utils/author/basic_test_author_resource.rb +1 -1
- data/lib/au_ps_inferno/utils/basic_test/bundle_module.rb +2 -2
- data/lib/au_ps_inferno/utils/basic_test/capability_operations_module.rb +6 -3
- data/lib/au_ps_inferno/utils/basic_test/composition_elements_and_slices_module.rb +2 -0
- data/lib/au_ps_inferno/utils/basic_test/composition_section_read_module.rb +3 -3
- data/lib/au_ps_inferno/utils/basic_test/composition_subelements_module.rb +1 -0
- data/lib/au_ps_inferno/utils/basic_test/resolve_resource_type_module.rb +1 -0
- data/lib/au_ps_inferno/utils/basic_test/resource_helpers_module.rb +1 -0
- data/lib/au_ps_inferno/utils/basic_test/section_bundle_validation_module.rb +2 -2
- data/lib/au_ps_inferno/utils/basic_test_class.rb +0 -2
- data/lib/au_ps_inferno/utils/basic_test_contants_module.rb +1 -0
- data/lib/au_ps_inferno/utils/basic_validate_bundle_test.rb +4 -2
- data/lib/au_ps_inferno/utils/bundle_is_valid_class.rb +2 -17
- data/lib/au_ps_inferno/utils/composition_utils.rb +24 -3
- data/lib/au_ps_inferno/utils/custodian/basic_test_custodian_resource.rb +1 -1
- data/lib/au_ps_inferno/utils/custodian/basic_test_custodian_tests.rb +1 -1
- data/lib/au_ps_inferno/utils/{summary_valid_bundle_class.rb → generate_summary_bundle_test_class.rb} +9 -14
- data/lib/au_ps_inferno/utils/provided_bundle_test_class.rb +32 -0
- data/lib/au_ps_inferno/utils/retrieve_bundle_test_class.rb +26 -18
- data/lib/au_ps_inferno/utils/subject/basic_test_subject_resource.rb +1 -1
- data/lib/au_ps_inferno/version.rb +1 -1
- metadata +11 -5
- data/lib/au_ps_inferno/utils/basic_test/scratch_bundle_entries_module.rb +0 -30
- data/lib/au_ps_inferno/utils/ips_retrieve_bundle_test_class.rb +0 -17
- data/lib/au_ps_inferno/utils/ips_summary_valid_bundle_class.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6316b514f80af300008b937f2c8f54637ffacb32af34a7633409084efd0252b8
|
|
4
|
+
data.tar.gz: ca3b0bf435ec0dca9a8e82c7df58e060eae051ccb62c7bcddc049441543b51e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7398b7cc5249a0dc1058452620cc5cf4639ec424513ce8ee7ccdb16ce069e5795390e8e9c54cd083f702008490054532bf6ab7080ad1452124f2adb16c25b448
|
|
7
|
+
data.tar.gz: '026914eaed1aaedb89cedd566d42c71eb38aa5f24861d4527830c35c4ae07be8f68151b65a9978067f555f05fe4441b58cdf9f87cc301ae169dac5b3e22a6b8a'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative 'bundle_acquisition'
|
|
4
|
+
|
|
3
5
|
require_relative 'bundle_validation'
|
|
4
6
|
|
|
5
7
|
require_relative 'au_ps_bundle_must_support_conformance'
|
|
@@ -31,6 +33,8 @@ module AUPSTestKit
|
|
|
31
33
|
|
|
32
34
|
run_as_group
|
|
33
35
|
|
|
36
|
+
group from: :suite_au_ps_bundle_instance_bundle_acquisition
|
|
37
|
+
|
|
34
38
|
group from: :suite_au_ps_bundle_instance_bundle_validation
|
|
35
39
|
|
|
36
40
|
group from: :suite_au_ps_bundle_instance_au_ps_bundle_must_support_conformance
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'suite_au_ps_bundle_instance_bundle_provide'
|
|
4
|
+
|
|
5
|
+
module AUPSTestKit
|
|
6
|
+
# Automatically generated primitive group for Provide AU PS Bundle
|
|
7
|
+
class AUPSSuiteAuPsBundleInstanceBundleAcquisition < Inferno::TestGroup
|
|
8
|
+
title 'Provide AU PS Bundle'
|
|
9
|
+
description 'Loads the Bundle resource pasted as text and stores it for the validation tests in this group.'
|
|
10
|
+
id :suite_au_ps_bundle_instance_bundle_acquisition
|
|
11
|
+
|
|
12
|
+
run_as_group
|
|
13
|
+
|
|
14
|
+
test from: :suite_au_ps_bundle_instance_bundle_provide
|
|
15
|
+
end
|
|
16
|
+
end
|
data/lib/au_ps_inferno/suite/au_ps_bundle_instance/suite_au_ps_bundle_instance_bundle_provide.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative '../../utils/basic_test_class'
|
|
4
|
+
require_relative '../../utils/metadata_manager'
|
|
5
|
+
|
|
6
|
+
require_relative '../../utils/provided_bundle_test_class'
|
|
7
|
+
|
|
8
|
+
module AUPSTestKit
|
|
9
|
+
# Automatically generated primitive test for Bundle instance is parsable
|
|
10
|
+
class AUPSSuiteAuPsBundleInstanceBundleValidationLoadTheProvidedAuPsBundle < ProvidedBundleTestClass
|
|
11
|
+
title 'Bundle instance is parsable'
|
|
12
|
+
description 'The provided text can be parsed as a FHIR resource (JSON or XML) and its resourceType is ' \
|
|
13
|
+
'Bundle. The parsed Bundle is stored for the validation tests in this group; conformance to the ' \
|
|
14
|
+
'AU PS Bundle profile is tested separately under Bundle Validation.'
|
|
15
|
+
id :suite_au_ps_bundle_instance_bundle_provide
|
|
16
|
+
|
|
17
|
+
def metadata_manager
|
|
18
|
+
@metadata_manager ||= MetadataManager.new(File.expand_path('../../metadata.yaml', __dir__))
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -10,7 +10,7 @@ module AUPSTestKit
|
|
|
10
10
|
id :au_ps_cs_is_valid_100preview
|
|
11
11
|
|
|
12
12
|
run do
|
|
13
|
-
|
|
13
|
+
omit_if url.blank?, NO_SERVER_URL_OMIT_MESSAGE
|
|
14
14
|
fhir_get_capability_statement
|
|
15
15
|
scratch[:capability_statement] = resource
|
|
16
16
|
info "Capability Statement saved to scratch: #{scratch[:capability_statement]}"
|
|
@@ -23,7 +23,8 @@ module AUPSTestKit
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
run do
|
|
26
|
-
|
|
26
|
+
omit_if url.blank?, NO_SERVER_URL_OMIT_MESSAGE
|
|
27
|
+
skip_if scratch[:capability_statement].blank?, 'CapabilityStatement was not retrieved from the server'
|
|
27
28
|
check_profiles_status(
|
|
28
29
|
{ 'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-allergyintolerance' => 'AUPSAllergyIntolerance',
|
|
29
30
|
'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-bundle' => 'AUPSBundle', 'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-composition' => 'AUPSComposition', 'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-condition' => 'AUPSCondition', 'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-medicationrequest' => 'AUPSMedicationRequest', 'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-medicationstatement' => 'AUPSMedicationStatement', 'http://hl7.org.au/fhir/ps/StructureDefinition/au-ps-patient' => 'AUPSPatient' },
|
data/lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_supports_ips_recommended_ops.rb
CHANGED
|
@@ -10,7 +10,7 @@ module AUPSTestKit
|
|
|
10
10
|
id :au_ps_cs_supports_ips_recommended_ops_100preview
|
|
11
11
|
|
|
12
12
|
run do
|
|
13
|
-
|
|
13
|
+
omit_if url.blank?, NO_SERVER_URL_OMIT_MESSAGE
|
|
14
14
|
summary_op_defined?
|
|
15
15
|
operation_defined?(operations, 'http://hl7.org/fhir/uv/ipa/OperationDefinition/docref', %w[docref],
|
|
16
16
|
:docref_op_defined)
|
data/lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_acquisition.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'suite_generate_au_ps_using_ips_summary_validation_tests_bundle_generate'
|
|
4
|
+
|
|
5
|
+
module AUPSTestKit
|
|
6
|
+
# Automatically generated primitive group for Generate AU PS Bundle using $summary
|
|
7
|
+
class AUPSSuiteGenerateAuPsUsingIpsSummaryValidationTestsBundleAcquisition < Inferno::TestGroup
|
|
8
|
+
title 'Generate AU PS Bundle using $summary'
|
|
9
|
+
description 'Invokes the IPS $summary operation on the FHIR server and stores the returned Bundle for the validation tests in this group.'
|
|
10
|
+
id :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_acquisition
|
|
11
|
+
|
|
12
|
+
run_as_group
|
|
13
|
+
|
|
14
|
+
test from: :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_generate
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
require_relative '../../../utils/basic_test_class'
|
|
4
4
|
require_relative '../../../utils/metadata_manager'
|
|
5
5
|
|
|
6
|
-
require_relative '../../../utils/
|
|
7
|
-
|
|
8
|
-
require_relative '../../../utils/ips_summary_valid_bundle_class'
|
|
6
|
+
require_relative '../../../utils/bundle_is_valid_class'
|
|
9
7
|
|
|
10
8
|
module AUPSTestKit
|
|
11
9
|
# Automatically generated primitive test for Generated Bundle is valid against AU PS Bundle profile
|
|
12
|
-
class AUPSSuiteGenerateAuPsUsingIpsSummaryValidationTestsBundleValidationGeneratedBundleIsValidAgainstAuPsBundleProfile <
|
|
10
|
+
class AUPSSuiteGenerateAuPsUsingIpsSummaryValidationTestsBundleValidationGeneratedBundleIsValidAgainstAuPsBundleProfile < BundleIsValidClass
|
|
13
11
|
title 'Generated Bundle is valid against AU PS Bundle profile'
|
|
14
12
|
description 'Verifies that a bundle produced by the IPS $summary operation conforms to the AU PS Bundle profile.'
|
|
15
13
|
id :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation_bundle_valid
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
require_relative '../../../utils/basic_test_class'
|
|
4
4
|
require_relative '../../../utils/metadata_manager'
|
|
5
5
|
|
|
6
|
-
require_relative '../../../utils/
|
|
7
|
-
|
|
8
|
-
require_relative '../../../utils/ips_summary_valid_bundle_class'
|
|
6
|
+
require_relative '../../../utils/ips_bundle_is_valid_class'
|
|
9
7
|
|
|
10
8
|
module AUPSTestKit
|
|
11
9
|
# Automatically generated primitive test for Generated Bundle is valid against IPS Bundle profile
|
|
12
|
-
class AUPSSuiteGenerateAuPsUsingIpsSummaryValidationTestsBundleValidationGeneratedBundleIsValidAgainstIpsBundleProfile <
|
|
10
|
+
class AUPSSuiteGenerateAuPsUsingIpsSummaryValidationTestsBundleValidationGeneratedBundleIsValidAgainstIpsBundleProfile < IpsBundleIsValidClass
|
|
13
11
|
title 'Generated Bundle is valid against IPS Bundle profile'
|
|
14
12
|
description 'Verifies that a bundle produced by the IPS $summary operation conforms to the IPS Bundle profile.'
|
|
15
13
|
id :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation_bundle_valid_ips
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative 'bundle_acquisition'
|
|
4
|
+
|
|
3
5
|
require_relative 'bundle_validation'
|
|
4
6
|
|
|
5
7
|
require_relative 'au_ps_bundle_must_support_conformance'
|
|
@@ -31,6 +33,8 @@ module AUPSTestKit
|
|
|
31
33
|
|
|
32
34
|
run_as_group
|
|
33
35
|
|
|
36
|
+
group from: :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_acquisition
|
|
37
|
+
|
|
34
38
|
group from: :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation
|
|
35
39
|
|
|
36
40
|
group from: :suite_generate_au_ps_using_ips_summary_validation_tests_au_ps_bundle_must_support_conformance
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative '../../utils/basic_test_class'
|
|
4
|
+
require_relative '../../utils/metadata_manager'
|
|
5
|
+
|
|
6
|
+
require_relative '../../utils/generate_summary_bundle_test_class'
|
|
7
|
+
|
|
8
|
+
module AUPSTestKit
|
|
9
|
+
# Automatically generated primitive test for Patient summary Bundle is generated by the IPS $summary operation
|
|
10
|
+
class AUPSSuiteGenerateAuPsUsingIpsSummaryValidationTestsBundleValidationGenerateAuPsBundleUsingTheIpsSummaryOperation < GenerateSummaryBundleTestClass
|
|
11
|
+
title 'Patient summary Bundle is generated by the IPS $summary operation'
|
|
12
|
+
description 'The IPS $summary operation returns HTTP 200 with a Bundle. The generated Bundle is stored for ' \
|
|
13
|
+
'the validation tests in this group.'
|
|
14
|
+
id :suite_generate_au_ps_using_ips_summary_validation_tests_bundle_generate
|
|
15
|
+
|
|
16
|
+
def metadata_manager
|
|
17
|
+
@metadata_manager ||= MetadataManager.new(File.expand_path('../../metadata.yaml', __dir__))
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'suite_retrieve_au_ps_bundle_validation_tests_bundle_retrieve'
|
|
4
|
+
|
|
5
|
+
module AUPSTestKit
|
|
6
|
+
# Automatically generated primitive group for Retrieve AU PS Bundle
|
|
7
|
+
class AUPSSuiteRetrieveAuPsBundleValidationTestsBundleAcquisition < Inferno::TestGroup
|
|
8
|
+
title 'Retrieve AU PS Bundle'
|
|
9
|
+
description 'Retrieves the document Bundle using a Bundle read interaction or a direct HTTP GET request and stores it for the validation tests in this group.'
|
|
10
|
+
id :suite_retrieve_au_ps_bundle_validation_tests_bundle_acquisition
|
|
11
|
+
|
|
12
|
+
run_as_group
|
|
13
|
+
|
|
14
|
+
test from: :suite_retrieve_au_ps_bundle_validation_tests_bundle_retrieve
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
require_relative '../../../utils/basic_test_class'
|
|
4
4
|
require_relative '../../../utils/metadata_manager'
|
|
5
5
|
|
|
6
|
-
require_relative '../../../utils/
|
|
7
|
-
|
|
8
|
-
require_relative '../../../utils/ips_retrieve_bundle_test_class'
|
|
6
|
+
require_relative '../../../utils/bundle_is_valid_class'
|
|
9
7
|
|
|
10
8
|
module AUPSTestKit
|
|
11
9
|
# Automatically generated primitive test for Retrieved Bundle is valid against AU PS Bundle profile
|
|
12
|
-
class AUPSSuiteRetrieveAuPsBundleValidationTestsBundleValidationRetrievedBundleIsValidAgainstAuPsBundleProfile <
|
|
10
|
+
class AUPSSuiteRetrieveAuPsBundleValidationTestsBundleValidationRetrievedBundleIsValidAgainstAuPsBundleProfile < BundleIsValidClass
|
|
13
11
|
title 'Retrieved Bundle is valid against AU PS Bundle profile'
|
|
14
|
-
description 'Verifies that
|
|
12
|
+
description 'Verifies that the bundle retrieved from the server conforms to the AU PS Bundle profile.'
|
|
15
13
|
id :suite_retrieve_au_ps_bundle_validation_tests_bundle_validation_bundle_valid
|
|
16
14
|
|
|
17
15
|
def metadata_manager
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
require_relative '../../../utils/basic_test_class'
|
|
4
4
|
require_relative '../../../utils/metadata_manager'
|
|
5
5
|
|
|
6
|
-
require_relative '../../../utils/
|
|
7
|
-
|
|
8
|
-
require_relative '../../../utils/ips_retrieve_bundle_test_class'
|
|
6
|
+
require_relative '../../../utils/ips_bundle_is_valid_class'
|
|
9
7
|
|
|
10
8
|
module AUPSTestKit
|
|
11
9
|
# Automatically generated primitive test for Retrieved Bundle is valid against IPS Bundle profile
|
|
12
|
-
class AUPSSuiteRetrieveAuPsBundleValidationTestsBundleValidationRetrievedBundleIsValidAgainstIpsBundleProfile <
|
|
10
|
+
class AUPSSuiteRetrieveAuPsBundleValidationTestsBundleValidationRetrievedBundleIsValidAgainstIpsBundleProfile < IpsBundleIsValidClass
|
|
13
11
|
title 'Retrieved Bundle is valid against IPS Bundle profile'
|
|
14
|
-
description 'Verifies that
|
|
12
|
+
description 'Verifies that the bundle retrieved from the server conforms to the IPS Bundle profile.'
|
|
15
13
|
id :suite_retrieve_au_ps_bundle_validation_tests_bundle_validation_bundle_valid_ips
|
|
16
14
|
|
|
17
15
|
def metadata_manager
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require_relative 'bundle_acquisition'
|
|
4
|
+
|
|
3
5
|
require_relative 'bundle_validation'
|
|
4
6
|
|
|
5
7
|
require_relative 'au_ps_bundle_must_support_conformance'
|
|
@@ -31,6 +33,8 @@ module AUPSTestKit
|
|
|
31
33
|
|
|
32
34
|
run_as_group
|
|
33
35
|
|
|
36
|
+
group from: :suite_retrieve_au_ps_bundle_validation_tests_bundle_acquisition
|
|
37
|
+
|
|
34
38
|
group from: :suite_retrieve_au_ps_bundle_validation_tests_bundle_validation
|
|
35
39
|
|
|
36
40
|
group from: :suite_retrieve_au_ps_bundle_validation_tests_au_ps_bundle_must_support_conformance
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative '../../utils/basic_test_class'
|
|
4
|
+
require_relative '../../utils/metadata_manager'
|
|
5
|
+
|
|
6
|
+
require_relative '../../utils/retrieve_bundle_test_class'
|
|
7
|
+
|
|
8
|
+
module AUPSTestKit
|
|
9
|
+
# Automatically generated primitive test for Bundle is retrievable from the FHIR server
|
|
10
|
+
class AUPSSuiteRetrieveAuPsBundleValidationTestsBundleValidationRetrieveAuPsBundleFromTheFhirServer < RetrieveBundleTestClass
|
|
11
|
+
title 'Bundle is retrievable from the FHIR server'
|
|
12
|
+
description 'A Bundle can be retrieved via a Bundle read interaction (FHIR server URL and Bundle ID) or a ' \
|
|
13
|
+
'direct HTTP GET of the Bundle URL, returning HTTP 200 with a parsable FHIR Bundle. The ' \
|
|
14
|
+
'retrieved Bundle is stored for the validation tests in this group.'
|
|
15
|
+
id :suite_retrieve_au_ps_bundle_validation_tests_bundle_retrieve
|
|
16
|
+
|
|
17
|
+
def metadata_manager
|
|
18
|
+
@metadata_manager ||= MetadataManager.new(File.expand_path('../../metadata.yaml', __dir__))
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -19,7 +19,7 @@ module AUPSTestKit
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def test_composition_attester_party_ms_identifier_slices
|
|
22
|
-
|
|
22
|
+
omit_unless_bundle_in_scratch
|
|
23
23
|
resource = attester_party_resource
|
|
24
24
|
skip_if resource.blank?, 'Attester or attester.party is not populated'
|
|
25
25
|
|
|
@@ -8,10 +8,11 @@ module AUPSTestKit
|
|
|
8
8
|
def attester_party_resource
|
|
9
9
|
return nil unless scratch_bundle.present?
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
bundle_resource = BundleDecorator.new(scratch_bundle)
|
|
12
|
+
ref_str = attester_party_ref_from_bundle(bundle_resource)
|
|
12
13
|
return nil if ref_str.blank?
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
bundle_resource.resource_by_reference(ref_str)
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
private
|
|
@@ -18,7 +18,7 @@ module AUPSTestKit
|
|
|
18
18
|
ref_str = author_ref.respond_to?(:reference) ? author_ref.reference : author_ref['reference']
|
|
19
19
|
return nil if ref_str.blank?
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
bundle_resource.resource_by_reference(ref_str)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
private
|
|
@@ -6,7 +6,7 @@ module AUPSTestKit
|
|
|
6
6
|
# Bundle-level checks, mandatory MS list info, and IPS bundle profile validation.
|
|
7
7
|
module BasicTestBundleModule
|
|
8
8
|
def bundle_mandatory_ms_elements_info
|
|
9
|
-
|
|
9
|
+
omit_unless_bundle_in_scratch
|
|
10
10
|
passed = [identifier_info?, type_info?, timestamp_info?, all_entries_have_full_url_info?].all?
|
|
11
11
|
message_type = passed ? 'info' : 'error'
|
|
12
12
|
add_message(message_type,
|
|
@@ -39,7 +39,7 @@ module AUPSTestKit
|
|
|
39
39
|
private
|
|
40
40
|
|
|
41
41
|
def validate_bundle_wrapper(profile_with_version)
|
|
42
|
-
|
|
42
|
+
omit_unless_bundle_in_scratch
|
|
43
43
|
validate_bundle(
|
|
44
44
|
scratch_bundle,
|
|
45
45
|
profile_with_version
|
|
@@ -8,9 +8,12 @@ module AUPSTestKit
|
|
|
8
8
|
operation.definition == op_def_url || names_arr.include?(operation.name.downcase)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if operation_defined
|
|
12
|
+
info "Server CapabilityStatement declares support for operation #{op_def_url}: ✅ Declared"
|
|
13
|
+
else
|
|
14
|
+
info "Server CapabilityStatement does not declare support for operation #{op_def_url}. " \
|
|
15
|
+
'This operation is not required by AU PS; this message is informational only.'
|
|
16
|
+
end
|
|
14
17
|
|
|
15
18
|
scratch[scratch_key] = operation_defined
|
|
16
19
|
end
|
|
@@ -6,6 +6,7 @@ module AUPSTestKit
|
|
|
6
6
|
private
|
|
7
7
|
|
|
8
8
|
def validate_populated_elements_in_composition(elements_array, required: true)
|
|
9
|
+
omit_unless_bundle_in_scratch
|
|
9
10
|
composition_resource = composition_resource_from_scratch
|
|
10
11
|
return false unless composition_resource.present?
|
|
11
12
|
|
|
@@ -31,6 +32,7 @@ module AUPSTestKit
|
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
def validate_populated_slices_in_composition(slices_array)
|
|
35
|
+
omit_unless_bundle_in_scratch
|
|
34
36
|
return false unless scratch_bundle.present?
|
|
35
37
|
|
|
36
38
|
composition_resource = BundleDecorator.new(scratch_bundle).composition_resource
|
|
@@ -18,18 +18,18 @@ module AUPSTestKit
|
|
|
18
18
|
private
|
|
19
19
|
|
|
20
20
|
def test_composition_mandatory_sections
|
|
21
|
-
|
|
21
|
+
omit_unless_bundle_in_scratch
|
|
22
22
|
test_composition_sections_data(sections_codes: MANDATORY_SECTIONS_CODES, bundle_data: scratch_bundle,
|
|
23
23
|
mandatory: true)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def test_composition_recommended_sections
|
|
27
|
-
|
|
27
|
+
omit_unless_bundle_in_scratch
|
|
28
28
|
test_composition_sections_data(sections_codes: RECOMMENDED_SECTIONS_CODES, bundle_data: scratch_bundle)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def test_composition_optional_sections
|
|
32
|
-
|
|
32
|
+
omit_unless_bundle_in_scratch
|
|
33
33
|
test_composition_sections_data(sections_codes: OPTIONAL_SECTIONS_CODES, bundle_data: scratch_bundle)
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -4,6 +4,7 @@ module AUPSTestKit
|
|
|
4
4
|
# Resolves the resource type from a resource. This module is used in tests for subject, author, custodian, attester.
|
|
5
5
|
module BasicTestResolveResourceTypeModule
|
|
6
6
|
def test_resource_type_is_valid?(container_type)
|
|
7
|
+
omit_unless_bundle_in_scratch
|
|
7
8
|
result = raw_resource_type_is_valid(container_type)
|
|
8
9
|
valid = result[:valid?]
|
|
9
10
|
result_msg = result[:msg]
|
|
@@ -116,6 +116,7 @@ module AUPSTestKit
|
|
|
116
116
|
end
|
|
117
117
|
|
|
118
118
|
def guard_populated_resource(container_type)
|
|
119
|
+
omit_unless_bundle_in_scratch
|
|
119
120
|
resource_is_poluated = raw_resource_type_is_valid(container_type)
|
|
120
121
|
skip_if !resource_is_poluated[:valid?], resource_is_poluated[:msg]
|
|
121
122
|
end
|
|
@@ -6,7 +6,7 @@ module AUPSTestKit
|
|
|
6
6
|
private
|
|
7
7
|
|
|
8
8
|
def validate_populated_undefined_sections_in_bundle(sections_code_to_filter, elements_array)
|
|
9
|
-
|
|
9
|
+
omit_unless_bundle_in_scratch
|
|
10
10
|
|
|
11
11
|
bundle_resource = BundleDecorator.new(scratch_bundle)
|
|
12
12
|
sections_to_validate = bundle_resource.composition_resource.section_codes.filter do |section_code|
|
|
@@ -18,7 +18,7 @@ module AUPSTestKit
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def validate_populated_sections_in_bundle(section_codes_array, elements_array, optional: false)
|
|
21
|
-
|
|
21
|
+
omit_unless_bundle_in_scratch
|
|
22
22
|
skip_if section_codes_array.blank?, 'No sections to validate'
|
|
23
23
|
|
|
24
24
|
composition = BundleDecorator.new(scratch_bundle).composition_resource
|
|
@@ -20,7 +20,6 @@ require_relative 'basic_test/ms_identifier_slices_module'
|
|
|
20
20
|
require_relative 'basic_test/composition_elements_and_slices_module'
|
|
21
21
|
require_relative 'basic_test/section_bundle_validation_module'
|
|
22
22
|
require_relative 'basic_test/resolve_path_debug_module'
|
|
23
|
-
require_relative 'basic_test/scratch_bundle_entries_module'
|
|
24
23
|
require_relative 'basic_test/ms_elements_populated_module'
|
|
25
24
|
require_relative 'basic_test/ms_sub_elements_populated_module'
|
|
26
25
|
require_relative 'basic_test/resolve_resource_type_module'
|
|
@@ -48,7 +47,6 @@ module AUPSTestKit
|
|
|
48
47
|
include BasicTestCompositionElementsAndSlicesModule
|
|
49
48
|
include BasicTestSectionBundleValidationModule
|
|
50
49
|
include BasicTestResolvePathDebugModule
|
|
51
|
-
include BasicTestScratchBundleEntriesModule
|
|
52
50
|
include BasicTestMsElementsPopulatedModule
|
|
53
51
|
include BasicTestMsSubElementsPopulatedModule
|
|
54
52
|
include BasicTestResolveResourceTypeModule
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module AUPSTestKit
|
|
4
4
|
module BasicTestConstants
|
|
5
|
+
NO_SERVER_URL_OMIT_MESSAGE = 'No FHIR server URL was provided, so this test group is omitted.'
|
|
5
6
|
# AU PS Patient Must Support identifier slices (optional). System URLs for IHI, DVA, Medicare.
|
|
6
7
|
PATIENT_MS_IDENTIFIER_SLICES = [
|
|
7
8
|
{ name: 'IHI', system: 'http://ns.electronichealth.net.au/id/hi/ihi/1.0' },
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
module AUPSTestKit
|
|
4
4
|
# Basic test for validating a Bundle resource against the AU PS Bundle or IPS Bundle profile
|
|
5
5
|
class BasicValidateBundleTest < BasicTest
|
|
6
|
-
OMIT_AU_PS_MESSAGE = 'Validation against AU PS Bundle is disabled'
|
|
7
|
-
|
|
6
|
+
OMIT_AU_PS_MESSAGE = 'Validation against the AU PS Bundle profile is disabled because "AU PS Bundle ' \
|
|
7
|
+
'Validation" is not selected in the "Validate Against" input.'
|
|
8
|
+
OMIT_IPS_MESSAGE = 'Validation against the IPS Bundle profile is disabled because "IPS Bundle ' \
|
|
9
|
+
'Validation" is not selected in the "Validate Against" input.'
|
|
8
10
|
|
|
9
11
|
id :basic_validate_bundle_test
|
|
10
12
|
|
|
@@ -3,27 +3,12 @@
|
|
|
3
3
|
require_relative 'basic_validate_bundle_test'
|
|
4
4
|
|
|
5
5
|
module AUPSTestKit
|
|
6
|
-
# The Bundle
|
|
6
|
+
# The Bundle loaded by this test group is valid against the AU PS Bundle profile
|
|
7
7
|
class BundleIsValidClass < BasicValidateBundleTest
|
|
8
8
|
id :bundle_is_valid_class_test
|
|
9
|
-
input :bundle_resource,
|
|
10
|
-
optional: true,
|
|
11
|
-
description: 'If you want to check existing Bundle resource',
|
|
12
|
-
type: 'textarea'
|
|
13
|
-
|
|
14
|
-
def skip_test?
|
|
15
|
-
bundle_resource.blank?
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def read_and_save_data
|
|
19
|
-
resource = FHIR.from_contents(bundle_resource)
|
|
20
|
-
scratch[:bundle_ips_resource] = resource
|
|
21
|
-
save_bundle_entities_to_scratch(scratch_bundle)
|
|
22
|
-
end
|
|
23
9
|
|
|
24
10
|
run do
|
|
25
|
-
|
|
26
|
-
read_and_save_data
|
|
11
|
+
omit_unless_bundle_in_scratch
|
|
27
12
|
omit_if omit_au_ps_validation?, OMIT_AU_PS_MESSAGE
|
|
28
13
|
validate_au_ps_bundle
|
|
29
14
|
end
|
|
@@ -7,12 +7,33 @@ require_relative 'composition_utils/boolean_and_stats'
|
|
|
7
7
|
module CompositionUtils
|
|
8
8
|
include CompositionUtilsBooleanAndStats
|
|
9
9
|
|
|
10
|
+
NO_BUNDLE_OMIT_MESSAGE = 'No AU PS Bundle was loaded by this test group (its inputs were not provided or ' \
|
|
11
|
+
'the Bundle could not be acquired), so this test is omitted.'
|
|
12
|
+
|
|
13
|
+
# Each top-level group keeps its Bundle under its own scratch key so that a
|
|
14
|
+
# group can never validate a Bundle acquired by a different group.
|
|
15
|
+
BUNDLE_SOURCE_GROUPS = {
|
|
16
|
+
'retrieve_au_ps_bundle_validation_tests' => 'retrieve',
|
|
17
|
+
'generate_au_ps_using_ips_summary_validation_tests' => 'summary',
|
|
18
|
+
'au_ps_bundle_instance' => 'instance'
|
|
19
|
+
}.freeze
|
|
20
|
+
|
|
21
|
+
def bundle_scratch_key
|
|
22
|
+
id_str = self.class.id.to_s
|
|
23
|
+
_slug, source = BUNDLE_SOURCE_GROUPS.find { |slug, _| id_str.include?(slug) }
|
|
24
|
+
source ? :"bundle_ips_resource_#{source}" : :bundle_ips_resource
|
|
25
|
+
end
|
|
26
|
+
|
|
10
27
|
def scratch_bundle
|
|
11
|
-
scratch[
|
|
28
|
+
scratch[bundle_scratch_key]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def save_bundle_to_scratch(bundle)
|
|
32
|
+
scratch[bundle_scratch_key] = bundle
|
|
12
33
|
end
|
|
13
34
|
|
|
14
|
-
def
|
|
15
|
-
|
|
35
|
+
def omit_unless_bundle_in_scratch
|
|
36
|
+
omit_if scratch_bundle.blank?, NO_BUNDLE_OMIT_MESSAGE
|
|
16
37
|
end
|
|
17
38
|
|
|
18
39
|
def group_section_output(section_info_array)
|
|
@@ -18,7 +18,7 @@ module AUPSTestKit
|
|
|
18
18
|
ref_str = custodian_ref.respond_to?(:reference) ? custodian_ref.reference : custodian_ref['reference']
|
|
19
19
|
return nil if ref_str.blank?
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
bundle_resource.resource_by_reference(ref_str)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
private
|
|
@@ -8,7 +8,7 @@ module AUPSTestKit
|
|
|
8
8
|
include BasicTestConstants
|
|
9
9
|
|
|
10
10
|
def test_composition_custodian_ms_identifier_slices
|
|
11
|
-
|
|
11
|
+
omit_unless_bundle_in_scratch
|
|
12
12
|
resource = custodian_resource
|
|
13
13
|
skip_if resource.blank?, 'Custodian is not populated'
|
|
14
14
|
|
data/lib/au_ps_inferno/utils/{summary_valid_bundle_class.rb → generate_summary_bundle_test_class.rb}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require 'uri'
|
|
5
|
-
|
|
6
|
-
require_relative 'basic_validate_bundle_test'
|
|
3
|
+
require_relative 'basic_test_class'
|
|
7
4
|
|
|
8
5
|
module AUPSTestKit
|
|
9
|
-
#
|
|
10
|
-
class
|
|
11
|
-
id :
|
|
6
|
+
# Generates a Bundle via the IPS $summary operation into the group's scratch space
|
|
7
|
+
class GenerateSummaryBundleTestClass < BasicTest
|
|
8
|
+
id :generate_summary_bundle_test_class
|
|
12
9
|
input_order :url, :patient_id, :identifier, :profile, :credentials, :header_name, :header_value
|
|
13
10
|
|
|
11
|
+
NO_SUMMARY_INPUTS_MESSAGE = 'No FHIR server URL with patient id or patient identifier was provided, ' \
|
|
12
|
+
'so this test group is omitted.'
|
|
13
|
+
|
|
14
14
|
input :url,
|
|
15
15
|
title: 'FHIR Server Base Url',
|
|
16
16
|
optional: true
|
|
@@ -68,17 +68,12 @@ module AUPSTestKit
|
|
|
68
68
|
assert_response_status(200)
|
|
69
69
|
assert_resource_type(:bundle)
|
|
70
70
|
resource_from_request = FHIR.from_contents(response.response_body)
|
|
71
|
-
|
|
72
|
-
save_bundle_entities_to_scratch(scratch_bundle)
|
|
71
|
+
save_bundle_to_scratch(resource_from_request)
|
|
73
72
|
end
|
|
74
73
|
|
|
75
74
|
run do
|
|
76
|
-
|
|
77
|
-
summary_op_defined? if scratch[:summary_op_defined].blank?
|
|
78
|
-
skip_if scratch[:summary_op_defined] == false, 'Server does not declare support for $summary operation'
|
|
75
|
+
omit_if skip_test?, NO_SUMMARY_INPUTS_MESSAGE
|
|
79
76
|
read_and_save_data
|
|
80
|
-
omit_if omit_au_ps_validation?, OMIT_AU_PS_MESSAGE
|
|
81
|
-
validate_au_ps_bundle
|
|
82
77
|
end
|
|
83
78
|
end
|
|
84
79
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'basic_test_class'
|
|
4
|
+
|
|
5
|
+
module AUPSTestKit
|
|
6
|
+
# Loads a Bundle pasted as text into the group's scratch space
|
|
7
|
+
class ProvidedBundleTestClass < BasicTest
|
|
8
|
+
id :provided_bundle_test_class
|
|
9
|
+
|
|
10
|
+
NO_PROVIDED_BUNDLE_MESSAGE = 'No Bundle resource was provided, so this test group is omitted.'
|
|
11
|
+
|
|
12
|
+
input :bundle_resource,
|
|
13
|
+
optional: true,
|
|
14
|
+
description: 'If you want to check existing Bundle resource',
|
|
15
|
+
type: 'textarea'
|
|
16
|
+
|
|
17
|
+
def parse_bundle_resource
|
|
18
|
+
FHIR.from_contents(bundle_resource)
|
|
19
|
+
rescue StandardError
|
|
20
|
+
nil
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
run do
|
|
24
|
+
omit_if bundle_resource.blank?, NO_PROVIDED_BUNDLE_MESSAGE
|
|
25
|
+
resource = parse_bundle_resource
|
|
26
|
+
assert resource.present?, 'The provided text could not be parsed as a FHIR resource'
|
|
27
|
+
assert resource.resourceType == 'Bundle',
|
|
28
|
+
"The provided resource is a #{resource.resourceType}, expected a Bundle"
|
|
29
|
+
save_bundle_to_scratch(resource)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require 'uri'
|
|
5
|
-
|
|
6
|
-
require_relative 'basic_validate_bundle_test'
|
|
3
|
+
require_relative 'basic_test_class'
|
|
7
4
|
|
|
8
5
|
module AUPSTestKit
|
|
9
|
-
#
|
|
10
|
-
class RetrieveBundleTestClass <
|
|
6
|
+
# Retrieves a Bundle from a FHIR server (or a direct URL) into the group's scratch space
|
|
7
|
+
class RetrieveBundleTestClass < BasicTest
|
|
11
8
|
id :retrieve_bundle_test_class
|
|
12
9
|
input_order :bundle_url, :url, :bundle_id, :credentials, :header_name, :header_value
|
|
13
10
|
|
|
11
|
+
NO_RETRIEVAL_INPUTS_MESSAGE = 'No FHIR server URL with Bundle ID, and no Bundle URL, were provided, ' \
|
|
12
|
+
'so this test group is omitted.'
|
|
13
|
+
|
|
14
14
|
input :bundle_id,
|
|
15
15
|
optional: true,
|
|
16
16
|
description: 'To request Bundle/{bundle_id}'
|
|
@@ -46,17 +46,27 @@ module AUPSTestKit
|
|
|
46
46
|
fhir_read(:bundle, bundle_id)
|
|
47
47
|
assert_response_status(200)
|
|
48
48
|
assert_resource_type(:bundle)
|
|
49
|
-
|
|
49
|
+
save_bundle_to_scratch(resource)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def get_bundle_resource_from_url(bundle_url)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
bundle_resource
|
|
57
|
-
assert bundle_resource.resourceType == 'Bundle',
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
get(bundle_url, headers: extra_headers)
|
|
54
|
+
assert_response_status(200)
|
|
55
|
+
bundle_resource = parse_bundle(request.response_body)
|
|
56
|
+
assert bundle_resource.present?, "The response from #{bundle_url} could not be parsed as a FHIR resource"
|
|
57
|
+
assert bundle_resource.resourceType == 'Bundle',
|
|
58
|
+
"The resource at #{bundle_url} is a #{bundle_resource.resourceType}, expected a Bundle"
|
|
59
|
+
save_bundle_to_scratch(bundle_resource)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def extra_headers
|
|
63
|
+
header_name.present? && header_value.present? ? { header_name => header_value } : {}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def parse_bundle(body)
|
|
67
|
+
FHIR.from_contents(body)
|
|
68
|
+
rescue StandardError
|
|
69
|
+
nil
|
|
60
70
|
end
|
|
61
71
|
|
|
62
72
|
def skip_test?
|
|
@@ -65,17 +75,15 @@ module AUPSTestKit
|
|
|
65
75
|
|
|
66
76
|
def read_and_save_data
|
|
67
77
|
if url.present? && bundle_id.present?
|
|
68
|
-
get_bundle_resource_from_fhir_server(bundle_id)
|
|
78
|
+
get_bundle_resource_from_fhir_server(bundle_id)
|
|
69
79
|
elsif bundle_url.present?
|
|
70
80
|
get_bundle_resource_from_url(bundle_url)
|
|
71
81
|
end
|
|
72
82
|
end
|
|
73
83
|
|
|
74
84
|
run do
|
|
75
|
-
|
|
85
|
+
omit_if skip_test?, NO_RETRIEVAL_INPUTS_MESSAGE
|
|
76
86
|
read_and_save_data
|
|
77
|
-
omit_if omit_au_ps_validation?, OMIT_AU_PS_MESSAGE
|
|
78
|
-
validate_au_ps_bundle
|
|
79
87
|
end
|
|
80
88
|
end
|
|
81
89
|
end
|
metadata
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: au_ps_inferno
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ilya Beda
|
|
8
8
|
- Pavel Rozhkov
|
|
9
|
+
- Kyle Pettigrew
|
|
9
10
|
autorequire:
|
|
10
11
|
bindir: bin
|
|
11
12
|
cert_chain: []
|
|
@@ -85,6 +86,7 @@ description: AU PS Inferno Test Kit
|
|
|
85
86
|
email:
|
|
86
87
|
- ilya@beda.software
|
|
87
88
|
- pavel.r@beda.software
|
|
89
|
+
- kyle.pettigrew@csiro.au
|
|
88
90
|
executables: []
|
|
89
91
|
extensions: []
|
|
90
92
|
extra_rdoc_files: []
|
|
@@ -136,9 +138,11 @@ files:
|
|
|
136
138
|
- lib/au_ps_inferno/suite/au_ps_bundle_instance/au_ps_composition_subject/suite_au_ps_bundle_instance_au_ps_composition_subject_subject_resource_type_is_valid.rb
|
|
137
139
|
- lib/au_ps_inferno/suite/au_ps_bundle_instance/au_ps_composition_undefined_sections.rb
|
|
138
140
|
- lib/au_ps_inferno/suite/au_ps_bundle_instance/au_ps_composition_undefined_sections/suite_au_ps_bundle_instance_au_ps_composition_undefined_sections_sections_may_undefined.rb
|
|
141
|
+
- lib/au_ps_inferno/suite/au_ps_bundle_instance/bundle_acquisition.rb
|
|
139
142
|
- lib/au_ps_inferno/suite/au_ps_bundle_instance/bundle_validation.rb
|
|
140
143
|
- lib/au_ps_inferno/suite/au_ps_bundle_instance/bundle_validation/suite_au_ps_bundle_instance_bundle_validation_bundle_valid.rb
|
|
141
144
|
- lib/au_ps_inferno/suite/au_ps_bundle_instance/bundle_validation/suite_au_ps_bundle_instance_bundle_validation_bundle_valid_ips.rb
|
|
145
|
+
- lib/au_ps_inferno/suite/au_ps_bundle_instance/suite_au_ps_bundle_instance_bundle_provide.rb
|
|
142
146
|
- lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_is_valid_test.rb
|
|
143
147
|
- lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_supports_au_ps_profiles.rb
|
|
144
148
|
- lib/au_ps_inferno/suite/au_ps_retrieve_cs_group/au_ps_cs_supports_ips_recommended_ops.rb
|
|
@@ -180,10 +184,12 @@ files:
|
|
|
180
184
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/au_ps_composition_subject/composition_subject_subject_resource_type_is_valid.rb
|
|
181
185
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/au_ps_composition_undefined_sections.rb
|
|
182
186
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/au_ps_composition_undefined_sections/composition_undefined_sections_sections_may_undefined.rb
|
|
187
|
+
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_acquisition.rb
|
|
183
188
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_validation.rb
|
|
184
189
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_validation/suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation_bundle_valid.rb
|
|
185
190
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/bundle_validation/suite_generate_au_ps_using_ips_summary_validation_tests_bundle_validation_bundle_valid_ips.rb
|
|
186
191
|
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/generate_au_ps_using_ips_summary_validation_tests.rb
|
|
192
|
+
- lib/au_ps_inferno/suite/generate_au_ps_using_ips_summary_validation_tests/suite_generate_au_ps_using_ips_summary_validation_tests_bundle_generate.rb
|
|
187
193
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/au_ps_bundle_must_support_conformance.rb
|
|
188
194
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/au_ps_bundle_must_support_conformance/bundle_must_support_conformance_bundle_must_support_populated.rb
|
|
189
195
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/au_ps_composition_attester.rb
|
|
@@ -220,10 +226,12 @@ files:
|
|
|
220
226
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/au_ps_composition_subject/suite_retrieve_au_ps_bundle_validation_tests_au_ps_composition_subject_subject_ms_elements.rb
|
|
221
227
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/au_ps_composition_undefined_sections.rb
|
|
222
228
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/au_ps_composition_undefined_sections/composition_undefined_sections_sections_may_undefined.rb
|
|
229
|
+
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_acquisition.rb
|
|
223
230
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_validation.rb
|
|
224
231
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_validation/suite_retrieve_au_ps_bundle_validation_tests_bundle_validation_bundle_valid.rb
|
|
225
232
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/bundle_validation/suite_retrieve_au_ps_bundle_validation_tests_bundle_validation_bundle_valid_ips.rb
|
|
226
233
|
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/retrieve_au_ps_bundle_validation_tests.rb
|
|
234
|
+
- lib/au_ps_inferno/suite/retrieve_au_ps_bundle_validation_tests/suite_retrieve_au_ps_bundle_validation_tests_bundle_retrieve.rb
|
|
227
235
|
- lib/au_ps_inferno/utils/attester/basic_test_attester_identifier_slices.rb
|
|
228
236
|
- lib/au_ps_inferno/utils/attester/basic_test_attester_message_helpers.rb
|
|
229
237
|
- lib/au_ps_inferno/utils/attester/basic_test_attester_module.rb
|
|
@@ -246,7 +254,6 @@ files:
|
|
|
246
254
|
- lib/au_ps_inferno/utils/basic_test/resolve_path_debug_module.rb
|
|
247
255
|
- lib/au_ps_inferno/utils/basic_test/resolve_resource_type_module.rb
|
|
248
256
|
- lib/au_ps_inferno/utils/basic_test/resource_helpers_module.rb
|
|
249
|
-
- lib/au_ps_inferno/utils/basic_test/scratch_bundle_entries_module.rb
|
|
250
257
|
- lib/au_ps_inferno/utils/basic_test/section_bundle_validation_module.rb
|
|
251
258
|
- lib/au_ps_inferno/utils/basic_test_class.rb
|
|
252
259
|
- lib/au_ps_inferno/utils/basic_test_contants_module.rb
|
|
@@ -263,11 +270,11 @@ files:
|
|
|
263
270
|
- lib/au_ps_inferno/utils/custodian/basic_test_custodian_module.rb
|
|
264
271
|
- lib/au_ps_inferno/utils/custodian/basic_test_custodian_resource.rb
|
|
265
272
|
- lib/au_ps_inferno/utils/custodian/basic_test_custodian_tests.rb
|
|
273
|
+
- lib/au_ps_inferno/utils/generate_summary_bundle_test_class.rb
|
|
266
274
|
- lib/au_ps_inferno/utils/inferno_suite_generator_compat.rb
|
|
267
275
|
- lib/au_ps_inferno/utils/ips_bundle_is_valid_class.rb
|
|
268
|
-
- lib/au_ps_inferno/utils/ips_retrieve_bundle_test_class.rb
|
|
269
|
-
- lib/au_ps_inferno/utils/ips_summary_valid_bundle_class.rb
|
|
270
276
|
- lib/au_ps_inferno/utils/metadata_manager.rb
|
|
277
|
+
- lib/au_ps_inferno/utils/provided_bundle_test_class.rb
|
|
271
278
|
- lib/au_ps_inferno/utils/retrieve_bundle_test_class.rb
|
|
272
279
|
- lib/au_ps_inferno/utils/rich_message_class.rb
|
|
273
280
|
- lib/au_ps_inferno/utils/rich_validation_message.rb
|
|
@@ -279,7 +286,6 @@ files:
|
|
|
279
286
|
- lib/au_ps_inferno/utils/subject/basic_test_subject_module.rb
|
|
280
287
|
- lib/au_ps_inferno/utils/subject/basic_test_subject_patient_ms_other_tests.rb
|
|
281
288
|
- lib/au_ps_inferno/utils/subject/basic_test_subject_resource.rb
|
|
282
|
-
- lib/au_ps_inferno/utils/summary_valid_bundle_class.rb
|
|
283
289
|
- lib/au_ps_inferno/utils/validator_helpers.rb
|
|
284
290
|
- lib/au_ps_inferno/version.rb
|
|
285
291
|
homepage: https://github.com/hl7au/au-ps-inferno
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module AUPSTestKit
|
|
4
|
-
# Saving and retrieving bundle entities from scratch.
|
|
5
|
-
module BasicTestScratchBundleEntriesModule
|
|
6
|
-
def save_bundle_entities_to_scratch(bundle)
|
|
7
|
-
scratch[:bundle_entities] = bundle.entry.map do |entry|
|
|
8
|
-
{
|
|
9
|
-
full_url: entry.fullUrl,
|
|
10
|
-
resource_type: entry.resource.resourceType,
|
|
11
|
-
resource: entry.resource
|
|
12
|
-
}
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def bundle_entities_from_scratch
|
|
17
|
-
scratch[:bundle_entities] || []
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def bundle_entity_from_scratch(full_url)
|
|
21
|
-
bundle_entities_from_scratch.find { |entity| entity[:full_url] == full_url }
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def bundle_entity_resource_from_scratch(full_url)
|
|
25
|
-
return nil if bundle_entity_from_scratch(full_url).nil?
|
|
26
|
-
|
|
27
|
-
bundle_entity_from_scratch(full_url)[:resource]
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative 'retrieve_bundle_test_class'
|
|
4
|
-
|
|
5
|
-
module AUPSTestKit
|
|
6
|
-
# Retrieve a bundle and validate against the IPS Bundle profile
|
|
7
|
-
class IpsRetrieveBundleTestClass < RetrieveBundleTestClass
|
|
8
|
-
id :ips_retrieve_bundle_test_class_base
|
|
9
|
-
|
|
10
|
-
run do
|
|
11
|
-
skip_if skip_test?, 'There is no FHIR server URL, Bundle ID or Bundle URL provided'
|
|
12
|
-
read_and_save_data
|
|
13
|
-
omit_if omit_ips_validation?, OMIT_IPS_MESSAGE
|
|
14
|
-
validate_ips_bundle
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative 'summary_valid_bundle_class'
|
|
4
|
-
|
|
5
|
-
module AUPSTestKit
|
|
6
|
-
# Bundle from $summary validated against the IPS Bundle profile
|
|
7
|
-
class IpsSummaryValidBundleClass < SummaryValidBundleClass
|
|
8
|
-
id :ips_summary_valid_bundle_class_base
|
|
9
|
-
|
|
10
|
-
run do
|
|
11
|
-
omit_if omit_ips_validation?, OMIT_IPS_MESSAGE
|
|
12
|
-
validate_ips_bundle
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|