/Pharmacon

A digital medicine prescription application

Primary LanguageJavaScript

Pharmacon

This is a digital prescription system in which doctor can prescribe medicines digitally. Each prescription will have an unique prescription Id, pharmasist uses this Id to view the prescription.

Doctors and Pharmasists can register through 'Register' option. Freshly registered accounts will be activated only after the approval of administrator. Doctors can prescribe medicines by logging into their account. Pharmasists can view prescriptions by entering into their accounts. Administrator have the privilege to verify, view and remove Doctors and Pharmasists.

Configuring Backend

  1. Log in to mongoDb account

  2. Create a New Project named Pharmacon
    Create Poject
    Create Project
    Create Poject

  3. Create a cluster
    Create Cluster
    Select Shared Cluster
    Create Cluster
    Select GCP and lowa
    Create Cluster

  4. Add Admin Details
    Click on Collection
    Create collection
    Click on Add My Own Data
    Add Data
    Create Database
    Create Db
    Click on Insert Document
    Insert Document
    Insert Admin details
    Add Admin

    {
        "_id": {
            "$oid": "5ee885d95de65397132b9ae2"
        },
        "first_name": "Administrator",
        "last_name": "Administrator",
        "email": "admin@xyz.com",
        "password": "$2b$10$RpQUe1.GoaBuu8zsRrmbhuIfwJ0pb8A.UDk7ctPn/t061cY.lRhOG",
        "role": "admin",
        "acc_status": "true"
    } 
    
  5. Allow Network Access by whitelisting IP
    Network Access
    You can either whitelist Current IP or All IP
    Network Access

  6. Connecting to application
    Select connect
    Connection 1
    Create DB User
    Connection 2
    Choose connection method as Connect Your Application
    Connection 3
    Copy the URI
    Connection 4
    Create a .env file in backend folder and set the content as ATLAS_URI= . Change the dbName and password with your's.>
    Connection 5

    Run Application

    1. Clone repository using git clone https://github/printfjoby/Pharmacon

    2. To install depndencies, run npm install in the root(/) directory and also in backend directory

    3. Start Backend server in port:5000, run npm start in backend directory

    4. Start Frontend server in port:3000, run npm start in root directory

    5. The Application will start running in localhost:3000

    Interacting with Application

    1. Open the application and create a Doctor and Pharmasist account using Register option.

    2. Login as administrator using email admin@xyz.com and password admin123.

    3. Click on Approve and approve the doctor and pharmasist.

    4. Login as Doctor using the account you created.

    5. Using Prescribe option prescribe medicine and copy the Prescription Id from the response message.

    6. Login as Pharmasist

    7. In View Prescription option paste the 'Prescription ID` and view the prescription.

    Application Screenshots

    Home Page

    Home

    Register Page

    Register

    Approve or Reject Doctors and Pharmasist

    approve

    View All Doctors

    View Doctor

    View All Pharmasists

    View Pharmasist

    Prescribe Medicine

    Prescribe

    View Prescription

    View Prescription