Skip to main content

Export Service Technical

This document describes the technical details of the Export Service, and the changes that have been made to the Export Service in each release.

Change Log

VersionChanges
Pre-v24 changes are not documented
v24Added support for configurable retry policy for DocuLive and DIPS
v24Removed AmbuStat export logic
v33Added Email Export Service

Retry Policy

The Export Service now supports a configurable retry policy for DocuLive and DIPS. The retry policy is configured in the appsettings.json file. The retry policy is configured as a number of retries and a delay between each retry. The default retry policy is 3 retries with a 10 minutes delay between each retry.

"RetryPolicy": {
"MaxRetries": 3,
"DelayBetweenRetries": 10
}

How it works

The retry policy uses the export status for the medical record to determine if the export should be attempted. Retries will only happen for completed medical records. Manually requested, incomplete records will only be attempted once per manual request as long as they remain incomplete.

Before checking the retry policy, the export service will filter out medical records that have been exported successfully, or medical records that are set to be Ignored (e.g. because the medical record does not have a valid patient id). Successfully exported medical records or Ignored medical records will only be included in the list that is fed through the retry policy check if they have been updated after the Success or Ignore status was set.

  1. Create new export status for the medical record if it has never been attempted before.
    1. Number of attempts is 0.
    2. Last attempt time is minimum value for DateTimeOffset structs.
  2. Reset the number of attempts if the export status is not Attempted or CommunicationFailure.
  3. If the number of attempts is less than the maximum number of retries;
    1. If the last attempt time is greater than the current time minus the delay between retries;
      1. Increase the number of attempts by 1.
      2. Mark the last attempt time as the current time.
      3. Set the status to Attempted.
      4. Attempt the export.
    2. Else; do not attempt the export, but do not change the status.
  4. Else;
    1. Set the status to Ignored.
    2. Set the last attempt time to the current time.
    3. Do not attempt the export.

Removed AmbuStat Logic

AmbuStat is an old GRID module that is no longer in use. The Export Service used to have logic to handle AmbuStat export configurations, but this logic has now been removed.