Skip to content

udsm-dhis2-lab/universal-machine-interfacing-adapter

Machine Interfacing

A desktop app that can be used to interface between Lab machines and LIS. The app is written in Electron and uses SQLite as data storage.

Run Locally

Clone the project

  git clone https://github.com/udsm-dhis2-lab/machine-interfacing

Go to the project directory

  cd machine-interfacing

Install dependencies

  npm install --legacy-peer-deps

Start the server

  npm start

Building

  • The app can be built as an executable depending on the environment you choose since the underlying electron technology produces a cross-platform app.

  • From your app directory in the terminal, run

npm run package
  • By default, the above command produces an executable similar to the os used to run.

  • The executable will be available in

releases

Tech Stack

Client: Angular, Redux, Bootstrap, and Angular Material

Renderer: Electron

Features Supported

Authentication

Login

  • In-app (App users)

  • External login

    • External login is Supported since the app was built to link with any LIS and not just ETL so a user can either log in with in app user credentials or external system credentials.

Settings

Settings

  1. General Settings(Machine configurations and General System Settings)
  2. Functions and Secrets(To the core, the app uses functions for communication to any LIS)
  3. Mapping(If an external LIS uses mapped items for data, then you can add the mappings to be used in data sync)
  4. Users, Roles and Privileges(Creating in-app users and their credentials)

General Settings

General Settings

  • From this page, we can add new machines and their respective settings ready for connection.

  • Adding new Machine with details

Machine

Functions and Secrets

Functions

  • You can add new JavaScript functions that are used to sync between the app and LIS. Also, these externally written functions are the ones used for external login.

  • Every function contains optional secrets that can be sensitive information inserted in the functions at the time of execution.

Adding a new function Function

Adding new Secret Secret

Mapping

Mapping

  • This section of settings helps with adding mappings if the LIS with which the app sending data requires that.

Dashboard

Dashboard

  • The dashboard shows the following

    • Live application Logs(Data and sync logs) Logs

    • Sync status summaries Status

    • Machine connection status(Shows the machine connection status, the last connected machine IP and Port and you can reconnect or choose a new machine to connect to ) Connection Status

    • You can select a new machine to connect to from the list of available with the connect button from the previous image Selecting Machine

    • A connected machine will look as in the image below Connected Machine

Sync Data

  • We can sync data between the app and LIS with the following methods

    • Manual sync one record at a time Manual

    • Run a function that is responsible for data sync Sync

    • You can also schedule your sync to run at your desired time Schedule

    • In every machine, you can also set data to sync directly to LIS as soon as it is received in the general machine settings

Contributing

The App is currently closed source but this information will be updated as soon as it is open sourced

Used By

This project is used by the following companies:

Roadmap

  • Add support for FTP communication machines

  • Add support for Serial communication machines

  • Add support for multiple parallel connections