openapi: 3.2.0 info: title: Elation Health Discontinued Medications API version: '1.0' description: 'Operations tagged Discontinued Medications across 3 of this provider''s published API definitions: elation-api-settings.json, elation-health-api-full-openapi.yaml, elation-patient-document-api.json. Each path carries the servers of the definition it was published in.' servers: - url: https://sandbox.elationemr.com/api/2.0 - description: Sandbox Server url: https://sandbox.elationemr.com - description: Production Server url: https://api.app.elationemr.com tags: - name: Discontinued Medications paths: /discontinued_medications/: get: summary: Find Discontinued Medications description: '' operationId: find-discontinued-medications parameters: - name: patient in: query schema: type: array items: type: integer format: int32 - name: practice in: query schema: type: array items: type: integer format: int32 - name: document_date__lte in: query schema: type: string format: date - name: document_date__gte in: query schema: type: string format: date - name: discontinue_date__gte in: query schema: type: string format: date - name: discontinue_date__lte in: query schema: type: string format: date responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"count\": 2,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"id\": 140758486024219,\n \"last_medication_order\": 140758485696538,\n \"med_order\": 140758485696538,\n \"thread\": 140758485630999,\n \"discontinue_date\": \"2022-05-17\",\n \"reason\": null,\n \"prescribing_physician\": 140754478628866,\n \"supervising_physician\": null,\n \"is_documented\": false,\n \"medication\": {\n \"id\": 140742231851055,\n \"rxnorm_cuis\": [\n \"2045377\"\n ],\n \"ndcs\": [\n \"00173-0888-10\"\n ],\n \"name\": \"Arnuity Ellipta Inhalation Aerosol Powder Breath Activated 50 MCG/ACT\",\n \"brand_name\": \"Arnuity Ellipta\",\n \"generic_name\": \"Fluticasone Furoate Aerosol Powder Breath Activ 50 MCG/ACT\",\n \"is_controlled\": false,\n \"type\": \"prescription\",\n \"route\": \"Inhalation\",\n \"strength\": \"50 MCG/ACT\",\n \"form\": \"Aerosol Powder Breath Activated\"\n },\n \"documenting_personnel\": 140754478628866,\n \"document_date\": \"2022-05-17T09:35:01Z\",\n \"chart_date\": \"2022-05-17T09:35:01Z\",\n \"created_date\": \"2022-05-17T09:35:01Z\",\n \"deleted_date\": null,\n \"signed_date\": \"2022-05-17T09:35:01Z\",\n \"patient\": 140754479349761,\n \"practice\": 140754475089924\n },\n {\n \"id\": 140758486089755,\n \"last_medication_order\": 140758485696538,\n \"med_order\": 140758485696538,\n \"thread\": 140758485630999,\n \"discontinue_date\": \"2022-05-17\",\n \"reason\": null,\n \"prescribing_physician\": 140754478628866,\n \"supervising_physician\": null,\n \"is_documented\": true,\n \"medication\": {\n \"id\": 140742231851055,\n \"rxnorm_cuis\": [\n \"2045377\"\n ],\n \"ndcs\": [\n \"00173-0888-10\"\n ],\n \"name\": \"Arnuity Ellipta Inhalation Aerosol Powder Breath Activated 50 MCG/ACT\",\n \"brand_name\": \"Arnuity Ellipta\",\n \"generic_name\": \"Fluticasone Furoate Aerosol Powder Breath Activ 50 MCG/ACT\",\n \"is_controlled\": false,\n \"type\": \"prescription\",\n \"route\": \"Inhalation\",\n \"strength\": \"50 MCG/ACT\",\n \"form\": \"Aerosol Powder Breath Activated\"\n },\n \"documenting_personnel\": 140754478628866,\n \"document_date\": \"2022-05-17T09:35:57Z\",\n \"chart_date\": \"2022-05-17T09:35:57Z\",\n \"created_date\": \"2022-05-17T09:35:57Z\",\n \"deleted_date\": null,\n \"signed_date\": \"2022-05-17T09:35:57Z\",\n \"patient\": 140754479349761,\n \"practice\": 140754475089924\n },\n ]\n}" '400': description: '400' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} deprecated: false tags: - Discontinued Medications security: - sec0: [] post: summary: Create Discontinued Medications description: '' operationId: create-discontinued-medications requestBody: content: application/json: schema: type: object required: - med_order properties: med_order: type: integer description: med_order ID format: int32 discontinue_date: type: string description: discontinue date default: Today format: date reason: type: string description: discontinue reason default: 'Null' is_documented: type: boolean description: if need documented default: false documenting_personnel: type: integer description: UserProfile id format: int32 responses: '200': description: '200' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} deprecated: false x-readme: code-samples: - language: python code: "import requests\nimport json\n\naccess_token = \"TyEPKw8fVGRKpCBa81ygwjCLXDNIAm\"\nauth_header = \"Bearer %s\" % (access_token)\n\ndata = {\n \"med_order\": 140758531047450,\n \"reason\": \"new_reason\",\n \"discontinue_date\": \"2020-08-08\"\n}\n\nresp = requests.post(\n \"https://sandbox.elationemr.com/api/2.0/discontinued_medication\",\n data=json.dumps(data),\n headers={'Authorization': auth_header, 'Content-type': 'application/json'})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Discontinued Medications security: - sec0: [] servers: - url: https://sandbox.elationemr.com/api/2.0 /discontinued_medications/{id}: get: summary: Get Discontinued Medication description: '' operationId: find-discontinued-medication parameters: - name: id in: path description: discontinue_medication id schema: type: integer format: int32 required: true responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"id\": 140758486089755,\n \"last_medication_order\": 140758485696538,\n \"med_order\": 140758485696538,\n \"thread\": 140758485630999,\n \"discontinue_date\": \"2022-05-17\",\n \"reason\": null,\n \"prescribing_physician\": 140754478628866,\n \"supervising_physician\": null,\n \"is_documented\": true,\n \"medication\": {\n \"id\": 140742231851055,\n \"rxnorm_cuis\": [\n \"2045377\"\n ],\n \"ndcs\": [\n \"00173-0888-10\"\n ],\n \"name\": \"Arnuity Ellipta Inhalation Aerosol Powder Breath Activated 50 MCG/ACT\",\n \"brand_name\": \"Arnuity Ellipta\",\n \"generic_name\": \"Fluticasone Furoate Aerosol Powder Breath Activ 50 MCG/ACT\",\n \"is_controlled\": false,\n \"type\": \"prescription\",\n \"route\": \"Inhalation\",\n \"strength\": \"50 MCG/ACT\",\n \"form\": \"Aerosol Powder Breath Activated\"\n },\n \"documenting_personnel\": 140754478628866,\n \"document_date\": \"2022-05-17T09:35:57Z\",\n \"chart_date\": \"2022-05-17T09:35:57Z\",\n \"created_date\": \"2022-05-17T09:35:57Z\",\n \"deleted_date\": null,\n \"signed_date\": \"2022-05-17T09:35:57Z\",\n \"patient\": 140754479349761,\n \"practice\": 140754475089924\n}" schema: type: object properties: id: type: integer example: 140758486089755 default: 0 last_medication_order: type: integer example: 140758485696538 default: 0 med_order: type: integer example: 140758485696538 default: 0 thread: type: integer example: 140758485630999 default: 0 discontinue_date: type: string example: '2022-05-17' reason: {} prescribing_physician: type: integer example: 140754478628866 default: 0 supervising_physician: {} is_documented: type: boolean example: true default: true medication: type: object properties: id: type: integer example: 140742231851055 default: 0 rxnorm_cuis: type: array items: type: string example: '2045377' ndcs: type: array items: type: string example: 00173-0888-10 name: type: string example: Arnuity Ellipta Inhalation Aerosol Powder Breath Activated 50 MCG/ACT brand_name: type: string example: Arnuity Ellipta generic_name: type: string example: Fluticasone Furoate Aerosol Powder Breath Activ 50 MCG/ACT is_controlled: type: boolean example: false default: true type: type: string example: prescription route: type: string example: Inhalation strength: type: string example: 50 MCG/ACT form: type: string example: Aerosol Powder Breath Activated documenting_personnel: type: integer example: 140754478628866 default: 0 document_date: type: string example: '2022-05-17T09:35:57Z' chart_date: type: string example: '2022-05-17T09:35:57Z' created_date: type: string example: '2022-05-17T09:35:57Z' deleted_date: {} signed_date: type: string example: '2022-05-17T09:35:57Z' patient: type: integer example: 140754479349761 default: 0 practice: type: integer example: 140754475089924 default: 0 '400': description: '400' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} deprecated: false tags: - Discontinued Medications security: - sec0: [] servers: - url: https://sandbox.elationemr.com/api/2.0 /api/2.0/discontinued_medications/: get: operationId: discontinued_medications_list parameters: - in: query name: discontinue_date__gte schema: format: date type: string - in: query name: discontinue_date__lte schema: format: date type: string - in: query name: document_date__gt schema: format: date-time type: string - in: query name: document_date__gte schema: format: date-time type: string - in: query name: document_date__lt schema: format: date-time type: string - in: query name: document_date__lte schema: format: date-time type: string - description: Number of results to return per page. in: query name: limit required: false schema: type: integer - description: The initial index from which to return the results. in: query name: offset required: false schema: type: integer - description: Which field to use when ordering the results. in: query name: order_by required: false schema: type: string - description: Multiple values may be separated by commas. explode: false in: query name: patient schema: items: format: int64 type: integer type: array style: form - in: query name: permanent schema: type: boolean - description: Multiple values may be separated by commas. explode: false in: query name: practice schema: items: format: int64 type: integer type: array style: form - description: Multiple values may be separated by commas. explode: false in: query name: prescribing_physician schema: items: format: int64 type: integer type: array style: form responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedDiscontinueMedOrderList' description: '' security: - oauth2: [] summary: List Discontinued Medications tags: - Discontinued Medications x-el8-docs-category: Patient Document API x-el8-docs-versions: - '2.1' - '2.0' post: description: Create a new discontinued medication. operationId: discontinued_medications_create requestBody: content: application/json: schema: $ref: '#/components/schemas/DiscontinueMedOrder' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/DiscontinueMedOrder' description: '' security: - oauth2: [] summary: Create Discontinued Medication tags: - Discontinued Medications x-el8-docs-category: Patient Document API x-el8-docs-versions: - '2.1' - '2.0' servers: - description: Sandbox Server url: https://sandbox.elationemr.com - description: Production Server url: https://api.app.elationemr.com /api/2.0/discontinued_medications/{id}/: delete: description: Delete an existing discontinued medication. operationId: discontinued_medications_destroy parameters: - in: path name: id required: true schema: format: int64 type: integer responses: '204': description: No response body security: - oauth2: [] summary: Delete Discontinued Medication tags: - Discontinued Medications x-el8-docs-category: Patient Document API x-el8-docs-versions: - '2.1' - '2.0' get: operationId: discontinued_medications_retrieve parameters: - in: path name: id required: true schema: format: int64 type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/DiscontinueMedOrder' description: '' security: - oauth2: [] summary: Retrieve Discontinued Medication tags: - Discontinued Medications x-el8-docs-category: Patient Document API x-el8-docs-versions: - '2.1' - '2.0' servers: - description: Sandbox Server url: https://sandbox.elationemr.com - description: Production Server url: https://api.app.elationemr.com components: schemas: PaginatedDiscontinueMedOrderList: properties: count: example: 123 type: integer next: example: http://api.example.org/accounts/?offset=400&limit=100 format: uri nullable: true type: string previous: example: http://api.example.org/accounts/?offset=200&limit=100 format: uri nullable: true type: string results: items: $ref: '#/components/schemas/DiscontinueMedOrder' type: array required: - results type: object MedicationDrugType: description: '* `user` - user * `medispan` - medispan * `ss` - surescripts * `disp` - dispensary' enum: - user - medispan - ss - disp type: string Medication: properties: active_ndcs: items: type: string type: array brand_name: readOnly: true type: string created_date: format: date-time readOnly: true type: - string - 'null' creation_type: allOf: - $ref: '#/components/schemas/MedicationDrugType' default: user readOnly: true form: readOnly: true type: string generic_name: readOnly: true type: string id: description: The id of the medication. format: int64 type: integer is_controlled: default: false description: Whether the drug is a controlled substance or not. type: boolean market_end_date: format: date-time type: - string - 'null' name: description: The name that will display for the medication in the search and when referenced by the prescription or documented med. type: string ndcs: description: The NDCs of the medication (must contain only one ndc code when creating). items: type: string type: array obsolete_date: description: The date at which this practice medication became obsolete. format: date-time type: - string - 'null' practice: description: The practice that created the medication. `null` for medications from the standard formulary. format: int64 type: integer route: readOnly: true type: string rxnorm_cuis: description: The Rxnorm.cui code of the medication (must contain only one cui code when creating). items: type: string type: array strength: description: The strength of the drug, e.g. 40mg. maxLength: 255 type: - string - 'null' type: allOf: - $ref: '#/components/schemas/MedicationType' default: prescription description: 'Whether the practice medication is an OTC or Prescription drug. * `otc` - otc * `prescription` - prescription * `discontinued` - discontinued' type: object DiscontinueMedOrder: properties: chart_date: description: The timestamp at which this discontinue was available in the patient's chart format: date-time type: string created_date: description: The timestamp at which this discontinue was created in our database. format: date-time readOnly: true type: - string - 'null' deleted_date: description: The timestamp at which the discontinue was marked as deleted, usually occurs when a user wants to 'undiscontinue' the medication. format: date-time readOnly: true type: - string - 'null' discontinue_date: description: The date when the medication was discontinued. format: date type: string document_date: description: The timestamp at which we've documented this discontinue occurred. format: date-time type: string documenting_personnel: description: The user who documented this discontinue. format: int64 type: integer id: description: The id of the discontinue medication. readOnly: true type: integer is_documented: type: boolean last_medication_order: description: The id of the last medication ordered before we discontinued this thread of med orders. readOnly: true type: - integer - 'null' med_order: description: The id of the medication which we discontinued. format: int64 type: integer medication: allOf: - $ref: '#/components/schemas/Medication' description: The medication that was discontinued. patient: description: The id of the patient chart. format: int64 type: integer practice: description: The id of the practice. format: int64 type: integer prescribing_physician: description: The id of the physician who prescribed the medication. format: int64 type: integer reason: description: The discontinue reason. type: - string - 'null' signed_by: format: int64 readOnly: true type: integer signed_date: description: The timestamp at which a user signed off on the discontinue. format: date-time type: - string - 'null' supervising_physician: description: If the prescribing physician requires supervision, this will reference the physician who is in that role. format: int64 type: - integer - 'null' thread: format: int64 type: integer required: - med_order type: object MedicationType: description: '* `otc` - otc * `prescription` - prescription * `discontinued` - discontinued' enum: - otc - prescription - discontinued type: string securitySchemes: sec0: type: oauth2 flows: clientCredentials: tokenUrl: https://example.com/oauth2/token scopes: {} oauth2: flows: clientCredentials: scopes: act_as_user: Impersonate a provider via X-On-Behalf-Of (combinable with apiv2 or system scopes) apiv2: Full access to the API system/{resource_name}.read: Read access to a specific resource system/{resource_name}.write: Write access to a specific resource tokenUrl: /api/2.0/oauth2/token/ type: oauth2 x-refined-from: - elation-api-settings.json - elation-health-api-full-openapi.yaml - elation-patient-document-api.json x-readme: headers: [] x-readme-fauxas: true