DiseaseReportManager
Internal members (not exported)
Queries
HasPendingReport #
Check whether a disease row exists with the expected pending value.
Signature:
Public Function HasPendingReport(ByVal reportTable As ListObject, ByVal diseaseName As String, Optional ByVal expectedValue As String = "yes") As Boolean
Parameters:
reportTable: ListObject hosting the import report entries.diseaseName: String disease identifier to search for.expectedValue: Optional String pending flag, defaults to ""yes"".
Returns: Boolean True when the disease requires a report.
Commands
ClearReportStatus #
Remove disease rows from all report tables on the worksheet.
Signature:
Public Sub ClearReportStatus(ByVal reportSheet As Worksheet, ByVal diseaseName As String)
Parameters:
reportSheet: Worksheet hosting the import report tables.diseaseName: String disease identifier to purge.
Internal Helpers
ValidateReportTable #
Ensure the report table reference is valid.
Signature:
Private Sub ValidateReportTable(ByVal reportTable As ListObject)
ValidateReportSheet #
Ensure the report sheet reference is valid.
Signature:
Private Sub ValidateReportSheet(ByVal reportSheet As Worksheet)
ValidateDiseaseName #
Ensure the disease name is provided.
Signature:
Private Sub ValidateDiseaseName(ByVal diseaseName As String)
ResolveColumn #
Retrieve the Nth column from the table's data body.
Signature:
Private Function ResolveColumn(ByVal reportTable As ListObject, ByVal columnIndex As Long) As Range
ColumnContains #
Determine whether a disease row matches the expected status.
Signature:
Private Function ColumnContains(ByVal namesColumn As Range, ByVal statusColumn As Range, ByVal diseaseName As String, ByVal expectedValue As String) As Boolean
LocateRows #
Locate all row indexes belonging to the disease.
Signature:
Private Function LocateRows(ByVal reportTable As ListObject, ByVal diseaseName As String) As BetterArray
DeleteRows #
Delete the supplied rows from the table, starting from the bottom.
Signature:
Private Sub DeleteRows(ByVal reportTable As ListObject, ByVal rowIndexes As BetterArray)
Normalize #
Normalize text for case-insensitive comparisons.
Signature:
Private Function Normalize(ByVal value As String) As String
ReadColumn #
Read a single-column range into a 2D Variant matrix.
Signature:
Private Function ReadColumn(ByVal columnRange As Range) As Variant
ErrorHandling
ThrowError #
Centralised error raising aligned with ProjectError codes.
Signature:
Private Sub ThrowError(ByVal errNumber As ProjectError, ByVal errMessage As String)