Liking cljdoc? Tell your friends :D

com.nervestaple.hl7-parser.message


ack-messageclj

(ack-message options ack-status parsed-message)

Returns a parsed message that contains an acknowledgement message for the provided parsed message, the acknowledgement message will use the same delimiters. If the message indicates that no acknowledgement should be returned, this function will return nil.

The 'option' should be a hash-map with the following keys:

:sending-app, :sending-facility, :production-mode, :version,
:text-message

Optionally, a :message-id key may be provided if you need a specific value.

These values will be used to fill out the ACK message. The 'ack-status' field should be a valid HL7 version 2.x acknowledgment status:

AA (accepted), AE (error), AR (rejected)
Returns a parsed message that contains an acknowledgement message
for the provided parsed message, the acknowledgement message will
use the same delimiters. If the message indicates that no
acknowledgement should be returned, this function will return nil.

The 'option' should be a hash-map with the following keys:

    :sending-app, :sending-facility, :production-mode, :version,
    :text-message

Optionally, a `:message-id` key may be provided if you need a specific
value.

These values will be used to fill out the ACK message. The
'ack-status' field should be a valid HL7 version 2.x acknowledgment
status:

    AA (accepted), AE (error), AR (rejected)
raw docstring

ack-message-fallbackclj

(ack-message-fallback options ack-status message)

Returns a parsed message that contains an acknowledgement message for the provided un-parsed message, the acknowledgement message will use default delimiters. Use this function when you have an HL7v2 message that you need to acknowledge but you cannot parse.

The 'option' should be a hash-map with the following keys:

:sending-app, :sending-facility, :production-mode, :version,
:text-message

Optionally, a :message-id key may be provided if you need a specific value.

These values will be used to fill out the ACK message. The 'ack-status' field should be a valid HL7 version 2.x acknowledgment status:

AA (accepted), AE (error), AR (rejected)
Returns a parsed message that contains an acknowledgement message for the
provided un-parsed message, the acknowledgement message will use default
delimiters. Use this function when you have an HL7v2 message that you need to
acknowledge but you cannot parse.

The 'option' should be a hash-map with the following keys:

    :sending-app, :sending-facility, :production-mode, :version,
    :text-message

Optionally, a `:message-id` key may be provided if you need a specific
value.

These values will be used to fill out the ACK message. The
'ack-status' field should be a valid HL7 version 2.x acknowledgment
status:

    AA (accepted), AE (error), AR (rejected)
raw docstring

extract-text-from-segmentsclj

(extract-text-from-segments parsed-message segment-type index & options)

Extracts the text from the parsed message for the supplied index of the given segments, the text will be concatenated and returned as one String. For instance, this function would extract all of the text from the fifth index of all of the OBX segments:

  (extract-text-from-segments parsed-message 'OBX' 5)

You may pass in an optional argument that contains a character to interleave between the chunks of extracted text (for instance, ' ').

Extracts the text from the parsed message for the supplied index of
  the given segments, the text will be concatenated and returned as
  one String. For instance, this function would extract all of the text
  from the fifth index of all of the OBX segments:

      (extract-text-from-segments parsed-message 'OBX' 5)

  You may pass in an optional argument that contains a character to
  interleave between the chunks of extracted text (for instance,
  '
').
raw docstring

get-fieldclj

(get-field message segment-id field-index)

Returns the field with the provided index from the segment with the given id of the provided message.

Returns the field with the provided index from the segment with the
given id of the provided message.
raw docstring

get-field-componentclj

(get-field-component message segment-id field-index component-index)

Returns the component at the provided index from the field with the provided index from the segment with the given id in the provided message.

Returns the component at the provided index from the field with the
provided index from the segment with the given id in the provided
message.
raw docstring

get-field-firstclj

(get-field-first parsed-message segment-id field-index)

Returns the first instance of the field with the provided index from the segment with the given id of the provided message. This function is handy when you know there's only one instance of a particular segment (like 'MSH'), you won't have to grab the first element; it will be returned by this function.

Returns the first instance of the field with the provided index
from the segment with the given id of the provided message. This
function is handy when you know there's only one instance of a
particular segment (like 'MSH'), you won't have to grab the first
element; it will be returned by this function.
raw docstring

get-field-first-valueclj

(get-field-first-value parsed-message segment-id field-index)

Returns the value of the first instance of the field with the provided index from the segment with the given id of the provided message. This function is handy when you know there's only one instance of a particular segment (like 'MSH'), you won't have to grab the first element and then it's :content value; it will be returned by this function.

Returns the value of the first instance of the field with the
provided index from the segment with the given id of the provided
message. This function is handy when you know there's only one
instance of a particular segment (like 'MSH'), you won't have to
grab the first element and then it's :content value; it will be
returned by this function.
raw docstring

get-segment-fieldclj

(get-segment-field segment index)
(get-segment-field segment index raw?)

Returns the field with the provided index from the given segment. Keep in mind that this function expects the index to adhere to the HL7 specification where the first field of data is located at index 1. Another gotcha in the MSH segment, the first field of data starts at index 2 and that's the list of delimiters.

This function will return the id of the segment if you ask for index 0. For the MSH segment, it will return nil for index 1 instead of returning the field delimiter. If you want the field delimiter you can get it under the :delimiter key of the message. If the provided index is out of bounds then nil will be returned.

Returns the field with the provided index from the given
segment. Keep in mind that this function expects the index to adhere
to the HL7 specification where the first field of data is located at
index 1. Another gotcha in the MSH segment, the first field of data
starts at index 2 and that's the list of delimiters.

This function will return the id of the segment if you ask for index 0. For
the MSH segment, it will return nil for index 1 instead of returning the field
delimiter. If you want the field delimiter you can get it under the :delimiter
key of the message. If the provided index is out of bounds then nil will be
returned.
raw docstring

get-segment-field-rawclj

(get-segment-field-raw segment index)

get-segmentsclj

(get-segments message segment-id)

Returns all of the segments in the message that have the provided segment id.

Returns all of the segments in the message that have the provided
segment id.
raw docstring

message-id-unparsedclj

(message-id-unparsed message)

Returns the message id for an HL7 message by doing some simple regular expression matching on the message. This function does not involve parsing the message and may be faster.

Returns the message id for an HL7 message by doing some simple
regular expression matching on the message. This function does *not*
involve parsing the message and may be faster.
raw docstring

REGEX-MESSAGE-IDclj


segment-idsclj

(segment-ids message)

Returns a list of the segment ids present in the message.

Returns a list of the segment ids present in the message.
raw docstring

set-fieldclj

(set-field message segment-id field-index value)

Updates the message by altering the field value for the specified segment. When specifying field indexes, be sure to use the correct HL7 index (the segment id would be 0, the first field is at index 1).

Your value should be an atom or an collection, a collection indicates a field with components. Subcomponents are represented as a collection containing a collection. Pass in a collection of fields to indicate repeating fields.

Updates the message by altering the field value for the specified
segment. When specifying field indexes, be sure to use the correct
HL7 index (the segment id would be 0, the first field is at index
1).

Your value should be an atom or an collection, a collection
indicates a field with components. Subcomponents are represented as
a collection containing a collection. Pass in a collection of fields
to indicate repeating fields.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close