davinci_us_drug_formulary_test_kit 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/lib/davinci_us_drug_formulary_test_kit/custom_groups/capability_statement/conformance_support_test.rb +41 -0
- data/lib/davinci_us_drug_formulary_test_kit/custom_groups/capability_statement/fhir_version_test.rb +15 -0
- data/lib/davinci_us_drug_formulary_test_kit/custom_groups/capability_statement/instantiate_test.rb +19 -0
- data/lib/davinci_us_drug_formulary_test_kit/custom_groups/capability_statement/json_support_test.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/custom_groups/capability_statement/profile_support_test.rb +39 -0
- data/lib/davinci_us_drug_formulary_test_kit/custom_groups/v2.0.1/capability_statement_group.rb +78 -0
- data/lib/davinci_us_drug_formulary_test_kit/date_search_validation.rb +121 -0
- data/lib/davinci_us_drug_formulary_test_kit/fhir_resource_navigation.rb +155 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_code_search_test.rb +54 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_drug_tier_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_formulary_include_search_test.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_formulary_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_id_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_lastupdated_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_must_support_test.rb +46 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_period_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_pharmacy_benefit_type_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_read_test.rb +26 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_reference_resolution_test.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_status_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_subject_include_search_test.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_subject_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/basic_validation_test.rb +39 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic/metadata.yml +292 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/basic_group.rb +107 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_coverage_area_search_test.rb +45 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_coverage_type_search_test.rb +45 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_formulary_coverage_search_test.rb +45 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_id_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_identifier_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_lastupdated_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_must_support_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_name_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_period_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_read_test.rb +26 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_status_search_test.rb +53 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_type_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/formulary_validation_test.rb +39 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary/metadata.yml +278 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/formulary_group.rb +104 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_address_city_search_test.rb +44 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_address_postalcode_search_test.rb +44 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_address_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_address_state_search_test.rb +44 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_id_search_test.rb +56 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_lastupdated_search_test.rb +44 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_must_support_test.rb +37 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_read_test.rb +26 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/location_validation_test.rb +39 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location/metadata.yml +177 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/location_group.rb +92 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_code_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_doseform_search_test.rb +45 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_drug_name_search_test.rb +44 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_id_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_lastupdated_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_must_support_test.rb +47 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_read_test.rb +26 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_status_search_test.rb +53 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/medication_knowledge_validation_test.rb +39 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge/metadata.yml +214 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/medication_knowledge_group.rb +91 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/metadata.yml +1192 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/metadata.yml +371 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_coverage_area_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_coverage_type_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_formulary_coverage_include_search_test.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_formulary_coverage_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_id_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_identifier_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_lastupdated_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_must_support_test.rb +66 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_name_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_period_search_test.rb +42 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_read_test.rb +26 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_reference_resolution_test.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_status_search_test.rb +53 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_type_search_test.rb +43 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan/payer_insurance_plan_validation_test.rb +39 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/payer_insurance_plan_group.rb +108 -0
- data/lib/davinci_us_drug_formulary_test_kit/generated/v2.0.1/usdf_test_suite.rb +114 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/group_generator.rb +181 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/group_metadata.rb +79 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/group_metadata_extractor.rb +329 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/ig_loader.rb +77 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/ig_metadata.rb +33 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/ig_metadata_extractor.rb +40 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/ig_resources.rb +60 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/include_search_test_generator.rb +68 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/must_support_metadata_extractor.rb +384 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/must_support_test_generator.rb +117 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/naming.rb +28 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/read_test_generator.rb +92 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/reference_resolution_test_generator.rb +91 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/search_definition_metadata_extractor.rb +187 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/search_metadata_extractor.rb +59 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/search_test_generator.rb +270 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/suite_generator.rb +94 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/terminology_binding_metadata_extractor.rb +116 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/validation_test_generator.rb +102 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator/value_extractor.rb +113 -0
- data/lib/davinci_us_drug_formulary_test_kit/generator.rb +94 -0
- data/lib/davinci_us_drug_formulary_test_kit/igs/package/r4_search-parameters.json +65408 -0
- data/lib/davinci_us_drug_formulary_test_kit/igs/package.tgz +0 -0
- data/lib/davinci_us_drug_formulary_test_kit/must_support_test.rb +224 -0
- data/lib/davinci_us_drug_formulary_test_kit/read_test.rb +62 -0
- data/lib/davinci_us_drug_formulary_test_kit/reference_resolution_test.rb +174 -0
- data/lib/davinci_us_drug_formulary_test_kit/request_logger.rb +46 -0
- data/lib/davinci_us_drug_formulary_test_kit/search_test.rb +767 -0
- data/lib/davinci_us_drug_formulary_test_kit/search_test_properties.rb +58 -0
- data/lib/davinci_us_drug_formulary_test_kit/validation_test.rb +56 -0
- data/lib/davinci_us_drug_formulary_test_kit/version.rb +5 -0
- data/lib/davinci_us_drug_formulary_test_kit.rb +1 -0
- metadata +245 -0
@@ -0,0 +1,91 @@
|
|
1
|
+
require_relative 'medication_knowledge/medication_knowledge_status_search_test'
|
2
|
+
require_relative 'medication_knowledge/medication_knowledge_id_search_test'
|
3
|
+
require_relative 'medication_knowledge/medication_knowledge_lastupdated_search_test'
|
4
|
+
require_relative 'medication_knowledge/medication_knowledge_code_search_test'
|
5
|
+
require_relative 'medication_knowledge/medication_knowledge_drug_name_search_test'
|
6
|
+
require_relative 'medication_knowledge/medication_knowledge_doseform_search_test'
|
7
|
+
require_relative 'medication_knowledge/medication_knowledge_read_test'
|
8
|
+
require_relative 'medication_knowledge/medication_knowledge_validation_test'
|
9
|
+
require_relative 'medication_knowledge/medication_knowledge_must_support_test'
|
10
|
+
|
11
|
+
module DaVinciUSDrugFormularyTestKit
|
12
|
+
module USDFV201
|
13
|
+
class MedicationKnowledgeGroup < Inferno::TestGroup
|
14
|
+
title 'Formulary Drug Tests'
|
15
|
+
short_description 'Verify support for the server capabilities required by the Formulary Drug.'
|
16
|
+
description %(
|
17
|
+
# Background
|
18
|
+
|
19
|
+
The USDF Formulary Drug sequence verifies that the system under test is
|
20
|
+
able to provide correct responses for MedicationKnowledge queries. These queries
|
21
|
+
must contain resources conforming to the Formulary Drug as
|
22
|
+
specified in the USDF v2.0.1 Implementation Guide.
|
23
|
+
|
24
|
+
# Testing Methodology
|
25
|
+
## Searching
|
26
|
+
This test sequence will first perform each required search associated
|
27
|
+
with this resource. This sequence will perform searches with the
|
28
|
+
following parameters:
|
29
|
+
|
30
|
+
* status
|
31
|
+
* _id
|
32
|
+
* _lastUpdated
|
33
|
+
* code
|
34
|
+
* drug-name
|
35
|
+
|
36
|
+
### Search Parameters
|
37
|
+
The first search uses the selected resources from the prior launch
|
38
|
+
sequence. Any subsequent searches will look for its parameter values
|
39
|
+
from the results of the first search. If a value cannot be found this way, the search is skipped.
|
40
|
+
|
41
|
+
### Search Validation
|
42
|
+
Inferno will retrieve up to the first 20 bundle pages of the reply for
|
43
|
+
MedicationKnowledge resources and save them for subsequent tests. Each of
|
44
|
+
these resources is then checked to see if it matches the searched
|
45
|
+
parameters in accordance with [FHIR search
|
46
|
+
guidelines](https://www.hl7.org/fhir/search.html).
|
47
|
+
|
48
|
+
|
49
|
+
## Must Support
|
50
|
+
Each profile contains elements marked as "must support". This test
|
51
|
+
sequence expects to see each of these elements at least once. If at
|
52
|
+
least one cannot be found, the test will fail. The test will look
|
53
|
+
through the MedicationKnowledge resources found in the first test for these
|
54
|
+
elements.
|
55
|
+
|
56
|
+
## Profile Validation
|
57
|
+
Each resource returned from the first search is expected to conform to
|
58
|
+
the [Formulary Drug](http://hl7.org/fhir/us/davinci-drug-formulary/StructureDefinition/usdf-FormularyDrug). Each element is checked against
|
59
|
+
teminology binding and cardinality requirements.
|
60
|
+
|
61
|
+
Elements with a required binding are validated against their bound
|
62
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
63
|
+
then the test will fail.
|
64
|
+
|
65
|
+
## Reference Validation
|
66
|
+
At least one instance of each external reference in elements marked as
|
67
|
+
"must support" within the resources provided by the system must resolve.
|
68
|
+
The test will attempt to read each reference found and will fail if no
|
69
|
+
read succeeds.
|
70
|
+
|
71
|
+
)
|
72
|
+
|
73
|
+
id :usdf_v201_medication_knowledge
|
74
|
+
run_as_group
|
75
|
+
|
76
|
+
def self.metadata
|
77
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'medication_knowledge', 'metadata.yml'), aliases: true))
|
78
|
+
end
|
79
|
+
|
80
|
+
test from: :usdf_v201_medication_knowledge_status_search_test
|
81
|
+
test from: :usdf_v201_medication_knowledge__id_search_test
|
82
|
+
test from: :usdf_v201_medication_knowledge__lastUpdated_search_test
|
83
|
+
test from: :usdf_v201_medication_knowledge_code_search_test
|
84
|
+
test from: :usdf_v201_medication_knowledge_drug_name_search_test
|
85
|
+
test from: :usdf_v201_medication_knowledge_doseform_search_test
|
86
|
+
test from: :usdf_v201_medication_knowledge_read_test
|
87
|
+
test from: :usdf_v201_medication_knowledge_validation_test
|
88
|
+
test from: :usdf_v201_medication_knowledge_must_support_test
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|