ctsit / rcc.billing

Automated, data-driven service billing implemented on REDCap Custodian
https://ctsit.github.io/rcc.billing/
Apache License 2.0
0 stars 3 forks source link

use service_identifier pk #211

Closed ljwoodley closed 6 months ago

ljwoodley commented 7 months ago

Closes issue #210. Not this update dropped target_projects row count from 90 to 1 when ran.

pbchase commented 7 months ago

Not this update dropped target_projects row count from 90 to 1 when ran.

Which feels like a different, more harmful bug. I'll test it. I feel like the original code was a half-finished idea to prevent a corner case. I think I know what needs to happen.

pbchase commented 7 months ago

So one record in target_projects was right, but the original code had still missed the mark. I moved that code block to a better place to anti_join on all 3 columns required to identify a unique annual project billing record. The end result is still one new record which, I think, shines a light on a different problem, but it's not a problem we need to address here.