Null orphan rows are being created in analytics table for custom SDA container. How can I prevent creation or ensure automated deletion of these rows?
We have created a custom SDA container to store a certain kind of new, customized patient data.
We are observing a behavior in the correspoding analytics table for this custom SDA class where rows are added for a patient for which the MPI is null and the patient record does not exist.
From what we can tell, it seems that, when there is a MPI link/unlink, rows are added to analytics linked to the new Patient record that contains the latest MPI, but the old rows linked to the old (now non-existent) Patient are not removed. We are concerned why this is happening, since, in our testing, it does not occur with stock SDA containers (for example, the HSAA.Encounter table).
It has been suggested that perhaps there is some system code that is only able to execute to remove orphan rows that are created when a patient is linked to a new MPI when the analytics table is in the HSAA.* parent package. However, despite renaming the parent classes, we haven't been able to get data written to the custom container's analytics row in this way.
Is there anyone that has run into this issue? I would appreciate any advice on options to solve or deal with this.
Also: It appears that there is no data integrity issue with the newly created rows (i.e. the row that is populated with the patient's current MPI contains the correct information), but this issue is creating a lot of junk rows in the analytics table and makes the ingestion process look like it's functioning incorrectly. So, while perhaps running an automated process to periodically delete the rows is an option, we would like to not have to do this.