Question
· Feb 21

SQL Table - Data Cleanup

Hi Community,

I've created a method in my File Service to do a cleanup for every file load. Currently, I've set it to delete data when LastUpdated date is greater than maxdate. However, I want to do a cleanup for every new file load. Any suggestions or advice on how to do this? Thanks!

 

Method Cleanup()
{

   Set tMaxDate = ""
   &SQL(SELECT Max(LastUpdated) into :tMaxDate
   FROM MC_Table_Data.Patient) 
 

   &SQL(DELETE MC_Table_Data.Patient WHERE LastUpdated<:tMaxDate)
}

Product version: HealthShare 2022.1
$ZV: HealthShare Unified Care Record 2022.2.3 Build: 1001 [HealthShare Modules: Core:24.0 + Patient Index:24.0] - IRIS for UNIX (IBM AIX for System Power System-64) 2022.1.2 (Build 574_0_22407U) Wed Apr 5 2023 11:17:13 EDT [Core:24.0|Patient Index:24.0]
Discussion (0)1
Log in or sign up to continue