(extract-trailing segment index)Extracts and unwraps all of the data from a segment of parsed HL7 v2 data starting at the provided HL7 v2 index and returns that data as a vector.
Extracts and unwraps all of the data from a segment of parsed HL7 v2 data starting at the provided HL7 v2 index and returns that data as a vector.
(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 there is no data at the given index, 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 there is no data at the given index, nil will be returned.
(hl7-to-record segment-id field-limit to-type-fn segment)Converts a segment of parsed HL7 data into an HL7 record by applying the
supplied map of segment data to the to-type function. Any segment data that
is not included in the record (that is, has an index greater that the HL7
index field-limit) will be present on the record under the key :remainder.
Converts a segment of parsed HL7 data into an HL7 record by applying the supplied map of segment data to the `to-type` function. Any segment data that is not included in the record (that is, has an index greater that the HL7 index `field-limit`) will be present on the record under the key `:remainder`.
(record-to-hl7 segment-id to-hl7-fn record)Converts a segment record into a segment of parsed HL7 v2 data by creating a
new parsed HL7 segment of with the provided segment-id and then applying the
to-hl7-fn to the supplied record of data and adding it to the segment.
Converts a segment record into a segment of parsed HL7 v2 data by creating a new parsed HL7 segment of with the provided `segment-id` and then applying the `to-hl7-fn` to the supplied record of data and adding it to the segment.
(replace-first lookup-fn data)Removes the first item in a collection and replaces it with the result of applying that item to the lookup-fn. The lookup-fn should be a one argument function.
Removes the first item in a collection and replaces it with the result of applying that item to the lookup-fn. The lookup-fn should be a one argument function.
(segment-to-hl7-remainder to-hl7-fn)Accepts a function that converts a segment record into a segment of parsed HL7 v2 data and returns another function that converts the record, in addition any data on the :remainder key of the record to be converted is appended to the end of the returned HL7 v2 data.
Accepts a function that converts a segment record into a segment of parsed HL7 v2 data and returns another function that converts the record, in addition any data on the :remainder key of the record to be converted is appended to the end of the returned HL7 v2 data.
(validate-segment segment-id segment)Accepts a segment identifier and a segment, if the segment's identifier doesn't
match the supplied segment-id then an exception is thrown.
Accepts a segment identifier and a segment, if the segment's identifier doesn't match the supplied `segment-id` then an exception is thrown.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |