A triage API that receives symptoms and returns an urgency score. It also returns the nearest hospital (only in Buenos Aires)
Access website at https://triageapi.herokuapp.com
{
"score": 30,
"age": 50,
"covidAlert": false,
"date": 1604461368362,
"patientID": "47fca1fa9445c4f84390",
"lab": {
"anemia": {
"title": "Microcytic anemia",
"suggestion": "Request iron parameters"
},
"thrombocytopenia": {
"title": "Very low platelets",
"suggestion": "Consult at the emergency ward"
},
"hyponatremia": {
"title": "Low sodium",
"suggestion": "Consult at the emergency ward"
}
}
}
- Please use this header in all your requests to acces the API:
headers: {"Authorization": "linkedin"}
-
Request patient object with the following route -> https://triageapi.herokuapp.com/api/patientModel
-
Modify the patient object data as you see fit (age, symtpoms, geolocation, etc)
-
Send the modified object back to the API for scoring at -> https://triageapi.herokuapp.com/api/score
-
Scoring response example:
date in unix timestamp
{
"score": 30,
"age": 50,
"covidAlert": false,
"date": 1604461368362,
"patientID": "47fca1fa9445c4f84390",
"lab": {
"anemia": {
"title": "Microcytic anemia",
"suggestion": "Request iron parameters"
},
"thrombocytopenia": {
"title": "Very low platelets",
"suggestion": "Consult at the emergency ward"
},
"hyponatremia": {
"title": "Low sodium",
"suggestion": "Consult at the emergency ward"
}
}
}
- To send lab parameters in the patient object:
"lab": {isPresent: true, values: "values here"}
for chatbots or step by step forms
Installation in HTML file
<script src="http://triageapi.herokuapp.com/triagejs"></script>
triageAPI.initPatient()
InitPatient() : creates the patient object in localstorage for easy modification through different pages. Must call it always before trying to update with the following methods.
triageAPI.setPatientAge(35)
setPatientAge() : updates the patient's age. Must call it before sending the patient to the API to avoid receiveing an error response. Patient without a set age can't be scored.
triageAPI.updatePatientSymptoms("fever", true)
updatePatientSymptoms() : sets desired symptom to true
- fever
- cough
- abdominalPain
- throatPain
- runnyNose
- urinatingPain
- diarrhea
- vomiting
- pain
- edema
triageAPI.setAbdominalPainLocation("rightHypochondrium", true)
setAbdominalPainLocation() : sets desired abdominal zone to true or false for scoring
Zones:
- rightHypochondium
- epigastricRegion
- leftHypochondium
- rightLumbar
- umbilicalRegion
- leftLumbar
- rightIliacRegion
- hypogastrium
- leftIliacRegion
let scored = triageAPI.scorePatient();
console.log(scored);
scorePatient() sends modified patient object to the API for scoring and returns a scored response
synchronous ajax call
Response:
{
"score": 30,
"age": 50,
"covidAlert": false,
"date": 1604461368362,
"patientID": "47fca1fa9445c4f84390"
}
triageAPI.initPatient();
triageAPI.setUniquePatientID("thisisanuniqueid", "sha256");
triageAPI.setPatientAge(45);
triageAPI.updatePatientSymptoms("fever", true);
triageAPI.updatePatientSymptoms("cough", true);
let scored = triageAPI.scorePatient();
console.log(scored);
triageAPI.setRuleOut("intensiveCareInLastMonth", true)
setRuleOut() : sets ruleOut keys to true or false
- intensiveCareInLastMonth
- cancer
- immuneDefficiency
- chemoInLast2Months
- dyspnea
- acuteMotorImpairment
- chestPain
- hematemesis
Consistent hashed ID for patient tracking
Enabling uniqueID the scored response will return a hashed patientID, it will be always the same provided the same string parameter. The hashing can be done with sha256 or base64.
triageAPI.setUniquePatientID("helloworld", "sha256")
patientModel.info.hashString = "helloworld"
patientModel.config = {uniqueIdEncryption: "sha256"}
- Acute abdomen
- Appendicitis
- Cholecystitis
- Pharyngitis
- Laryngitis
- Acute upper respiratory infection
- Lower urinary tract infection
- Upper/ lower complicated urinary tract infection
- Deep venous thrombosis (incomplete)
- Cardiac failure (incomplete)
- Alergy (incomplete)
- Gastroenteritis
- write unit test for headache
- expand triage.js library
- add ions to apitest frontend
- add more iron and anemia parameters to apitest frontend
- write labProcess diagnostics tests
- debug labprocess.js
- Unique and consistent patientID
- add more diagnostic options