{"action":"opened","issue":{"url":"https://api.github.com/repos/ruby-hl7/ruby-hl7/issues/50","labels_url":"https://api.github.com/repos/ruby-hl7/ruby-hl7/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/ruby-hl7/ruby-hl7/issues/50/comments","events_url":"https://api.github.com/repos/ruby-hl7/ruby-hl7/issues/50/events","html_url":"https://github.com/ruby-hl7/ruby-hl7/issues/50","id":104397531,"number":50,"title":"Splitting multi-valued fields on `item_delim`","user":{"login":"adamstegman","id":286694,"avatar_url":"https://avatars.githubusercontent.com/u/286694?v=3","gravatar_id":"","url":"https://api.github.com/users/adamstegman","html_url":"https://github.com/adamstegman","followers_url":"https://api.github.com/users/adamstegman/followers","following_url":"https://api.github.com/users/adamstegman/following{/other_user}","gists_url":"https://api.github.com/users/adamstegman/gists{/gist_id}","starred_url":"https://api.github.com/users/adamstegman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamstegman/subscriptions","organizations_url":"https://api.github.com/users/adamstegman/orgs","repos_url":"https://api.github.com/users/adamstegman/repos","events_url":"https://api.github.com/users/adamstegman/events{/privacy}","received_events_url":"https://api.github.com/users/adamstegman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-02T03:48:47Z","updated_at":"2015-09-02T03:48:47Z","closed_at":null,"body":"We have to do `(seg.field || \"\").split(seg.item_delim)` a lot, and it's pretty silly. What would a good API to do this from the gem look like?\r\n\r\nIdeally it would be something like `obx.units[4]`, but that would break the existing API and might be confusing when some fields are arrays and some are strings. So maybe this should be a new method.\r\n\r\nWhat about something like `HL7::Message::Segment.split_field(obx.units)`? It's quite verbose but I'm not sure where else to hang the function. It should handle `nil` and return an empty array.\r\n\r\nDoes anyone have any thoughts about this?"}}