Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HL7.get/2 is missing a return type #44

Closed
gabbybene opened this issue Aug 12, 2024 · 0 comments · Fixed by #45
Closed

HL7.get/2 is missing a return type #44

gabbybene opened this issue Aug 12, 2024 · 0 comments · Fixed by #45

Comments

@gabbybene
Copy link
Contributor

HL7.get/2 can return a list of hl7_map_data() when selecting multiple segments, but this is currently missing from the function's typespec.

Example:

import HL7
HL7.Examples.wikipedia_sample_hl7()
|> HL7.new!()
|> HL7.get(~p"OBX[*]")

returns

[
  %{
    0 => "OBX",
    1 => "1",
    2 => %{1 => %{1 => "N", 2 => %{1 => "K", 2 => "M"}}},
    3 => %{1 => %{2 => "Body Height"}},
    5 => "1.80",
    6 => %{1 => %{1 => "m", 2 => "Meter", 3 => "ISO+"}},
    11 => "F"
  },
  %{
    0 => "OBX",
    1 => "2",
    2 => "NM",
    3 => %{1 => %{2 => "Body Weight"}},
    5 => "79",
    6 => %{1 => %{1 => "kg", 2 => "Kilogram", 3 => "ISO+"}},
    11 => "F"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant