Analytics Retrieval
You can retrieve all of the core consultation data along with custom analytic data you have added for all consultations that have taken place using our Analytics Retrieval API.
Once you have the bearer token, the Analytics Retrieval API endpoint can be called to get all of the consultations for a given time period.
POST https://portal.your.md/v4/analytics/query`
The payload for the POST request is shown below.
{
"start_date": "2024-07-24",
"end_date": "2024-08-09",
}
Parameters
Parameter name | Description |
---|---|
start_date | The start date for the query |
end_date | The end date for the query |
Response
The response to the API call should return an array of records as below.
{
"records": [
{
"datetime_conv_start": "2024-06-19 08:58:52.563000 UTC",
"datetime_conv_end": "2024-06-19 08:58:56.685000 UTC",
"user_input": "male, 1978, shaking",
"duration": "hour",
"extracted_symptoms": "C0036973 (Shivering or rigors)",
"additional_symptoms": "C0000734 (Palpable abdominal mass), C0000737 (Abdominal or pelvic pain), C0004604 (Back pain), C0004604 (Chronic non specific lower back pain), C0008031 (Chest pain), C0008033 (Pleuritic pain), C0010200 (Coughing), C0013404 (Dyspnoea), C0015732 (Incontinence of feces), C0015967 (Fever), C0231807 (Dyspnoea only on exertion), C0238995 (Sharp chest pain), C0239134 (Productive cough), C0266835 (Pulsatile abdominal mass), C0344304 (Generalised abdominal pain), C0417744 (Bite of mosquito), C0474585 (Black faeces), C2045676 (Change in stool colour (not including blood or mucus) PLACEHOLDER), C3263722 (Recent injury), CM000390 (Abdominal pain worse with pressing), CM000989 (Living in or travel to at risk countries in the past 2 months)",
"confirmed_influencing_factors": "C0020538 (High BP), C0004096 (Asthma), C0028754 (Obesity), C0337664 (Smoker)",
"excluded_influencing_factors": "C0011849 (Diabetes), C0010054 (CHD), C0403447 (CKD), C0024117 (COPD), C0038454 (Stroke)",
"excluded_symptoms": "C0012833 (Dizziness and giddiness), C0015230 (Skin change on head or body or genitals), C0018932 (Blood mixed in stool/poo ), C0019079 (Haemoptysis), C0020578 (Hyperventilation), C0024031 (Low back pain), C0028643 (Numbness), C0028961 (Oliguria/anuria (12 hours or longer)), C0030252 (Palpitations), C0036572 (Seizure), C0038238 (Steatorrhoea), C0038450 (Stridor), C0039070 (Syncope), C0040822 (Tremor or trembling), C0042024 (Urinary incontinence), C0042963 (Vomiting), C0043144 (Wheezing), C0085636 (Photophobia), C0235632 (Loin pain), C0238740 (Severe back pain), C0238741 (Upper back pain), C0239008 (Chest wall tenderness), C0476273 (Unable to talk in full sentences at rest), C0522061 (Localised abdominal/pelvic pain), C0683369 (Confusion), C0850149 (Dry cough), C1277592 (Bright red blood when wiping bottom or streaks on poo), C1398357 (Neck lump or neck swelling(s)), C1411946 (Severe abdominal or pelvic pain), C2073376 (Chest pain worse on coughing), C2712054 (Dyspnoea on exertion and at rest), C4062321 (New onset functional impairment), CM000215 (Sudden onset breathlessness), CM000258 (Chest pain worse on moving the chest wall e.g. twisting), CM000264 (Sudden onset chest pain), CM000411 (Lump(s)), CM000775 (Unintentional weight loss), CM000776 (Abdominal pain worse on coughing), CM000914 (Inability to pass wind), CM001269 (Back pain at night), CM001326 (Severe chest pain), CM001457 (Chest pain improved by leaning forward), CM001468 (Abdominal pain triggered or worsened by stress), CM001477 (Anginal pain), CM001492 (Abdominal pain worse with defecation), CM001563 (Tearing or ripping chest pain), CM001564 (Tearing or ripping back pain)",
"outcome_conditions": "C0032285 (Pneumonia)",
"outcome_rules": "emergency_ambulance_symptom",
"rounds_count": 22,
"events": [
{
"id": "test",
"payload": {
"b": "Event",
"a": "Start"
}
},
{
"id": "test",
"payload": {
"b": "Symptoms",
"a": "Confirm"
}
},
{
"id": "test",
"payload": {
"b": "Complete",
"a": "Consultation"
}
}
]
},
{
"user_input": "male, 1991, I have a headache",
"extracted_symptoms": "",
"additional_symptoms": "",
"confirmed_influencing_factors": "",
"excluded_influencing_factors": "",
"excluded_symptoms": "",
"outcome_conditions": "",
"events": [
{
"id": "test1",
"payload": {
"c": "17thJuly",
"b": "event",
"a": "analytics"
}
},
{
"id": "test2",
"payload": {
"c": "17thJuly",
"b": "event",
"a": "analytics"
}
},
{
"id": "test3",
"payload": {
"b": "Event",
"a": "Start"
}
}
]
}
]
}
Record Output Fields
The fields included as part of the consultation record are listed below.
Field name | Description |
---|---|
datetime_conv_start | Start time of the conversation (UTC) |
datetime_conv_end | End time of the conversation (UTC) |
conversation_id | ID of the consultation itself |
user_input | Details of the user and the symptoms they entered |
duration | Duration of the symptoms |
extracted_symptoms | The key symptoms confirmed by the user |
additional_symptoms | Additional symptoms the user selected |
excluded_symptoms | Symptoms that were ruled out |
confirmed_influencing_factors | Influencing factors that were taken into account |
excluded_influencing_factors | Influencing factors that have been excluded |
outcome_conditions | The most probable condition(s) |
outcome_rules | The triage outcome based on findings |
events | An array of the custom analytics added |
event.id | An ID assigned for this event / piece of data. |
event.payload | The JSON structure containing the data / event you wish to store against the assessment. |
Updated 2 months ago