Story

Worldwide, as millions of people stay at home to minimize transmission of COVID19, health-care workers prepare to do the exact opposite. They will go to clinics and hospitals, putting themselves at high risk from COVID-2019. Data from China's National Health Commission tell us that above 3300 health-care workers have been infected as of early March and, according to local media, by the end of February at least 22 had died. In Italy, 20% of responding health-care workers were infected, and some have died. Reports from medical staff describe physical and mental exhaustion, the torment of difficult triage decisions, and the pain of losing patients and colleagues, all in addition to the infection risk.

There may be many mediums of transmission and smallest of the unnoticed medium may lead to potential exposure.

According to data online by United Kingdom National Health Service about 79% of people have visited a pharmacy at least once in the last 12 months, 37% visit at least once a month.

Medicines are delivered only with prescriptions. So these prescriptions could be a medium for transmission making the healthcare workers a bridge to unknowingly transmit COVID19 in addition to they getting infected.

Demo video using Adafruit IO:


Demo video using own database and dashboard:

Working

Main dashboard:

This dashboard has two sidebar option :

This can be accessed at https://www.nishanchettri.com/hackster01/

Local Prescription (when doctor is present)

When the doctor is able to attend the patient.

Doctor clicks on prescribe

Doctor scans the patient tag using the hardware in fig3. which has scanPID.ino firmware code loaded given below:

/*scanPID.ino
@brief This code is for the scanning hardware carried by doctors and lab test incharge
*/

#include <SPI.h>
#include <MFRC522.h>
#include <String.h>
#define RST_PIN         22        // Configurable, see typical pin layout above
#define SS_PIN          21        // Configurable, see typical pin layout above
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.
void setup()
{
Serial.begin(9600);   // Initiate a serial communication
SPI.begin();      // Initiate  SPI bus
mfrc522.PCD_Init();   // Initiate MFRC522
Serial.println("Approximate your card to the reader...");
Serial.println();
}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
String content= "";
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
content.concat(String(mfrc522.uid.uidByte[i]));
}
// char* c = strcpy(new char[content.length() + 1], content.c_str());
Serial.print("t1.txt=\"" + content+ "\"");
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);
delay(500);
}

The doctor will retrieve the id by scanning the patient's tag and fill the prescription using the interface shown below in fig 4.

After doctor sends the prescription. Patient receives an Email as well as the prescription detail is stored in database.

Pharmacy

Pharmacy scans the patient tag and retrieves the medicine prescribed to the patient using his device which is same as fig 3. but has different firmware code given below (retrievePrescription.ino) :

/*
retrievePrescription.ino
*/
/****************************For http client****************/
#include <Arduino.h>
#include <WiFi.h>
#include <WiFiMulti.h>
#include <HTTPClient.h>
#define USE_SERIAL Serial
WiFiMulti wifiMulti;
String url="https://nishanchettri.com/hackster01/specific.php?pid=" ;
/***********************************************************/
/****************************For MFRC522****************/
#include <SPI.h>
#include <MFRC522.h>
#include <String.h>

#define RST_PIN         22        // Configurable, see typical pin layout above
#define SS_PIN          21        // Configurable, see typical pin layout above
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.
/***********************************************************/
String med;
void setup() {

    USE_SERIAL.begin(9600);
    SPI.begin();      // Initiate  SPI bus
    mfrc522.PCD_Init();   // Initiate MFRC522
    USE_SERIAL.println();
    USE_SERIAL.println();
    USE_SERIAL.println();

    wifiMulti.addAP("nissan", "password");
    while((wifiMulti.run() != WL_CONNECTED))
    {
      delay(500);
      Serial.print(".");
    }
    Serial.println("");
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
}

void loop() 
{

  String content= "";
  byte letter;
     while((wifiMulti.run() != WL_CONNECTED));

      if ( ! mfrc522.PICC_IsNewCardPresent()) 
        {
          return;
        }
        // Select one of the cards
      if ( ! mfrc522.PICC_ReadCardSerial()) 
        {
          return;
        }
      for (byte i = 0; i < mfrc522.uid.size; i++) 
          {
             content.concat(String(mfrc522.uid.uidByte[i]));
          }
          
        HTTPClient http;
        url+=content;
        http.begin(url); //HTTP
        int httpCode = http.GET();
        
        if(httpCode > 0) 
        {
            if(httpCode == HTTP_CODE_OK) 
            {
               med = http.getString();
               Serial.println(med);
            }
        } 
        else {
            USE_SERIAL.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
        }

        http.end();

    delay(5000);

}

The retrieved prescription is seen in a display. For now I do not have access to components so, it is printed on the serial monitor as shown below:

Remote Prescription(when doctor is absent)

When doctor is not present in hospital and patient has done all required tests and only waiting for necessary prescription. This happened to me. I was diagnosed with measles and Jaundice and needed immediate medications but due to unavailability of doctor no medicine could be given to me and I had to pay ward bills and stay in the hospital.

Flow diagram:

In this case the in-charge of lab reports accesses the dashboard in fig.1. Clicks on upload test reports. The test reports are then uploaded via interface shown below:

The doctor then could download the report and prescribe from interface as shown in fig. 4.

ALL THE FILES AND CODE REQUIRED FOR THIS PROJECT IS IN THE GITHUB REPOSITORY GIVEN BELOW.

STAY SAFE ! LET US FIGHT THIS MENACE TOGETHER !