ex_hl7 v0.3.0 HL7.Composite
Generic functions used by HL7 composite field macros
Summary
Functions
Creates the map corresponding to the underlying struct in a composite field
Converts the struct holding the composite field data into the tuple format
accepted by the functions in HL7.Writer
Converts a composite field into an iolist suitable to send over a socket or write to a file
Macros
Checks if a composite field is empty. This function is implemented as a macro so that it can be used in guards
Types
descriptor :: {name :: atom, type :: atom}
option ::
{:separators, [{key :: atom, separator :: byte}]} |
{:trim, boolean}
t :: map
Functions
Specs
decode(t, [descriptor], binary | tuple) ::
t |
no_return
Creates the map corresponding to the underlying struct in a composite field.
Specs
encode(t, [descriptor]) ::
HL7.Type.field |
no_return
Converts the struct holding the composite field data into the tuple format
accepted by the functions in HL7.Writer
.
Specs
to_iodata(t, [descriptor], [option]) ::
iodata |
no_return
Converts a composite field into an iolist suitable to send over a socket or write to a file.