7. ASTM implemetation modules¶
7.1. astm.omnilab
:: Omnilab LabOnline¶
Based on:
file: | LABONLINE - HOST connection specifications |
---|---|
author: | Giuseppe Iannucci |
revision: | 2 |
date: | 2011-05-31 |
7.1.1. astm.omnilab.client
- LabOnline client implementation¶
-
class
astm.omnilab.client.
Header
(*args, **kwargs)¶ ASTM header record.
Parameters: - type (str) – Record Type ID. Always
H
. - delimeter (str) – Delimiter Definition. Always
\^&
. - message_id (None) – Message Control ID. Not used.
- password (None) – Access Password. Not used.
- sender (
Sender
) – Information about sender. Optional. - address (None) – Sender Street Address. Not used.
- reserved (None) – Reserved Field. Not used.
- phone (None) – Sender Telephone Number. Not used.
- chars (None) – Sender Characteristics. Not used.
- receiver (None) – Information about receiver. Not used.
- comments (None) – Comments. Not used.
- processing_id (str) – Processing ID. Always
P
. - version (str) – ASTM Version Number. Always
E 1394-97
. - timestamp (datetime.datetime) – Date and Time of Message
- type (str) – Record Type ID. Always
-
class
astm.omnilab.client.
Patient
(*args, **kwargs)¶ ASTM patient record.
Parameters: - type (str) – Record Type ID. Always
P
. - seq (int) – Sequence Number. Required.
- practice_id (str) – Practice Assigned Patient ID. Required. Length: 12.
- laboratory_id (str) – Laboratory Assigned Patient ID. Required. Length: 16.
- id (None) – Patient ID. Not used.
- name (
PatientName
) – Patient name. - maiden_name (None) – Mother’s Maiden Name. Not used.
- birthdate (datetime.date) – Birthdate.
- sex (str) – Patient Sex. One of:
M
(male),F
(female),I
(animal),None
is unknown. - race (None) – Patient Race-Ethnic Origin. Not used.
- address (None) – Patient Address. Not used.
- reserved (None) – Reserved Field. Not used.
- phone (None) – Patient Telephone Number. Not used.
- physician_id (None) – Attending Physician. Not used.
- special_1 (None) – Special Field #1. Not used.
- special_2 (int) – Patient source. Possible values:
-
0
: internal patient; -1
: external patient. - height (None) – Patient Height. Not used.
- weight (None) – Patient Weight. Not used.
- diagnosis (None) – Patient’s Known Diagnosis. Not used.
- medications (None) – Patient’s Active Medications. Not used.
- diet (None) – Patient’s Diet. Not used.
- practice_1 (None) – Practice Field No. 1. Not used.
- practice_2 (None) – Practice Field No. 2. Not used.
- admission_date (None) – Admission/Discharge Dates. Not used.
- admission_status (None) – Admission Status. Not used.
- location (str) – Patient location. Length: 20.
- diagnostic_code_nature (None) – Nature of diagnostic code. Not used.
- diagnostic_code (None) – Diagnostic code. Not used.
- religion (None) – Patient religion. Not used.
- martial_status (None) – Martian status. Not used.
- isolation_status (None) – Isolation status. Not used.
- language (None) – Language. Not used.
- hospital_service (None) – Hospital service. Not used.
- hospital_institution (None) – Hospital institution. Not used.
- dosage_category (None) – Dosage category. Not used.
- type (str) – Record Type ID. Always
-
class
astm.omnilab.client.
Order
(*args, **kwargs)¶ ASTM order record.
Parameters: - type (str) – Record Type ID. Always
O
. - seq (int) – Sequence Number. Required.
- sample_id (str) – Sample ID number. Required. Length: 12.
- instrument (None) – Instrument specimen ID. Not used.
- test (
Test
) – Test information structure (aka Universal Test ID). - priority (str) – Priority flag. Required. Possible values:
-
S
: stat; -R
: routine. - created_at (datetime.datetime) – Ordered date and time. Required.
- sampled_at (datetime.datetime) – Specimen collection date and time.
- collected_at (None) – Collection end time. Not used.
- volume (None) – Collection volume. Not used.
- collector (None) – Collector ID. Not used.
- action_code (str) – Action code. Required. Possible values:
-
C
: cancel works for specified tests; -A
: add tests to existed specimen; -N
: create new order; -R
: rerun tests for specified order; - danger_code (None) – Danger code. Not used.
- clinical_info (None) – Revelant clinical info. Not used.
- delivered_at (None) – Date/time specimen received.
- biomaterial (str) – Sample material code. Length: 20.
- physician (None) – Ordering Physician. Not used.
- physician_phone (None) – Physician’s phone number. Not used.
- user_field_1 (str) – An optional field, it will be send back unchanged to the host along with the result. Length: 20.
- user_field_2 (str) – An optional field, it will be send back unchanged to the host along with the result. Length: 1024.
- laboratory_field_1 (str) – In multi-laboratory environment it will be used to indicate which laboratory entering the order. Length: 20.
- laboratory_field_2 (str) – Primary tube code. Length: 12.
- modified_at (None) – Date and time of last result modification. Not used.
- instrument_charge (None) – Instrument charge to computer system. Not used.
- instrument_section (None) – Instrument section id. Not used.
- report_type (str) – Report type. Always
O
which means normal order request. - reserved (None) – Reserved. Not used.
- location_ward (None) – Location ward of specimen collection. Not used.
- infection_flag (None) – Nosocomial infection flag. Not used.
- specimen_service (None) – Specimen service. Not used.
- laboratory (str) – Production laboratory: in multi-laboratory environment indicates laboratory expected to process the order. Length: 20.
- type (str) – Record Type ID. Always
-
class
astm.omnilab.client.
Result
(*args, **kwargs)¶ ASTM patient record.
Parameters: - type (str) – Record Type ID. Always
R
. - seq (int) – Sequence Number. Required.
- test (
Test
) – Test information structure (aka Universal Test ID). - value (None) – Measurement value. Numeric, coded or free text value depending on result type. Required. Length: 1024.
- units (None) – Units. Not used.
- references (None) – Reference ranges. Not used.
- abnormal_flag (None) – Result abnormal flag. Not used.
- abnormality_nature (None) – Nature of abnormality testing. Not used.
- status (None) – Result status. Not used.
- normatives_changed_at (None) – Date of changes in instrument normative values or units. Not used.
- operator (None) – Operator ID. Not used.
- started_at (None) – When works on test was started on. Not used.
- completed_at (datetime.datetime) – When works on test was done. Required.
- instrument (None) – Instrument ID. Not used.
- type (str) – Record Type ID. Always
-
class
astm.omnilab.client.
Comment
(*args, **kwargs)¶ ASTM patient record.
Parameters:
7.1.2. astm.omnilab.server
- LabOnline server implementation¶
-
class
astm.omnilab.server.
RecordsDispatcher
(*args, **kwargs)¶ Omnilab specific records dispatcher. Automatically wraps records by related mappings.
-
class
astm.omnilab.server.
Header
(*args, **kwargs)¶ ASTM header record.
Parameters: - type (str) – Record Type ID. Always
H
. - delimeter (str) – Delimiter Definition. Always
\^&
. - message_id (None) – Message Control ID. Not used.
- password (None) – Access Password. Not used.
- sender (
Sender
) – Information about sender. Optional. - address (None) – Sender Street Address. Not used.
- reserved (None) – Reserved Field. Not used.
- phone (None) – Sender Telephone Number. Not used.
- chars (None) – Sender Characteristics. Not used.
- receiver (None) – Information about receiver. Not used.
- comments (None) – Comments. Not used.
- processing_id (str) – Processing ID. Always
P
. - version (str) – ASTM Version Number. Always
E 1394-97
. - timestamp (datetime.datetime) – Date and Time of Message
- type (str) – Record Type ID. Always
-
astm.omnilab.server.
Patient
¶ alias of
CommonPatient
-
class
astm.omnilab.server.
Order
(*args, **kwargs)¶ ASTM order record.
Parameters: - type (str) – Record Type ID. Always
O
. - seq (int) – Sequence Number. Required.
- sample_id (str) – Sample ID number. Required. Length: 12.
- instrument (
Instrument
) – Instrument specimen ID. - test (
Test
) – Test information structure (aka Universal Test ID). - priority (str) – Priority flag. Required. Possible values:
-
S
: stat; -R
: routine. - created_at (datetime.datetime) – Ordered date and time. Required.
- sampled_at (datetime.datetime) – Specimen collection date and time.
- collected_at (None) – Collection end time. Not used.
- volume (None) – Collection volume. Not used.
- collector (None) – Collector ID. Not used.
- action_code (str) – Action code. Required. Possible values:
-
None
: normal order result; -Q
: quality control; - danger_code (None) – Danger code. Not used.
- clinical_info (None) – Revelant clinical info. Not used.
- delivered_at (None) – Date/time specimen received.
- biomaterial (str) – Sample material code. Length: 20.
- physician (None) – Ordering Physician. Not used.
- physician_phone (None) – Physician’s phone number. Not used.
- user_field_1 (str) – An optional field, it will be send back unchanged to the host along with the result. Length: 20.
- user_field_2 (str) – An optional field, it will be send back unchanged to the host along with the result. Length: 1024.
- laboratory_field_1 (None) – Laboratory field #1. Not used.
- laboratory_field_2 (str) – Primary tube code. Length: 12.
- modified_at (None) – Date and time of last result modification. Not used.
- instrument_charge (None) – Instrument charge to computer system. Not used.
- instrument_section (None) – Instrument section id. Not used.
- report_type (str) – Report type. Always
F
which means final order request. - reserved (None) – Reserved. Not used.
- location_ward (None) – Location ward of specimen collection. Not used.
- infection_flag (None) – Nosocomial infection flag. Not used.
- specimen_service (None) – Specimen service. Not used.
- laboratory (None) – Production laboratory. Not used.
- type (str) – Record Type ID. Always
-
class
astm.omnilab.server.
Result
(*args, **kwargs)¶ ASTM patient record.
Parameters: - type (str) – Record Type ID. Always
R
. - seq (int) – Sequence Number. Required.
- test (
Test
) – Test information structure (aka Universal Test ID). - value (None) – Measurement value. Numeric, coded or free text value depending on result type. Required. Length: 1024.
- units (str) – Units. Length: 20.
- references (str) – Normal reference value interval.
- abnormal_flag (str) – Result abnormal flag. Possible values:
-
0
: normal result; -1
: result out of normal values; -2
: result out of attention values; -3
: result out of panic values; +10 Delta-check; +1000 Device alarm. Length: 4. - abnormality_nature (str) – Nature of abnormality testing. Possible values:
-
N
: normal value; -L
: below low normal range; -H
: above high normal range; -LL
: below low critical range; -HH
: above high critical range. - status (str) – Result status.
F
indicates a final result;R
indicating rerun. Length: 1. - normatives_changed_at (None) – Date of changes in instrument normative values or units. Not used.
- operator (
Operator
) – Operator ID. - started_at (datetime.datetime) – When works on test was started on.
- completed_at (datetime.datetime) – When works on test was done.
- instrument (
Instrument
) – Instrument ID. Required.
- type (str) – Record Type ID. Always