Skip to content

Instantly share code, notes, and snippets.

@tomiwaAdey
Last active June 3, 2019 07:12
Show Gist options
  • Select an option

  • Save tomiwaAdey/e3ae421afc10349418fb82ec7885c9e5 to your computer and use it in GitHub Desktop.

Select an option

Save tomiwaAdey/e3ae421afc10349418fb82ec7885c9e5 to your computer and use it in GitHub Desktop.
Dialogue tree
"Dialouge":{
"nodes":[
{
"id": 1,
"node_type":"question",
"root_edge_id":0,
"content":[
{
"text":"What seems to be the problem?",
"subtext":""
}
]
},
{
"id": 2,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Which best describes your symptoms?",
"subtext":""
}
]
},
{
"id": 3,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Has anything recently been inserted into the ear?",
"subtext":"(such as a cotton bud or tweezers)"
}
]
},
{
"id": 4,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Have you had any discharge from the ear?",
"subtext":""
}
]
},
{
"id": 5,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Is there blood in the discharge?",
"subtext":""
}
]
},
{
"id": 6,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"What does the discharge look like?",
"subtext":""
}
]
},
{
"id": 7,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"How quickly did the hearing loss or blocked feeling develop?",
"subtext":""
}
]
},
{
"id": 8,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Have you felt any pain or pressure under the jaw?",
"subtext":""
}
]
},
{
"id": 9,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Have you had a recent cold, blocked/stuffy nose, or blocked sinuses?",
"subtext":""
}
]
},
{
"id": 10,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Does the blockage/reduced hearing come and go?",
"subtext":""
}
]
},
{
"id": 11,
"node_type":"question",
"root_edge_id":1,
"content":[
{
"text":"Is the blockage/reduced hearing constant?",
"subtext":""
}
]
},
{
"id": 12,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"You should see your doctor about",
"condition":"Impacted Ear Wax",
"what_does_it_mean":"It's likely that you have earwax or debris blocking your ear, which will need to be be gently removed by ear syringing.",
"what_should_i_do_now":"Make an appointment with your doctor to check that you have earwax/debris and if so, arrange ear syringing.",
"help_from_the_pharmacy":"",
"when_to_see_your_doctor":""
}
]
},
{
"id": 13,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"You should see your doctor about",
"condition":"Cauliflower Ear",
"what_does_it_mean":"Cauliflower ear (auricular haematoma) is often caused by injury/trauma to the outer ear. The cartilage of the outer ear structure gets inflamed, which then disrupts the blood supply to the area and leads to a change in shape of the outer ear tissues: the cauliflower-like appearance.",
"what_should_i_do_now":"Make an appointment with your doctor to check that you have cauliflower ear and get the right treatment.",
"help_from_the_pharmacy":"",
"when_to_see_your_doctor":""
}
]
},
{
"id": 14,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"You should see your doctor about",
"condition":"Possible Eardrum Damage",
"what_does_it_mean":"Your eardrum may be damaged. A perforation or hole in the eardrum can be caused by injuries such as a blow to your ear, or inserting an object like a cotton bud deep into the ear. Other possible causes include ear infections, changes in air pressure while flying or diving, or an explosion or other very loud noise.",
"what_should_i_do_now":"Make an appointment with your doctor as soon as possible to have your ear assessed.",
"help_from_the_pharmacy":"",
"when_to_see_your_doctor":""
}
]
},
{
"id": 15,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"It appears you may have",
"condition":"Mild Otitis Externa",
"what_does_it_mean":"Mild otitis externa involves inflammation (redness and swelling) of the outer ear canal. It's caused when the skin surface of the ear canal is disturbed by allergies, irritants or inflammatory conditions such as eczema, but may also be due to an underlying bacterial infection.",
"what_should_i_do_now":"You can try using olive oil ear drops from the pharmacy to moisturise irritated skin.",
"help_from_the_pharmacy":"Antihistamines such as cetirizine or loratadine can calm the itch. Choline salicylate-based ear drops such as Earex Plus can help reduce pain or inflammation.",
"when_to_see_your_doctor":"If symptoms don’t improve after using pharmacy treatments, please see your doctor who may wish to prescribe antibiotics."
}
]
},
{
"id": 16,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"It appears you may have",
"condition":"Otitis Media",
"what_does_it_mean":'Otitis media is a middle ear infection that causes inflammation (redness and swelling) and pain due to fluid build-up behind the eardrum. In some cases, the eardrum can be perforated and fluid or pus may leak out. This is commonly known as "glue ear" and can often affect young children.',
"what_should_i_do_now":'Make an appointment with your doctor as soon as possible for a visual inspection of the middle ear, and possible prescripton-only treatment.',
"help_from_the_pharmacy":'You can take paracetamol, or anti-inflammatories such as ibuprofen, for temporary pain relief until you can see your doctor.',
"when_to_see_your_doctor":''
}
]
},
{
"id": 17,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"It appears you may have",
"condition":"Moderate to Severe Otitis Externa",
"what_does_it_mean":"Otitis externa involves redness and swelling (inflammation) of the outer ear canal. It's caused when the skin surface of the ear canal is disturbed by allergies, irritants or inflammatory conditions such as eczema. When it is moderate to severe, it is highly likely to be due to an underlying bacterial infection.",
"what_should_i_do_now":"You should see a doctor as soon as possible for prescribed treatment. This may include antibiotic and anti-inflammatory steroid ear drops or sprays, or even oral antibiotics.",
"help_from_the_pharmacy":"",
"when_to_see_your_doctor":""
}
]
},
{
"id": 18,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"It appears you may have",
"condition":"Congestion in the Ear, Nose, Throat, and Sinuses",
"what_does_it_mean":"Mucus and air moving between the cavity spaces and tubing within the ear, nose and throat can cause pain, pressure, crackling, and a muffled sound in your ear.",
"what_should_i_do_now":"Steam inhalations may help. If symptoms continue, see your pharmacist for alternatives.",
"help_from_the_pharmacy":"Decongestant medication is available, such as tablets containing pseudoephedrine or phenylephrine. As an alternative, nasal decongestant sprays such as Otrivine or Vicks Sinex spray can help. For a drug-free option, saline sea salt nasal sprays such as Sterimar can also be used to clear blocked sinuses.",
"when_to_see_your_doctor":"See your doctor if symptoms don't improve within 3 days, or if they get worse. You should also see your doctor if you start to feel dizzy and/or have hot or cold sweats, which could indicate a bacterial infection of the sinuses."
}
]
},
{
"id": 19,
"node_type":"assesment",
"root_edge_id":1,
"content":[
{
"intro":"It appears you may have",
"condition":"Earwax Build-Up",
"what_does_it_mean":"Earwax is naturally formed inside your ears and acts as a defence barrier, protecting the ears from harmful substances and bacteria. It usually moves out of the ears gradually by the action of chewing, and is harmless. However, sometimes it can build up and block the ears.",
"what_should_i_do_now":"Olive oil may help to soften the wax, encouraging it to come out gradually.",
"help_from_the_pharmacy":"Milder treatments such as olive oil ear drops, or those containing arachis oil may help to soften the wax, encouraging it to come out gradually. Stronger treatments such as sodium bicarbonate ear drops, or Otex, can break down the wax more aggressively.",
"when_to_see_your_doctor":"If there is no result after a few days of treatment, it's sometimes necessary to have the ears syringed at the doctor's surgery."
}
]
}
],
"edges":[
{
"from_node_id":1,
"to_node_id":2,
"content":[
{
"text":"Ear",
"subtext":""
}
]
},
{
"from_node_id":2,
"to_node_id":3,
"content":[
{
"text":"Irritation of the ear canal",
"subtext":""
}
]
},
{
"from_node_id":2,
"to_node_id":7,
"content":[
{
"text":"Hearing loss and/or ear feels blocked",
"subtext":""
}
]
},
{
"from_node_id":2,
"to_node_id":13,
"content":[
{
"text":"Swelling of the outer ear",
"subtext":""
}
]
},
{
"from_node_id":3,
"to_node_id":12,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":3,
"to_node_id":4,
"content":[
{
"text":"No",
"subtext":""
}
]
},
{
"from_node_id":4,
"to_node_id":5,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":4,
"to_node_id":15,
"content":[
{
"text":"No",
"subtext":""
}
]
},
{
"from_node_id":5,
"to_node_id":14,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":5,
"to_node_id":6,
"content":[
{
"text":"No",
"subtext":""
}
]
},
{
"from_node_id":6,
"to_node_id":16,
"content":[
{
"text":"Cloudy and/or green or yellow",
"subtext":""
}
]
},
{
"from_node_id":6,
"to_node_id":17,
"content":[
{
"text":"Clear and watery",
"subtext":""
}
]
},
{
"from_node_id":7,
"to_node_id":8,
"content":[
{
"text":"Suddenly (within a day or two)",
"subtext":""
}
]
},
{
"from_node_id":7,
"to_node_id":10,
"content":[
{
"text":"Gradually (slowly getting worse over the last week or more)",
"subtext":""
}
]
},
{
"from_node_id":8,
"to_node_id":10,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":8,
"to_node_id":9,
"content":[
{
"text":"No",
"subtext":""
}
]
},
{
"from_node_id":9,
"to_node_id":10,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":9,
"to_node_id":19,
"content":[
{
"text":"No",
"subtext":""
}
]
},
{
"from_node_id":10,
"to_node_id":18,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":10,
"to_node_id":11,
"content":[
{
"text":"No",
"subtext":""
}
]
},
{
"from_node_id":11,
"to_node_id":19,
"content":[
{
"text":"Yes",
"subtext":""
}
]
},
{
"from_node_id":11,
"to_node_id":18,
"content":[
{
"text":"No",
"subtext":""
}
]
}
]
}
@tomiwaAdey
Copy link
Author

@tomiwaAdey
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment