us_core_test_kit 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 423a133232c347722fccf2898b4ad15c164310066ee3490b21f597fbc71f9687
4
- data.tar.gz: d6976a899786dd91a28e63671f4e94bb8062e743be466b72db5c1fc037cee661
3
+ metadata.gz: 73fe6df54949275287514ff854eddd9ad980636597d53aebf84c712b002b9ab6
4
+ data.tar.gz: ed6cafa99e52868d58333ef7c97d51918c7ddaae5c22e9fd9c39dd6d65579e8e
5
5
  SHA512:
6
- metadata.gz: fff0f5644ac84c70e2a6782d245437c62d82115e6b6c22772c2290b641ea60c3cfd293cf41a642419de436168f03f691b351d348b5bdd61818eceb9f6c01aba2
7
- data.tar.gz: e47893ae3a7207fbc0e85bd958a1d8ffc94d516206971af365f1a962f338155c40d538be86c89732bb519101d2d31e724887c05bffff98346049d3fb56f1a584
6
+ metadata.gz: 4c67d926c520ff027a2c508f72b7e09b68e7d3227d41d8bed7ee522d3de65a101a814aecb48c84bc85ecd0cb5b54d6851d4ed56d53f20c5c29bbd55ce420678e
7
+ data.tar.gz: 5e87c426a12469514878a72f6ad11afe62bdd52a5ea5966d033c984784b7a720a6fbdf08879c023a49b68e6818f4a82eb63e56391b0cd328679df6e00a62c6f4
@@ -154,7 +154,7 @@
154
154
  :path: target.measure
155
155
  - :type: Quantity
156
156
  :strength: example
157
- :system:
157
+ :system:
158
158
  :path: target.detail
159
159
  - :type: CodeableConcept
160
160
  :strength: example
@@ -5269,7 +5269,7 @@
5269
5269
  :path: target.measure
5270
5270
  - :type: Quantity
5271
5271
  :strength: example
5272
- :system:
5272
+ :system:
5273
5273
  :path: target.detail
5274
5274
  - :type: CodeableConcept
5275
5275
  :strength: example
@@ -42,8 +42,8 @@ module USCoreTestKit
42
42
  VALIDATION_MESSAGE_FILTERS = [
43
43
  %r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
44
44
  %r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
45
- /^Observation\.effective\.ofType\(Period\): vs-1:/, # Invalid invariant in FHIR v4.0.1
46
- /^Observation\.effective\.ofType\(Period\): us-core-1:/ # Invalid invariant in US Core v3.1.1
45
+ /Observation\.effective\.ofType\(Period\): vs-1:/, # Invalid invariant in FHIR v4.0.1
46
+ /Observation\.effective\.ofType\(Period\): us-core-1:/ # Invalid invariant in US Core v3.1.1
47
47
  ].freeze
48
48
 
49
49
  def self.metadata
@@ -151,7 +151,7 @@
151
151
  :path: target.measure
152
152
  - :type: Quantity
153
153
  :strength: example
154
- :system:
154
+ :system:
155
155
  :path: target.detail
156
156
  - :type: CodeableConcept
157
157
  :strength: example
@@ -5307,7 +5307,7 @@
5307
5307
  :path: target.measure
5308
5308
  - :type: Quantity
5309
5309
  :strength: example
5310
- :system:
5310
+ :system:
5311
5311
  :path: target.detail
5312
5312
  - :type: CodeableConcept
5313
5313
  :strength: example
@@ -44,8 +44,8 @@ module USCoreTestKit
44
44
  VALIDATION_MESSAGE_FILTERS = [
45
45
  %r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
46
46
  %r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
47
- /^Observation\.effective\.ofType\(Period\): vs-1:/, # Invalid invariant in FHIR v4.0.1
48
- /^Observation\.effective\.ofType\(Period\): us-core-1:/ # Invalid invariant in US Core v3.1.1
47
+ /Observation\.effective\.ofType\(Period\): vs-1:/, # Invalid invariant in FHIR v4.0.1
48
+ /Observation\.effective\.ofType\(Period\): us-core-1:/ # Invalid invariant in US Core v3.1.1
49
49
  ].freeze
50
50
 
51
51
  def self.metadata
@@ -529,6 +529,20 @@ module USCoreTestKit
529
529
  page_count += 1
530
530
  end
531
531
 
532
+ valid_resource_types = [resource_type, 'OperationOutcome'].concat(additional_resource_types)
533
+ valid_resource_types << 'Medication' if resource_type == 'MedicationRequest'
534
+
535
+ invalid_resource_types =
536
+ resources.reject { |entry| valid_resource_types.include? entry.resourceType }
537
+ .map(&:resourceType)
538
+ .uniq
539
+
540
+ if invalid_resource_types.any?
541
+ info "Received resource type(s) #{invalid_resource_types.join(', ')} in search bundle, " \
542
+ "but only expected resource types #{valid_resource_types.join(', ')}. " + \
543
+ "This is unusual but allowed if the server believes additional resource types are relevant."
544
+ end
545
+
532
546
  resources
533
547
  end
534
548
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module USCoreTestKit
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: us_core_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen MacVicar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-01 00:00:00.000000000 Z
11
+ date: 2022-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core