Skip to content

Latest commit

 

History

History
109 lines (71 loc) · 6.69 KB

PROJECT.md

File metadata and controls

109 lines (71 loc) · 6.69 KB

Covid Vaccine Appointment ChatBot

📙 Description

A conversational bot(Nana Adwoa) allowing users to book days with available slots to take covid vaccine.

💡 Motivation and Context

COVID-19 infections are increasing in Ghana, with 420 new infections reported on average each day. That's 54% of the peak — the highest daily average reported on July 28. During the last week reported, Ghana averaged about 719 doses administered each day. At that rate, it will take a further 8,460 days to administer enough doses for another 10% of the population.

As taking Vaccines is still in progress, most of the population are busy and would find it difficult going to join long queues to take Vaccines Shot. Even though their health is important, the quality of health service they get also depends on the amount of money they make as such the decision of leaving work for the vaccination becomes difficult to make.

Not only are most people also busy but due to social distancing regulations and safety reasons, people feel afraid of joining long queues or waiting several hours at vaccination spots or centers where it would be easy for them to take shots if they know exactly the time to come for the vaccine.

The solution here is simple, a simple conversational assistant or chat bot integrated into all the health service web platforms and also can be deployed as a telephony system where people can book days available for people to take their vaccines shots and schedule the second shot day. In a day, there are a number of shots and number of people who can take. This will prevent long queues and give people the comfort to take the vaccines and keep everyone Safe. For integrations, a custom integration will be made for web to allow it to be easily embedded on health service websites.

⚙️ Getting Started

To run this project locally, you need to create a service account for the agent

  • Clone the project https://github.com/botchway44/covid-vaccine-appointment.git
  • Create an environmental variable (.env file) in the root directory of the project - use .env.default as a template
  • Create a mongo database for the project, obtain a connection string and update the .env file with the connection string
  • Create a service account and from the json file update these fields in your .env file

Key Description
AGENT_ID The agent id of the project. Instructions below in getting the agent id
DF_PROJECT_ID The project id in the service json file
DF_PRIVATE_KEY The peivate key in the service json file
DF_PRIVATE_KEY_ID The private key id in the service json file
DF_CLIENT_EMAIL The client email in the service json file
MONGODB_URL A mongodb connection string
GMAIL The Email to be used by the SMTP Service MailerService. Check the guide Extra section to see how to setup Gmail for that.
GMAIL_PASS The provided Gmail password


  • run npm install
  • run npm run start:dev
  • locate the project on http://localhost:9000/dev.html

Importing Agent to the DialogflowCX console

Updating the Webhook from DialogflowCX console

You can use ngrok or localtunnel to expose the webhook to the internet. After exporting the port 9000 you can update the webhook in the DialogflowCX console.

  • Open the DialogflowCX console and click on the Manage tab
  • Select Webhooks and from the created webhook with the name fulfillment, update it to the generated address.

image


Updating the agent id

The last step is to update the agent id in the chat component to the agent id of your project. You can find the agent id in the url bar when you open your project in dialogflow CX console or in the all agents page of the CX console.

Click on the Kebab menu closer to the agent name Screenshot (38)_LI


Select Copy name and paste in any editor. Your agent id comes after the agents image

Replace the agent id and webhook url in the chat component.

<dialogflowcx-chat-widget
  chat-title="Vaccine Appointments"
  agent-id="replace-with-your-agent-id"
  agent-url="/channels/web"
>
</dialogflowcx-chat-widget>

<!-- FYI 
1. if you want to attach the widget on a custom site, 
replace the agent-url with the domain of the server 
you hosted the project on then append /channels/web 

2. Make sure to use us-central1 for the project location
-->

Extra

A few resources and guides when setting this project up