Module utilities.hl7_utils
Parse HL7 data into pdf extractor schedule/demographic format.
Functions
def hl7_demo_preprocess(hl7_entries: collections.abc.Mapping[str, PDFLibProto]) ‑> tuple[list[dict[str, str]], list[str]]
-
Preprocess hl7 data files into expected DataFrameMatcher format.
Originally implemented for support of HL7 v2.3 data files from bluelakesolutions.com (now defunct).
Args
hl7_entries
- mapping of file names to PDFLibProto objects containing the raw hl7 data
Returns
tuple of (list of dicts containing parsed hl7 data, list of static dates of service)
Classes
class ConcatTuple (source_keys: list[str], output_key: str, concat_func: collections.abc.Callable[[list[str | vStr]], str | vStr] = <function ConcatTuple.<lambda>>, keep_sources: bool = True)
-
Define fields in the raw output whose values should be concatenated under a new key in the final output.
Attributes
source_keys
- list of keys in the raw output whose values should be concatenated
output_key
- key under which the concatenated value should be stored
concat_func
- function to apply to the concatenated values
keep_sources
- whether to keep the source keys in the final output
Ancestors
- builtins.tuple
Instance variables
var concat_func : collections.abc.Callable[[list[str | vStr]], str | vStr]
-
Alias for field number 2
var keep_sources : bool
-
Alias for field number 3
var output_key : str
-
Alias for field number 1
var source_keys : list[str]
-
Alias for field number 0