Provider employment changes
Overview
This guide explains how to
- Update Provider Practice location
- Add New Provider Work History
- Update Provider Work History
- Add Provider Employment Termination.
Preparation
Start by setting your Organization ID (reach out on Intercom if you've lost this UUID) and your API key. Then, gather your Provider's unique ID.
Save your IDs!
If at any point you lost track of your Provider IDs, you can use the GET Providers endpoint with a
search
to find them again, e.g. with `requests.get(providers_url, params={"search": "[email protected]"}, headers=headers)
Update Provider Practice location
Add a New Provider Practice Association and Set Primary Location
You can easily use the Medallion API Platform UI for adding a new Provider Practice Association and setting it as the primary location for the Provider.
You will need to gather the Practice ID. If you do not have this ID, you can go to GET Practices endpoint and use the query parameter search
to search by the Practice Name. Once you get the Practice ID, go to POST a Provider Practice Association endpoint.
Set provider
to your Provider ID, practice
to the Practice ID you just grabbed and finally set is_primary_location
to True
.
import requests
url = "https://app.medallion.co/api/v1/org/provider-practice-associations/"
payload = {
"provider": "<PROVIDER_ID>",
"practice": "<PRACTICE_ID>",
"is_primary_location": True
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": "<YOUR_API_KEY>"
}
response = requests.post(url, json=payload, headers=headers)
response_json = response.json()
print(response_json)
Set Existing Provider Practice Association as Primary Location
You will need to gather the Practice Association ID. If you do not have this ID, you can go to GET Provider Practice Associations endpoint, set query parameter provider
to your Provider's unique ID. This will list all the Practice Associations for your Provider. Grab the ID of the Practice Association (not the Practice ID!) you want to set as the primary location.
Now go to PATCH a Provider Practice Association endpoint. Set id
to the Practice Association ID you just grabbed. Set is_primary_location
to True
import requests
practice_association_id = "<PRACTICE_ID>"
url = f"https://app.medallion.co/api/v1/org/provider-practice-associations/{practice_association_id}/"
payload = { "is_primary_location": True }
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": "<YOUR_API_KEY>"
}
response = requests.patch(url, json=payload, headers=headers)
response_json = response.json()
print(response_json)
Update Provider Work History
You can easily use the Medallion API Platform UI for updating Provider Work History.
You will need to gather the ID of the Work Experience you want to terminate. If you do not have this ID, you can go to GET Work Experiences endpoint, set provider_pk
to your Provider's unique ID and set is_present
query parameter to True
. If this returns no results, you can unset is_present
and set search
query parameter to their Institution Name.
Once you have the Work Experience ID, go to PATCH a Work Experience endpoint, set the provider_pk
to your Provider's unique ID and set id
to the Work Experience ID. Fill the fields you want to change. For example if you want to update the title
field
import requests
provider_pk = "<YOUR_PROVIDER_ID>"
work_id = "<WORK_ID>"
url = f"https://app.medallion.co/api/v1/org/providers/{provider_pk}/work-experience/{work_id}/"
payload = {
"title": "NEW_TITLE",
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": "<YOUR_API_KEY>"
}
response = requests.patch(url, json=payload, headers=headers)
response_json = response.json()
print(response_json)
Add New Provider Work History
You can easily use the Medallion API Platform UI for adding a new Provider Work History.
Go to POST a Work Experience endpoint.
Set provider_pk
to your Provider's unique ID. You can enter fields for institution name, address and dates. If your Provider is currently working at this job, set is_present
to True
.
import requests
provider_pk = "<YOUR_PROVIDER_ID>"
url = f"https://app.medallion.co/api/v1/org/providers/{provider_pk}/work-experience/"
#example payload
payload = {
"institution_name": "Example",
"start_date": "2018-08-01",
"country": "US",
"city": "New York City",
"admitting_privileges": False,
"state": "NY",
"is_present": True
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": "<YOUR_API_KEY>"
}
response = requests.post(url, json=payload, headers=headers)
response_json = response.json()
print(response_json)
Add Provider Employment Termination.
You will need to gather the ID of the Work Experience you want to terminate. If you do not have this ID, you can go to GET Work Experiences endpoint, set provider_pk
to your Provider's unique ID and set is_present
query parameter to True
. If this returns no results, you can unset is_present
and set search
query parameter to their Institution Name.
Once you have the Work Experience ID, go to PATCH a Work Experience endpoint, set the provider_pk
to your Provider's unique ID and set id
to the Work Experience ID. Set is_present
to False
and set end_date
to the termination date.
import requests
provider_pk = "<YOUR_PROVIDER_ID>"
work_id = "<WORK_ID>"
url = f"https://app.medallion.co/api/v1/org/providers/{provider_pk}/work-experience/{work_id}/"
payload = {
"end_date": "TERMINATION_DATE",
"is_present": False
}
headers = {
"accept": "application/json",
"content-type": "application/json",
"x-api-key": "<YOUR_API_KEY>"
}
response = requests.patch(url, json=payload, headers=headers)
response_json = response.json()
print(response_json)
Updated 11 months ago