openapi: 3.0.3 info: title: Dexcare slots availability version: 5.0.0 security: - ApiKey: [] servers: - url: https://api.{customerShorthand}.dexcare.io/v5 description: mTLS External Ingress variables: customerShorthand: default: frosh description: Customer's Short Name enum: - frosh - kp-uat paths: /providers/{npid}/timeslots: get: operationId: getSingleProviderTimeslots parameters: - in: query name: daysOfSlots description: 'Allows use of getting slots by "page". Retrieve number of days that have slots which can be nonconsecutive days for each "page". Example: 3 entered returns 3 days of slots for today, tomorrow, and next Monday as the dates between tomorrow and Monday do not have slots available. ' required: false schema: type: integer minimum: 1 example: 3 - in: path name: npid description: the provider national ID (NPIs) required: true schema: type: string - in: query name: product description: product name assigned to client required: false schema: type: string default: DexCare - in: query name: visitTypeName description: When visitTypeName is present, only get slots matches visitTypeName. Pass in multiple by repeating param visitTypeName required: false style: form explode: true schema: type: array items: type: string example: - AdultWellness - PediatricWellness - in: query name: startDate description: start date for slots. required: false schema: type: string pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(Z|[-+]\d{2}:\d{2}))?$ description: start date in yyyy-MM-dd or yyyy-MM-Thh:mm:ss+hh:mm format default: today example: - '2021-01-01' - '2021-01-01T09:30:00-05:00' - '2021-01-01T14:30:00Z' - in: query name: endDate description: end date for slots required: false schema: type: string pattern: ^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(Z|[-+]\d{2}:\d{2}))?$ description: end date in yyyy-MM-dd or yyyy-MM-Thh:mm:ss+hh:mm format default: configured limit such as 90 days example: - '2021-01-10' - '2021-01-10T09:30:00-05:00' - '2021-01-10T14:30:00Z' - in: query name: newOrEstablishedPatient description: Allows filtering of slots by patient type of new or established patient. Both types will be returned by default. required: false schema: type: string enum: - newPatient - establishedPatient - bothNewAndEstablishedPatient - in: query name: visitTypeEmrId description: Allows filtering slots by visit type ID, also known visitTypeId, the value used by an EMR. Pass in multiple by repeating param visitTypeName. If this is used with visitTypeName, slots will be filtered by both. required: false style: form explode: true schema: type: array items: type: string example: - '100045' - in: query name: departmentEmrId description: Also known as departmentId, it allows filter by slots by department. This requires departmentEmrSystemId. Otherwise, all department slots are returned. required: false schema: type: string example: - '100340323' - in: query name: departmentEmrSystemId description: Also known as ehrSystemName or ehrInstance. This is the emrSystem instance that is required for departmentEmrId. required: false schema: type: string example: - wellCareSystem.epic - in: query name: departmentUrlName description: Allows filter by slots of by the department's unique url name. This does not require departmentEmrSystemId. You may not use this param with departmentEmrId/departmentEmrSystemId. required: false schema: type: string example: - quickCareUrgentCare responses: '200': description: success response. content: application/json: schema: type: object properties: slots: type: array description: array of slots by clinician-department combination. Multiple objects indicates clinician has multiple departments with slots items: type: object properties: npi: type: string description: the clinician national id example: '7890612345' timezone: type: string description: timezone of healthcare provider example: America/Los_Angeles departmentId: type: string description: external department ID example: '3200080012' departmentIdentifier: type: string description: EHR system and the department ID. Used for booking example: epic.one|3200080012 slotsByVisitType: type: array items: type: object properties: visitTypeId: type: string description: visit type id example: '4378' visitTypeName: type: string description: visit type short name example: AdultWellness visitTypeGuid: type: string description: unique visit type identifier example: e9314950-10e8-4250-bf15-8caf0a9a50cc visitTypeTitle: type: string description: Name of visitType example: Adult Annual or Physical Clinic Visit forNewPatient: type: boolean description: If the slot is for new patients forEstablishedPatient: type: boolean description: If the slot is for established patients isBookable: type: boolean description: If the slot is bookable scheduleDays: type: array description: array of slots ordered by date items: type: object properties: date: type: string format: date example: '2022-03-09' slotTimes: type: array description: array of slots ordered by soonest time items: type: object properties: duration: type: number description: time span of slot in minutes example: 30 slotDateTime: type: string format: datetime example: '2022-03-09T15:00:00-08:00' previousEndDate: type: string format: date description: 'Present only when "daysOfSlots" param is used. Use this value as the end date in a subsequent request to get the previous "page" of slots. This does not mean that there are slots on this date but rather an instruction to use this date for an API request. A value of null means there are no slots available before the current page. ' example: '2025-01-10' nextStartDate: type: string format: date description: 'Present only when "daysOfSlots" param is used. This is the start date in a subsequent request to get the next "page" of slots. This does not mean that there are slots on this date but rather an instruction to use this date for an API request. A value of null means there are no slots available after the current page. ' example: '2025-01-20' ehrSystemName: type: string description: the ehr system of the department example: epic.one '400': description: Bad request error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message '401': description: Unauthorized content: application/json: schema: type: object properties: message: type: string example: API key is not valid status: type: number example: 401 required: - message - status '404': description: Provider not found content: application/json: schema: type: object properties: message: type: string example: API key is not valid status: type: number example: 401 required: - message - status '500': description: internal server error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message /slots/search: post: description: search slots availabilities by providers information operationId: getSlotsAvailability summary: slots availability service parameters: - in: header name: x-api-key description: Client api key schema: type: string required: false requestBody: description: criteria for querying slots content: application/json: schema: required: - criteriaItems type: object properties: startDate: description: start date for slots in YYYY-MM-DD format, this date will be considered as provider's timezone. when startDate is missing, search will start from first available date type: string example: '2022-06-01' endDate: description: end date for slots in YYYY-MM-DD format, this date will be considered as provider's timezone. when endDate is missing, search duration will be n days after startDate, n is configurable in system, default is 30 type: string example: '2022-06-10' visitTypeNames: description: list of visit type names, when visitTypeName is present, only get slots matches to list of visitTypeNames. type: array items: type: string example: - AdultWellness - PediatricWellness criteriaItems: type: array minItems: 1 description: list of providers for querying slots items: required: - npi type: object properties: npi: type: string description: the provider national id example: '7890612345' ehrInstance: type: string description: identifier used to map internally to the correct ehr instance example: pacific.nw departmentId: type: string description: department id of provider, when departmentId is present, ehrInstance is required. example: '34589431' additionalProperties: false additionalProperties: false required: true responses: '200': description: success response. content: application/json: schema: type: object description: slots search response required: - results properties: results: description: response return back as array when there is multiple providers with valid slots. if non provider with valid slots, return empty array type: array items: description: if no slots found for certain provider in search criteria, this provider won't be able to present in response. only list providers with valid slots required: - npi - ehrInstance - departmentId - timezone - visitTypes type: object properties: npi: type: string description: the provider national IDs (NPIs) example: '7890612345' ehrInstance: type: string description: identifier used to map internally to the correct ehr instance example: pacific.nw departmentId: type: string description: department id for required provider example: '34589431' timezone: type: string description: timezone info, indicate the timezone of department example: America/Los_Angeles visitTypes: description: only list visit type when there are valid slots for this visit type. type: array items: required: - visitTypeId - visitTypeName - slots type: object properties: visitTypeId: type: string description: visit type id example: '4378' visitTypeName: type: string description: visit type name example: AdultWellness slots: type: array description: array of slots for each visit type items: required: - dateTime - duration type: object properties: dateTime: description: start date of lookup in ISO format. Will be localized on lookup on slot timezone type: string format: date-time example: '2022-03-09T15:00:00-08:00' duration: type: integer description: length of the time slot example: 30 '400': description: Bad request error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message '401': description: Unauthorized content: application/json: schema: type: object properties: message: type: string example: API key is not valid status: type: number example: 401 required: - message - status '404': description: Not found error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message '500': description: internal server error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message /slots/slot-released: post: summary: slot released description: indicate a slot has been released (e.g. slot is cancelled) operationId: slotReleased parameters: - in: header name: x-api-key description: Client api key schema: type: string required: false requestBody: content: application/json: schema: type: object properties: npi: description: the provider national IDs (NPIs) type: string departmentId: description: department id for the required provider type: string minLength: 1 visitTypeId: description: visit type emr id type: string example: '12345' minLength: 1 slotDateTime: description: specific time slot date time type: string format: date-time example: '2022-02-04T23:28:05.456Z' ehrInstance: description: identifier used to map internally to the correct ehr instance type: string example: pacific.nw minLength: 1 disableRefresh: description: optional flag used in automation testing to disable the trigger to refresh slot data from the EHR type: boolean example: true default: false required: - npi - departmentId - visitTypeId - slotDateTime - ehrInstance responses: '204': description: success response headers: correlation-id: schema: type: string format: uuid description: Unique id to correlate call logs between our microservices '400': description: 'client error; request cannot be processed with current parameters and should not be retried without addressing errors ' content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message headers: correlation-id: schema: type: string format: uuid description: Unique id to correlate call logs between our microservices '500': description: server error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message headers: correlation-id: schema: type: string format: uuid description: Unique id to correlate call logs between our microservices /slots/slot-taken: post: summary: slot taken description: indicate a slot has been taken (e.g. the slot has been booked) operationId: slotTaken parameters: - in: header name: x-api-key description: Client api key schema: type: string required: false requestBody: content: application/json: schema: type: object properties: npi: description: the provider national IDs (NPIs) type: string example: '1245662048' departmentId: description: department id for the required provider type: string example: '100005' minLength: 1 visitTypeId: description: visit type emr id type: string example: '12345' minLength: 1 slotDateTime: description: specific time slot date time type: string format: date-time example: '2022-02-04T23:28:05.456Z' ehrInstance: description: identifier used to map internally to the correct ehr instance type: string example: pacific.nw minLength: 1 disableRefresh: description: optional flag used in automation testing to disable the trigger to refresh slot data from the EHR type: boolean example: true default: false required: - npi - departmentId - visitTypeId - slotDateTime - ehrInstance responses: '204': description: success response with no content headers: correlation-id: schema: type: string format: uuid description: Unique id to correlate call logs between our microservices '400': description: 'client error; request cannot be processed with current parameters and should not be retried without addressing errors ' content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message headers: correlation-id: schema: type: string format: uuid description: Unique id to correlate call logs between our microservices '500': description: server error content: application/json: schema: type: object properties: errorCode: type: integer example: 500201 message: type: string example: the value of virtual is not defined required: - errorCode - message headers: correlation-id: schema: type: string format: uuid description: Unique id to correlate call logs between our microservices components: securitySchemes: ApiKey: type: apiKey in: header name: x-api-key description: API key (API_KEY_SLOTS) for ApiKey to ApiKey Authorization, provided by DexCare to customer