See project wiki at https://github.com/dialoguemd/covid-19/wiki
The purpose of this app is to deliver accurate personalized information from trusted Canadian medical sources regarding COVID-19.
This service personalizes the information about the virus based on user's individual situation. All content is vetted by Canadian medical professionals.
The project is created by Dialogue. Dialogue is the leading Canadian telemedicine provider pioneering virtual healthcare dedicated exclusively to the world's leading organizations. We drive real health outcomes through amazing healthcare experiences, an employee engagement playbook, and a relentless focus on patient safety and security.
See CONTRIBUTING.md.
The structure of this project is based on the following concepts:
src/content
directory. A content file is a Markdown file that has a title, body and a source. A file name of the content file must be in the form filename.{language-code}.md
.The content served to uses is stored in text files in https://github.com/dialoguemd/covid-19/tree/master/src/content
.
The files are placed in sub-sirectories. Each sub-directory corresponds to a "content class". A content class is a collection of content that will be served to all users that belong to a class. Which class a user belongs to is determined by the answers they provide.
All content files follow the Markdown format.
To add a new content file, do the following:
## Title
Your content goes here
[Source](https://link-to-the-source-of-the-content)
In the project directory, you can run:
npm install
Installs the dependencies.
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
npm run build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Defining rules is handled by json-rules-engine.
Facts
are the values collected through the chatRules
are the evaluation of those factsResults
are generated from the rules being applied to those factsAdd them to rules/global.json
They can also be defined on a step directly under metadata. Step-defined rules will only be applied if that step was rendered.
e.g.
steps = [
{
id: '1',
message: 'Pick a number',
trigger: '2',
metadata: {
rule: {
"conditions":{...},
"event":{...}
}
}
},
...
]