Alternatives To Medic
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Python Automation Scripts264
3 years agogpl-3.0Python
Simple yet powerful automation stuffs.
Instagram Proxy Api239
5 years agoJavaScript
CORS compliant API to access Instagram's public data
News Fetch140
2 months ago28January 29, 20219mitPython
A Python Package which helps to scrape all news details from any news websites
Linkedin Learning Downloader125
3 years ago21Python
Linkedin Learning videos downloader
Scraply114
a year agoMay 29, 2019apache-2.0Go
Scraply a simple dom scraper to fetch information from any html based website
Daily Scraper92
a month ago16agpl-3.0HTML
Fetches information about every webpage 🤖
Public Instagram44
15 years ago9October 30, 20176gpl-3.0JavaScript
Tool to fetch Instagram's public content.
Socialinfo4j36
4 years agoJava
fetch data from Facebook, Instagram and LinkedIn
Centris34
9 years agoTeX
Predict real-estate prices in Montreal
Twitterscraper4j22
3 years agomitJava
a java library which scrapes twitter to fetch publicly available info
Alternatives To Medic
Select To Compare


Alternative Project Comparisons
Readme

medic

Table Of Contents

  1. Description
  2. Getting Started
  3. API 1 and API 2
  4. API 3
  5. API 5

Description

Use Apimedic API to search and fetch medical symptom, list down the possible medical conditions/diagnosis, thereafter using web scraping to scrape information regarding their treatments and storing it in Firebase Realtime Database.

  1. API 1 to To fetch the symptoms by using Apimedic’s APIs.
  2. API 2 to list down the medical conditions for a given symptom.
  3. API 3 to fetch/display treatment options for given medical condition and store it in a database.
  4. API 5 take a text like “I’m having a back pain”, and extracts symptoms and based on those symptoms returns the medical conditions.

Getting Started

Following instructions will get you a copy of the project up and running on your local machine


Prerequisites

  • You need to have Android Studio installed on your system.Download Link
  • You need to have an Android Device with Debugger enabled.

Installation (setting up project)

  • Download the zip file and extract it.
  • Start Android Studio and open extracted folder/zip file.
  • Sync the project and then press "run app" on top right screen of Android Studio.

API 1 and API 2

Search and Fetch Symptom

On Searching a Symptom, URL for the JSON query to fetch all symptoms is created "https://sandbox-healthservice.priaid.ch/symptoms?token=" key.Token +"&format=json&language=en-gb", if apimedic database contains that particular symptom a query URL for its possible diagnosis is formed "https://sandbox-healthservice.priaid.ch/diagnosis?symptoms=[" + currObject.getString("ID") + "]&gender=male&year_of_birth=1997&token=" + key.Token + "&format=json&language=en-gb" and executed, after fetching JSON objects of the diagnosis, its information is displayed in a list.

image image

Fetching Auth Token

As AuthToken is valid only for a period of time, it needs to be fetched every time on creation of main activity, key = new AccessToken(); A class named TokenKey has function named LoadToken for the specified purpose.

Working with Volley Library

Volley is an HTTP library that makes networking for Android apps easier and faster.
For fetching both symptoms and diagnosis , connection to API is made through volley.
RequestQueue queue = Volley.newRequestQueue(this);

API 3

Web Scraping for a given Diagnosis

For a particular Medical Condition, information regarding its available Treatments were scraped from "Knowledge Panel" on https://www.google.com and "Glossary List" on https://legacy.priaid.ch/en-gb using "JSOUP" Library Document doc = Jsoup.connect(URL).get();

Incase of scraping a Knowledge Panel, a google search like "Treatment for Common Cold" gives us a web page which has a info box containing "TREATMENT" tab which is automatically selected, 4 separate List containing HTML elements of same Class Name is maintained after inspecting each info box.

   Elements treatoptions = ans.select("div.hXYDxb");
   Elements subtype = ans.select("a.HZnEfd");
   Elements subdetails = ans.select("div.Rs3Epd");
   Elements counter = ans.select("div.Y6f3fc.HtP7nb");
image image image otherwise for Glossary List, based on ID of Treatment a simple query `("https://legacy.priaid.ch/en-gb/glossar-details?t=issue&id=" + params[0].ID)` displays a web page from which information under title "Consequences and Treatment" is scraped
 
  treattab = doc.getElementsByTag("p");

                        for (Element element : treattab) {

                            if (element.previousElementSibling().text().equals("Consequences + Treatment")) {
                                treatObj.Info = element.text();
                                break;
                            }
                        }
   
   
image image

Use of Firebase Relatime Database

To store already fetched information of Treatments for a Disease, Firebase realtime database is used which is a schemaless database (NoSQL) in which the data is stored in JSON format. Any further query on same diagnosis will fetch data from database instead of scraping it from web.

image

API 5

A simple "String.contains(Substring)" functionality inside "if condition" during fetching/checking for symptoms can take a text like “I’m having a back pain”, and extracts symptoms and based on those symptoms returns the medical conditions.

image
Popular Scraper Projects
Popular Fetch Projects
Popular Data Processing Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Scraper
Fetch
Medical