Giter Site home page Giter Site logo

nberelidze / swatinc.lis.lis01a2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swatinc/swatinc.lis.lis01a2

0.0 0.0 0.0 85 KB

This library is an OO implementation of the CLSI LIS01-A2 standard. Specification for Low-Level Protocol to Transfer Messages Between Clinical Laboratory Instruments and Computer Systems

License: GNU General Public License v3.0

C# 100.00%

swatinc.lis.lis01a2's Introduction

Tested With the following analysers

Note that each branch in this repository is actually a main brach with specific changes for specific analysers. The master branch is the generic one which will try to adhere with the LIS2-A2 standard.

  • CelltacG-MEK-9100
  • EvidenceInvestigator-RandoxLaboratories
  • RX_Daytona+

SwatInc.Lis.Lis01A2

This library is an OO implementation of the CLSI LIS01-A2 standard. Specification for Low-Level Protocol to Transfer Messages Between Clinical Laboratory Instruments and Computer Systems.

The two libraries in this repo are C# implementations of the same from Essy.LIS.

Instructions For Use

Add these namespaces to your code

using SwatInc.Lis.Lis01A2.Interfaces;
using SwatInc.Lis.Lis01A2.Services;
using SwatInc.Lis.Lis02A2;

TCP/IP

      var someIP = "192.168.1.11";
      UInt16 somePort = 1111;
      var lowLevelConnection = new Lis01A02TCPConnection(someIP, somePort);
      var lisConnection = new Lis01A2Connection(lowLevelConnection);

Serial port

      var sp = new System.IO.Ports.SerialPort("COM1");
      // Config Serial port to your needs
      var lowLevelConnection = new Lis01A02RS232Connection(sp);
      var lisConnection = new Lis01A2Connection(lowLevelConnection);

Create LIS parser object and connect

      var LISParser = new LISParser(lisConnection);
      LISParser.OnSendProgress += LISParser_OnSendProgress; //Send data progress will trigger this event
      LISParser.OnReceivedRecord += LISParser_OnReceivedRecord; //incoming LIS frames will trigger this event
      LISParser.Connection.Connect();
    private static void LISParser_OnReceivedRecord(object Sender, ReceiveRecordEventArgs e)
    {

    }

    private static void LISParser_OnSendProgress(object sender, SendProgressEventArgs e)
    {

    }

Now you are ready to receive incoming packets or you can transmit data

            var lisRecordList = new List<AbstractLisRecord>();
            var hr = new HeaderRecord();
            hr.SenderID = "Some Sender ID Code";
            hr.ProcessingID = HeaderProcessingID.Production;
            lisRecordList.Add(hr);
            var pr = new PatientRecord();
            pr.SequenceNumber = 1;
            pr.LaboratoryAssignedPatientID = "Sam001";
            lisRecordList.Add(pr);
            var orderRec = new OrderRecord();
            orderRec.SequenceNumber = 1;
            orderRec.SpecimenID = "Sam001";
            orderRec.TestID = new UniversalTestID();
            orderRec.TestID.ManufacturerCode = "T001";
            orderRec.ReportType = OrderReportType.Final;
            lisRecordList.Add(orderRec);
            pr = new PatientRecord();
            pr.SequenceNumber = 2;
            pr.LaboratoryAssignedPatientID = "Sam002";
            lisRecordList.Add(pr);
            orderRec = new OrderRecord();
            orderRec.SequenceNumber = 1;
            orderRec.SpecimenID = "Sam002";
            orderRec.TestID = new UniversalTestID();
            orderRec.TestID.ManufacturerCode = "T001";
            orderRec.ReportType = OrderReportType.Final;
            lisRecordList.Add(orderRec);
            var tr = new TerminatorRecord();
            lisRecordList.Add(tr);
            LISParser.SendRecords(lisRecordList);

You can fill the record data to your own needs. There are more record type that you can instantiate and transmit. The data is transmitted in the order of the list.

swatinc.lis.lis01a2's People

Contributors

ibrahimhuycn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.