HL7.Query.replace_parts
You're seeing just the function
replace_parts
, go back to HL7.Query module for more information.
Specs
Replaces segment parts of all selected segments, iterating through each selection.
A replacement function accepts an HL7.Query
containing one selection with its
part
property set to the value found using the field_selector
.
Examples
iex> import HL7.Query
iex> HL7.Examples.nist_immunization_hl7()
...> |> replace_parts("OBX-3.2", fn q -> "TEST: " <> q.part end)
...> |> get_parts("OBX-3.2")
...> |> List.first()
"TEST: Vaccine funding program eligibility category"
iex> import HL7.Query
iex> HL7.Examples.wikipedia_sample_hl7()
...> |> select("PID")
...> |> replace_parts("5.2", "UNKNOWN")
...> |> get_part("PID-5.2")
"UNKNOWN"