openapi: 3.2.0 info: title: Elation Health Lab Order Sets API version: '1.0' description: 'Operations tagged Lab Order Sets across 3 of this provider''s published API definitions: elation-api-settings.json, elation-health-api-full-openapi.yaml, elation-orders-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: Lab Order Sets paths: /lab_order_sets/: get: summary: Find Lab Order Sets description: '' operationId: find-lab-order-sets parameters: - name: Authorization in: header description: Bearer token required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"count\": 5,\n \"next\": null,\n \"previous\": null,\n \"results\": [//list of objects]\n}" '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\nresp = requests.get(\"https://sandbox.elationemr.com/api/2.0/lab_order_sets/\",\n headers={'Authorization': auth_header})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Lab Order Sets security: - sec0: [] post: summary: Create Lab Order Set description: '' operationId: create-lab-order-set parameters: - name: Authorization in: header description: Bearer token required: true schema: type: string requestBody: content: application/json: schema: type: object required: - practice - name - content properties: practice: type: integer format: int32 name: type: string content: type: object properties: tests: type: array description: LabOrderTest id items: properties: id: type: integer description: object id format: int64 required: - id type: object stat_method: type: string enum: - wet_reading_phone - wet_reading_fax - stat_phone - stat_fax - stat_phone_fax patient_instructions: type: string test_center_notes: type: string fasting_method: type: string enum: - fasting_12_hour - fasting_8_hours - fasting_2_hours - fasting_none - fasting_random standing_order_frequency: type: string standing_order_end_date: type: string format: date collection_datetime: type: string format: date icd10_codes: type: array items: properties: code: type: string description: icd10 code type: object lab_vendor: type: integer description: lab_vendor id format: int32 responses: '201': description: '201' content: application/json: examples: Result: value: "{\n \"compendium_code\": null,\n \"content\": {\n \"collection_datetime\": null,\n \"fasting_method\": null,\n \"icd10_codes\": [],\n \"id\": 140758913777765,\n \"patient_instructions\": \"\",\n \"standing_order_end_date\": null,\n \"standing_order_frequency\": null,\n \"stat_method\": null,\n \"test_center_notes\": \"\",\n \"tests\": []\n },\n \"created_date\": \"2022-06-02T13:46:19.300949Z\",\n \"deleted_date\": null,\n \"id\": 140758913843296,\n \"lab_vendor\": null,\n \"name\": \"Diabetes - Annual (Order Set)\",\n \"practice\": 140758894575620\n}" schema: type: object properties: compendium_code: {} content: type: object properties: collection_datetime: {} fasting_method: {} icd10_codes: type: array id: type: integer example: 140758913777765 default: 0 patient_instructions: type: string example: '' standing_order_end_date: {} standing_order_frequency: {} stat_method: {} test_center_notes: type: string example: '' tests: type: array created_date: type: string example: '2022-06-02T13:46:19.300949Z' deleted_date: {} id: type: integer example: 140758913843296 default: 0 lab_vendor: {} name: type: string example: Diabetes - Annual (Order Set) practice: type: integer example: 140758894575620 default: 0 '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 \"content\": {},\n \"name\": \"Diabetes - Annual (Order Set)\",\n \"practice\": 140758894575620\n}\n\nresp = requests.post(\"https://sandbox.elationemr.com/api/2.0/lab_order_sets/\",\n data=json.dumps(data),\n headers={'Authorization': auth_header,\n 'Content-type': 'application/json'})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Lab Order Sets security: - sec0: [] servers: - url: https://sandbox.elationemr.com/api/2.0 /lab_order_sets/{id}: get: summary: Get Lab Order Sets description: '' operationId: get-lab-order-sets parameters: - name: id in: path schema: type: integer format: int64 required: true - name: Authorization in: header description: Bearer token required: true schema: type: string responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"count\": 5,\n \"next\": null,\n \"previous\": null,\n \"results\": [//list of objects]\n}" '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\nresp = requests.get(\"https://sandbox.elationemr.com/api/2.0/lab_order_sets/140756377075740/\",\n headers={'Authorization': auth_header})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Lab Order Sets security: - sec0: [] put: summary: Update Lab Order Set description: '' operationId: update-lab-order-set parameters: - name: Authorization in: header description: Bearer token required: true schema: type: string - name: id in: path description: Object id schema: type: integer format: int64 required: true requestBody: content: application/json: schema: type: object required: - practice - name - content properties: practice: type: integer format: int32 name: type: string content: type: object properties: tests: type: array description: LabOrderTest id items: properties: id: type: integer description: object id format: int64 required: - id type: object stat_method: type: string enum: - wet_reading_phone - wet_reading_fax - stat_phone - stat_fax - stat_phone_fax patient_instructions: type: string test_center_notes: type: string fasting_method: type: string enum: - fasting_12_hour - fasting_8_hours - fasting_2_hours - fasting_none - fasting_random standing_order_frequency: type: string standing_order_end_date: type: string format: date collection_datetime: type: string format: date icd10_codes: type: array items: properties: code: type: string description: icd10 code type: object lab_vendor: type: integer description: lab_vendor id format: int32 responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"compendium_code\": null,\n \"content\": {\n \"collection_datetime\": null,\n \"fasting_method\": null,\n \"icd10_codes\": [],\n \"id\": 140758913777765,\n \"patient_instructions\": \"\",\n \"standing_order_end_date\": null,\n \"standing_order_frequency\": null,\n \"stat_method\": null,\n \"test_center_notes\": \"\",\n \"tests\": []\n },\n \"created_date\": \"2022-06-02T13:46:19.300949Z\",\n \"deleted_date\": null,\n \"id\": 140758913843296,\n \"lab_vendor\": null,\n \"name\": \"Diabetes - Annual (Order Set)\",\n \"practice\": 140758894575620\n}" schema: type: object properties: compendium_code: {} content: type: object properties: collection_datetime: {} fasting_method: {} icd10_codes: type: array id: type: integer example: 140758913777765 default: 0 patient_instructions: type: string example: '' standing_order_end_date: {} standing_order_frequency: {} stat_method: {} test_center_notes: type: string example: '' tests: type: array created_date: type: string example: '2022-06-02T13:46:19.300949Z' deleted_date: {} id: type: integer example: 140758913843296 default: 0 lab_vendor: {} name: type: string example: Diabetes - Annual (Order Set) practice: type: integer example: 140758894575620 default: 0 '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 \"content\": {},\n \"name\": \"Diabetes - Annual (Order Set)\",\n \"practice\": 140758894575620\n}\n\nresp = requests.put(\"https://sandbox.elationemr.com/api/2.0/lab_order_sets/140758913974368/\",\n data=json.dumps(data),\n headers={'Authorization': auth_header,\n 'Content-type': 'application/json'})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Lab Order Sets security: - sec0: [] patch: summary: Update Lab Order Set description: '' operationId: update-lab-order-set-1 parameters: - name: Authorization in: header description: Bearer token required: true schema: type: string - name: id in: path description: Object id schema: type: integer format: int64 required: true requestBody: content: application/json: schema: type: object required: - name - content properties: practice: type: integer format: int32 name: type: string content: type: object properties: tests: type: array description: LabOrderTest id items: properties: id: type: integer description: object id format: int64 required: - id type: object stat_method: type: string enum: - wet_reading_phone - wet_reading_fax - stat_phone - stat_fax - stat_phone_fax patient_instructions: type: string test_center_notes: type: string fasting_method: type: string enum: - fasting_12_hour - fasting_8_hours - fasting_2_hours - fasting_none - fasting_random standing_order_frequency: type: string standing_order_end_date: type: string format: date collection_datetime: type: string format: date icd10_codes: type: array items: properties: code: type: string description: icd10 code type: object lab_vendor: type: integer description: lab_vendor id format: int32 responses: '200': description: '200' content: application/json: examples: Result: value: "{\n \"compendium_code\": null,\n \"content\": {\n \"collection_datetime\": null,\n \"fasting_method\": null,\n \"icd10_codes\": [],\n \"id\": 140758913777765,\n \"patient_instructions\": \"\",\n \"standing_order_end_date\": null,\n \"standing_order_frequency\": null,\n \"stat_method\": null,\n \"test_center_notes\": \"\",\n \"tests\": []\n },\n \"created_date\": \"2022-06-02T13:46:19.300949Z\",\n \"deleted_date\": null,\n \"id\": 140758913843296,\n \"lab_vendor\": null,\n \"name\": \"Diabetes - Annual (Order Set)\",\n \"practice\": 140758894575620\n}" schema: type: object properties: compendium_code: {} content: type: object properties: collection_datetime: {} fasting_method: {} icd10_codes: type: array id: type: integer example: 140758913777765 default: 0 patient_instructions: type: string example: '' standing_order_end_date: {} standing_order_frequency: {} stat_method: {} test_center_notes: type: string example: '' tests: type: array created_date: type: string example: '2022-06-02T13:46:19.300949Z' deleted_date: {} id: type: integer example: 140758913843296 default: 0 lab_vendor: {} name: type: string example: Diabetes - Annual (Order Set) practice: type: integer example: 140758894575620 default: 0 '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 \"content\": {},\n \"name\": \"Diabetes - Annual (Order Set)\",\n \"practice\": 140758894575620\n}\n\nresp = requests.patch(\"https://sandbox.elationemr.com/api/2.0/lab_order_sets/140758913974368/\",\n data=json.dumps(data),\n headers={'Authorization': auth_header,\n 'Content-type': 'application/json'})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Lab Order Sets security: - sec0: [] delete: summary: Delete Lab Order Sets description: '' operationId: delete-lab-order-sets parameters: - name: id in: path schema: type: integer format: int64 required: true - name: Authorization in: header description: Bearer token required: true schema: type: string responses: '204': description: '204' content: application/json: examples: Result: value: '' '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\nresp = requests.delete(\"https://sandbox.elationemr.com/api/2.0/lab_order_sets/140756377075740/\",\n headers={'Authorization': auth_header})\n\nprint resp.status_code\nprint json.dumps(json.loads(resp.content), indent=2)" samples-languages: - python tags: - Lab Order Sets security: - sec0: [] servers: - url: https://sandbox.elationemr.com/api/2.0 /api/2.0/lab_order_sets/: get: description: Returns a list of lab order sets operationId: lab_order_sets_list parameters: - 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 responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedLabOrderSetList' description: '' security: - oauth2: [] summary: List Lab Order Sets tags: - Lab Order Sets x-el8-docs-category: Orders API x-el8-docs-versions: - '2.1' - '2.0' post: description: Create a new lab order set. operationId: lab_order_sets_create requestBody: content: application/json: schema: $ref: '#/components/schemas/LabOrderSet' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/LabOrderSet' description: '' security: - oauth2: [] summary: Create Lab Order Set tags: - Lab Order Sets x-el8-docs-category: Orders 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/lab_order_sets/{id}/: delete: description: Delete an existing lab order set. operationId: lab_order_sets_destroy parameters: - in: path name: id required: true schema: format: int64 type: integer responses: '204': description: No response body security: - oauth2: [] summary: Delete Lab Order Set tags: - Lab Order Sets x-el8-docs-category: Orders API x-el8-docs-versions: - '2.1' - '2.0' get: description: Retrieve a single lab order set operationId: lab_order_sets_retrieve parameters: - in: path name: id required: true schema: format: int64 type: integer responses: '200': content: application/json: schema: $ref: '#/components/schemas/LabOrderSet' description: '' security: - oauth2: [] summary: Retrieve Lab Order Set tags: - Lab Order Sets x-el8-docs-category: Orders API x-el8-docs-versions: - '2.1' - '2.0' patch: description: Update an existing lab order set. operationId: lab_order_sets_partial_update parameters: - in: path name: id required: true schema: format: int64 type: integer requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedLabOrderSet' responses: '200': content: application/json: schema: $ref: '#/components/schemas/LabOrderSet' description: '' security: - oauth2: [] summary: Partially Update Lab Order Set tags: - Lab Order Sets x-el8-docs-category: Orders API x-el8-docs-versions: - '2.1' - '2.0' put: description: Replace an existing lab order set. operationId: lab_order_sets_update parameters: - in: path name: id required: true schema: format: int64 type: integer requestBody: content: application/json: schema: $ref: '#/components/schemas/LabOrderSet' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/LabOrderSet' description: '' security: - oauth2: [] summary: Update Lab Order Set tags: - Lab Order Sets x-el8-docs-category: Orders 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: ICD10Code: properties: code: maxLength: 50 type: string description: maxLength: 500 type: - string - 'null' required: - code type: object LabOrderAOEQuestion: properties: choices: items: $ref: '#/components/schemas/LabOrderAOEQuestionChoice' type: array code: maxLength: 100 type: string created_date: format: date-time readOnly: true type: - string - 'null' deleted_date: format: date-time readOnly: true type: - string - 'null' example_format: type: - string - 'null' id: readOnly: true type: integer max_length: maximum: 65535 minimum: 0 type: - integer - 'null' question_type: $ref: '#/components/schemas/QuestionTypeEnum' secondary_code: maxLength: 100 type: - string - 'null' value: type: string required: - choices - code - value type: object LabOrderAOEQuestionChoice: properties: code: maxLength: 100 type: string created_date: format: date-time readOnly: true type: - string - 'null' deleted_date: format: date-time readOnly: true type: - string - 'null' id: readOnly: true type: integer value: type: string required: - code - value type: object PaginatedLabOrderSetList: 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/LabOrderSet' type: array required: - results type: object NullEnum: type: 'null' LabOrderSet: properties: compendium_code: description: "RM-9598 Guard against missing code/name. Can't repro issue from ticket\n locally so being extra careful with the guards here." readOnly: true type: string content: $ref: '#/components/schemas/LabOrderContent' created_date: description: Time at which elation created this order. Can be different from chart_date when the order was imported into a chart from a different source and document_date when documenting an order that happened at some other time. format: date-time readOnly: true type: - string - 'null' deleted_date: format: date-time readOnly: true type: - string - 'null' id: readOnly: true type: integer lab_vendor: format: int64 type: - integer - 'null' name: description: The name of the lab order set. maxLength: 250 type: string practice: format: int64 type: integer required: - content - name - practice type: object LabOrderTestToLabOrderAOEQuestion: properties: question: $ref: '#/components/schemas/LabOrderAOEQuestion' required: type: boolean sequence: maximum: 65535 minimum: 0 type: integer test: format: int64 readOnly: true type: integer required: - question - sequence type: object StatMethodEnum: description: '* `wet_reading_phone` - STAT Wet Reading - Please Phone Report * `wet_reading_fax` - STAT Wet Reading - Please Fax Report * `stat_phone` - STAT - Phone * `stat_fax` - STAT - Fax * `stat_phone_fax` - STAT - Phone and Fax' enum: - wet_reading_phone - wet_reading_fax - stat_phone - stat_fax - stat_phone_fax type: string PatchedLabOrderSet: properties: compendium_code: description: "RM-9598 Guard against missing code/name. Can't repro issue from ticket\n locally so being extra careful with the guards here." readOnly: true type: string content: $ref: '#/components/schemas/LabOrderContent' created_date: description: Time at which elation created this order. Can be different from chart_date when the order was imported into a chart from a different source and document_date when documenting an order that happened at some other time. format: date-time readOnly: true type: - string - 'null' deleted_date: format: date-time readOnly: true type: - string - 'null' id: readOnly: true type: integer lab_vendor: format: int64 type: - integer - 'null' name: description: The name of the lab order set. maxLength: 250 type: string practice: format: int64 type: integer type: object LabOrderContent: properties: collection_datetime: description: If lab specimen collection is done onsite, this is the time at which the collection was taken. format: date-time type: - string - 'null' fasting_method: description: 'Instructions for patient and lab on how long they should fast before specimen collection. * `fasting_12_hour` - Fasting - 12 hours * `fasting_8_hours` - Fasting - 8 hours * `fasting_2_hours` - Fasting - 2 hours * `fasting_none` - Non-Fasting * `fasting_random` - Fasting or non-fasting does not matter (Random)' oneOf: - $ref: '#/components/schemas/FastingMethodEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' icd10_codes: description: ICD10 diagnosis codes provided along with the order. items: allOf: - $ref: '#/components/schemas/ICD10Code' type: array id: readOnly: true type: integer patient_instructions: description: Notes for patient. type: string standing_order_end_date: description: Date at which standing order should be canceled. format: date type: - string - 'null' standing_order_frequency: description: Number of times order should be performed on a standing basis. maxLength: 50 type: - string - 'null' stat_method: oneOf: - $ref: '#/components/schemas/StatMethodEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' test_center_notes: description: Notes for Lab. type: string tests: description: The list of tests that should be performed by the lab. Must all be either from the same compendium or no compendium. items: $ref: '#/components/schemas/LabOrderTestWithDiagnoses' type: array type: object FastingMethodEnum: description: '* `fasting_12_hour` - Fasting - 12 hours * `fasting_8_hours` - Fasting - 8 hours * `fasting_2_hours` - Fasting - 2 hours * `fasting_none` - Non-Fasting * `fasting_random` - Fasting or non-fasting does not matter (Random)' enum: - fasting_12_hour - fasting_8_hours - fasting_2_hours - fasting_none - fasting_random type: string QuestionTypeEnum: description: '* `enum` - enum * `enum_multiselect` - enum_multiselect * `freetext` - freetext * `y_or_n` - y_or_n * `numeric` - numeric * `yyyymmdd` - yyyymmdd * `2_numeric_1_decimal` - 2_numeric_1_decimal' enum: - enum - enum_multiselect - freetext - y_or_n - numeric - yyyymmdd - 2_numeric_1_decimal type: string LabOrderTestWithDiagnoses: properties: code: description: Any code associated with the test, usually provided by the lab vendor's compendium. maxLength: 50 type: - string - 'null' compendium: description: The id of the compendium provided the lab vendor that provides the lab order test. All tests in the same order **MUST** share the same compendium. format: int64 type: - integer - 'null' cpts: description: A list of CPT codes associated with the lab order test. items: type: string type: array created_date: description: Time at which Elation created this Lab Order Test. format: date-time readOnly: true type: - string - 'null' deleted_date: description: Time at which this Lab Order Test was deleted. Can happen when a lab order compendium update deprecates a test. format: date-time readOnly: true type: - string - 'null' icd10_codes: items: $ref: '#/components/schemas/ICD10Code' type: array id: readOnly: true type: integer lab_vendor: description: The id of the lab vendor who provides the lab order test. format: int64 type: - integer - 'null' name: description: The name of the Lab Order Test. maxLength: 255 type: string practice_created: description: The id of the practice that created the test if practice created. format: int64 type: - integer - 'null' procedure_class: description: Code provided by specific compendiums that indicate the "class" of test, e.g. histology vs cytology. Some lab vendors require that tests with specific procedure classes need to ordered separately. maxLength: 50 type: - string - 'null' questions: description: A list of Ask on Entry (AOE) Questions that need to be answered by the orderer when creating the order. items: $ref: '#/components/schemas/LabOrderTestToLabOrderAOEQuestion' type: array synonyms: description: A list of synonyms that are useful when searching for a specific test. items: type: string type: array required: - icd10_codes - name type: object BlankEnum: enum: - '' 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-orders-api.json x-readme: headers: [] x-readme-fauxas: true