(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
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 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)
(ack-message-fallback options ack-status 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
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 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)
(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 th 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 th 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, ' ').
(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.
(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.
(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.
(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.
(get-segment-field segment index)
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.
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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close