When changing the case status from Open to Closed (any), the End Date appears but is not mandatory. You can save the case status as closed without providing an end date. This causes a disconnect in the data; cases may appear ongoing (no end date) but with a status indicating they are closed.
Note: the End Date field USED to be mandatory, and then it stopped being mandatory at some point.

Here's the script from HICC to correct your data:
-- Setting this variable to 1 will set the new end date to all cases that have a status of closed (either directly or through custom case states). Default: 0DECLARE @PerformUpdate BIT = 0-- Setting this to a valid date (YYYY-MM-DD) will set the case closures to to indicated value when PerformUpdate is 1. Default: '2025-12-03'DECLARE @NewEndDate DATE = '2025-12-03'-- Setting this to 0 will include all cases in the SELECT statement (does not affect the UPDATE statement). Default: 1DECLARE @ShowOnlyMissingEndDate BIT = 1-- Setting this to 1 will call a second SELECT query in the execution that reveals the number of cases that need a new end date set. Default: 0-- This count should be 0 after running this script with PerformUpdate = 1.DECLARE @ShowCaseCountNeedingUpdate BIT = 0IF @PerformUpdate = 1BEGINUPDATE c
SET c.DateCaseClosed = @NewEndDate
FROM HIFIS_Cases c
JOIN HIFIS_CaseStateTypes cst ON cst.ID = c.CaseStateTypeID
WHERE (c.CaseStateTypeID IN (2,3) OR (cst.RollUpID IS NOT NULL AND cst.RollUpID IN (2,3)))
AND c.DateCaseClosed IS NULL
END
SELECT CaseID, CaseState, RollupCaseState, DateCaseOpened, DateCaseClosed, NeedsEndDateYNFROM (
SELECT c.CaseID, c.CaseStateTypeID, cst.NameE CaseState, cst.RollUpID, rollupState.NameE RollupCaseState, c.DateCaseOpened, c.DateCaseClosed,
CASE WHEN (c.CaseStateTypeID IN (2,3) OR (cst.RollUpID IS NOT NULL AND cst.RollUpID IN (2,3)))
AND c.DateCaseClosed IS NULL THEN 'Y' ELSE 'N' END AS NeedsEndDateYNFROM HIFIS_Cases c
JOIN HIFIS_CaseStateTypes cst ON cst.ID = c.CaseStateTypeID
LEFT JOIN HIFIS_CaseStateTypes rollupState ON rollupState.ID = cst.RollUpID
) cases
WHERE (@ShowOnlyMissingEndDate = 1 AND NeedsEndDateYN = 'Y')
OR @ShowOnlyMissingEndDate = 0;
IF @ShowCaseCountNeedingUpdate = 1BEGINSELECT COUNT(*) CasesNeedingUpdate
FROM HIFIS_Cases c
JOIN HIFIS_CaseStateTypes cst ON cst.ID = c.CaseStateTypeID
WHERE (c.CaseStateTypeID IN (2,3) OR (cst.RollUpID IS NOT NULL AND cst.RollUpID IN (2,3)))
AND c.DateCaseClosed IS NULL
END
@Ali Ryder This doesn't update the services table too?
@Christie Scott haha I hadn't noticed that...
@Ali Ryder I wrote a similar script to close case management with no activity in x days. It respects the status if there was one set, and sets the outcome to goals not met if there is no existing outcome/status. I had thought updating both the services and cases table was needed based on examining the behavior of HIFIS when you close them manually, so I am a little surprised at this lol
Fixed in 4.0.61.1
Note that this affects activity/inactivity, so if you're finding a lot of active clients that shouldn't be active, maybe this is why