Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component []Data
Component is a type that contains Fields and SubComponents. Usually separated by '^'. e.g. component1^component2
type Composer ¶
Composer is an interface that represents a piece of data that is indexable and composable.
type Encoder ¶
func NewEncoder ¶
NewEncoder creates and initializes an Encoder which will write an encoded HL7 message to the provided io.Writer.
func (*Encoder) Encode ¶
Encode converts the provided slice of Segments stored in the Encoder to an HL7 "pipehat" encoded message and writes it to the io.Writer set in its Writer field. The Segment slice must contain a valid message header (MSH) segment with fields 1 and 2 populated with the field separator and escape characters; if this segment is not present, Encode will return an error.
type Field ¶
type Field []byte
Field represents a slice of bytes. This is the most basic type in a HL7 message. e.g., in: MSH|^~\&|field|component1^component2 "MSH", "^~\&", "field", "component1", "component2" are all Fields.
type Repeated ¶
type Repeated []Data
Repeated is a type that contains Fields, SubComponents, and Components. Usually separated by '~'. e.g. component1a^component2a~component1b^component2b
type Segment ¶
type Segment []Data
Segment is a type that contains Fields, SubComponents, Components, and Repeated. Usually separated by '|'. e.g. MSH|field1
type SubComponent ¶
type SubComponent []Field
SubComponent is a type that contains Fields. Usually separated by '&'. e.g. subcomponent1&subcomponent2
func (*SubComponent) Append ¶
func (s *SubComponent) Append(values ...Data) error
Append appends Data to this SubComponent.
func (SubComponent) Index ¶
func (s SubComponent) Index(index int) (Data, bool)
Index returns the Data at a certain index inside this SubComponent.
func (SubComponent) Len ¶
func (s SubComponent) Len() int