DexCare SDK 7.0.0

This page contains information on how to upgrade from SDK 6.x to SDK 7.0. For a full list of changes, see the Release Notes.

Core Library Desugaring

As of DexCare SDK 7.0, if your app has a minimum target API lower than 26, you will also need to enable core library desugaring in order to use the Java Time library on those lower API versions.

Follow the Android guide here: https://developer.android.com/studio/write/java8-support#library-desugaring

Dates

Dates throughout the SDK have changed types, and now use the Java Time library introduced with Java 8.

See this page in Oracle’s documentation for more details on the new types and their intended purposes: https://www.oracle.com/technical-resources/articles/java/jf14-date-time.html

In essence:

  • Dates that only represent a day are now LocalDate. These represent a day without any time or timezone, e.g. 2021-05-13.
  • Dates that have valid time components are now ZonedDateTime.
    • Note: by default these times are displayed in the device’s timezone. If you want to display times as “airport times”, you will need to call ZonedDateTime.withZoneSameInstant(newZoneId: ZoneId) to get the local time in the specified timezone.
    • For example: If the appointment’s time is 2pm PST, but the device is set to EST timezone, the appointment time will display as 5pm by default.
    • In addition, the ZonedDateTime has a zone property that can be used to display the timezone to the user (best experience).
  • Dates that only represent a time without associated timezone are now LocalTime. These are not associated with any specific date or timezone.
  • Strings that previously represented a timezone are now ZoneId.

Interface Changes

  • ProviderService.getProviderTimeslots()
    • startDate parameter is now a LocalDate
    • endDate parameter is now a LocalDate

Model Changes

  • Clinic
    • timezone is now a ZoneId
  • ClinicTimeSlot
    • startDate is now a LocalDate
    • endDate is now a LocalDate
    • timezone is now a ZoneId
  • InsuranceManualOther
    • dateOfBirth is now a LocalDate
  • InsuranceImageOther
    • dateOfBirth is now a LocalDate
  • OpenHours
    • startTime is now a LocalTime
    • endTime is now a LocalTime
  • PatientDemographics
    • birthdate is now a LocalDate
  • PracticeRegionAvailability
    • start is now a ZonedDateTime
    • end is now a ZonedDateTime
  • ProviderTimeSlot
    • startDate is now a LocalDate
    • endDate is now a LocalDate
    • timezone is now a ZoneId
  • ScheduledVisit
    • startDateTime is now a ZonedDateTime
    • endDateTime is now a ZonedDateTime
    • timezone is now a ZoneId
  • ScheduledVisit.Timestamps
    • cancelled is now a ZonedDateTime
    • done is now a ZonedDateTime
    • requested is now a ZonedDateTime
    • staffdeclined is now a ZonedDateTime
  • ScheduleDay
    • date is now a ZonedDateTime. NOTE: This property should no longer be used. Instead, a new localDate property has been added to this model which should be used instead. The date property on this model only represents the day - the API is incorrectly returning time with it and should be ignored.
    • New property localDate: LocalDate which should be used instead of date.
  • TimeSlot
    • slotDateTime is now a ZonedDateTime

VirtualVisitInformation

If you were previously creating VirtualVisitInformation objects with the currentState parameter specified, the parameter was removed.

Deprecation removals

  • Removed deprecated models/methods/properties:
    • Address.address
    • Address.address2
    • Region
    • RetailService.uploadInsuranceCard
    • VirtualPracticeRegion.getVisitPriceInDollars
    • VirtualService.startVirtualVisit methods without practiceId argument
    • VirtualService.getRegions
    • VirtualService.getRegionAvailability
    • VirtualService.getInsurancePayers
    • VirtualService.verifyCouponCode
    • VirtualVisitInformation.currentState
  • Removed all of the DexCare SDK’s Date extension functions. They are no longer needed with the Java 8 Date Time types.