Provider Agnostic Time Slots

DexCare offers the ability to schedule in person visits that are agnostic as to the type of provider (for example it could be an in person retail clinic).

In order for patients to set up an appointment they must choose an available time slot during which time services can be provided to them.

The following API endpoints allow you to list the departments within your organization and the time slots that they have available.

Once a time slot is selected, your application hand off control to DexCare’s scheduling application web interface elements to schedule an appointment.

Retrieving All Departments

Retrieves a list of departments configured for your environment along with their metadata.

Endpoint

get All Departments

/v1/departments

Parameters

brand

Filters by those departments that are only branded with the specified value <string> defined in your environment configuration.

If your health system has only one brand, this value can be excluded.

type: query
default: <All brands>
example: brand=<your brand>
values: string

clinicType

Filters only Retail or Virtual clinics

type: query
default: Retail
example: clinicType=Retail
values: Retail Virtual

onlyActive

Allows inactive departments to be listed

type: query
default: true
example: onlyActive=false
values: true false

Responses

200

Returns an array of JSON objects representing the Department entity. For each Department, this will include details including:

  • allowable visit types
  • brand
  • clinicType
  • contact information
  • open hours
  • timezone
  • urlName

For an example of the full structure of a Department, see Retrieving Department Information

Examples

Example: List Retail Departments, All Brands

Get a list of all Retail departments, for all brands that are active.

https://api.care.dexcarehealth.com/v1/departments

Example: List Retail Departments, Single Brand

Get a list of all Retail departments, branded only as “YourBrand”, including inactive departments. Including a brand is important if your health system has multiple branded subsidiaries or partners.

https://api.care.dexcarehealth.com/v1/departments?brand=YourBrand&onlyActive=false

Retrieving Department Information

Retrieves a specific department’s metadata. Similar to the /departments endpoint, this endpoint selects a more extensive set of properties for a single department.

Endpoint

get Single Department

/v1/departments/<urlName>

Parameters

urlName

REQUIRED

The urlName that is configured within DexCare for a given department

type: path
default: N/A
example: /v1/departments/Broadway
values: string

Responses

200

JSON object includes details of the requested Department.


{
    "raw": null,
    "isValidDepartment": 0,
    "extensionUrlDomain": "http://providence.org",
    "isActive": true,
    "startActivated": "2020-02-12T17:00:00+00:00",
    "departmentId": "40557000",
    "departmentGuid": "40557000",
    "ehrSystemName": "org.providence.dig.epic.provorca",
    "instanceId": "1",
    "brandName": "Acme",
    "displayName": "AcmeC4",
    "address": {
        "city": "Portland",
        "state": "OR",
        "postalCode": "97210",
        "line1": "2103 W Burnside St",
        "line2": null
    },
    "phone": "(800) 860-1100",
    "timezone": "America/Los_Angeles",
    "urlName": "AcmeC4",
    "latitude": 45.5051,
    "longitude": -122.675,
    "imageS3Bucket": "https://customer-assets.care.dexcarehealth.com/clinicImages/",
    "smallImageUrl": "https://customer-assets.care.dexcarehealth.com/clinicImages/acme/AcmeC4.jpg",
    "clinicType": "Retail",
    "allowedVisitTypes": [
        {
            "visitTypeId": "75015169",
            "name": "Acme ExpressCare Illness",
            "preferenceLogic": null,
            "reasonLabel": "What health changes, if any, have occurred since the previous visit?",
            "description": "Retail Appointment",
            "shortName": "Illness",
            "group": "none",
            "sortOrder": 0,
            "appointmentDuration": 30
        }
    ],
    "openDays": [
        {
            "day": "Monday",
            "openHours": {
                "startTime": "07:00:00",
                "endTime": "19:00:00"
            }
        },
 ...
        {
            "day": "Sunday",
            "openHours": {
                "startTime": "07:00:00",
                "endTime": "19:00:00"
            }
        }
    ],
    "partner": "None"
}

allowedVisitTypes
Identifiable by the field shortName, allowed visit types will indicate the types of appointments that may be scheduled at this location
brand
Brand categorize a Department based on affiliation (i.e. subsidiaries or partners)
contact information
Fields and structures such as address, phone are useful to display to users to contact the Department
clinicType
Either Retail or Virtual this field will indicate whether an in person visit is possible or whether the visit must be done online virtually
latitude and longitude
Coordinates that allow the Department to be located on a map
timezone
Note that the timezone of the Department will be relevant to the timeslots returned but the /departments/<urlName>/timeslots endpoint
open hours
Structure with the day of the week as well as startTime and endTime fields to indicate the hours that the Department is open
urlName
String identifier for the Department to be used in subsequent calls, such as to get the time slots that are open

404

The department with the given “urlName” was not found

Examples

Get the department metadata for the department with urlName = “AcmeC4”.

https://api.care.dexcarehealth.com/v1/departments/AcmeC4

Retrieving Available Time Slots for a Department

Retrieves a list of available time slots for a given department.

The timezone of time slots corresponds to the timezone of the department.

Time slots will be restricted to the default range for the visit type. This normally includes time slots for the current day unless a specified cut off time has passed, after which only time slots for future days are returned.

For example, when the visit type is “Illness” (the default visit type for Retail clinic type), the range is the current day, with a cut off time defaulted to 17:00 clinic time, as well as the next day’s slots.

For other visit types, the default could be longer (such as 7 days for vaccine visits).

Time slots that are already booked are excluded.

Endpoint

get Single Department Timeslots

/v1/departments/<urlName>/timeslots

urlName

REQUIRED

The urlName that is configured within DexCare for a given department

type: path
default: N/A
example: /v1/departments/Broadway/timeslots
values: string

Responses

200

JSON object containing an array of available time slots broken down by day.

Truncated example payload:

{
    "departmentId": "40557000",
    "timezone": "America/Los_Angeles",
    "startDate": "2021-07-02T00:00:00-07:00",
    "endDate": "2021-07-03T23:59:59-07:00",
    "scheduleDays": [
        {
            "departmentId": "40557000",
            "date": "2021-07-03T12:00:00",
            "timeSlots": [
						   {
								"providerNationalId": "INT-1177000",
								"providerId": "1177000",
								"id": "ewogICJyZXNvdXJjZVR5cGUiOiAiU2xvdCIsCiAgImV4dGVuc2lvbiI6IFsgewogICAgInVybCI6ICJodHRwOi8vcHJvdmlkZW5jZS5vcmcvc2xvdERhdGUiLAogICAgInZhbHVlU3RyaW5nIjogIjIwMjEtMDctMDMiCiAgfSwgewogICAgInVybCI6ICJodHRwOi8vcHJvdmlkZW5jZS5vcmcvdmlzaXRUeXBlSWQiLAogICAgInZhbHVlU3RyaW5nIjogIjc1MDE1MTY5IgogIH0sIHsKICAgICJ1cmwiOiAiaHR0cDovL3Byb3ZpZGVuY2Uub3JnL3RpbWV6b25lIiwKICAgICJ2YWx1ZVN0cmluZyI6ICJBbWVyaWNhL0xvc19BbmdlbGVzIgogIH0gXSwKICAiYXBwb2ludG1lbnRUeXBlIjogewogICAgImNvZGluZyI6IFsgewogICAgICAiY29kZSI6ICJvcGVuIgogICAgfSBdCiAgfSwKICAic3RhcnQiOiAiMjAyMS0wNy0wM1QxNTowMDowMC4wMDArMDA6MDAiLAogICJlbmQiOiAiMjAyMS0wNy0wM1QxNToyMDowMC4wMDArMDA6MDAiCn0=",
								"slotDateTime": "2021-07-03T08:00:00-07:00",
								"departmentId": "40557000",
								"departmentIdentifier": "org.providence.dig.epic.provorca|40557000",
								"slotType": "Retail",
								"duration": "20",
								"visitTypeId": "75015169"
							},
...
 

Key properties of the TimeSlot entity include:

slotDateTime
ISO 8601 formatted representation of the time slot in the department’s time zone
duration
Length of the time slot in minutes
id
Base64 encoded string that contains the slot start and end time in UTC, see below
Below is an example of a decoded id string from the above example:
{
  "resourceType": "Slot",
  "extension": [ {
    "url": "http://providence.org/slotDate",
    "valueString": "2021-07-03"
  }, {
    "url": "http://providence.org/visitTypeId",
    "valueString": "75015169"
  }, {
    "url": "http://providence.org/timezone",
    "valueString": "America/Los_Angeles"
  } ],
  "appointmentType": {
    "coding": [ {
      "code": "open"
    } ]
  },
  "start": "2021-07-03T15:00:00.000+00:00",
  "end": "2021-07-03T15:20:00.000+00:00"
}

404

Department with urlName was not found

Examples

Get the time slots for the department with urlName = “AcmeC4”

https://api.care.dexcarehealth.com/v1/departments/AcmeC4/timeslots

Starting the Scheduling Flow

Once the user has selected a time slot, you can hand off control to the DexCare scheduling application to begin a Retail type of appointment with the identifier of the selected time slot.

Note: Virtual appointments are handled in a different manner, not covered by this document.

Web Routing

/retail?timeSlot=<slotDateTime>&departmentUrlName=<urlName>&brand=<brand>

Examples

Start scheduling a retail appointment for the 3:40pm time slot at the AcmeC4 clinic

Note: The slot provided will not work if the date & time has passed. In this case, the user will be presented with a dialog to pick a new time slot.

https://scheduling.care.dexcarehealth.com/retail?timeSlot=2021-04-24T15:40:00-07:00&departmentUrlName=AcmeC4&brand=Acme

Note that brand is a required parameter for this call.