davinci_us_drug_formulary_test_kit 0.11.0 → 0.12.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: 5da16d423c118156da150fd9a6ad67fdedda6c3bd154377fb7794b074419edbc
4
- data.tar.gz: e6ac77c4fdde8b3c1c457339e7c5c077c3c0ae1c4562152ac0853d7a62577bd2
3
+ metadata.gz: 5f79e24334e2b824a36557f5a1928e6512f6a9d36b36cf99698ddfad9cf62efb
4
+ data.tar.gz: d4540c4c4a6048c53c4f2aa5e7e946d6d1d1ebb49380637fd7023c41e0bf7af1
5
5
  SHA512:
6
- metadata.gz: 67974be7b9cccf56fbcd507c348b46df10cf90ed96b0777b977e10b1b6e0771d4d768a6ec24ae8e730ea6d17f65bbbf6d0e5e77ffefcd1ffb22ea0504a0939b9
7
- data.tar.gz: 0f54db7b6131970356a2086f18eda574d379f2c4f1f673ac876b26d128d3254dea38ec032f156a82c19c227c0e939a06367e1063943099f547bde62de58264ea
6
+ metadata.gz: 22e347a051dae9e27137936325d9e4f6df4f2da1dbf3d640b2a1e3c71e82c61e9f9a561adab302aa25d3ba34972e40b152c58fab033c9f5538088f6801de6dd3
7
+ data.tar.gz: b15c56c6119cf032bfe380f431811202a94f88f02396258d14f22500ccfa4b1119d0b605bf4c0c2c4deaa0e489e0da2a32c50c0d9a86e4a99b81cdcfd37a9023
@@ -11,10 +11,10 @@
11
11
  "_type": "text"
12
12
  },
13
13
  {
14
- "name": "smart_credentials",
14
+ "name": "smart_auth_info",
15
15
  "value": null,
16
16
  "_title": "OAuth Credentials",
17
- "_type": "oauth_credentials",
17
+ "_type": "auth_info",
18
18
  "_optional": true
19
19
  },
20
20
  {
@@ -16,7 +16,7 @@ module DaVinciUSDrugFormularyTestKit
16
16
  end.compact
17
17
  end
18
18
 
19
- def find_a_value_at(element, path, include_dar: false, &block)
19
+ def find_a_value_at(element, path, include_dar: false, &)
20
20
  return nil if element.nil?
21
21
 
22
22
  elements = Array.wrap(element)
@@ -28,7 +28,7 @@ module DaVinciUSDrugFormularyTestKit
28
28
  end
29
29
  end
30
30
 
31
- return elements.find(&block) if block_given?
31
+ return elements.find(&) if block_given?
32
32
 
33
33
  return elements.first
34
34
  end
@@ -1,4 +1,3 @@
1
- require 'inferno/dsl/oauth_credentials'
2
1
  require_relative '../../version'
3
2
  require_relative '../../custom_groups/v2.0.1/capability_statement_group'
4
3
  require_relative 'payer_insurance_plan_group'
@@ -97,26 +96,70 @@ module DaVinciUSDrugFormularyTestKit
97
96
  }
98
97
  ]
99
98
 
99
+ requirement_sets(
100
+ {
101
+ identifier: 'hl7.fhir.us.davinci-drug-formulary_2.0.1',
102
+ title: 'Da Vinci Payer Data Exchange (PDex) US Drug Formulary v2.0.1',
103
+ actor: 'Server'
104
+ }
105
+ )
106
+
100
107
  input :url,
101
108
  title: 'FHIR Endpoint',
102
109
  description: 'URL of the FHIR endpoint'
103
- input :smart_credentials,
110
+ input :smart_auth_info,
104
111
  title: 'OAuth Credentials',
105
- type: :oauth_credentials,
112
+ type: :auth_info,
106
113
  optional: true
107
114
 
108
115
  fhir_client do
109
116
  url :url
110
- oauth_credentials :smart_credentials
117
+ auth_info :smart_auth_info
111
118
  end
112
119
 
113
- group from: :usdf_v201_capability_statement
120
+ group from: :usdf_v201_capability_statement do
121
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@51', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@53',
122
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@54'
123
+ end
114
124
 
115
- group from: :usdf_v201_payer_insurance_plan
116
- group from: :usdf_v201_formulary
117
- group from: :usdf_v201_basic
118
- group from: :usdf_v201_medication_knowledge
119
- group from: :usdf_v201_location
125
+ group from: :usdf_v201_payer_insurance_plan do
126
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@20', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@21',
127
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@22', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@23',
128
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@24', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@25',
129
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@26', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@27',
130
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@28', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@29'
131
+ end
132
+
133
+ group from: :usdf_v201_formulary do
134
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@20', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@21',
135
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@22', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@23',
136
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@24', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@25',
137
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@26', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@27',
138
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@28', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@29'
139
+ end
140
+
141
+ group from: :usdf_v201_basic do
142
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@36', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@37',
143
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@38', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@39',
144
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@40', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@41',
145
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@42', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@43',
146
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@44'
147
+ end
148
+
149
+ group from: :usdf_v201_medication_knowledge do
150
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@15', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@16',
151
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@17', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@45',
152
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@46', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@47',
153
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@48', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@49',
154
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@50'
155
+ end
156
+
157
+ group from: :usdf_v201_location do
158
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@30', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@31',
159
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@32', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@33',
160
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@34', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@35'
161
+ end
162
+
120
163
  end
121
164
  end
122
165
  end
@@ -30,7 +30,6 @@ module DaVinciUSDrugFormularyTestKit
30
30
  end
31
31
 
32
32
  def load_ig
33
-
34
33
  tar = Gem::Package::TarReader.new(
35
34
  Zlib::GzipReader.open(ig_file_name)
36
35
  )
@@ -72,7 +72,9 @@ module DaVinciUSDrugFormularyTestKit
72
72
 
73
73
  def include_param_resource
74
74
  res_type = group_metadata.search_definitions[:"#{include_search_look_up_param}"][:type]
75
- res_type = group_metadata.search_definitions[:"#{include_search_look_up_param}"][:target] if res_type == 'Reference'
75
+ if res_type == 'Reference'
76
+ res_type = group_metadata.search_definitions[:"#{include_search_look_up_param}"][:target]
77
+ end
76
78
  res_type
77
79
  end
78
80
  end
@@ -25,7 +25,7 @@ module DaVinciUSDrugFormularyTestKit
25
25
  end
26
26
 
27
27
  def output
28
- @output ||= ERB.new(template).result(binding)
28
+ @output ||= ERB.new(template, trim_mode: '-').result(binding)
29
29
  end
30
30
 
31
31
  def base_output_file_name
@@ -1,4 +1,3 @@
1
- require 'inferno/dsl/oauth_credentials'
2
1
  require_relative '../../version'
3
2
  require_relative '<%= capability_statement_file_name %>'
4
3
  <% group_file_list.each do |file_name| %>require_relative '<%= file_name %>'
@@ -94,22 +93,64 @@ module DaVinciUSDrugFormularyTestKit
94
93
  }
95
94
  ]
96
95
 
96
+ requirement_sets(
97
+ {
98
+ identifier: 'hl7.fhir.us.davinci-drug-formulary_2.0.1',
99
+ title: 'Da Vinci Payer Data Exchange (PDex) US Drug Formulary v2.0.1',
100
+ actor: 'Server'
101
+ }
102
+ )
103
+
97
104
  input :url,
98
105
  title: 'FHIR Endpoint',
99
106
  description: 'URL of the FHIR endpoint'
100
- input :smart_credentials,
107
+ input :smart_auth_info,
101
108
  title: 'OAuth Credentials',
102
- type: :oauth_credentials,
109
+ type: :auth_info,
103
110
  optional: true
104
111
 
105
112
  fhir_client do
106
113
  url :url
107
- oauth_credentials :smart_credentials
114
+ auth_info :smart_auth_info
108
115
  end
109
116
 
110
- group from: :<%= capability_statement_group_id %>
117
+ group from: :<%= capability_statement_group_id %> do
118
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@51', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@53',
119
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@54'
120
+ end
111
121
  <% group_id_list.each do |id| %>
112
- group from: :<%= id %><% end %>
122
+ group from: :<%= id %> do
123
+ <%- if id.include?('usdf_v201_payer_insurance_plan') -%>
124
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@20', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@21',
125
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@22', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@23',
126
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@24', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@25',
127
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@26', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@27',
128
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@28', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@29'
129
+ <%- elsif id.include?('usdf_v201_formulary') -%>
130
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@20', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@21',
131
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@22', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@23',
132
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@24', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@25',
133
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@26', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@27',
134
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@28', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@29'
135
+ <%- elsif id.include?('usdf_v201_basic') -%>
136
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@36', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@37',
137
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@38', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@39',
138
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@40', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@41',
139
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@42', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@43',
140
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@44'
141
+ <%- elsif id.include?('usdf_v201_medication_knowledge') -%>
142
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@15', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@16',
143
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@17', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@45',
144
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@46', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@47',
145
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@48', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@49',
146
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@50'
147
+ <%- elsif id.include?('usdf_v201_location') -%>
148
+ verifies_requirements 'hl7.fhir.us.davinci-drug-formulary_2.0.1@30', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@31',
149
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@32', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@33',
150
+ 'hl7.fhir.us.davinci-drug-formulary_2.0.1@34', 'hl7.fhir.us.davinci-drug-formulary_2.0.1@35'
151
+ <%- end -%>
152
+ end
153
+ <% end %>
113
154
  end
114
155
  end
115
156
  end
@@ -1,6 +1,6 @@
1
1
  require_relative 'version'
2
2
 
3
- module DaVinciUSDrugFormularyTestKit
3
+ module DaVinciUSDrugFormularyTestKit
4
4
  class Metadata < Inferno::TestKit
5
5
  id :davinci_us_drug_formulary_test_kit
6
6
  title 'Da Vinci US Drug Formulary Test Kit'
@@ -17,9 +17,9 @@ module DaVinciUSDrugFormularyTestKit
17
17
  [DaVinci Payer Data Exchange (PDex) US Drug Formulary Implementation Guide v2.0.1](http://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1).
18
18
 
19
19
  <!-- break -->
20
-
20
+
21
21
  These tests check the following behaviors as defined in the IG:
22
-
22
+
23
23
  - FHIR Interactions
24
24
  + Capabilities
25
25
  + Read
@@ -30,17 +30,17 @@ module DaVinciUSDrugFormularyTestKit
30
30
  + Validation against IG profiles
31
31
  + Presence of all Must Support fields
32
32
  * Resolution of Must Support references
33
-
33
+
34
34
  The DaVinci US Drug Formulary Test Kit is built using the
35
35
  [Inferno Framework](https://inferno-framework.github.io/).
36
36
  The Inferno Framework is designed for reuse and aims to make it easier to
37
37
  build test kits for any FHIR-based data exchange.
38
-
38
+
39
39
  ### Known Limitations
40
-
40
+
41
41
  The following areas of the IG are not fully tested in this draft version
42
42
  of the test kit:
43
-
43
+
44
44
  - Must Support checks are not performed for all elements of Formulary Drug
45
45
  resources due to the use of an intensional value set for slicing
46
46
  `MedicationKnowledge.code.coding` elements.
@@ -49,9 +49,9 @@ module DaVinciUSDrugFormularyTestKit
49
49
  + Multiple Or
50
50
  + Multiple And
51
51
  + Comparators
52
-
52
+
53
53
  ## Reporting Issues
54
-
54
+
55
55
  Please report any issues with this set of tests in the
56
56
  [GitHub Issues](https://github.com/inferno-framework/davinci-us-drug-formulary-test-kit/issues)
57
57
  section of this repository.
@@ -14,211 +14,15 @@ module DaVinciUSDrugFormularyTestKit
14
14
  def perform_must_support_test(resources)
15
15
  skip_if resources.blank?, "No #{resource_type} resources were found"
16
16
 
17
- missing_elements(resources)
18
- missing_slices(resources)
19
- missing_extensions(resources)
20
- handle_must_support_choices if metadata.must_supports[:choices].present?
21
17
  # TODO: long term fix = allow intensional VS to be used for slicing in formulary drug
22
18
  # ticket fi-2099
23
19
  if resource_type == 'MedicationKnowledge'
24
20
  # skip slice check for drugs
25
- missing_elements.delete_if { |element| element[:path].include?('coding:') }
26
- pass if (missing_elements + missing_extensions).empty?
27
- else
28
- missing_slices(resources)
29
- pass if (missing_elements + missing_slices + missing_extensions).empty?
21
+ metadata.must_supports[:slices].clear
22
+ metadata.must_supports[:elements].delete_if { |element| element[:path].include?('coding:') }
30
23
  end
31
24
 
32
- skip "Could not find #{missing_must_support_strings.join(', ')} in the #{resources.length} " \
33
- "provided #{resource_type} resource(s)"
34
- end
35
-
36
- def handle_must_support_choices
37
- missing_elements.delete_if do |element|
38
- choices = metadata.must_supports[:choices].find { |choice| choice[:paths]&.include?(element[:path]) }
39
- is_any_choice_supported?(choices)
40
- end
41
-
42
- missing_extensions.delete_if do |extension|
43
- choices = metadata.must_supports[:choices].find { |choice| choice[:extension_ids]&.include?(extension[:id]) }
44
- is_any_choice_supported?(choices)
45
- end
46
-
47
- missing_slices.delete_if do |slice|
48
- choices = metadata.must_supports[:choices].find { |choice| choice[:slice_names]&.include?(slice[:slice_id]) }
49
- is_any_choice_supported?(choices)
50
- end
51
- end
52
-
53
- def is_any_choice_supported?(choices)
54
- choices.present? &&
55
- (
56
- choices[:paths]&.any? { |path| missing_elements.none? { |element| element[:path] == path } } ||
57
- choices[:extension_ids]&.any? do |extension_id|
58
- missing_extensions.none? do |extension|
59
- extension[:id] == extension_id
60
- end
61
- end ||
62
- choices[:slice_names]&.any? { |slice_name| missing_slices.none? { |slice| slice[:slice_id] == slice_name } }
63
- )
64
- end
65
-
66
- def missing_must_support_strings
67
- missing_elements.map { |element_definition| missing_element_string(element_definition) } +
68
- missing_slices.map { |slice_definition| slice_definition[:slice_id] } +
69
- missing_extensions.map { |extension_definition| extension_definition[:id] }
70
- end
71
-
72
- def missing_element_string(element_definition)
73
- if element_definition[:fixed_value].present?
74
- "#{element_definition[:path]}:#{element_definition[:fixed_value]}"
75
- else
76
- element_definition[:path]
77
- end
78
- end
79
-
80
- def exclude_uscdi_only_test?
81
- config.options[:exclude_uscdi_only_test] == true
82
- end
83
-
84
- def must_support_extensions
85
- if exclude_uscdi_only_test?
86
- metadata.must_supports[:extensions].reject { |extension| extension[:uscdi_only] }
87
- else
88
- metadata.must_supports[:extensions]
89
- end
90
- end
91
-
92
- def missing_extensions(resources = [])
93
- @missing_extensions ||=
94
- must_support_extensions.select do |extension_definition|
95
- resources.none? do |resource|
96
- path = extension_definition[:path]
97
- if extension_definition[:path] == 'extension'
98
- resource.extension.any? { |extension| extension.url == extension_definition[:url] }
99
- else
100
- extension = find_a_value_at(resource, path)
101
- extension&.url == extension_definition[:url]
102
- end
103
- end
104
- end
105
- end
106
-
107
- def must_support_elements
108
- if exclude_uscdi_only_test?
109
- metadata.must_supports[:elements].reject { |element| element[:uscdi_only] }
110
- else
111
- metadata.must_supports[:elements]
112
- end
113
- end
114
-
115
- def missing_elements(resources = [])
116
- @missing_elements ||=
117
- must_support_elements.select do |element_definition|
118
- resources.none? do |resource|
119
- path = element_definition[:path] # .delete_suffix('[x]')
120
- value_found = find_a_value_at(resource, path) do |value|
121
- value_without_extensions =
122
- value.respond_to?(:to_hash) ? value.to_hash.except('extension') : value
123
-
124
- (value_without_extensions.present? || value_without_extensions == false) &&
125
- (element_definition[:fixed_value].blank? || value == element_definition[:fixed_value])
126
- end
127
- # Note that false.present? => false, which is why we need to add this extra check
128
- value_found.present? || value_found == false
129
- end
130
- end
131
- @missing_elements
132
- end
133
-
134
- def must_support_slices
135
- if exclude_uscdi_only_test?
136
- metadata.must_supports[:slices].reject { |slice| slice[:uscdi_only] }
137
- else
138
- metadata.must_supports[:slices]
139
- end
140
- end
141
-
142
- def missing_slices(resources = [])
143
- @missing_slices ||=
144
- must_support_slices.select do |slice|
145
- resources.none? do |resource|
146
- path = slice[:path] # .delete_suffix('[x]')
147
- find_slice(resource, path, slice[:discriminator]).present?
148
- end
149
- end
150
- end
151
-
152
- def find_slice(resource, path, discriminator)
153
- find_a_value_at(resource, path) do |element|
154
- case discriminator[:type]
155
- when 'patternCodeableConcept'
156
- coding_path = discriminator[:path].present? ? "#{discriminator[:path]}.coding" : 'coding'
157
- find_a_value_at(element, coding_path) do |coding|
158
- coding.code == discriminator[:code] && coding.system == discriminator[:system]
159
- end
160
- when 'patternCoding'
161
- coding_path = discriminator[:path].present? ? discriminator[:path] : ''
162
- find_a_value_at(element, coding_path) do |coding|
163
- coding.code == discriminator[:code] && coding.system == discriminator[:system]
164
- end
165
- when 'patternIdentifier'
166
- find_a_value_at(element, discriminator[:path]) { |identifier| identifier.system == discriminator[:system] }
167
- when 'value'
168
- values = discriminator[:values].map { |value| value.merge(path: value[:path].split('.')) }
169
- find_slice_by_values(element, values)
170
- when 'type'
171
- case discriminator[:code]
172
- when 'Date'
173
- begin
174
- Date.parse(element)
175
- rescue ArgumentError
176
- false
177
- end
178
- when 'DateTime'
179
- begin
180
- DateTime.parse(element)
181
- rescue ArgumentError
182
- false
183
- end
184
- when 'String'
185
- element.is_a? String
186
- else
187
- element.is_a? FHIR.const_get(discriminator[:code])
188
- end
189
- when 'requiredBinding'
190
- coding_path = discriminator[:path].present? ? "#{discriminator[:path]}.coding" : 'coding'
191
- find_a_value_at(element, coding_path) { |coding| discriminator[:values].include?(coding.code) }
192
- end
193
- end
194
- end
195
-
196
- def find_slice_by_values(element, value_definitions)
197
- path_prefixes = value_definitions.map { |value_definition| value_definition[:path].first }.uniq
198
- Array.wrap(element).find do |el|
199
- path_prefixes.all? do |path_prefix|
200
- value_definitions_for_path =
201
- value_definitions
202
- .select { |value_definition| value_definition[:path].first == path_prefix }
203
- .each { |value_definition| value_definition[:path].shift }
204
- find_a_value_at(el, path_prefix) do |el_found|
205
- child_element_value_definitions, current_element_value_definitions =
206
- value_definitions_for_path.partition { |value_definition| value_definition[:path].present? }
207
- current_element_values_match =
208
- current_element_value_definitions
209
- .all? { |value_definition| value_definition[:value] == el_found }
210
-
211
- child_element_values_match =
212
- if child_element_value_definitions.present?
213
- find_slice_by_values(el_found, child_element_value_definitions)
214
- else
215
- true
216
- end
217
-
218
- current_element_values_match && child_element_values_match
219
- end
220
- end
221
- end
25
+ skip { assert_must_support_elements_present(resources, nil, metadata:) }
222
26
  end
223
27
  end
224
28
  end
@@ -0,0 +1,167 @@
1
+ Req Set,ID,URL,Requirement,Conformance,Actors,Sub-Requirement(s),Conditionality,Not Tested Reason,Not Tested Details
2
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,1,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#access-methods,"Authenticated API: Access to the formulary service when integrated with protected health information (PHI) or personally identifiable information (PII) as part of the Patient Access API SHALL be protected through an authorized, authenticated transaction as described in the Da Vinci Health Record Exchange (HRex) FHIR Implementation Guide Security and Privacy Section [[link](https://hl7.org/fhir/us/davinci-hrex/STU1/security.html)].",SHALL,Server,,true,,
3
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,2,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#access-methods,"Unauthenticated API: When exchanging formulary data exclusively, which is public information without any PHI or PII, the formulary service MAY also be accessed through an API that does not require authentication or authorization.",MAY,Server,,true,,
4
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,3,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#access-methods,The formulary server SHALL NOT maintain any records through the unauthenticated API that could associate the consumer with the medications queried.,SHALL NOT,Server,,false,,
5
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,4,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"When accessing data through an authenticated API, the response for queries on InsurancePlan depends on whether the authenticated member has access to the plan in relation to their membership.
6
+ ... For Formulary, this means all Formularies that are generally available to the member. If the member is in a group, all group associated formularies are returned.",SHALL,Server,,true,,
7
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,5,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"When accessing data through an authenticated API, the response for queries on InsurancePlan depends on whether the authenticated member has access to the plan in relation to their membership.
8
+ ... For Formulary, this means all Formularies that are generally available to the member. If the member is ... not in a group, all generally available formularies (that is, those that are not restricted to only one or more groups) are returned.",SHALL,Server,,true,,
9
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,6,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,Clients can determine the Formulary InsurancePlan(s) that the member is subscribed by first retrieving the Payer Insurance Plan(s) and identifying the Formulary(s) through the Payer Insurance Plan InsurancePlan.coverage.,MAY,Client,,false,,
10
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,7,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
11
+
12
+ InsurancePlan specified – GET by resource ID
13
+
14
+ Return plan if covered by insurer and included in group if member is part of a group",SHOULD,Server,,true,,
15
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,8,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
16
+
17
+ InsurancePlan specified – GET by resource ID
18
+
19
+ [if no plan is] covered by insurer and included in group if member is part of a group… return 400",SHOULD,Server,,true,,
20
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,9,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
21
+
22
+ InsurancePlan reference not specified - Search
23
+
24
+ Return all plans if covered by insurer and included in group if member is part of a group",SHOULD,Server,,true,,
25
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,10,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
26
+
27
+ InsurancePlan reference not specified - Search
28
+
29
+ [if no plans are] covered by insurer and included in group if member is part of a group… return 200",SHOULD,Server,,true,,
30
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,11,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"Server implementers SHALL make other profiled resources in this IG (FormularyItem, FormularyDrug) associated to a member’s available plans available through authenticated access. This IG does not define restrictions on authenticated access to resources not associated with a member’s available plan or the Plan Location resource.",SHALL,Server,,false,,
31
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,12,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#unauthenticated,"When accessing data through an unauthenticated API, the conformant payer formulary service SHALL NOT require an application to send consumer identifying information in order to query for the list of health plans provided by that payer and the medication and costs for each plan.",SHALL NOT,Server,,true,,
32
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,13,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#resource-relationships,"Additionally, a more general RxNorm semantic drug form group code **SHOULD** be present for searching across drugs with the same ingredient, brand, and form (regardless of strength).",SHOULD,Server,,false,,
33
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,14,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#resource-relationships,All drugs with RxNorm Term Type of SCD or SBD **SHALL** have a coding repetition and RxNorm Term Type of SCDG or SBDG respectively.,SHALL,Server,,true,,
34
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,15,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-code,"Servers **SHALL** support a MedicationKnowledge.code.coding repetition including the detailed drug, strength, and form, including RxNorm Term Types (TTY) of SCD (Semantic Clinical Drug), SBD Semantic Branded Drug), GPCK (Generic Pack), or BPCK (Branded Pack).",SHALL,Server,,false,,
35
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,16,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-code,"Additionally, servers **SHALL** support a MedicationKnowledge.code.coding repetition including the general RxNorm code (and name) with Term Type of SCDG (Semantic Clinical Drug Form Group) or SBDG (Semantic Branded Drug Form Group) when there is a concept matching the primary code represented by the Term Type SCD or SBD respectively. This requirement includes using the respective RxNorm name in the display of the coding repetition.",SHALL,Server,,true,,
36
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,17,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-code,Searches for drugs with the above RxNorm Term Types (SCDG and SBDG) by either code will provide the client with a way to search for drugs without a specified strength.,SHALL,Server,,true,,
37
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,18,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-name,Servers are required to support the more general drug form group code and name where one exists.,SHALL,Server,,false,,
38
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,19,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-name,This display name will be included in any drug name search for which the general drug form group code exists.,SHALL,Server,,false,,
39
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,20,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
40
+ PayerInsurancePlan & Formulary (InsurancePlan)…
41
+
42
+ _id",SHALL,Server,,false,,
43
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,21,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
44
+ PayerInsurancePlan & Formulary (InsurancePlan)…
45
+
46
+ _lastUpdated",SHALL,Server,,false,,
47
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,22,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
48
+ PayerInsurancePlan & Formulary (InsurancePlan)…
49
+
50
+ identifier",SHALL,Server,,false,,
51
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,23,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
52
+ PayerInsurancePlan & Formulary (InsurancePlan)…
53
+
54
+ status",SHALL,Server,,false,,
55
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,24,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
56
+ PayerInsurancePlan & Formulary (InsurancePlan)…
57
+
58
+ period",SHALL,Server,,false,,
59
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,25,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
60
+ PayerInsurancePlan & Formulary (InsurancePlan)…
61
+
62
+ type",SHALL,Server,,false,,
63
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,26,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
64
+ PayerInsurancePlan & Formulary (InsurancePlan)…
65
+
66
+ name",SHALL,Server,,false,,
67
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,27,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
68
+ PayerInsurancePlan & Formulary (InsurancePlan)…
69
+
70
+ coverage-type",SHALL,Server,,false,,
71
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,28,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
72
+ PayerInsurancePlan & Formulary (InsurancePlan)…
73
+
74
+ formulary-coverage",SHALL,Server,,false,,
75
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,29,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
76
+ PayerInsurancePlan & Formulary (InsurancePlan)…
77
+
78
+ coverage-area",SHALL,Server,,false,,
79
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,30,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
80
+ InsurancePlanLocation (Location)…
81
+
82
+ _id",SHALL,Server,,false,,
83
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,31,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
84
+ InsurancePlanLocation (Location)…
85
+
86
+ _lastUpdated",SHOULD,Server,,false,,
87
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,32,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
88
+ InsurancePlanLocation (Location)…
89
+
90
+ address",SHOULD,Server,,false,,
91
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,33,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
92
+ InsurancePlanLocation (Location)…
93
+
94
+ address-city",SHOULD,Server,,false,,
95
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,34,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
96
+ InsurancePlanLocation (Location)…
97
+
98
+ address-state",SHOULD,Server,,false,,
99
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,35,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
100
+ InsurancePlanLocation (Location)…
101
+
102
+ address-postalcode",SHOULD,Server,,false,,
103
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,36,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
104
+ FormularyItem (Basic)…
105
+
106
+ _id",SHALL,Server,,false,,
107
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,37,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
108
+ FormularyItem (Basic)…
109
+
110
+ _lastUpdated",SHALL,Server,,false,,
111
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,38,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
112
+ FormularyItem (Basic)…
113
+
114
+ code",SHALL,Server,,false,,
115
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,39,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
116
+ FormularyItem (Basic)…
117
+
118
+ subject",SHALL,Server,,false,,
119
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,40,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
120
+ FormularyItem (Basic)…
121
+
122
+ status",SHALL,Server,,false,,
123
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,41,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
124
+ FormularyItem (Basic)…
125
+
126
+ period",SHALL,Server,,false,,
127
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,42,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
128
+ FormularyItem (Basic)…
129
+
130
+ formulary",SHALL,Server,,false,,
131
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,43,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
132
+ FormularyItem (Basic)…
133
+
134
+ pharmacy-benefit-type",SHALL,Server,,false,,
135
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,44,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
136
+ FormularyItem (Basic)…
137
+
138
+ drug-tier",SHALL,Server,,false,,
139
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,45,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
140
+ FormularyDrug (MedicationKnowledge)…
141
+
142
+ _id",SHALL,Server,,false,,
143
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,46,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
144
+ FormularyDrug (MedicationKnowledge)…
145
+
146
+ _lastUpdated",SHALL,Server,,false,,
147
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,47,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
148
+ FormularyDrug (MedicationKnowledge)…
149
+
150
+ status",SHALL,Server,,false,,
151
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,48,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
152
+ FormularyDrug (MedicationKnowledge)…
153
+
154
+ code",SHALL,Server,,false,,
155
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,49,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
156
+ FormularyDrug (MedicationKnowledge)…
157
+
158
+ drug-name",SHALL,Server,,false,,
159
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,50,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
160
+ FormularyDrug (MedicationKnowledge)…
161
+
162
+ doseform",SHOULD,Server,,false,,
163
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,51,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/CapabilityStatement-usdf-server.html,[Section 6 auto-generated from capability statement],SHALL,Server,,false,,
164
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,52,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#conformance-expectations,This guide inherits all conformance expectations identified in the Health Record Exchange (Hrex) Conformance Expectations section (https://hl7.org/fhir/us/davinci-hrex/STU1/conformance.html). All systems claiming conformance to this guide SHALL conform to the requirements listed in that section.,SHALL,Server,,false,,
165
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,53,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#conformance-expectations,Server systems claiming conformance to this guide SHALL meet the capability statement expectation requirements identified in the US Drug Formulary Server Capability Statement,SHALL,Server,,false,,
166
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,54,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#conformance-expectations,Server systems claiming conformance to this guide… SHALL have a CapabilityStatement that has a CapabilityStatement.instantiates with a URL of http://hl7.org/fhir/us/davinci-drug-formulary/CapabilityStatement/usdf-server or a URL to the appropriate version of the CapabilityStatement.,SHALL,Server,,false,,
167
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,55,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,Servers SHALL enable clients to determine the Formulary InsurancePlan(s) that the member is subscribed by first retrieving the Payer Insurance Plan(s) and identifying the Formulary(s) through the Payer Insurance Plan InsurancePlan.coverage.,DEPRECATED,Server,,,,
@@ -0,0 +1,165 @@
1
+ Req Set,ID,URL,Requirement,Conformance,Actors,Conditionality,Not Tested Reason,Not Tested Details,DaVinci US Drug Formulary v2.0.1 Short ID(s),DaVinci US Drug Formulary v2.0.1 Full ID(s)
2
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,1,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#access-methods,"Authenticated API: Access to the formulary service when integrated with protected health information (PHI) or personally identifiable information (PII) as part of the Patient Access API SHALL be protected through an authorized, authenticated transaction as described in the Da Vinci Health Record Exchange (HRex) FHIR Implementation Guide Security and Privacy Section [[link](https://hl7.org/fhir/us/davinci-hrex/STU1/security.html)].",SHALL,Server,true,,,"",""
3
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,2,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#access-methods,"Unauthenticated API: When exchanging formulary data exclusively, which is public information without any PHI or PII, the formulary service MAY also be accessed through an API that does not require authentication or authorization.",MAY,Server,true,,,"",""
4
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,3,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#access-methods,The formulary server SHALL NOT maintain any records through the unauthenticated API that could associate the consumer with the medications queried.,SHALL NOT,Server,false,,,"",""
5
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,4,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"When accessing data through an authenticated API, the response for queries on InsurancePlan depends on whether the authenticated member has access to the plan in relation to their membership.
6
+ ... For Formulary, this means all Formularies that are generally available to the member. If the member is in a group, all group associated formularies are returned.",SHALL,Server,true,,,"",""
7
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,5,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"When accessing data through an authenticated API, the response for queries on InsurancePlan depends on whether the authenticated member has access to the plan in relation to their membership.
8
+ ... For Formulary, this means all Formularies that are generally available to the member. If the member is ... not in a group, all generally available formularies (that is, those that are not restricted to only one or more groups) are returned.",SHALL,Server,true,,,"",""
9
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,7,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
10
+
11
+ InsurancePlan specified – GET by resource ID
12
+
13
+ Return plan if covered by insurer and included in group if member is part of a group",SHOULD,Server,true,,,"",""
14
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,8,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
15
+
16
+ InsurancePlan specified – GET by resource ID
17
+
18
+ [if no plan is] covered by insurer and included in group if member is part of a group… return 400",SHOULD,Server,true,,,"",""
19
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,9,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
20
+
21
+ InsurancePlan reference not specified - Search
22
+
23
+ Return all plans if covered by insurer and included in group if member is part of a group",SHOULD,Server,true,,,"",""
24
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,10,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"how the Formulary API should respond to requests…
25
+
26
+ InsurancePlan reference not specified - Search
27
+
28
+ [if no plans are] covered by insurer and included in group if member is part of a group… return 200",SHOULD,Server,true,,,"",""
29
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,11,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#authenticated,"Server implementers SHALL make other profiled resources in this IG (FormularyItem, FormularyDrug) associated to a member’s available plans available through authenticated access. This IG does not define restrictions on authenticated access to resources not associated with a member’s available plan or the Plan Location resource.",SHALL,Server,false,,,"",""
30
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,12,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#unauthenticated,"When accessing data through an unauthenticated API, the conformant payer formulary service SHALL NOT require an application to send consumer identifying information in order to query for the list of health plans provided by that payer and the medication and costs for each plan.",SHALL NOT,Server,true,,,"",""
31
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,13,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#resource-relationships,"Additionally, a more general RxNorm semantic drug form group code **SHOULD** be present for searching across drugs with the same ingredient, brand, and form (regardless of strength).",SHOULD,Server,false,,,"",""
32
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,14,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#resource-relationships,All drugs with RxNorm Term Type of SCD or SBD **SHALL** have a coding repetition and RxNorm Term Type of SCDG or SBDG respectively.,SHALL,Server,true,,,"",""
33
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,15,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-code,"Servers **SHALL** support a MedicationKnowledge.code.coding repetition including the detailed drug, strength, and form, including RxNorm Term Types (TTY) of SCD (Semantic Clinical Drug), SBD Semantic Branded Drug), GPCK (Generic Pack), or BPCK (Branded Pack).",SHALL,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
34
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,16,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-code,"Additionally, servers **SHALL** support a MedicationKnowledge.code.coding repetition including the general RxNorm code (and name) with Term Type of SCDG (Semantic Clinical Drug Form Group) or SBDG (Semantic Branded Drug Form Group) when there is a concept matching the primary code represented by the Term Type SCD or SBD respectively. This requirement includes using the respective RxNorm name in the display of the coding repetition.",SHALL,Server,true,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
35
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,17,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-code,Searches for drugs with the above RxNorm Term Types (SCDG and SBDG) by either code will provide the client with a way to search for drugs without a specified strength.,SHALL,Server,true,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
36
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,18,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-name,Servers are required to support the more general drug form group code and name where one exists.,SHALL,Server,false,,,"",""
37
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,19,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#searching-by-drug-name,This display name will be included in any drug name search for which the general drug form group code exists.,SHALL,Server,false,,,"",""
38
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,20,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
39
+ PayerInsurancePlan & Formulary (InsurancePlan)…
40
+
41
+ _id",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
42
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,21,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
43
+ PayerInsurancePlan & Formulary (InsurancePlan)…
44
+
45
+ _lastUpdated",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
46
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,22,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
47
+ PayerInsurancePlan & Formulary (InsurancePlan)…
48
+
49
+ identifier",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
50
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,23,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
51
+ PayerInsurancePlan & Formulary (InsurancePlan)…
52
+
53
+ status",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
54
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,24,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
55
+ PayerInsurancePlan & Formulary (InsurancePlan)…
56
+
57
+ period",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
58
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,25,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
59
+ PayerInsurancePlan & Formulary (InsurancePlan)…
60
+
61
+ type",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
62
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,26,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
63
+ PayerInsurancePlan & Formulary (InsurancePlan)…
64
+
65
+ name",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
66
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,27,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
67
+ PayerInsurancePlan & Formulary (InsurancePlan)…
68
+
69
+ coverage-type",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
70
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,28,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
71
+ PayerInsurancePlan & Formulary (InsurancePlan)…
72
+
73
+ formulary-coverage",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
74
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,29,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#payerinsuranceplan--formulary-insuranceplan,"Search Parameters Required by This Implementation Guide…
75
+ PayerInsurancePlan & Formulary (InsurancePlan)…
76
+
77
+ coverage-area",SHALL,Server,false,,,"2, 3","davinci_us_drug_formulary_v201-usdf_v201_payer_insurance_plan, davinci_us_drug_formulary_v201-usdf_v201_formulary"
78
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,30,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
79
+ InsurancePlanLocation (Location)…
80
+
81
+ _id",SHALL,Server,false,,,6,davinci_us_drug_formulary_v201-usdf_v201_location
82
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,31,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
83
+ InsurancePlanLocation (Location)…
84
+
85
+ _lastUpdated",SHOULD,Server,false,,,6,davinci_us_drug_formulary_v201-usdf_v201_location
86
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,32,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
87
+ InsurancePlanLocation (Location)…
88
+
89
+ address",SHOULD,Server,false,,,6,davinci_us_drug_formulary_v201-usdf_v201_location
90
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,33,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
91
+ InsurancePlanLocation (Location)…
92
+
93
+ address-city",SHOULD,Server,false,,,6,davinci_us_drug_formulary_v201-usdf_v201_location
94
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,34,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
95
+ InsurancePlanLocation (Location)…
96
+
97
+ address-state",SHOULD,Server,false,,,6,davinci_us_drug_formulary_v201-usdf_v201_location
98
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,35,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#insuranceplanlocation-location,"Search Parameters Required by This Implementation Guide…
99
+ InsurancePlanLocation (Location)…
100
+
101
+ address-postalcode",SHOULD,Server,false,,,6,davinci_us_drug_formulary_v201-usdf_v201_location
102
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,36,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
103
+ FormularyItem (Basic)…
104
+
105
+ _id",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
106
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,37,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
107
+ FormularyItem (Basic)…
108
+
109
+ _lastUpdated",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
110
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,38,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
111
+ FormularyItem (Basic)…
112
+
113
+ code",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
114
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,39,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
115
+ FormularyItem (Basic)…
116
+
117
+ subject",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
118
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,40,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
119
+ FormularyItem (Basic)…
120
+
121
+ status",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
122
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,41,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
123
+ FormularyItem (Basic)…
124
+
125
+ period",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
126
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,42,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
127
+ FormularyItem (Basic)…
128
+
129
+ formulary",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
130
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,43,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
131
+ FormularyItem (Basic)…
132
+
133
+ pharmacy-benefit-type",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
134
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,44,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularyitem-basic,"Search Parameters Required by This Implementation Guide…
135
+ FormularyItem (Basic)…
136
+
137
+ drug-tier",SHALL,Server,false,,,4,davinci_us_drug_formulary_v201-usdf_v201_basic
138
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,45,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
139
+ FormularyDrug (MedicationKnowledge)…
140
+
141
+ _id",SHALL,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
142
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,46,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
143
+ FormularyDrug (MedicationKnowledge)…
144
+
145
+ _lastUpdated",SHALL,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
146
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,47,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
147
+ FormularyDrug (MedicationKnowledge)…
148
+
149
+ status",SHALL,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
150
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,48,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
151
+ FormularyDrug (MedicationKnowledge)…
152
+
153
+ code",SHALL,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
154
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,49,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
155
+ FormularyDrug (MedicationKnowledge)…
156
+
157
+ drug-name",SHALL,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
158
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,50,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/search_parameters.html#formularydrug-medicationknowledge,"Search Parameters Required by This Implementation Guide…
159
+ FormularyDrug (MedicationKnowledge)…
160
+
161
+ doseform",SHOULD,Server,false,,,5,davinci_us_drug_formulary_v201-usdf_v201_medication_knowledge
162
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,51,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/CapabilityStatement-usdf-server.html,[Section 6 auto-generated from capability statement],SHALL,Server,false,,,1,davinci_us_drug_formulary_v201-usdf_v201_capability_statement
163
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,52,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#conformance-expectations,This guide inherits all conformance expectations identified in the Health Record Exchange (Hrex) Conformance Expectations section (https://hl7.org/fhir/us/davinci-hrex/STU1/conformance.html). All systems claiming conformance to this guide SHALL conform to the requirements listed in that section.,SHALL,Server,false,,,"",""
164
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,53,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#conformance-expectations,Server systems claiming conformance to this guide SHALL meet the capability statement expectation requirements identified in the US Drug Formulary Server Capability Statement,SHALL,Server,false,,,1,davinci_us_drug_formulary_v201-usdf_v201_capability_statement
165
+ hl7.fhir.us.davinci-drug-formulary_2.0.1,54,https://hl7.org/fhir/us/davinci-drug-formulary/STU2.0.1/use_cases_and_overview.html#conformance-expectations,Server systems claiming conformance to this guide… SHALL have a CapabilityStatement that has a CapabilityStatement.instantiates with a URL of http://hl7.org/fhir/us/davinci-drug-formulary/CapabilityStatement/usdf-server or a URL to the appropriate version of the CapabilityStatement.,SHALL,Server,false,,,1,davinci_us_drug_formulary_v201-usdf_v201_capability_statement
@@ -49,7 +49,6 @@ module DaVinciUSDrugFormularyTestKit
49
49
  def all_include_search_params
50
50
  @all_include_search_params ||=
51
51
  search_param_names.each_with_object({}) do |value, params|
52
-
53
52
  params[value] ||= fixed_value_search_param_values.filter_map do |fixed_value|
54
53
  fixed_value_search_params(fixed_value, value).merge('_include' => include_param)
55
54
  end
@@ -272,7 +271,7 @@ module DaVinciUSDrugFormularyTestKit
272
271
 
273
272
  search_and_check_response(params_with_comparator)
274
273
 
275
- fetch_all_bundled_resources(resource_type: resource_type, bundle: resource).each do |resource|
274
+ fetch_all_bundled_resources(resource_type:, bundle: resource).each do |resource|
276
275
  check_resource_against_params(resource, params_with_comparator) if resource.resourceType == resource_type
277
276
  end
278
277
  end
@@ -504,11 +503,13 @@ module DaVinciUSDrugFormularyTestKit
504
503
 
505
504
  def select_all_bundled_resources
506
505
  if resource_type == 'MedicationRequest'
507
- fetch_all_bundled_resources(resource_type: resource_type, bundle: resource, additional_resource_types: ['Medication'])
508
- .select{ |resource| resource.resourceType == resource_type }
506
+ fetch_all_bundled_resources(resource_type:, bundle: resource, additional_resource_types: ['Medication'])
507
+ .select do |resource|
508
+ resource.resourceType == resource_type
509
+ end
509
510
  else
510
- fetch_all_bundled_resources(resource_type: resource_type, bundle: resource)
511
- .select{ |resource| resource.resourceType == resource_type }
511
+ fetch_all_bundled_resources(resource_type:, bundle: resource)
512
+ .select { |resource| resource.resourceType == resource_type }
512
513
  end
513
514
  end
514
515
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DaVinciUSDrugFormularyTestKit
4
- VERSION = '0.11.0'
5
- LAST_UPDATED = '2025-02-25'
4
+ VERSION = '0.12.1'
5
+ LAST_UPDATED = '2025-07-02'
6
6
  end
@@ -1,2 +1,2 @@
1
- require_relative 'davinci_us_drug_formulary_test_kit/metadata.rb'
1
+ require_relative 'davinci_us_drug_formulary_test_kit/metadata'
2
2
  require_relative 'davinci_us_drug_formulary_test_kit/generated/v2.0.1/usdf_test_suite'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: davinci_us_drug_formulary_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-02-25 00:00:00.000000000 Z
13
+ date: 2025-07-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: inferno_core
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.6.2
21
+ version: 0.6.15
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.6.2
28
+ version: 0.6.15
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: tls_test_kit
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +68,20 @@ dependencies:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
70
  version: '6.1'
71
+ - !ruby/object:Gem::Dependency
72
+ name: roo
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: 2.10.1
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: 2.10.1
71
85
  - !ruby/object:Gem::Dependency
72
86
  name: rspec
73
87
  requirement: !ruby/object:Gem::Requirement
@@ -228,6 +242,9 @@ files:
228
242
  - lib/davinci_us_drug_formulary_test_kit/read_test.rb
229
243
  - lib/davinci_us_drug_formulary_test_kit/reference_resolution_test.rb
230
244
  - lib/davinci_us_drug_formulary_test_kit/request_logger.rb
245
+ - lib/davinci_us_drug_formulary_test_kit/requirements/davinci_us_drug_formulary_test_kit_requirements.csv
246
+ - lib/davinci_us_drug_formulary_test_kit/requirements/generated/davinci_us_drug_formulary_v201_requirements_coverage.csv
247
+ - lib/davinci_us_drug_formulary_test_kit/requirements/hl7.fhir.us.davinci-drug-formulary_2.0.1_reqs.xlsx
231
248
  - lib/davinci_us_drug_formulary_test_kit/search_test.rb
232
249
  - lib/davinci_us_drug_formulary_test_kit/search_test_properties.rb
233
250
  - lib/davinci_us_drug_formulary_test_kit/validation_test.rb