onc_certification_g10_test_kit 3.3.0 → 3.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29d1384f7d5a0ae29a25db2bef10d89572ef5112298a21ddc9ec8a7316947a62
|
4
|
+
data.tar.gz: 5c4b63d1d7a45c65fc3af1e8d56b466fd99a811a06baedbdf6cd558b1085e3b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a9bc19aa48b0b24bb045368b08e5de4dd1256258a4f17b0ef810a0c02653049ba4b5c300ccb24f1d47f300cca274f816a5d7c8a9e274e8ab7a8d69371885a74
|
7
|
+
data.tar.gz: 3bfcbb63b923db092d12cd148911ee7993161799ea6bf25a60b187676ecf923e53935ea7546c7052e4489ff337f0b17c0dcd3078fde3a68dc2033039f7b9a214
|
@@ -18,12 +18,42 @@ module ONCCertificationG10TestKit
|
|
18
18
|
@validation_messages = []
|
19
19
|
end
|
20
20
|
|
21
|
+
def us_core_5_condition_category?
|
22
|
+
binding_definition[:path] == 'category' &&
|
23
|
+
binding_definition[:system] == 'http://hl7.org/fhir/us/core/ValueSet/us-core-problem-or-health-concern'
|
24
|
+
end
|
25
|
+
|
21
26
|
def validate
|
22
|
-
|
27
|
+
# Handle special case due to required binding on a slice
|
28
|
+
if us_core_5_condition_category?
|
29
|
+
validate_us_core_5_condition_category
|
30
|
+
else
|
31
|
+
add_error(element_with_invalid_binding) if element_with_invalid_binding.present? # rubocop:disable Style/IfInsideElse
|
32
|
+
end
|
23
33
|
|
24
34
|
validation_messages
|
25
35
|
end
|
26
36
|
|
37
|
+
def validate_us_core_5_condition_category
|
38
|
+
valid_category =
|
39
|
+
find_a_value_at(path_source, binding_definition[:path]) do |element|
|
40
|
+
!invalid_binding?(element)
|
41
|
+
end
|
42
|
+
|
43
|
+
return if valid_category.present?
|
44
|
+
|
45
|
+
error_message = %(
|
46
|
+
#{resource_type}/#{resource.id} does not contain a `category` from the
|
47
|
+
`http://hl7.org/fhir/us/core/ValueSet/us-core-problem-or-health-concern`
|
48
|
+
ValueSet.
|
49
|
+
)
|
50
|
+
|
51
|
+
validation_messages << {
|
52
|
+
type: 'error',
|
53
|
+
message: error_message
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
27
57
|
def path_source
|
28
58
|
return resource if binding_definition[:extensions].blank?
|
29
59
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onc_certification_g10_test_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
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-11-
|
11
|
+
date: 2022-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bloomer
|