UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 535 kB
{"openapi":"3.0.0","servers":[{"url":"https://app.drchrono.com"}],"info":{"description":"This document is intended as a detailed reference for the precise behavior of\nthe drchrono API. If this is your first time using the API, start with our <a href=\"/api-docs-old/tutorial\">tutorial</a>. If you are upgrading from a previous version, take a look at the changelog section.\n\n# Authorization\n\n## Initial authorization\n\nThere are three main steps in the OAuth 2.0 authentication workflow:\n\n1. Redirect the provider to the authorization page.\n2. The provider authorizes your application and is redirected back to\n your web application.\n3. Your application exchanges the `authorization_code` that came with\n the redirect for an `access_token` and `refresh_token`.\n\n### Step 1: Redirect to drchrono\n\nThe first step is redirecting your user to drchrono, typically with a button\nlabeled \"Connect to drchrono\" or \"Login with drchrono\". This is just a link that\ntakes your user to the following URL:\n\n https://drchrono.com/o/authorize/?redirect_uri=REDIRECT_URI_ENCODED&response_type=code&client_id=CLIENT_ID_ENCODED&scope=SCOPES_ENCODED\n\n- `REDIRECT_URI_ENCODED` is the URL-encoded version of the redirect URI (as registered for your application and used in later steps).\n- `CLIENT_ID_ENCODED` is the URL-encoded version of your application's client ID.\n- `SCOPES_ENCODED` is a URL-encoded version of a space-separated list of scopes, which can be found in each endpoint or omitted to default to all scopes.\n\nThe `scope` parameter consists of an optional, space-separated list of scopes your application is requesting.\nIf omitted, all scopes will be requested.\n\nScopes are of the form `BASE_SCOPE:[read|write]` where `BASE_SCOPE` is any of `user`, `calendar`, `patients`, `patients:summary`, `billing`, `clinical` and `labs`.\nYou should request only the scopes you need.\nFor instance, an application which sends \"Happy Birthday!\" emails to a doctor's patients on their birthdays would use the scope parameter `\"patients:summary:read\"`,\nwhile one that allows patients to schedule appointments online would need at least\n`\"patients:summary:read patients:summary:write calendar:read calendar:write clinical:read clinical:write\"`.\n\n### Step 2: Provider authorization\n\nAfter logging in (if necessary), the provider will be presented with a screen\nwith your application's name and the list of permissions you requested (via the\n`scope` parameter).\n\nWhen they click the \"Authorize\" button, they will be redirected to your redirect\nURI with a `code` query parameter appended, which contains an authorization code to be\nused in step 3. If they click the \"Cancel\" button, they will be redirected to\nyour redirect URI with `error=access_denied` instead.\n\nNote: This authorization code expires extremely quickly, so you must perform\nstep 3 immediately, ideally before rendering the resulting page for the end\nuser.\n\n### Step 3: Token exchange\n\nThe `code` obtained from step 2 is usable exactly once to obtain an access token\nand refresh token. Here is an example token exchange in Python:\n\n import datetime, pytz, requests\n\n if 'error' in get_params:\n raise ValueError('Error authorizing application: %s' % get_params[error])\n\n response = requests.post('https://drchrono.com/o/token/', data={\n 'code': get_params['code'],\n 'grant_type': 'authorization_code',\n 'redirect_uri': 'http://mytestapp.com/redirect_uri',\n 'client_id': 'abcdefg12345',\n 'client_secret': 'abcdefg12345',\n })\n response.raise_for_status()\n data = response.json()\n\n # Save these in your database associated with the user\n access_token = data['access_token']\n refresh_token = data['refresh_token']\n expires_timestamp = datetime.datetime.now(pytz.utc) + datetime.timedelta(seconds=data['expires_in'])\n\nYou now have all you need to make API requests authenticated as that provider.\nWhen using this access token, you'll only be able to access the data that the\nuser has access to and that you have been granted permissions for.\n\n## Refreshing an access token\n\nAccess tokens only last 48 hours (given in seconds in the `'expires_in'` key in\nthe token exchange step above), so they occasionally need to be refreshed. It\nwould be inconvenient to ask the user to re-authorize every time, so instead you\ncan use the refresh token like the original authorization to obtain a new access\ntoken. Replace the `code` parameter with `refresh_token`, change the value\n`grant_type` from `authorization_code` to `refresh_token`, and omit the\n`redirect_uri` parameter.\n\nExample in Python:\n\n ...\n response = requests.post('https://drchrono.com/o/token/', data={\n 'refresh_token': get_refresh_token(),\n 'grant_type': 'refresh_token',\n 'client_id': 'abcdefg12345',\n 'client_secret': 'abcdefg12345',\n })\n ...\n\n# Webhooks\n\nIn order to use drchrono API webhooks, you first need to have an API application on file\n(even if it is in Test Model).\nEach API webhook is associated with one API application, go to\n<a href=\"/api-management/\" target=\"_blank\">here</a> to set up both API applications and webhooks!\n\nOnce you registered an API application, you will see webhook section in each saved API applications.\nCreate a webhook and register some events there and save all the changes, then you are good to go!\n\n## Webhooks setup\n\nAll fields under webhooks section are required.\n\n**Callback URL**\nCallback URl is used to receive all hooks when subscribed events are triggered. This should be an URL under your control.\n\n**Secret token**\nSecret token is used to verify webhooks, this is very important, please set something with high entropy. Also we will\ntalk more about this later.\n\n**Events**\n\nEvents is used to register events you want to receiver notification when they happen. Currently we support following events.\n\nEvent name | Event description\n---------- | -----------------\n`APPOINTMENT_CREATE` | We will deliver a hook any time an appointment is created\n`APPOINTMENT_MODIFY` | We will deliver a hook any time an appointment is modified\n`PATIENT_CREATE` | We will deliver a hook any time a patient is created\n`PATIENT_MODIFY` | We will deliver a hook any time a patient is modified\n`PATIENT_PROBLEM_CREATE` | We will deliver a hook any time a patient problem is created\n`PATIENT_PROBLEM_MODIFY` | We will deliver a hook any time a patient problem is modified\n`PATIENT_ALLERGY_CREATE` | We will deliver a hook any time a patient allergy is created\n`PATIENT_ALLERGY_MODIFY` | We will deliver a hook any time a patient allergy is modified\n`PATIENT_MEDICATION_CREATE` | We will deliver a hook any time a patient medication is created\n`PATIENT_MEDICATION_MODIFY` | We will deliver a hook any time a patient medication is modified\n`CLINICAL_NOTE_LOCK` | We will deliver a hook any time a clinical note is locked\n`CLINICAL_NOTE_UNLOCK` | We will deliver a hook any time a clinical note is unlocked\n`TASK_CREATE` | We will deliver a hook any time a task is created\n`TASK_MODIFY` | We will deliver a hook any time a task is modified and any time creation, modification and deletion of task notes, associated task item\n`TASK_DELETE` | We will deliver a hook any time a task is deleted\n\n\n## Webhooks verification\n\nIn order to make sure the callback URL in webhook is under your control, we added a verification\nstep before we send any hooks out to you.\n\nVerification can be done by clicking \"Verify webhook\" button in webhooks setup page. After you click\nthe button, we will send a `GET` request to the callback URL, along with a parameter called `msg`.\n\nPlease use your webhook's secret token as hash key and SHA-256 as digest constructor, hash the `msg` value with\n<a href=\"https://tools.ietf.org/html/rfc2104.html\">HMAC algorithm</a>.\nAnd we expect a `200` JSON response, in JSON response body, there should be a key called `secret_token` existing, and its value should be\nequal to the <strong>hashed</strong> `msg`. Otherwise, verification will fail.\n\nHere is an example webhook verification in Python:\n\n import hashlib, hmac\n\n def webhook_verify(request):\n secret_token = hmac.new(WEBHOOK_SECRET_TOKEN, request.GET['msg'], hashlib.sha256).hexdigest()\n return json_response({\n 'secret_token': secret_token\n })\n\n<div class=\"alert alert-warning\">\n<b>Note:</b> Verification will be needed when webhook is first created and anytime callback URl is changed.\n</div>\n\n\n## Webhooks header and body\n\n**Header**\n\nKey | Value\n--- | -----\n`X-drchrono-event` | Event that triggered this hook, could be any one event above or `PING`\n`X-drchrono-signature` | Secret token associated with this webhook\n`X-drchrono-delivery` | ID of this delivery\n\n**Body**\n\nKey | Value\n--- | -----\n`receiver` | This will be an JSON representation of the webhook\n`object` | This will be an JSON representation of the object related to the triggered event, this would share same serializer as drchrono API\n\n## Webhooks ping and deliveries\n\nWebhooks ping and deliveries will be sent as `POST` requests.\n\n**PING**:\n\nYou can always ping your webhook to check things, by clicking the \"Ping webhook\" button in webhook setup page. And a hook with header `X-drchrono-event: PING` would be sent to the callback URL.\n\n**Deliveries**:\n\nYou can check recent deliveries by clicking the \"deliveries\" link in webhook setup page. And you can resend a hook by clicking \"redeliver\" button after select a specific delivery.\n\n## Webhooks delivery mechanism\n\nWe will delivery a hook the moment a subscribed event is triggered. We will not record any response header or body you send back after you receive the hook.\nHowever we only consider the response status code. We will consider any `2xx` responses as successfully delivered.\nAny other responses, like `302` would be considered failing.\nAnd we will try to redeliver unsuccessfully delivered hooks 3 times, first redeliver happens at 1 hour after the initial event,\nsecond receliver happens 3 hours after the initial event, and the third redeliver happens 7 hours after the initial event.\nAfter these redeliveries, if the delivery is still unsuccessful, you have to redeliver it by hand.\n\n\n## Webhooks security\n\nYou may want to secure your webhooks to only consider requests send out from drchrono. And this is where <code>secret_token</code> is needed in\nrequest header.\nTry to set the <code>secret_token</code> to something with high entropy, a good example could be taking the output of\n<code>ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'</code>.\nAfter this, you might want to verify all request headers you received on your server with this token.\n\n\n# iframe integration\n\nSome API apps provide additional functionality for interacting with patient data\nnot offered by drchrono, and can benefit by being incorporated into drchrono's\npatient information page via iframe. We have created a simple API to make this\npossible.\n\nTo make an existing API application accessible via an iframe on the patient\npage, you need to update either \"Patient iframe\" or \"Clinical note iframe\" section in API management page,\nto make the iframe to appear on (either the patient page or the clinical note page),\nwith the URL that the iframe will use for each page, and the height it should\nhave. The application will be reviewed before it is approved to ensure that it\nis functional and secure.\n\n## Register a Doctor\n\niframe applications will appear as choices on the left-hand menu of the patient\npage for doctors registered with your application. To register a doctor with\nyour application, make a `POST` request to the `/api/iframe_integration`\nendpoint using the access token for the corresponding doctor. This endpoint does not\nexpect any payload.\n\nTo disable your iframe application for a doctor, make a `DELETE` request to the\nsame endpoint.\n\n## Populating the iframe\n\nThere are two places where the iframe can be displayed, either within the\npatient detail page or the clinical note page, shown below respectively:\n\n<img src=\"{% asset 'public/images/iframe_patient_page.png' %}\" alt=\"Iframe on the patient page\"/>\n\n<img src=\"{% asset 'public/images/iframe_clinical_note.png' %}\" alt=\"Iframe on the clinical note page\"/>\n\nWhen requesting approval for your iframe app, you must specify a URL for one or\nboth of these pages which will serve as the base URL for your IFrame\ncontents. When a doctor views your iframe, the source URL will have various\nquery parameters appended to it, for example for the patient page the `src`\nparameter of the IFrame will be:\n\n```\n<iframe_url>?doctor_id=<doctor_id>&patient_id=<patient_id>&practice_id=<practice_id>&iat=<iat>&jwt=<jwt>\n```\n\nThe `jwt` parameter is crucial if your application transfers any sort of PHI and\ndoes not implement its own login system. It encapsulates the other parameters\nin a [JSON web token (JWT)](http://jwt.io) and signs them using SHA-256 HMAC\nwith your `client_secret` as the key. This verifies that the iframe is being\nloaded within one of drchrono's pages by an authorized user. In production, you\nshould validate the JWT using an approved library (which are listed on the\n[official site](http://jwt.io)), and only use the parameters extracted from the\nJWT. Using Python and Django, this might look like:\n\n import jwt\n\n CLIENT_SECRET = <client_secret>\n MAX_TIME_DRIFT_SECONDS = 60\n\n def validate_parameters(request):\n token = request.GET['jwt']\n\n return jwt.decode(token, CLIENT_SECRET, algorithms=['HS256'], leeway=MAX_TIME_DRIFT_SECONDS)\n\nModern browsers' same-origin policy means that data cannot be passed between\nyour application and drchrono's page through the iframe. Therefore, interaction\nmust happen through the API, using information provided in JWT.\n\n# Versions and deprecation\n\n## Stability Policy\n\nChanges to this API version will be limited to adding endpoints, or adding fields to existing\nendpoints, or adding optional query parameters. Any new fields which are not read-only will be optional.\n\n## Deprecation Policy\n\nThe drchrono API is versioned. Versions can be in the following states:\n\n* **Active:** This is our latest and greatest version of the API. It is actively supported by\nour API team and is improved upon with new features, bug fixes and optimizations that do\nnot break backwards compatibility.\n\n* **Deprecated:** A deprecated API version is considered second best--having been\nsurpassed by our active API version. An API version remains in this state for one year,\nafter which time it falls to the not supported state. A deprecated API version is passively supported;\nwhile it won't be removed until becoming unsupported, it may not receive new features but will likely\nbe subject to security updates and performance improvements.\n\n* **Unsupported:** An API version in the not supported state may be deactivated at any\ntime. An application using an unsupported API version should migrate to an active API version.\n\n## Version Map\n| Version Name | Previous Name | Start Date | Deprecation Date |\n|--------------|---------------|------------|------------------|\n| v2 | v2015_08 | 08/2015 | TBA |\n| v3 | v2016_06 | 06/2016 | |\n| v4 | N/A | 09/2018 | |\n\nIf you are looking for documentation for an older version\n\n- [V4(Hunt Valley)](/api-docs-old/v4/documentation) (old V4 documentation)\n- [V3(Sunnyvale)](/api-docs-old/v3/documentation)\n- [V2(Mountain View)](/api-docs-old/v2/documentation)\n\n# Changelog\n\nHere's changelog for different versions\n\n- [V4 Changelog](/api-docs-old/v4/changelog)\n- [V3 changelog](/api-docs-old/v3/changelog)\n\n","title":"","version":"v4 (Hunt Valley)","x-apisguru-categories":["customer_relation"],"x-logo":{"altText":"DrChrono Logo","url":"https://www.drchrono.com/site_media/images/drchrono-dark.53a9fc1649a7.png"},"x-origin":[{"format":"openapi","url":"https://drchrono.com/openapi-schema","version":"3.0"}],"x-providerName":"drchrono.com"},"tags":[{"description":"Create and manage administrative resources","name":"Administrative"},{"description":"Create and manage clinical resources","name":"Clinical"},{"description":"Create and manage billing resources","name":"Billing"},{"description":"Create and manage practice management resources","name":"PracticeManagement"}],"paths":{"/api/allergies":{"get":{"description":"Retrieve or search patient allergies","operationId":"allergies_list","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"The pagination cursor value.","title":"Cursor","type":"string"}},{"in":"query","name":"page_size","required":false,"schema":{"description":"Number of results to return per page.","title":"Page size","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Paginated Result","properties":{"data":{"description":"result data","items":{"$ref":"#/components/schemas/PatientAllergy"},"title":"data","type":"array"},"next":{"description":"Next Paginated page","title":"next","type":"string"},"previous":{"description":"Previous paginated page","title":"previous","type":"string"}},"title":"","type":"object"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"post":{"description":"Create patient allergy","operationId":"allergies_create","parameters":[{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAllergy"}}},"description":"Created"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"}},"/api/allergies/{id}":{"get":{"description":"Retrieve an existing patient allergy","operationId":"allergies_read","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAllergy"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"patch":{"description":"Update an existing patient allergy","operationId":"allergies_partial_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"put":{"description":"Update an existing patient allergy","operationId":"allergies_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"}},"/api/amendments":{"get":{"description":"Retrieve or search patient amendments. You can only interact with amendments created by your API application","operationId":"amendments_list","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"The pagination cursor value.","title":"Cursor","type":"string"}},{"in":"query","name":"page_size","required":false,"schema":{"description":"Number of results to return per page.","title":"Page size","type":"integer"}},{"description":"","in":"query","name":"appointment","required":false,"schema":{"description":"","title":"appointment","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Paginated Result","properties":{"data":{"description":"result data","items":{"$ref":"#/components/schemas/PatientAmendment"},"title":"data","type":"array"},"next":{"description":"Next Paginated page","title":"next","type":"string"},"previous":{"description":"Previous paginated page","title":"previous","type":"string"}},"title":"","type":"object"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"post":{"description":"Create patient amendments to a patient's clinical records","operationId":"amendments_create","parameters":[{"description":"","in":"query","name":"appointment","required":false,"schema":{"description":"","title":"appointment","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAmendment"}}},"description":"Created"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"}},"/api/amendments/{id}":{"delete":{"description":"Delete an existing patient amendment, you can only interact with amendments created by your API application","operationId":"amendments_delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"appointment","required":false,"schema":{"description":"","title":"appointment","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"get":{"description":"Retrieve an existing patient amendment, you can only interact with amendments created by your API application","operationId":"amendments_read","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"appointment","required":false,"schema":{"description":"","title":"appointment","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAmendment"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"patch":{"description":"Update an existing patient amendment, you can only interact with amendments created by your API application","operationId":"amendments_partial_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"appointment","required":false,"schema":{"description":"","title":"appointment","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"put":{"description":"Update an existing patient amendment, you can only interact with amendments created by your API application","operationId":"amendments_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"appointment","required":false,"schema":{"description":"","title":"appointment","type":"integer"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"}},"/api/appointment_profiles":{"get":{"description":"Retrieve or search appointment profiles for a doctor's calendar","operationId":"appointment_profiles_list","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"The pagination cursor value.","title":"Cursor","type":"string"}},{"in":"query","name":"page_size","required":false,"schema":{"description":"Number of results to return per page.","title":"Page size","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Paginated Result","properties":{"data":{"description":"result data","items":{"$ref":"#/components/schemas/AppointmentProfile"},"title":"data","type":"array"},"next":{"description":"Next Paginated page","title":"next","type":"string"},"previous":{"description":"Previous paginated page","title":"previous","type":"string"}},"title":"","type":"object"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"post":{"description":"Create appointment profiles for a doctor's calendar","operationId":"appointment_profiles_create","parameters":[{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentProfile"}}},"description":"Created"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"}},"/api/appointment_profiles/{id}":{"delete":{"description":"Delete an existing appointment profile","operationId":"appointment_profiles_delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"get":{"description":"Retrieve an existing appointment profile","operationId":"appointment_profiles_read","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentProfile"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"patch":{"description":"Update an existing appointment profile","operationId":"appointment_profiles_partial_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"put":{"description":"Update an existing appointment profile","operationId":"appointment_profiles_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"}},"/api/appointment_templates":{"get":{"description":"Retrieve or search appointment templates for a doctor's calendar","operationId":"appointment_templates_list","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"The pagination cursor value.","title":"Cursor","type":"string"}},{"in":"query","name":"page_size","required":false,"schema":{"description":"Number of results to return per page.","title":"Page size","type":"integer"}},{"description":"","in":"query","name":"profile","required":false,"schema":{"description":"","title":"profile","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Paginated Result","properties":{"data":{"description":"result data","items":{"$ref":"#/components/schemas/AppointmentTemplate"},"title":"data","type":"array"},"next":{"description":"Next Paginated page","title":"next","type":"string"},"previous":{"description":"Previous paginated page","title":"previous","type":"string"}},"title":"","type":"object"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"post":{"description":"Create appointment templates for a doctor's calendar","operationId":"appointment_templates_create","parameters":[{"description":"","in":"query","name":"profile","required":false,"schema":{"description":"","title":"profile","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTemplate"}}},"description":"Created"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"}},"/api/appointment_templates/{id}":{"delete":{"description":"Delete an existing appointment template","operationId":"appointment_templates_delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"profile","required":false,"schema":{"description":"","title":"profile","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"get":{"description":"Retrieve an existing appointment template","operationId":"appointment_templates_read","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"profile","required":false,"schema":{"description":"","title":"profile","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTemplate"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"patch":{"description":"Update an existing appointment template","operationId":"appointment_templates_partial_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"profile","required":false,"schema":{"description":"","title":"profile","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"},"put":{"description":"Update an existing appointment template","operationId":"appointment_templates_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"description":"","title":"","type":"string"}},{"description":"","in":"query","name":"profile","required":false,"schema":{"description":"","title":"profile","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}}],"responses":{"204":{"content":{},"description":"No Content"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","settings:read","settings:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","settings"],"x-practice-access":"\"share_appointment_profiles\" need to be set for data access among practice"}},"/api/appointments":{"get":{"description":"Retrieve or search appointment or breaks.\n<b>Note:</b> Either `since`, `date` or `date_range` parameter must be specified.\n ","operationId":"appointments_list","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"description":"The pagination cursor value.","title":"Cursor","type":"string"}},{"in":"query","name":"page_size","required":false,"schema":{"description":"Number of results to return per page.","title":"Page size","type":"integer"}},{"description":"","in":"query","name":"status","required":false,"schema":{"description":"","title":"status","type":"string"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}},{"description":"","in":"query","name":"since","required":false,"schema":{"description":"","title":"since","type":"string"}},{"description":"","in":"query","name":"date_range","required":false,"schema":{"description":"","title":"date_range","type":"string"}},{"description":"","in":"query","name":"date","required":false,"schema":{"description":"","title":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"Paginated Result","properties":{"data":{"description":"result data","items":{"$ref":"#/components/schemas/Appointment"},"title":"data","type":"array"},"next":{"description":"Next Paginated page","title":"next","type":"string"},"previous":{"description":"Previous paginated page","title":"previous","type":"string"}},"title":"","type":"object"}}},"description":"OK"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"},"post":{"description":"Create a new appointment or break on doctor's calendar","operationId":"appointments_create","parameters":[{"description":"","in":"query","name":"status","required":false,"schema":{"description":"","title":"status","type":"string"}},{"description":"","in":"query","name":"patient","required":false,"schema":{"description":"","title":"patient","type":"integer"}},{"description":"","in":"query","name":"office","required":false,"schema":{"description":"","title":"office","type":"integer"}},{"description":"","in":"query","name":"doctor","required":false,"schema":{"description":"","title":"doctor","type":"integer"}},{"description":"","in":"query","name":"since","required":false,"schema":{"description":"","title":"since","type":"string"}},{"description":"","in":"query","name":"date_range","required":false,"schema":{"description":"","title":"date_range","type":"string"}},{"description":"","in":"query","name":"date","required":false,"schema":{"description":"","title":"date","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Appointment"}}},"description":"Created"},"400":{"content":{},"description":"Bad Request"},"401":{"content":{},"description":"Unauthorized"},"403":{"content":{},"description":"Permission Denied"},"404":{"content":{},"description":"Not Found"},"405":{"content":{},"description":"Method Not Allowed"},"409":{"content":{},"description":"Scheduled time overlaps with an existing appointment"},"500":{"content":{},"description":"Internal Server Error"}},"security":[{"drchrono_oauth2":["calendar:read","calendar:write","clinical:read","clinical:write"]}],"tags":["Clinical"],"x-permissions":["scheduling","clinical-notes"],"x-practice-access":"\"share_patients\" need to be set for data access among practice"}},"/api/appointments/{id}":{"delete":{"description":"Delete an existing appointment or bre