The healthservice API of priaid allows you to access the symptom-checker engine of priaid.
You can access all data described in the following sections. Each resource requires an access token, described in section Authorization. Currently, you can access the following information:
Note: The token used in this documentation is an invalid test token and it should be replaced with a real token.
Symptoms can be either called to receive the full list of symptoms or a subset of symptoms (e.g. all symptoms of a body sublocation).
URL | https://healthservice.priaid.ch/symptoms |
Parameters | token, symptoms(optional), language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
symptoms |
JSON encoded int[] array | Serialized array of selected symptom ids in json format. example symptoms=[234,235,236] |
This endpoint returns an array of all health symptoms, if symptoms
are not provided. If symptoms
are provided, it returns the array of the requested symptoms. Each element consists of the symptom name and its ID.
Sample request
GET /symptoms?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID":188,
"Name":"Abdominal guarding"
},
{
"ID":238,
"Name":"Anxiety"
},
{
"ID":974,
"Name":"Aggressiveness"
},
{
"ID":54,
"Name":"Reduced appetite"
},
{
"ID":131,
"Name":"Increased appetite"
},
{
"ID":250,
"Name":"Breathing-related pains"
},
...
]
Error list
Error | HTTP Code | Description |
---|---|---|
symptoms are in invalid format! |
400 | symptoms are in invalid format! |
Issues can be either called to receive the full list of issues or a subset of issues (e.g. all issues of a diagnosis).
URL | https://healthservice.priaid.ch/issues |
Parameters | token, issues(optional), language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
issues |
JSON encoded int[] array | Serialized array of selected issue ids in json format. example issues=[234,235,236] |
This endpoint returns an array of all health issues, if issues
are not provided. If issues
are provided, it returns an array of the requested issues. Each element consists of the issue name and its ID.
Sample request
GET /issues?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 11,
"Name": "Flu"
},
{
"ID": 12,
"Name": "Irregular heart rhythm in atria"
},
{
"ID": 14,
"Name": "Inflammatory disease of the airways"
},
{
"ID": 15,
"Name": "Hypersensitivity reaction"
},
{
"ID": 16,
"Name": "High blood pressure"
}
]
Error list
Error | HTTP Code | Description |
---|---|---|
issues are in invalid format! |
400 | issues are in invalid format! |
The diagnosis is the core function of the symptom-checker to compute the potential health issues based on a set of symptoms, gender and age.
URL | https://healthservice.priaid.ch/diagnosis |
Parameters | token, symptoms, gender, year_of_birth, language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
symptoms |
JSON encoded int[] array | Serialized array of selected symptom ids in json format. example symptoms=[234,235,236] |
gender |
string | male, female |
year_of_birth |
int |
This endpoint returns an array of the generated health diagnosis. Each element consists of the relative accuracy (in %) and issue (ID, Name, ProfName, Icd and IcdName).
xxxyx
Sample request
GET /diagnosis?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb&symptoms=[233]&gender=male&year_of_birth=1988 HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"Issue":{
"ID": 40,
"Name": "Nosebleed",
"ProfName": "Epistaxis"
"Icd" : "A04.0",
"IcdName" : "Epistaxis",
"Accuracy": 90
},
"Specialisation":[
{
"ID": 15,
"Name": "General practice",
"SpecialistID": 3
},
{
"ID": 32,
"Name": "Otolaryngology",
"SpecialistID": 49
}
]
},
{
"Issue":{
"ID": 649,
"Name": "Lung bleeding",
"ProfName": "Hemoptysis"
"Icd" : "A04.1",
"IcdName" : "Haemoptysis",
"Accuracy": 18
},
"Specialisation":[
{
"ID": 15,
"Name": "General practice",
"SpecialistID": 3
},
{
"ID": 19,
"Name": "Internal medicine",
"SpecialistID": 4
}
]
}
]
Error list
Error | HTTP Code | Description |
---|---|---|
symptoms are missing or invalid |
400 | symptoms are missing or invalid! |
gender is missing or invalid |
400 | gender is missing or invalid! |
year_of_birth is missing or invalid |
400 | year_of_birth is missing or invalid! |
Body locations can be called to receive all the body locations
URL | https://healthservice.priaid.ch/body/locations |
Parameters | token, language, format(optional) |
Authorization | token |
This endpoint returns an array of all body locations. Each element consists of the ID and Name.
Sample request
GET /body/locations HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 7,
"Name": "Arms & shoulder"
},
{
"ID": 16,
"Name": "Abdomen, pelvis & buttocks"
},
{
"ID": 10,
"Name": "Legs"
},
{
"ID": 15,
"Name": "Chest & back"
},
{
"ID": 17,
"Name": "Skin, joints & general"
},
...
]
Body sublocations can be called to receive all the body sub locations from a body location.
URL | https://healthservice.priaid.ch/body/locations/{locationId} |
Parameters | token, location_id, language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
location_id |
int | see Body locations |
This endpoint returns an array of all body sublocations for the requested location_id
. Each element consists of the ID and Name.
Sample request
GET /body/locations/6 HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 23,
"Name": "Face & eyes"
},
{
"ID": 21,
"Name": "Hair & scalp"
},
{
"ID": 25,
"Name": "Mouth & jaw"
},
{
"ID": 24,
"Name": "Nose, ears, throat & neck"
},
{
"ID": 22,
"Name": "Forehead & head in general"
}
]
Parameter | Type | Values |
---|---|---|
locationId |
int | see Body locations |
Error list
Error | HTTP Code | Description |
---|---|---|
locationId is missing or invalid |
400 | locationId is missing or invalid! |
Unknown locationId |
204 | No content found |
Symptoms in body sublocations can be called to receive all the symptoms in a body sub location.
URL | https://healthservice.priaid.ch/symptoms/{locationId}/{selectorStatus}?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb |
Parameters | token, locationId, selectorStatus, language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
locationId |
int | see Body sublocations. If locationId = 0, then you get all symptoms |
selectorStatus |
string | man, woman, boy, girl |
This endpoint returns an array of all symptoms in a body sublocations for the requested locationId. Each element consists of the ID, Name, HasRedFlag, HealthSymptomLocationIDs and Synonyms.
If locationId=0, then you get all symptoms (from all body locations)
selectorStatus has been given the values “man, woman, boy, girl” (MWBG). The switch from Child to Adult is at the age of 11 (“edge year”). This means that 12 and above is considered as Adult (for man, woman), and 11 and below is considered as Child (for boy, girl). Meaning whoever indicates the age 11 and below (2016 - 2005 = 11) is considered a child (so Boy or Girl) and whoever indicates the age 12 and above (2016 - 2004 = 12) is considered adult.
Sample request
GET /symptoms/21/man?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 152,
"Name": "Hair loss",
"HasRedFlag": false,
"HealthSymptomLocationIDs": [
6,
21
],
"Synonyms": []
},
{
"ID": 239,
"Name": "Bold area among hair on the head",
"HasRedFlag": false,
"HealthSymptomLocationIDs": [
6,
21
],
"Synonyms": []
},
{
"ID": 245,
"Name": "Flaking skin on the head",
"HasRedFlag": false,
"HealthSymptomLocationIDs": [
21
],
"Synonyms": []
},
{
"ID": 247,
"Name": "Itching on head",
"HasRedFlag": false,
"HealthSymptomLocationIDs": [
21,
6
],
"Synonyms": [
"Itching on the head",
"Itch on head",
"Itching on head",
"Pruritus"
]
}
{
"ID": 269,
"Name": "Scalp redness",
"HasRedFlag": false,
"HealthSymptomLocationIDs": [
6,
21
],
"Synonyms": []
}
]
Error list
Error | HTTP Code | Description |
---|---|---|
locationId is missing or invalid |
400 | locationId id is missing or invalid! |
selectorStatus is missing or invalid! |
400 | selectorStatus is missing or invalid! |
Issue info can be called to receive all information about a health issue. The short description gives a short overview. A longer information can consist of "Description", "MedicalCondition", "TreatmentDescription".
URL | https://healthservice.priaid.ch/issues/{issue_id}/info |
Parameters | token, issue_id(int), language, format(optional) |
Authorization | token |
Sample request
GET /issues/11/info?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
{
"Description": "Flu is a disease of the human's respiratory system. It is highly contagious and spreads usually by the sneezes and coughs of an infected person. People can also catch a flu by shaking hands of an infected person. Adults are contagious one to two days before getting symptoms and up to seven days after becoming sick. This means that people can spread the virus before they even know that they are infected. More than 200'000 people are hospitalized every year due to complications from a flu and thousands die every year as a result of it. A flu epidemic can last numerous weeks in a country.",
"DescriptionShort": "Flu (often referred as influenza), is a viral infection of the nose, sinuses, throat, and respiratory tract by an influenza or parainfluenza virus. It’s seasonal, often occurring in winter, and can spread rapidly, called then flu epidemic. Swine flu and bird (avian) flu are specific strains of flu.",
"MedicalCondition": "When the infection occurs in healthy young people, it is usually not dangerous and lasts around one or two weeks. In some cases a dry cough may develop and last a bit longer. Elderly and those with pre-existing illnesses have a higher risk for complications. For this reason it’s recommended that these groups get vaccinated. Swine and bird flus are caused by slight different influenza viruses, but causing similar symptoms. Flu typically develops rapidly, with fever (sometimes accompanied with chills), muscle pain, headache, a dry and painful cough, sore throat, and exhaustion or fatigue. It’s important to note that the flu is different from the common cold, which is often also caused by a virus, but causes milder symptoms.",
"Name": "Flu",
"PossibleSymptoms": "Reduced appetite,Shortness of breath,Eye redness,Sputum,Burning in the throat,Chest pain,Fever,Pain in the limbs,Sore throat,Cough,Headache,Swollen glands in the neck,Swollen glands in the armpit,Tiredness,Runny nose,Sneezing,Chills,Sweating,Stuffy nose,Cough with sputum,Neck stiffness,Muscle weakness,Diarrhea,Night cough,Dizziness",
"ProfName": "Influenza",
"Synonyms": null,
"TreatmentDescription": "Even today flu can have fatal consequences for those with pre-existing conditions and requires a hospital stay with emergency medical measures. Normally it is self-limited and the body recovers by itself. A doctor may prescribe medication to help shorten the course of the flu if taken early. Bed rest and staying hydrated are usually sufficient. Medications such as Ibuprofen or Aspirin can lower a fever and relieve symptoms, but they will not shorten the course of the illness and should be used in children with caution. Flu vaccine is recommended for the following groups at risk: nursing infants, people over 60, people with compromised immune systems, and pregnant women."
}
Error list
Error | HTTP Code | Description |
---|---|---|
issueId wrong or invalid! |
400 | issueId wrong or invalid! |
issueId is missing or invalid! |
404 | Issue not found |
The proposed symptoms can be called to request additional symptoms which can be related to the given symptoms in order to refine the diagnosis.
URL | https://healthservice.priaid.ch/symptoms/proposed |
Parameters | token, symptoms, gender, year_of_birth, language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
symptoms |
JSON encoded int[] array | Serialized array of selected symptom ids in json format. example symptoms=[9,10,11] |
gender |
string | male, female |
year_of_birth |
int |
Sample request
GET /symptoms/proposed?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb&symptoms=[9,10,11]&gender=female&year_of_birth=1981 HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 28,
"Name": "Stuffy nose"
},
{
"ID": 15,
"Name": "Cough"
},
{
"ID": 14,
"Name": "Runny nose"
},
{
"ID": 50,
"Name": "Diarrhea"
},
{
"ID": 234,
"Name": "Neck stiffness"
},
{
"ID": 13,
"Name": "Sore throat"
}
]
Error list
Error | HTTP Code | Description |
---|---|---|
symptoms are missing! |
400 | symptoms are missing! |
selected_symptoms are invalid or symptoms are in invalid format! |
400 | symptoms are invalid or symptoms are in invalid format! |
gender is missing or invalid! |
400 | gender is missing or invalid! |
year_of_birth is missing or invalid! |
400 | year_of_birth is missing or invalid! |
Red flag texts are recommendations to the patient for a higher urgency or severeness of the possible symptoms. As an example a patient with pain in the breast might have a heart attack and therefore the patient should be warned about the urgency and severeness of the matter.
URL | https://healthservice.priaid.ch/redflag |
Parameters | token, symptomId(int), language, format(optional) |
Authorization | token |
Sample request
GET /redflag?token=eyJ0eXAiOiJKV1QiLCJhbGci...&symptomId=17&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
{
"You have selected a symptom which requires a prompt check with a medical doctor."
}
Error list
Error | HTTP Code | Description |
---|---|---|
symptomId wrong or invalid! |
400 | symptomId wrong or invalid! |
The diagnosis is the core function of the symptom-checker to compute the potential health issues based on a set of symptoms, gender and age, but instead of getting computed diagnosis, you can also get list of suggested specialisations for calulated diseases
URL | https://healthservice.priaid.ch/diagnosis/specialisations |
Parameters | token, symptoms, gender, year_of_birth, language, format(optional) |
Authorization | token |
Parameter | Type | Values |
---|---|---|
symptoms |
JSON encoded int[] array | Serialized array of selected symptom ids in json format. example symptoms=[10,11,12] |
gender |
string | male, female |
year_of_birth |
int |
This endpoint returns an array of the generated specialisations. Each element consists of the relative accuracy (in %) and specialisation (ID, Name).
Sample request
GET /diagnosis/specialisations?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb&symptoms=[10,11,12]&gender=male&year_of_birth=1988 HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 15,
"Name": "General practice",
"Accuracy": 90
},
{
"ID": 19,
"Name": "Internal medicine",
"Accuracy": 67.50807
},
{
"ID": 14,
"Name": "Gastroenterology",
"Accuracy": 15.303443
},
{
"ID": 35,
"Name": "Pulmonology",
"Accuracy": 13.3474264
},
{
"ID": 41,
"Name": "Rheumatology",
"Accuracy": 11.1542835
}
]
Error list
Error | HTTP Code | Description |
---|---|---|
symptoms are missing or invalid |
400 | symptoms are missing or invalid! |
gender is missing or invalid |
400 | gender is missing or invalid! |
year_of_birth is missing or invalid |
400 | year_of_birth is missing or invalid! |
Check out our specialisations so you can make your own mapping.
URL | https://healthservice.priaid.ch/specialisations |
Parameters | token, language, format(optional) |
Authorization | token |
This endpoint returns an array of all specialisations. Each element consists of the specialisation name and its ID.
Sample request
GET /specialisations?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 1,
"Name": "Cardiology"
},
{
"ID": 5,
"Name": "Allergology"
},
{
"ID": 14,
"Name": "Gastroenterology"
}
...
]
All requests have 3 common parameters: token
, language
and format
(optional, default value is json)
Parameter | Type | Values |
---|---|---|
token |
string | Security token received from https://authservice.priaid.ch/login |
language |
string | de-ch, en-gb, fr-fr, it-it, es-es, ar-sa, ru-ru, tr-tr, sr-sp, sk-sk |
format (optional) |
string | json, xml |
Error | HTTP Code | Description |
---|---|---|
Missing or invalid token | 400 | Missing or invalid token |
Not valid language | 400 | Not valid language |
All responses are encoded in the JSON or XML format. The currently supported languages are German (de-ch), English (en-gb), French (fr-fr), Italian (it-it), Spanish (es-es), Arabic (ar-sa), Russian (ru-ru), Turkish (tr-tr), Serbian (sr-sp), Slovakian (sk-sk) language. The base URL for all endpoints is https://healthservice.priaid.ch. The following sections describe in detail each method.
Sample request
GET /symptoms?token=eyJ0eXAiOiJKV1QiLCJhbGci...&language=de-ch HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"ID": 15,
"Name": "Allergie"
},
{
"ID": 181,
"Name": "Angststörung"
},
{
"ID": 103,
"Name": "Bandscheibenvorfall"
},
{
"ID": 495,
"Name": "Blähbauch"
},
{
"ID": 211,
"Name":"Chronisches Müdigkeitssyndrom"
},
{
"ID": 51,
"Name": "Durchfall"
},
...
]
All responses are by default JSON encoded. Format can be change by applying additional parameter format
in each request
Sample request
GET /symptoms?token=eyJ0eXAiOiJKV1QiLCJhbGci...&format=xml&language=en-gb HTTP/1.1
Host: healthservice.priaid.ch
Sample response
HTTP/1.1 200 OK
Content-Type: application/xml
<ArrayOfNameItem xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<NameItem >
<ID xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB">188</ID>
<Name>Abdominal guarding</Name>
</NameItem >
<NameItem >
<ID xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB">238</ID>
<Name>Anxiety</Name>
</NameItem >
<NameItem >
<ID xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB">1009</ID>
<Name>Arm pain</Name>
</NameItem >
<NameItem >
<ID xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB">998</ID>
<Name>Back deformity</Name>
</NameItem >
<NameItem >
<ID xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB">104</ID>
<Name>Back pain</Name>
</NameItem >
<NameItem >
<ID xmlns="http://schemas.datacontract.org/2004/07/WebServiceLib.DB">57</ID>
<Name>Blackening of vision</Name>
</NameItem >
</ArrayOfNameItem >
using Priaid.Diagnosis.Client;
using Priaid.Diagnosis.Client.Model;
class Test
{
public void SampleUse()
{
List<int> selectedSymptoms = new List<int>() { 223 };
/// <summary>
/// DiagnosisClient constructor
/// </summary>
/// <param name="username">api user username</param>
/// <param name="password">api user password</param>
/// <param name="authServiceUrl">priaid login url (https://authservice.priaid.ch/login)</param>
/// <param name="language">language (de-ch, en-gb, fr-fr, it-it, es-es, ar-sa, ru-ru, tr-tr, sr-sp, sk-sk)</param>
/// <param name="healthServiceUrl">priaid healthservice url(https://healthservice.priaid.ch)</param>
DiagnosisClient diagnosisClient = new DiagnosisClient("username", "password", "authServiceUrl", "language", "healthServiceUrl");
/// <summary>
/// Load all symptoms
/// <summary>
/// <returns>Returns list of all symptoms</returns>
List<HealthItem> sampleSymptoms = diagnosisClient.LoadSymptoms();
/// <summary>
/// Load all issues
/// <summary>
/// <returns>Returns list of all issues</returns>
List<HealthItem> sampleIssues = diagnosisClient.LoadIssues();
/// <summary>
/// Load detail informations about selected issue
/// <summary>
/// <param name="issueId"></param>
/// <returns>Returns detail informations about selected issue</returns>
HealthIssueInfo sampleIssueInfo = diagnosisClient.LoadIssueInfo(20);
/// <summary>
/// Load calculated list of potential issues for selected parameters
/// <summary>
/// <param name="selectedSymptoms">List of selected symptom ids</param>
/// <param name="gender">Selected person gender (Male, Female)</param>
/// <param name="yearOfBirth">Selected person year of born</param>
/// <returns>Returns calculated list of potential issues for selected parameters</returns>
List<HealthDiagnosis> sampleDiagnosis = diagnosisClient.LoadDiagnosis(selectedSymptoms, Gender.Male, 1988);
/// <summary>
/// Load calculated list of specialisations for selected parameters
/// </summary>
/// <param name="selectedSymptoms">List of selected symptom ids</param>
/// <param name="gender">Selected person gender (Male, Female)</param>
/// <param name="yearOfBirth">Selected person year of born</param>
/// <returns>Returns calculated list of specialisations for selected parameters</returns>
List<DiagnosedIssue> sampleSpecialisations = diagnosisClient.LoadSpecialisations(selectedSymptoms, Gender.Male, 1988)
/// <summary>
/// Load human body locations
/// <summary>
/// <returns>Returns list of human body locations</returns>
List<HealthItem> sampleBodyLocations = diagnosisClient.LoadBodyLocations();
/// <summary>
/// Load human body sublocations for selected human body location
/// <summary>
/// <param name="bodyLocationId">Human body location id</param>
/// <returns>Returns list of human body sublocations for selected human body location</returns>
List<HealthItem> sampleBodySublocations = diagnosisClient.LoadBodySubLocations(16);
/// <summary>
/// Load all symptoms for selected human body location
/// <summary>
/// <param name="locationId">Human body sublocation id</param>
/// <param name="selectedSelectorStatus">Selector status (Man, Woman, Boy, Girl)</param>
/// <returns>Returns list of all symptoms for selected human body location</returns>
List<HealthSymptomSelector> sampleSublocationSymptoms = diagnosisClient.LoadSublocationSymptoms(31, SelectorStatus.Man);
/// <summary>
/// Load list of proposed symptoms for selected symptoms combination
/// <summary>
/// <param name="selectedSymptoms">List of selected symptom ids</param>
/// <param name="gender">Selected person gender (Male, Female)</param>
/// <param name="yearOfBirth">Selected person year of born</param>
/// <returns>Returns list of proposed symptoms for selected symptoms combination</returns>
List<HealthItem> sampleProposedSymptoms = diagnosisClient.LoadProposedSymptoms(selectedSymptoms, Gender.Male, 1988);
/// <summary>
/// Load red flag text for selected symptom
/// <summary>
/// <param name="symptomId">Selected symptom id</param>
/// <returns>Returns red flag text for selected symptom</returns>
string sampleRedFlag = diagnosisClient.LoadRedFlag(17);
}
}