yahl7 0.3.2 → 0.3.3
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/CHANGELOG.md +10 -0
- data/lib/yahl7/v2/field_parser.rb +4 -7
- data/lib/yahl7/v2/segment/msh.rb +19 -20
- data/lib/yahl7/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d141ebcf963ad65a7423b151dbace65c9c3c10686e3c2a4b1d6e4f0f83437e7c
|
4
|
+
data.tar.gz: afcb1e44e825b5eaeb1bf1c5ba873d88787378e8632eb02eeb9b238566205064
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26dd504e49b914c590f23ab060510b0bbfaac22c08c80f17b95e323af46f61d79c0e1caa810e416b46cc1ff03d0c438006ce33d84712f0c53a2a9829d2f0bd41
|
7
|
+
data.tar.gz: 408a1274a45ed3d06f4b14d86e5d4a1deb5d00535b9ccb09c63bed747a790c66aa1cca6e883257af27826040b829946c8b532265649cc6dee5af4dd1ca4a3bdb
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.3.3] - 2021-09-01
|
9
|
+
|
10
|
+
This version comes with a few bugfixes
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- The mapping order of MSH fields was incorrect.
|
15
|
+
- When `YAHL7::V2::FieldParser` was given a `nil` value, the program could
|
16
|
+
crash. This condition should now be resolved.
|
17
|
+
|
8
18
|
## [0.3.2] - 2021-09-01
|
9
19
|
|
10
20
|
0.3.1 introduced a bug that is fixed in this release.
|
@@ -19,13 +19,8 @@ module YAHL7
|
|
19
19
|
private
|
20
20
|
|
21
21
|
def split_fields(body)
|
22
|
-
|
23
|
-
|
24
|
-
if fields.is_a?(String)
|
25
|
-
split_components(fields)
|
26
|
-
else
|
27
|
-
fields.map { |f| split_components(f) }
|
28
|
-
end
|
22
|
+
parts = split_body(body, parse_options.field_sep)
|
23
|
+
parts.is_a?(Array) ? parts.map { |f| split_components(f) } : split_components(parts)
|
29
24
|
end
|
30
25
|
|
31
26
|
def split_components(body)
|
@@ -43,6 +38,8 @@ module YAHL7
|
|
43
38
|
end
|
44
39
|
|
45
40
|
def split_body(body, separator)
|
41
|
+
return '' if body.nil?
|
42
|
+
|
46
43
|
got = body.split(separator)
|
47
44
|
got.count < 2 ? body : got
|
48
45
|
end
|
data/lib/yahl7/v2/segment/msh.rb
CHANGED
@@ -10,26 +10,25 @@ module YAHL7
|
|
10
10
|
|
11
11
|
define_field_names({
|
12
12
|
field_separator: 1,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
message_profile_identifier: 21
|
13
|
+
sending_application: 2,
|
14
|
+
sending_facility: 3,
|
15
|
+
receiving_application: 4,
|
16
|
+
receiving_facility: 5,
|
17
|
+
message_datetime: { index: 6, class: YAHL7::V2::DataType::TS },
|
18
|
+
security: 7,
|
19
|
+
message_type: 8,
|
20
|
+
message_control_id: 9,
|
21
|
+
processing_id: 10,
|
22
|
+
version_id: 11,
|
23
|
+
sequence_number: 12,
|
24
|
+
continuation_pointer: 13,
|
25
|
+
accept_acknowledgement_type: 14,
|
26
|
+
application_acknowledgement_type: 15,
|
27
|
+
country_code: 16,
|
28
|
+
character_set: 17,
|
29
|
+
principal_language: 18,
|
30
|
+
alternate_character_set_handling_scheme: 19,
|
31
|
+
message_profile_identifier: 20
|
33
32
|
})
|
34
33
|
end
|
35
34
|
end
|
data/lib/yahl7/version.rb
CHANGED