Physitrack API for Practice Management Systems

Patients

HTML Creating a patient with invalid data

Endpoint

POST /pmsapi/:pms_api_type/v1/patients

Parameters

Name Description
data[token] required provider token
data[patient][id] required patient id
data[patient][email] patient email
data[patient][title] patient title. Possible values are (mr, ms, mx). mx is set if not given.
data[patient][first_name] required patient first name
data[patient][last_name] required patient last name
data[patient][birth_year] patient year of birth (e.g. 1999). 1960 is set if not given.
data[patient][diagnosis_code] patient diagnosis code
data[patient][mobile_phone] patient phone in international format (e.g. +16045439777)
data[patient][ssn] ID Number (e.g. 19900922-8512)

Request

Route

POST /pmsapi/umbrella_corporation/v1/patients

Headers

Host: staging.physitrack.com
Content-Type: application/x-www-form-urlencoded
Cookie: 

Body

data[token]=123456&data[patient][id]=1234&data[patient][email]=test_patient%40example.com&data[patient][title]=ms&data[patient][first_name]=&data[patient][last_name]=tester&data[patient][birth_year]=1978&data[patient][diagnosis_code]=AB123&data[patient][ssn]=19900922-8512

Response

Simulated Response

Status

302

Headers

Content-Type: text/html; charset=utf-8

Body

<html><body>You are being <a href="http://staging.physitrack.com/clients">redirected</a>.</body></html>

HTML. Creating a patient / Opening a patient page

Please note that this will sign in a provider (it will also sign out one that is currently signed in if he is not the token owner).

Endpoint

POST /pmsapi/:pms_api_type/v1/patients

Parameters

Name Description
data[token] required provider token
data[patient][id] required patient id
data[patient][email] patient email
data[patient][title] patient title. Possible values are (mr, ms, mx). mx is set if not given.
data[patient][first_name] required patient first name
data[patient][last_name] required patient last name
data[patient][birth_year] patient year of birth (e.g. 1999). 1960 is set if not given.
data[patient][diagnosis_code] patient diagnosis code
data[patient][mobile_phone] patient phone in international format (e.g. +16045439777)
data[patient][ssn] ID Number (e.g. 19900922-8512)

Request

Route

POST /pmsapi/umbrella_corporation/v1/patients

Headers

Host: staging.physitrack.com
Content-Type: application/x-www-form-urlencoded
Cookie: 

Body

data[token]=123456&data[patient][id]=1234&data[patient][email]=test_patient%40example.com&data[patient][title]=ms&data[patient][first_name]=mister&data[patient][last_name]=tester&data[patient][birth_year]=1978&data[patient][diagnosis_code]=AB123&data[patient][ssn]=19900922-8512

Response

Simulated Response

Status

302

Headers

Content-Type: text/html; charset=utf-8

Body

<html><body>You are being <a href="http://staging.physitrack.com/clients/7072">redirected</a>.</body></html>

HTML. Creating a patient with invalid token

Endpoint

POST /pmsapi/:pms_api_type/v1/patients

Parameters

Name Description
data[token] required provider token
data[patient][id] required patient id
data[patient][email] patient email
data[patient][title] patient title. Possible values are (mr, ms, mx). mx is set if not given.
data[patient][first_name] required patient first name
data[patient][last_name] required patient last name
data[patient][birth_year] patient year of birth (e.g. 1999). 1960 is set if not given.
data[patient][diagnosis_code] patient diagnosis code
data[patient][mobile_phone] patient phone in international format (e.g. +16045439777)
data[patient][ssn] ID Number (e.g. 19900922-8512)

Request

Route

POST /pmsapi/umbrella_corporation/v1/patients

Headers

Host: staging.physitrack.com
Content-Type: application/x-www-form-urlencoded
Cookie: 

Body

data[token]=12345654321&

Response

Simulated Response

Status

302

Headers

Content-Type: text/html; charset=utf-8

Body

<html><body>You are being <a href="http://staging.physitrack.com/login">redirected</a>.</body></html>

JSON. Creating a patient

Endpoint

POST /pmsapi/:pms_api_type/v1/patients

Parameters

Name Description
data[token] required provider token
data[patient][id] required patient id
data[patient][email] patient email
data[patient][title] patient title. Possible values are (mr, ms, mx). mx is set if not given.
data[patient][first_name] required patient first name
data[patient][last_name] required patient last name
data[patient][birth_year] patient year of birth (e.g. 1999). 1960 is set if not given.
data[patient][diagnosis_code] patient diagnosis code
data[patient][mobile_phone] patient phone in international format (e.g. +16045439777)
data[patient][ssn] ID Number (e.g. 19900922-8512)

Request

Route

POST /pmsapi/umbrella_corporation/v1/patients

Headers

Host: staging.physitrack.com
Content-Type: application/json
Accept: application/json
Cookie: 

Body

{
  "data": {
    "token": "123456",
    "patient": {
      "id": "1234",
      "email": "test_patient@example.com",
      "title": "ms",
      "first_name": "mister",
      "last_name": "tester",
      "birth_year": 1978,
      "diagnosis_code": "AB123",
      "ssn": "19900922-8512"
    }
  }
}

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "id": 11472,
  "title": "ms",
  "first_name": "Mister",
  "last_name": "tester",
  "email": "test_patient@example.com",
  "birth_year": 1978,
  "diagnosis_code": "AB123",
  "ssn": "199009228512"
}

JSON. Creating a patient with invalid data

Endpoint

POST /pmsapi/:pms_api_type/v1/patients

Parameters

Name Description
data[token] required provider token
data[patient][id] required patient id
data[patient][email] patient email
data[patient][title] patient title. Possible values are (mr, ms, mx). mx is set if not given.
data[patient][first_name] required patient first name
data[patient][last_name] required patient last name
data[patient][birth_year] patient year of birth (e.g. 1999). 1960 is set if not given.
data[patient][diagnosis_code] patient diagnosis code
data[patient][mobile_phone] patient phone in international format (e.g. +16045439777)
data[patient][ssn] ID Number (e.g. 19900922-8512)

Request

Route

POST /pmsapi/umbrella_corporation/v1/patients

Headers

Host: staging.physitrack.com
Content-Type: application/json
Accept: application/json
Cookie: 

Body

{
  "data": {
    "token": "123456",
    "patient": {
      "id": "1234",
      "email": "test_patient@example.com",
      "title": "ms",
      "first_name": "",
      "last_name": "tester",
      "birth_year": 1978,
      "diagnosis_code": "AB123",
      "ssn": "19900922-8512"
    }
  }
}

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "errors": [
    "First name can't be blank"
  ]
}

JSON. Creating a patient with invalid token

Endpoint

POST /pmsapi/:pms_api_type/v1/patients

Parameters

Name Description
data[token] required provider token
data[patient][id] required patient id
data[patient][email] patient email
data[patient][title] patient title. Possible values are (mr, ms, mx). mx is set if not given.
data[patient][first_name] required patient first name
data[patient][last_name] required patient last name
data[patient][birth_year] patient year of birth (e.g. 1999). 1960 is set if not given.
data[patient][diagnosis_code] patient diagnosis code
data[patient][mobile_phone] patient phone in international format (e.g. +16045439777)
data[patient][ssn] ID Number (e.g. 19900922-8512)

Request

Route

POST /pmsapi/umbrella_corporation/v1/patients

Headers

Host: staging.physitrack.com
Content-Type: application/json
Accept: application/json
Cookie: 

Body

{
  "data": {
    "token": "12345654321",
    "patient": {}
  }
}

Response

Simulated Response

Status

401

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "error": "invalid token"
}

Providers

Checking provider status with correct api token

Endpoint

GET /pmsapi/:pms_api_type/v1/providers/check

Parameters

Name Description
data[token] required provider token

Request

Route

GET /pmsapi/umbrella_corporation/v1/providers/check?data[token]=123456

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Query Parameters

data={"token"=>"123456"}

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "success": true,
  "email": "charles_provider@example.com",
  "practitioner_id": 1234
}

Checking provider status with invalid token

Endpoint

GET /pmsapi/:pms_api_type/v1/providers/check

Parameters

Name Description
data[token] required provider token

Request

Route

GET /pmsapi/umbrella_corporation/v1/providers/check?data[token]=12345

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Query Parameters

data={"token"=>"12345"}

Response

Simulated Response

Status

417

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "errors": [
    "Invalid api token"
  ]
}

Checking provider status with no params

Endpoint

GET /pmsapi/:pms_api_type/v1/providers/check

Parameters

Name Description
data[token] required provider token

Request

Route

GET /pmsapi/umbrella_corporation/v1/providers/check

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Response

Simulated Response

Status

417

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "errors": [
    "Invalid api token"
  ]
}