Patient

This section represents the end-point for all patient based operations.  We use the term patient to refer to any users of your system for whom you need to run data analysis on.

GET     /api/V1/patient/getpatientslist
GET     /api/V1/patient/{patientID}
GET     /api/V1/patient/getpatientVideoSavingPreferences
POST   /api/V1/newLoginablepatient
POST   /api/V1/patient/{patientID}

GetPatientsDataList

When to use it:

Call this end-point when you want to get a list of all the patients you have created on the platform.

Tips:

  • The patientID is the information you can use throughout the platform to associate a user to data.
  • External ID can be a link to your other data sources.
import http.client

conn = http.client.HTTPSConnection(“smarttecapi2021.azurewebsites.net”)
payload = ”
headers = {
‘Authorization’: ‘API AUTHORIZATION KEY’,
}
conn.request(“GET”, “/api/V1/patient/getpatientslist”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))

curl –location –request GET ‘https://smarttecapi2021.azurewebsites.net/api/V1/patient/getpatientslist’ \
–header ‘Authorization: API AUTH KEY’ \
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener(“readystatechange”, function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});

xhr.open(“GET”, “https://smarttecapi2021.azurewebsites.net/api/V1/patient/getpatientslist”);
xhr.setRequestHeader(“Authorization”, “YOUR AUTH KEY”);
xhr.send();

[
{
“patientID”: “5a9963da-0a58-4338-ac2b-dbcfae3ba1c4”,
“firstName”: “demo”,
“lastName”: “demo”,
“privacyLevel”: 0,
“photo”: “N/A”,
“primaryLanguage”: “us-en”,
“email”: “delete1026@okaya.me”,
“joinDate”: “0001-01-01T00:00:00”,
“latestOverallScore”: 0,
“lastEntryDate”: “1970-01-01T00:00:00”,
“lastEvaluationDate”: “1970-01-01T00:00:00”,
“externalIdentifier”: null,
“password”: null,
“checkinSummary”: null
},
{
“patientID”: “9d09741b-e23c-4433-af0c-8ec4b8cca440”,
“firstName”: “Silviu”,
“lastName”: “Test”,
“privacyLevel”: 0,
“photo”: “https://okayers.s3.amazonaws.com/”,
“primaryLanguage”: “en”,
“email”: “okayauser111@sharklasers.com”,
“joinDate”: “0001-01-01T00:00:00”,
“latestOverallScore”: 0,
“lastEntryDate”: “2019-08-26T19:32:00”,
“lastEvaluationDate”: “1970-01-01T00:00:00”,
“externalIdentifier”: null,
“password”: null,
“checkinSummary”: null
}
]

(GET) patient/{PatientID}

When to use it:

Call this end-point when you want to get information about a particular patient and a link to some of the analysis completed.

Tips:

  • The patientID is the information you can use throughout the platform to associate a user to data.
  • External ID can be a link to your other data sources.
import http.client

conn = http.client.HTTPSConnection(“smarttecapi2021.azurewebsites.net”)
payload = ”
headers = {
‘Authorization’: ‘YOUR AUTH CODE’
}
conn.request(“GET”, “/api/V1/patient/700f714c-cfd2-45e7-abae-939c19545887”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))

curl –location –request GET ‘https://smarttecapi2021.azurewebsites.net/api/V1/patient/700f714c-cfd2-45e7-abae-939c19545887’ \
–header ‘Authorization: YOUR AUTH CODE’ \
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener(“readystatechange”function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open(“GET”“https://smarttecapi2021.azurewebsites.net/api/V1/patient/700f714c-cfd2-45e7-abae-939c19545887”);
xhr.setRequestHeader(“Authorization”“YOUR AUTH CODE”);

xhr.send();
{
“patientID”: “700f714c-cfd2-45e7-abae-939c19545887”,
“firstName”: “deletenov01”,
“lastName”: “dd”,
“privacyLevel”: 0,
“photo”: “”,
“primaryLanguage”: null,
“email”: “deletenov01@okaya.me”,
“joinDate”: “0001-01-01T00:00:00”,
“latestOverallScore”: 0,
“lastEntryDate”: “0001-01-01T00:00:00”,
“lastEvaluationDate”: “0001-01-01T00:00:00”,
“externalIdentifier”: “”,
“password”: null,
“checkinSummary”: null
}

Getpatientvideosavingpreferences

When to use it:

Call this end-point when you want to find out what a particular patient’s video saving preferences are.

A patient can decide to:

1 – Stay anonymous
2 – Not used at the moment
3,4 – Save the actual video on the platform.

If the patient opts in to stay anonymous, the video is discarded after analysis and cannot be retrieved.

Tips:

  • The patientID is the information you can use throughout the platform to associate a user to data.
import http.client

conn = http.client.HTTPSConnection(“smarttecapi2021.azurewebsites.net”)
payload = 
headers = {
  ‘Authorization’‘YOUR AUTH KEY’,
}
conn.request(“GET”“/api/V1/patient/getPatientVideoSavingPreferences?PatientID=700f714c-cfd2-45e7-abae-939c19545887”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))
curl –location –request GET ‘https://smarttecapi2021.azurewebsites.net/api/V1/patient/getPatientVideoSavingPreferences?PatientID=700f714c-cfd2-45e7-abae-939c19545887’ \
–header ‘Authorization: YOUR AUTH KEY’ \
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener(“readystatechange”function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open(“GET”“https://smarttecapi2021.azurewebsites.net/api/V1/patient/getPatientVideoSavingPreferences?PatientID=700f714c-cfd2-45e7-abae-939c19545887”);
xhr.setRequestHeader(“Authorization”“YOUR AUTH KEY”);

xhr.send();

4

updateVideoStoragePreferences

When to use it:

Call this end-point when you want to update a particular patient’s video saving preferences are.

A patient can decide to:

1 – Stay anonymous
2 – Not used at the moment
3,4 – Save the actual video on the platform.

If the patient opts in to stay anonymous, the video is discarded after analysis and cannot be retrieved.

Tips:

  • The patientID is the information you can use throughout the platform to associate a user to data.
  • The Level is the video sharing level the patient has opt-into.
import http.client

conn = http.client.HTTPSConnection(“smarttecapi2021.azurewebsites.net”)
payload = 
headers = {
  ‘Authorization’‘YOUR AUTH CODE’
}
conn.request(“POST”“/api/V1/patient/updateVideoStoragePreferences?PatientID=700f714c-cfd2-45e7-abae-939c19545887&Level=4”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))
curl –location –request POST ‘https://smarttecapi2021.azurewebsites.net/api/V1/patient/updateVideoStoragePreferences?PatientID=700f714c-cfd2-45e7-abae-939c19545887&Level=4’ \
–header ‘Authorization: YOUR AUTH CODE’ \
 
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener(“readystatechange”function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open(“POST”“https://smarttecapi2021.azurewebsites.net/api/V1/patient/updateVideoStoragePreferences?PatientID=700f714c-cfd2-45e7-abae-939c19545887&Level=4”);
xhr.setRequestHeader(“Authorization”“YOUR AUTH CODE”);

xhr.send();

success

newLoginablepatient

When to use it:

Call this end-point when you want to create a new patient in the system and want that patient to be able to login eventually.

Remember that when creating a Patient you must make sure that you are following the proper data privacy rights required in your location.

Tips:

  • CustomerCode: You can find this information on your API dashboard.  This is your public facing short code.
  • Privacy level refers to the different sharing levels you can pick for the Patient.
  • Primary Language:  This field is important as we use this information as part of the voice analysis.  en, fr, es as examples of proper languages.
  • External identifier: This field can be used to link the patient to your own internal system.
import http.client
import json

conn = http.client.HTTPSConnection(“smarttecapi2021.azurewebsites.net”)
payload = json.dumps({
  “patientID”“00000000-0000-0000-0000-000000000000”,
  “firstName”“string”,
  “lastName”“string”,
  “privacyLevel”0,
  “primaryLanguage”“string”,
  “email”“string”,
  “externalIdentifier”“string”,
  “password”“string”
})
headers = {
  ‘Authorization’‘YOUR AUTH CODE’,
  ‘Content-Type’‘application/json’
}
conn.request(“POST”“/api/V1/patient/newLoginablepatient?customerCode%20=123456”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))
curl –location –request POST ‘https://smarttecapi2021.azurewebsites.net/api/V1/patient/newLoginablepatient?customerCode =123456’ \
–header ‘Authorization: YOUR AUTH CODE’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
  “patientID” : “00000000-0000-0000-0000-000000000000”,
  “firstName”“string”,
  “lastName”“string”,
  “privacyLevel”0,
  “primaryLanguage”“string”,
  “email”“string”,
  “externalIdentifier”“string”,
  “password”“string”
}
var data = JSON.stringify({
  “patientID”“00000000-0000-0000-0000-000000000000”,
  “firstName”“string”,
  “lastName”“string”,
  “privacyLevel”0,
  “primaryLanguage”“string”,
  “email”“string”,
  “externalIdentifier”“string”,
  “password”“string”
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener(“readystatechange”function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open(“POST”“https://smarttecapi2021.azurewebsites.net/api/V1/patient/newLoginablepatient?customerCode%20=123456”);
xhr.setRequestHeader(“Authorization”“YOUR AUTH CODE”); 

xhr.send(data);

201 object with the id of the newly created patient.

(POST) patient/{patientID}

When to use it:

Call this end-point when you want to update an existing patient in the system.

Remember that when updating a Patient you must make sure that you are following the proper data privacy rights required in your location.

Tips:

  • Privacy level refers to the different sharing levels you can pick for the Patient.
  • Primary Language:  This field is important as we use this information as part of the voice analysis.  en, fr, es as examples of proper languages.
  • External identifier: This field can be used to link the patient to your own internal system.
import http.client
import json

conn = http.client.HTTPSConnection(“smarttecapi2021.azurewebsites.net”)
payload = json.dumps({
  “patientID”“00000000-0000-0000-0000-000000000000”,
  “firstName”“string”,
  “lastName”“string”,
  “privacyLevel”0,
  “primaryLanguage”“string”,
  “email”“string”,
  “externalIdentifier”“string”,
  “password”“string”
})
headers = {
  ‘Authorization’‘YOUR AUTH CODE’,
  ‘Content-Type’‘application/json’
}
conn.request(“POST”“/api/V1/patient/newLoginablepatient?customerCode%20=123456”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))
curl –location –request POST ‘https://smarttecapi2021.azurewebsites.net/api/V1/patient/newLoginablepatient?customerCode =123456’ \
–header ‘Authorization: YOUR AUTH CODE’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
  “patientID” : “00000000-0000-0000-0000-000000000000”,
  “firstName”“string”,
  “lastName”“string”,
  “privacyLevel”0,
  “primaryLanguage”“string”,
  “email”“string”,
  “externalIdentifier”“string”,
  “password”“string”
}
var data = JSON.stringify({
  “patientID”“00000000-0000-0000-0000-000000000000”,
  “firstName”“string”,
  “lastName”“string”,
  “privacyLevel”0,
  “primaryLanguage”“string”,
  “email”“string”,
  “externalIdentifier”“string”,
  “password”“string”
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener(“readystatechange”function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open(“POST”“https://smarttecapi2021.azurewebsites.net/api/V1/patient/newLoginablepatient?customerCode%20=123456”);
xhr.setRequestHeader(“Authorization”“YOUR AUTH CODE”); 

xhr.send(data);

201 object with the id of the newly created patient.