Primary Care Physician
Retrieve a Primary Care Physician
Section titled “Retrieve a Primary Care Physician”MD Live allows patients to add their primary care physician. This endpoint retrives information for a patient’s primary care physician.
HTTP Request
Section titled “HTTP Request”GET {server}/api/v1/patients/{patient_id}/evr_primary_care_physician
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Accept | application/json |
| Authorization | Bearer {jwttoken} |
URL Parameter
Section titled “URL Parameter”| Parameter | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Example Request
Section titled “Example Request”curl -X GET {server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician -H "Content-type: application/json" -H "Authorization: Bearer 34a2sample-api-token"RestClient::Request.new( :method => :get, :url => "{server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer 34a2sample-api-token", "Accept" => "application/json" }).executeExample Response
Section titled “Example Response”{ "pcp": { "id": 1 "full_name": "PCP Physician", "first_name": "PCP", "last_name": "Physician", "middle_name": "", "practice": "Doc Medical Practice", "email": "doctor@example.com", "address1": "123 Main St", "address2": "", "city": "FORT LAUDERDALE", "state_abbrev": "FL", "country_code": "US", "zip": "33301", "phone": "(954) 555-1111", "cell": "(954) 555-1111", "fax": "(954) 552-1234", }}When a patient does not have a primary care physician, the above command will return the following JSON:
{ "pcp" : null }Create a Primary Care Physician
Section titled “Create a Primary Care Physician”To create a primary care physician (PCP) for a patient, make a request to:
HTTP Request
Section titled “HTTP Request”POST {server}/api/v1/patients/{patient_id}/evr_primary_care_physician
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Accept | application/json |
| Authorization | Bearer {jwttoken} |
URL Parameter
Section titled “URL Parameter”| Parameter | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Request Body Parameters
Section titled “Request Body Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| pcp | object | true | Object containing contact information about the PCP |
| ↳ first_name | string | true | PCP first name |
| ↳ last_name | string | true | PCP last name |
| ↳ middle_name | string | false | PCP middle name |
| ↳ practice | string | true | Name of the PCP practice |
| string | false | PCP work email | |
| ↳ address1 | string | false | PCP office address 1 |
| ↳ address2 | string | false | PCP office address 2 |
| ↳ city | string | true | PCP office city |
| ↳ state_abbrev | string | true | PCP office state abbreviation |
| ↳ country_code | string | true | PCP office two letter country code |
| ↳ zip | string | false | PCP office zipcode |
| ↳ phone | string | true | PCP office number |
| ↳ cell | string | false | PCP cell number |
| ↳ fax | string | true | PCP office fax number |
Example Request
Section titled “Example Request”curl -X POST {server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician -H "Content-type: application/json" -H "Authorization: Bearer 34a2sample-api-token" -H "Accept: application/json" -d '{ "pcp": { "first_name": "PCP", "last_name": "Physician", "middle_name": "", "practice": "Doc Medical Practice", "email": "doctor@example.com", "address1": "123 Main St", "address2": "", "city": "FORT LAUDERDALE", "state_abbrev": "FL", "country_code": "US", "zip": "33301", "phone": "(954) 555-1111", "cell": "(954) 555-1111", "fax": "(954) 552-1234" } }'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer 34a2sample-api-token", "Accept" => "application/json" }, :payload => { pcp: { first_name: "PCP", last_name: "Physician", middle_name: "", practice: "Doc Medical Practice", email: "doctor@example.com", address1: "123 Main St", address2: "", city: "FORT LAUDERDALE", state_abbrev: "FL", country_code: "US", zip: "33301", phone: "(954) 555-1111", cell: "(954) 555-1111", fax: "(954) 552-1234" } }).executeExample Response
Section titled “Example Response”{ "pcp": { "id": 3 "full_name": "PCP Physician", "first_name": "PCP", "last_name": "Physician", "middle_name": "", "practice": "Doc Medical Practice", "email": "doctor@example.com", "address1": "123 Main St", "address2": "", "city": "FORT LAUDERDALE", "state_abbrev": "FL", "country_code": "US", "zip": "33301", "phone": "(954) 555-1111", "cell": "(954) 555-1111", "fax": "(954) 552-1234", }}Update a Primary Care Physician
Section titled “Update a Primary Care Physician”A patient can update their primary care physician’s (PCP) contact information.
HTTP Request
Section titled “HTTP Request”PUT {server}/api/v1/patients/{patient_id}/evr_primary_care_physician/{id}
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Accept | application/json |
| Authorization | Bearer {jwttoken} |
URL Parameter
Section titled “URL Parameter”| Parameter | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
| id | true | The ID of the PCP to update |
Request Body Parameters
Section titled “Request Body Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
| pcp | object | true | Object containing information about the PCP |
| ↳ first_name | string | false | PCP first name |
| ↳ last_name | string | false | PCP last name |
| ↳ middle_name | string | false | PCP middle name |
| ↳ practice | string | false | Name of the PCP practice |
| string | false | PCP work email | |
| ↳ address1 | string | false | PCP office address 1 |
| ↳ address2 | string | false | PCP office address 2 |
| ↳ city | string | false | PCP office city |
| ↳ state_abbrev | string | false | PCP office state abbreviation |
| ↳ country_code | string | false | PCP office two letter country code |
| ↳ zip | string | false | PCP office zipcode |
| ↳ phone | string | false | PCP office number |
| ↳ cell | string | false | PCP cell number |
| ↳ fax | string | false | PCP office fax number |
Example Request
Section titled “Example Request”curl -X POST {server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician/{id} -H "Content-type: application/json" -H "Authorization: Bearer 34a2sample-api-token" -H "Accept: application/json" -d '{ "pcp": { "first_name": "PCP", "last_name": "Physician", "middle_name": "", "practice": "PCP Practice", "email": "doctor@example.com", "address1": "555 Move Street", "address2": "", "city": "FORT LAUDERDALE", "state_abbrev": "FL", "country_code": "US", "zip": "33301", "phone": "(954) 555-5555", "cell": "(954) 555-5555", "fax": "(954) 552-1234" } }'RestClient::Request.new( :method => :post, :url => "{server_url}/api/v1/patients/{patient_id}/evr_primary_care_physician/{id}", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer 34a2sample-api-token", "Accept" => "application/json" }, :payload => { pcp: { first_name: "PCP", last_name: "Physician", middle_name: "", practice: "PCP Practice", email: "doctor@example.com", address1: "555 Move St", address2: "", city: "FORT LAUDERDALE", state_abbrev: "FL", country_code: "US", zip: "33301", phone: "(954) 555-1111", cell: "(954) 555-1111", fax: "(954) 552-1234" } }).executeExample Response
Section titled “Example Response”{ "pcp": { "id": 2 "full_name": "PCP Physician", "first_name": "PCP", "last_name": "Physician", "middle_name": "", "practice": "PCP Practice", "email": "doctor@example.com", "address1": "555 Move Street", "address2": "", "city": "FORT LAUDERDALE", "state_abbrev": "FL", "country_code": "US", "zip": "33301", "phone": "(954) 555-5555", "cell": "(954) 555-5555", "fax": "(954) 552-1234", }}Delete a Primary Care Physician
Section titled “Delete a Primary Care Physician”This endpoint deletes the primary care physician associated with a patient.
HTTP Request
Section titled “HTTP Request”DELETE {server}/api/v2/patients/{patient_id}/evr_primary_care_physicians/{id}
This request must include a valid User JWT token, please see our documentation
Header Parameter
Section titled “Header Parameter”| Parameter | Default |
|---|---|
| Content-type | application/json |
| Accept | application/json |
| Authorization | Bearer {jwttoken} |
URL Parameter
Section titled “URL Parameter”| Parameter | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
| id | true | The ID of the PCP to delete |
Example Request
Section titled “Example Request”curl -X DELETE {server_url}/api/v2/patients/{patient_id}/evr_primary_care_physicians/{id} -H "Content-type: application/json" -H "Authorization: Bearer 34a2sample-api-token" -H "Accept: application/json"RestClient::Request.new( :method => :delete, :url => "{server_url}/api/v2/patients/{patient_id}/evr_primary_care_physicians/{id}", :headers => { "Content-type" => "application/json", "Authorization" => "Bearer 34a2sample-api-token", "Accept" => "application/json" }).executeExample Response
Section titled “Example Response”The above command will return a 204 status code with no content in the body.