Skip to content

Commit 4082cbb

Browse files
committed
Altered parser to accept segment ID longer than 3 characters
Segments with identifiers less than three characters long are considered invalid.
1 parent 39c7ba9 commit 4082cbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/nervestaple/hl7_parser/parser.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@
584584
(let [segment-id (string/trim (read-text message reader))]
585585

586586
;; throw an exception if we don't get a valid segment id
587-
(when (or (nil? segment-id) (not= 3 (count segment-id)))
587+
(when (or (nil? segment-id) (> 3 (count segment-id)))
588588
(throw (Exception. (str "Illegal segment id \"" segment-id "\" read"))))
589589

590590
;; create our new segment

0 commit comments

Comments
 (0)