Patient Contacts (Client)
GET <qbench-url>/qbench/api/v1/patient_contact/{patient_contact_id}
Will retrieve a Patient Contact by its ID. A request for a single Patient Contact will also include its Patients.
Example request:
GET /qbench/api/v1/patient/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"first_name": "Patient",
"last_name": "Contact",
"phone": null,
"patients": [{
"first_name": "MoMo",
"last_name": "Chanel",
"gender": "Female Spayed",
"breed": "Sphinx",
"species": "Feline",
"date_of_birth": "02/02/2018",
"id": 67
},
{
"first_name": "Courage",
"last_name": "The Cowardly Dog",
"gender": "Male Neutered",
"breed": "Chihuahua",
"species": "Canine",
"date_of_birth": "07/21/2011",
"id": 68
}],
"address": null,
"customer_id": 2,
"email_address": null,
"id": 43
}
GET <qbench-url>/qbench/api/v1/patient?page_num={pageNum}&page_size={pageSize}
Will retrieve a paginated list of Patients. A list of Patients will include each patient’s Patient Contact
Optional query string params:
- customer_id:
- Will retrieve patient contacts only for a specific customer ID
- first_name:
- Will try to match the parameter with a Patient Contact’s first name
- last_name:
- Will try to match the parameter with a Patient Contact’s last name
Example request:
GET /qbench/api/v1/patient_contact?first_name=Kit HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"total_pages": 1,
"total_count": 1,
"data": [{
"first_name": "Patient",
"last_name": "Contact",
"phone": null,
"patients": [{
"first_name": "MoMo",
"last_name": "Chanel",
"gender": "Female Spayed",
"breed": "Sphinx",
"species": "Feline",
"date_of_birth": "02/02/2018",
"id": 67
},
{
"first_name": "Courage",
"last_name": "The Cowardly Dog",
"gender": "Male Neutered",
"breed": "Chihuahua",
"species": "Canine",
"date_of_birth": "07/21/2011",
"id": 68
}],
"address": null,
"customer_id": 2,
"email_address": null,
"id": 43
}
POST <qbench-url>/qbench/api/v1/patient_contact
Will create a new patient. First name and Customer ID is required.
Example request:
POST /qbench/api/v1/patient_contact HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
'first_name': 'Patient',
'last_name': 'Contact',
‘address’: ‘555 Main St. Roseville, CA 99999’,
‘email_address’: ‘support@qbench.net’,
‘phone’: ‘555-555-5555’,
‘customer_id’: 1
}
Example response:
{“id”: 1}
POST <qbench-url>/qbench/api/v1/patient_contact/{patient_contact_id}
Will update an existing patient contact. Customer ID cannot be null.
Example request:
POST /qbench/api/v1/patient/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
'first_name': ‘Patient,
'last_name': ‘Contact’
}
Example response:
{“message”: “OK”}
DELETE <qbench-url>/qbench/api/v1/patient_contact/{patient_contact_id}
Will delete a patient contact. Deleting a patient contact will delete all associated patients as well.
Example request:
DELETE /qbench/api/v1/patient_contact/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{"message":"OK"}
Comments
0 comments
Please sign in to leave a comment.