__all__ = [ 'RecordsDispatcher', 'Header', 'Patient', 'Order', 'Result', 'Query', 'Terminator', 'Instrument', 'Test', 'Specimen', 'TestType', 'Sample', 'QcInfo', 'ResultValue', 'ResultRange' ] #: Specimen information structure. #: #: :param patient_id: 病人ID. Length: 30 #: :type patient_id: str #: #: :param barcode: 样本条码. Length: 27 #: :type barcode: str #: Specimen = Component.build(TextField(name='patient_id', length=30), TextField(name='barcode', length=27)) #: Instrument (analyser) information structure. #: #: :param name: 消息发送者. Length: 16 #: :type name: str #: #: :param device_id: 设备ID. Length: 10 #: :type device_id: integer #: Instrument = Component.build(TextField(name='name', length=16), IntegerField(name='device_id', length=10)) #: Test :class:`~astm.mapping.Component` #: #: :param assay_code: 项目通道号 Required. Length: 10
__all__ = [ 'Header', 'Patient', 'Order', 'Result', 'Comment', 'Terminator', 'CommentData', 'PatientAge', 'Sender', 'Test' ] #: Patient age structure. #: #: :param value: Age value. #: :type value: int #: #: :param unit: Age unit. One of: ``years``, ``months``, ``days``. #: :type unit: str #: PatientAge = Component.build( IntegerField(name='value'), SetField(name='unit', values=('years', 'months', 'days'))) #: Test :class:`~astm.mapping.Component` also known as Universal Test ID. #: #: :param _: Reserved. Not used. #: :type _: None #: #: :param __: Reserved. Not used. #: :type __: None #: #: :param ___: Reserved. Not used. #: :type ___: None #: #: :param assay_code: Assay code. Required. Length: 20. #: :type assay_code: str
from astm.mapping import (Component, ConstantField, ComponentField, DateField, DateTimeField, IntegerField, SetField, TextField, NotUsedField) from astm.records import (HeaderRecord, PatientRecord, OrderRecord, ResultRecord, CommentRecord, TerminatorRecord) Sender = Component.build(TextField(name='name'), TextField(name='version')) Test = Component.build(NotUsedField(name='_'), NotUsedField(name='__'), NotUsedField(name='___'), TextField(name='analyte_name', required=True)) class Header(HeaderRecord): sender = ComponentField(Sender) processing_id = ConstantField(default='P') version = TextField(name='version', default='E 1394-97') class Patient(PatientRecord): practice_id = TextField(name='practice_id', required=True) location = TextField(name='location') class Order(OrderRecord): sample_id = TextField(name='sample_id') test = TextField(name='test') collector = TextField(name='collector') biomaterial = TextField(name='biomaterial') class Comment(CommentRecord):
from astm.mapping import (Component, ConstantField, ComponentField, DateField, DateTimeField, IntegerField, SetField, TextField, NotUsedField, Record) from astm.records import (HeaderRecord, PatientRecord, OrderRecord, ResultRecord, CommentRecord, TerminatorRecord) #: Information about sender. #: #: :param name: Name. #: :type name: str #: #: :param version: Sender software version. #: :type version: str #: Sender = Component.build( TextField(name='name', default='lianyang-LIS', length=40), TextField(name='version', default=__version__, length=20), TextField(name='serial', length=20)) #: Patient name structure. #: #: :param last: Last name. Length: 50. #: :type last: str #: #: :param first: First name. Length: 50. #: :type first: str #: PatientName = Component.build(TextField(name='last', length=50), TextField(name='first', length=50)) #: User name structure. #:
from astm import __version__ from astm.mapping import (Component, ConstantField, ComponentField, DateField, DateTimeField, IntegerField, SetField, TextField) from astm.records import (HeaderRecord, PatientRecord, OrderRecord, ResultRecord, CommentRecord, TerminatorRecord) #: Information about sender. #: #: :param name: Name. #: :type name: str #: #: :param version: Sender software version. #: :type version: str #: Sender = Component.build(TextField(name='name', default='python-astm'), TextField(name='version', default=__version__)) #: Patient name structure. #: #: :param last: Last name. Length: 50. #: :type last: str #: #: :param first: First name. Length: 50. #: :type first: str #: PatientName = Component.build(TextField(name='last', length=50), TextField(name='first', length=50)) class Header(HeaderRecord): """ASTM header record.
#: :param __: Reserved. Not used. #: :type __: None #: #: :param ___: Reserved. Not used. #: :type ___: None #: #: :param assay_code: Assay code. Required. Length: 20. #: :type assay_code: str #: #: :param assay_name: Assay name. Length: 8. #: :type assay_name: str #: Test = Component.build( NotUsedField(name='_'), NotUsedField(name='__'), NotUsedField(name='___'), TextField(name='assay_code', required=True, length=20), TextField(name='assay_name', length=8), ) #: Comment control data structure. #: CommentData = Component.build( SetField(name='code', values=('PC', 'RC', 'SC', 'TC')), TextField(name='value')) class Patient(CommonPatient): """ASTM patient record. :param type: Record Type ID. Always ``P``.
) from astm.records import ( HeaderRecord, PatientRecord, OrderRecord, ResultRecord, CommentRecord, TerminatorRecord ) #: Information about sender. #: #: :param name: Name. #: :type name: str #: #: :param version: Sender software version. #: :type version: str #: Sender = Component.build( TextField(name='name', default='python-astm'), TextField(name='version', default=__version__) ) #: Patient name structure. #: #: :param last: Last name. Length: 50. #: :type last: str #: #: :param first: First name. Length: 50. #: :type first: str #: PatientName = Component.build( TextField(name='last', length=50), TextField(name='first', length=50) )
] #: Instrument (analyser) information structure. #: #: :param _: Reserved. Not used. #: :type _: None #: #: :param rack: Rack number. Length: 5. #: :type rack: str #: #: :param position: Position number. Length: 3. #: :type position: str #: Instrument = Component.build( TextField(name='_'), TextField(name='rack', length=5), TextField(name='position', length=3), ) #: Test :class:`~astm.mapping.Component` also known as Universal Test ID. #: #: :param _: Reserved. Not used. #: :type _: None #: #: :param __: Reserved. Not used. #: :type __: None #: #: :param ___: Reserved. Not used. #: :type ___: None #: #: :param assay_code: Assay code. Required. Length: 20.
'Sender', 'Test'] #: Instrument (analyser) information structure. #: #: :param _: Reserved. Not used. #: :type _: None #: #: :param rack: Rack number. Length: 5. #: :type rack: str #: #: :param position: Position number. Length: 3. #: :type position: str #: Instrument = Component.build( TextField(name='_'), TextField(name='rack', length=5), TextField(name='position', length=3), ) #: Test :class:`~astm.mapping.Component` also known as Universal Test ID. #: #: :param _: Reserved. Not used. #: :type _: None #: #: :param __: Reserved. Not used. #: :type __: None #: #: :param ___: Reserved. Not used. #: :type ___: None #:
Sender ) __all__ = ['Header', 'Patient', 'Order', 'Result', 'Comment', 'Terminator', 'CommentData', 'PatientAge', 'Sender', 'Test'] #: Patient age structure. #: #: :param value: Age value. #: :type value: int #: #: :param unit: Age unit. One of: ``years``, ``months``, ``days``. #: :type unit: str #: PatientAge = Component.build( IntegerField(name='value'), SetField(name='unit', values=('years', 'months', 'days')) ) #: Test :class:`~astm.mapping.Component` also known as Universal Test ID. #: #: :param _: Reserved. Not used. #: :type _: None #: #: :param __: Reserved. Not used. #: :type __: None #: #: :param ___: Reserved. Not used. #: :type ___: None #: #: :param assay_code: Assay code. Required. Length: 20. #: :type assay_code: str