View Source HL7.Segment (elixir_hl7 v0.9.3)
Filter, parse and modify individual HL7 segments and their fragments.
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
.
Types
@type content_hl7() :: raw_hl7() | parsed_hl7()
@type parsed_hl7() :: [segment_hl7()] | HL7.Message.t()
@type raw_hl7() :: String.t() | HL7.RawMessage.t()
@type segment_hl7() :: [fragment_hl7()]
Functions
get_part(data, field, repetition \\ nil, component \\ nil, subcomponent \\ nil)
View Source@spec 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.
replace_part(segment, transform, field, repetition \\ nil, component \\ nil, subcomponent \\ nil)
View Source@spec replace_part( segment_hl7(), fragment_hl7() | (fragment_hl7() -> fragment_hl7()), pos_integer(), pos_integer() | nil, pos_integer() | nil, pos_integer() | nil ) :: segment_hl7() | String.t()
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
.