{"action":"created","issue":{"url":"https://api.github.com/repos/alivecor/simple_hl7/issues/5","repository_url":"https://api.github.com/repos/alivecor/simple_hl7","labels_url":"https://api.github.com/repos/alivecor/simple_hl7/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/alivecor/simple_hl7/issues/5/comments","events_url":"https://api.github.com/repos/alivecor/simple_hl7/issues/5/events","html_url":"https://github.com/alivecor/simple_hl7/issues/5","id":173600847,"number":5,"title":"Parsing through a range of multiple values in a segment?","user":{"login":"bradbajuz","id":2166808,"avatar_url":"https://avatars.githubusercontent.com/u/2166808?v=3","gravatar_id":"","url":"https://api.github.com/users/bradbajuz","html_url":"https://github.com/bradbajuz","followers_url":"https://api.github.com/users/bradbajuz/followers","following_url":"https://api.github.com/users/bradbajuz/following{/other_user}","gists_url":"https://api.github.com/users/bradbajuz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradbajuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradbajuz/subscriptions","organizations_url":"https://api.github.com/users/bradbajuz/orgs","repos_url":"https://api.github.com/users/bradbajuz/repos","events_url":"https://api.github.com/users/bradbajuz/events{/privacy}","received_events_url":"https://api.github.com/users/bradbajuz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-27T15:19:31Z","updated_at":"2016-08-31T03:11:45Z","closed_at":"2016-08-31T03:11:45Z","body":"I'm wondering if there is an easier way to grab multiple values from a segment?\r\n\r\n**Example:**\r\n`msg.pid[5].to_s`\r\n**Output:** Gives us patient last name\r\n\r\n`msg.pid[5][2].to_s`\r\n**Output:** Gives us patient first name\r\n\r\n`order = \"#{msg.pid[5].to_s}, #{msg.pid[5][2].to_s}\"`\r\n**Output:** Gives us full patient name\r\n\r\nBut is there an easier way to get the full patient name by iterating?\r\n\r\nWhat about a segment range?\r\n**Example:**\r\n\r\n`msg.pid[1..13].to_s`\r\n**Output:** would give the all the data from the PID segment\r\n"},"comment":{"url":"https://api.github.com/repos/alivecor/simple_hl7/issues/comments/243646336","html_url":"https://github.com/alivecor/simple_hl7/issues/5#issuecomment-243646336","issue_url":"https://api.github.com/repos/alivecor/simple_hl7/issues/5","id":243646336,"user":{"login":"hportlock","id":558025,"avatar_url":"https://avatars.githubusercontent.com/u/558025?v=3","gravatar_id":"","url":"https://api.github.com/users/hportlock","html_url":"https://github.com/hportlock","followers_url":"https://api.github.com/users/hportlock/followers","following_url":"https://api.github.com/users/hportlock/following{/other_user}","gists_url":"https://api.github.com/users/hportlock/gists{/gist_id}","starred_url":"https://api.github.com/users/hportlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hportlock/subscriptions","organizations_url":"https://api.github.com/users/hportlock/orgs","repos_url":"https://api.github.com/users/hportlock/repos","events_url":"https://api.github.com/users/hportlock/events{/privacy}","received_events_url":"https://api.github.com/users/hportlock/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T03:11:45Z","updated_at":"2016-08-31T03:11:45Z","body":"Sure if you come up with something good feel free to add it to the README and send a pull request. For now I'll make this issue as closed."}}
{"actor":{"display_login":"hportlock"}}