API Reference - verison 20171206 - see changelog
Introduction
The eHealthMe API (v1) is a basic HTTP API comprised of GET resources only. Where possible we use traditional HTTP response codes to convey the (error) status of a call.
This is a public API, open for all. As such there is a usage limit in place: 1 request per second and a total of 100 requests per hour per public IP address.
Resources
The following resources are available:
Drug Side Effect
GET: /api/v1/ds/{drug}/{side-effect}/
Path parameters
drug | A valid drug name. |
side-effect | A valid side effect name. |
Response codes
200 | Both drug and side effect are valid, returns the study object. |
202 | Both drug and side effect are valid but the requested study has yet to be calculated. |
301 | The API can accept non-URL-friendly drug and side effect names, yet will always redirect to the URL friendly version. |
404 | The drug and/or side effect are invalid. |
Response object
If a successful call has been made (code 200) a JSON study object will be returned. This object has the following properties:
co_existing_conditions | Object | The top 5 co existing conditions the reports for this study share, keys are the condition names, values are the number of reports. |
co_existing_symptoms | Object | The top 5 co existing symptoms the reports for this study share, keys are the symptom names, values are the number of reports. |
reports | Object | The total amount of reports which matched for this study. The percentage shown is the total amount of matched reports over the total amount of reports which take the given drug. |
top_side_effects | Object | The top 5 other side effects the reports for this study share, keys are the side effect names, values are the number of reports. |
top_drugs | Object | The top 5 other drugs the reports for this study share, keys are the drug names, values are the number of reports. |
top_conditions | Object | The top 5 conditions the reports for this study share, keys are the condition names, values are the number of reports. |
Example study object:
{
"co_existing_conditions": {
"diabetes": 503,
"high blood cholesterol": 1733,
"high blood pressure": 886,
"quit smoking": 602,
"type 2 diabetes": 703
},
"co_existing_symptoms": {
"diarrhea": 1838,
"dizziness": 1900,
"fatigue": 1853,
"nausea and vomiting": 2878,
"weakness": 1769
},
"reports": {
"amount": 9702,
"percent": 5.23
},
"top_conditions": {
"diabetes": 503,
"high blood cholesterol": 1733,
"high blood pressure": 886,
"quit smoking": 602,
"type 2 diabetes": 703
},
"top_drugs": {
"aspirin": 1485,
"lasix": 976,
"nexium": 822,
"plavix": 1042,
"synthroid": 939
},
"top_side_effects": {
"diarrhea": 1838,
"dizziness": 1900,
"fatigue": 1853,
"nausea and vomiting": 2878,
"weakness": 1769
}
Drug Interaction
GET: /api/v1/drug-interaction/{drug_1}/{drug_2}/
Path parameters
drug_1 | A valid drug name. |
drug_2 | A valid drug name. |
Response codes
200 | Both drugs are valid, returns the study object. |
202 | Both drugs are valid but the requested study has yet to be calculated. |
301 | The API can accept non-URL-friendly drug names, yet will always redirect to the URL friendly version. |
404 | One or both of the drugs are invalid. |
Response object
If a successful call has been made (code 200) a JSON study object will be returned. This object has the following properties:
co_existing_conditions | Object | The top 5 co existing conditions the reports for this study share, keys are the condition names, values are the number of reports. |
reports | Object | The total amount of reports which matched for this study. |
age_interaction | Object | Gives an array of most common drug interactions the matched reports share grouped by age. |
duration_interaction | Object | Gives an array of most common drug interactions the matched reports share grouped by drug duration. |
gender_interaction | Object | Gives an array of most common drug interactions the matched reports share grouped by gender. |
Example study object:
{
"age_interaction": {
"10-19": [
"abscess",
"acquired oesophageal web",
"actinic keratosis",
"anhedonia",
"anxiety",
"arteriosclerosis coronary artery",
"arthralgia",
"arthritis",
"atelectasis",
"basal cell carcinoma"
],
"20-29": [
"acne",
"asthenia",
"blood cholesterol increased",
"bronchitis acute",
"erectile dysfunction",
"haemorrhoids",
"rectal haemorrhage",
"stevens-johnson syndrome",
"tardive dyskinesia",
"weight decreased"
],
"30-39": [
"chest pain",
"depression",
"drug ineffective",
"nausea",
"agitation",
"arthralgia",
"back pain",
"drug tolerance increased",
"drug withdrawal syndrome",
"epicondylitis"
],
"40-49": [
"pain",
"chest pain",
"dyspnoea",
"anxiety",
"myocardial infarction",
"transient ischaemic attack",
"fatigue",
"cerebrovascular accident",
"headache",
"hypertension"
],
"50-59": [
"pain",
"fatigue",
"myocardial infarction",
"diarrhoea",
"nausea",
"paraesthesia",
"anaemia",
"anxiety",
"cardiac failure congestive",
"pancreatitis"
],
"60+": [
"back pain",
"nausea",
"anxiety",
"asthenia",
"diarrhoea",
"fatigue",
"pain",
"injury",
"vomiting",
"drug ineffective"
],
"nan": [
"pain",
"diarrhoea",
"anxiety",
"drug ineffective",
"back pain",
"weight decreased",
"fall",
"fatigue",
"nausea",
"weight increased"
]
},
"co_existing_conditions": {
"back pain": 62,
"depression": 48,
"high blood cholesterol": 215,
"high blood pressure": 97,
"pain": 119
},
"duration_interaction": {
"1 - 2 years": [
"myocardial infarction",
"chest pain",
"type 2 diabetes mellitus",
"hypertension",
"pain in extremity",
"renal failure",
"back pain",
"cardiac failure congestive",
"cataract",
"coronary artery disease"
],
"1 - 6 months": [
"type 2 diabetes mellitus",
"anxiety",
"back pain",
"myalgia",
"myocardial infarction",
"nausea",
"abasia",
"ageusia",
"arthralgia",
"blood cholesterol increased"
],
"10+ years": [
"cardiac disorder",
"gastrointestinal infection",
"tooth loss",
"dental caries",
"gingival infection",
"tooth infection",
"drug ineffective",
"malaise",
"adverse drug reaction",
"cystitis"
],
"2 - 5 years": [
"type 2 diabetes mellitus",
"cataract",
"hyperglycaemia",
"myocardial infarction",
"circulatory collapse",
"diabetes mellitus",
"dyspnoea",
"haemoglobin decreased",
"neuropathy peripheral",
"oesophagitis"
],
"5 - 10 years": [
"type 2 diabetes mellitus",
"pain",
"anhedonia",
"anxiety",
"cataract",
"hypertension",
"procedural pain",
"accident",
"acute myocardial infarction",
"aortic arteriosclerosis"
],
"6 - 12 months": [
"type 2 diabetes mellitus",
"cataract",
"glaucoma",
"eye degenerative disorder",
"impaired gastric emptying",
"blindness",
"blood glucose increased",
"cellulitis",
"colitis microscopic",
"haemoglobin decreased"
],
"< 1 month": [
"nausea",
"pain in extremity",
"vomiting",
"hypoaesthesia",
"pruritus",
"ageusia",
"erythema",
"hypertension",
"myalgia",
"paraesthesia"
],
"not specified": [
"pain",
"anxiety",
"nausea",
"fatigue",
"back pain",
"diarrhoea",
"chest pain",
"asthenia",
"dyspnoea",
"injury"
]
},
"gender_interaction": {
"female": [
"pain",
"nausea",
"fatigue",
"type 2 diabetes mellitus",
"anxiety",
"diarrhoea",
"headache",
"back pain",
"drug ineffective",
"chest pain"
],
"male": [
"back pain",
"anxiety",
"myocardial infarction",
"nausea",
"pain",
"asthenia",
"dyspnoea",
"diarrhoea",
"chest pain",
"fatigue"
]
},
"reports": {
"amount": 900,
},
}
Changelog
Version | Changes |
---|---|
20171206 | Launch version. |