Module gmHL7
source code
Some HL7 handling.
Author:
K.Hilbert <Karsten.Hilbert@gmx.net>
License:
GPL v2 or later
|
cIncomingData
Represents items of incoming data, say, HL7 snippets.
|
|
|
|
|
|
delete_incoming_data(pk_incoming_data=None) |
source code
|
|
|
fix_HL7_stupidities(filename,
encoding='utf8') |
source code
|
|
|
|
|
split_HL7_by_MSH(filename,
encoding='utf8') |
source code
|
|
|
|
|
split_HL7_by_PID(filename,
encoding='utf8') |
source code
|
|
|
import_MSH(filename)
Assumes what's produced by flatten_MSH_by_PID(). |
source code
|
|
|
stage_MSH_as_incoming_data(filename,
source=None)
Assumes what's produced by flatten_MSH_by_PID(). |
source code
|
|
|
HL7_EOL = u'\r'
|
|
HL7_SEGMENTS = u'FHS BHS MSH PID PV1 OBX NTE ORC OBR'.split()
|
|
MSH_sending_lab = 3
|
|
PID_name = 5
|
|
PID_lastname = 0
|
|
PID_firstname = 1
|
|
PID_middlename = 2
|
|
PID_dob = 7
|
|
PID_gender = 8
|
|
OBX_type = 3
|
|
OBX_LOINC = 0
|
|
OBX_name = 1
|
|
OBX_value = 5
|
|
OBX_unit = 6
|
Imports:
sys,
os,
codecs,
logging,
time,
pyDT,
pyhl7,
pyxml,
gmTools,
gmBusinessDBObject,
gmPG2,
gmDateTime,
gmPathLab