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
Version | Changes |
---|---|
Pre-v24 changes are not documented | |
v24 | Added support for configurable retry policy for DocuLive and DIPS |
v24 | Removed AmbuStat export logic |
v33 | Added 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.
- Create new export status for the medical record if it has never been attempted before.
- Number of attempts is 0.
- Last attempt time is minimum value for DateTimeOffset structs.
- Reset the number of attempts if the export status is not Attempted or CommunicationFailure.
- If the number of attempts is less than the maximum number of retries;
- If the last attempt time is greater than the current time minus the delay between retries;
- Increase the number of attempts by 1.
- Mark the last attempt time as the current time.
- Set the status to Attempted.
- Attempt the export.
- Else; do not attempt the export, but do not change the status.
- If the last attempt time is greater than the current time minus the delay between retries;
- Else;
- Set the status to Ignored.
- Set the last attempt time to the current time.
- 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.