Home | Trees | Indices | Help |
|
---|
|
Some HL7 handling.
Author: K.Hilbert <Karsten.Hilbert@gmx.net>
License: GPL v2 or later
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
HL7_EOL = '\r'
|
|
HL7_BRK = '\.br\\'
|
|
HL7_SEGMENTS = 'FHS BHS MSH PID PV1 OBX NTE ORC OBR'.split()
|
|
HL7_segment2field_count = {'FHS': 12, 'BHS': 12, 'MSH': 19, 'P
|
|
MSH_field__sending_lab = 3
|
|
PID_field__name = 5
|
|
PID_field__dob = 7
|
|
PID_field__gender = 8
|
|
PID_component__lastname = 1
|
|
PID_component__firstname = 2
|
|
PID_component__middlename = 3
|
|
OBR_field__service_name = 4
|
|
OBR_field__ts_requested = 6
|
|
OBR_field__ts_started = 7
|
|
OBR_field__ts_ended = 8
|
|
OBR_field__ts_specimen_received = 14
|
|
OBX_field__set_id = 1
|
|
OBX_field__datatype = 2
|
|
OBX_field__type = 3
|
|
OBX_component__loinc = 1
|
|
OBX_component__name = 2
|
|
OBX_field__subid = 4
|
|
OBX_field__value = 5
|
|
OBX_field__unit = 6
|
|
OBX_field__range = 7
|
|
OBX_field__abnormal_flag = 8
|
|
OBX_field__status = 11
|
|
OBX_field__timestamp = 14
|
|
NET_field__set_id = 1
|
|
NET_field__src = 2
|
|
NET_field__note = 3
|
|
HL7_field_labels = {'MSH': {0: 'Segment Type', 1: 'Field Separ
|
|
HL7_GENDERS = {'F': 'f', 'M': 'm', 'O': None, 'U': None, None:
|
Imports: sys, os, io, logging, time, shutil, pyDT, pyhl7, pyxml, gmI18N, gmTools, gmBusinessDBObject, gmPG2, gmDateTime, gmIncomingData, gmPathLab, gmPerson, gmPraxis, gmStaff
Function Details |
Multi-step processing of HL7 files. - input can be multi-MSH / multi-PID / partially malformed HL7 - tries to fix oddities - splits by MSH - splits by PID into <target_dir> - needs write permissions in dir_of(filename) - moves HL7 files which were successfully split up into dir_of(filename)/done/ - returns (True|False, list_of_PID_files) |
Multi-step processing of HL7 files. - input must be single-MSH / single-PID / normalized HL7 - imports into clin.incoming_data_unmatched - needs write permissions in dir_of(filename) - moves PID files which were successfully staged into dir_of(filename)/done/PID/ |
Variables Details |
HL7_segment2field_count
|
HL7_field_labels
|
HL7_GENDERS
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Dec 19 02:55:28 2018 | http://epydoc.sourceforge.net |