HL7.Query.filter

You're seeing just the function filter, go back to HL7.Query module for more information.

Specs

filter(content_or_query_hl7(), (t() -> as_boolean(term()))) :: t()
filter(content_or_query_hl7(), binary()) :: t()
filter(content_or_query_hl7(), [binary()]) :: t()

Filters (deletes) segments within selections by whitelisting one or more segment types. Accepts either a segment name, list of acceptable names, or a function that takes an HL7.Query (containing one sub-selected segment at a time) and returns a boolean filter value.

Examples

iex> import HL7.Query
iex> HL7.Examples.nist_immunization_hl7()
...> |> filter(["MSH", "PID", "ORC"])
...> |> root()
...> |> get_segment_names()
["MSH", "PID", "ORC", "ORC", "ORC"]