elixir_hl7 v0.6.2 HL7.Segment View Source
Filter, parse and modify individual HL7 segments and their fragments.
Link to this section Summary
Functions
Extracts content from a parsed HL7 segment, returning nested data by applying each supplied index in turn. Please note that HL7 indices start at 1
Updates content within a parsed HL7 segment, returning a modified segment whose data has been transformed at the given
indices (starting at 1 as with HL7's convention). The transform
can be either a string
, list
or fn old_data -> new_data
Link to this section Types
content_hl7()
View Source
content_hl7() :: raw_hl7() | parsed_hl7()
content_hl7() :: raw_hl7() | parsed_hl7()
fragment_hl7() View Source
parsed_hl7()
View Source
parsed_hl7() :: [segment_hl7()] | HL7.Message.t()
parsed_hl7() :: [segment_hl7()] | HL7.Message.t()
raw_hl7()
View Source
raw_hl7() :: String.t() | HL7.RawMessage.t()
raw_hl7() :: String.t() | HL7.RawMessage.t()
segment_hl7()
View Source
segment_hl7() :: [fragment_hl7()]
segment_hl7() :: [fragment_hl7()]
Link to this section Functions
get_part(data, field, repetition \\ nil, component \\ nil, subcomponent \\ nil)
View Source
get_part(
segment_hl7() | fragment_hl7(),
field :: pos_integer(),
repetition :: pos_integer() | nil,
component :: pos_integer() | nil,
subcomponent :: pos_integer() | nil
) :: nil | list() | binary()
get_part( segment_hl7() | fragment_hl7(), field :: pos_integer(), repetition :: pos_integer() | nil, component :: pos_integer() | nil, subcomponent :: pos_integer() | nil ) :: nil | list() | binary()
Extracts content from a parsed HL7 segment, returning nested data by applying each supplied index in turn. Please note that HL7 indices start at 1.
leftmost_value(d) View Source
replace_part(segment, transform, field, repetition \\ nil, component \\ nil, subcomponent \\ nil)
View Source
replace_part(
segment_hl7(),
fragment_hl7() | (fragment_hl7() -> fragment_hl7()),
pos_integer(),
pos_integer() | nil,
pos_integer() | nil,
pos_integer() | nil
) :: segment_hl7()
replace_part( segment_hl7(), fragment_hl7() | (fragment_hl7() -> fragment_hl7()), pos_integer(), pos_integer() | nil, pos_integer() | nil, pos_integer() | nil ) :: segment_hl7()
Updates content within a parsed HL7 segment, returning a modified segment whose data has been transformed at the given
indices (starting at 1 as with HL7's convention). The transform
can be either a string
, list
or fn old_data -> new_data
.