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

Refactor `create_and_send_new_redcap_prod_per_project_line_items.R` in preparation for service request line items. #228

Closed pbchase closed 3 months ago

pbchase commented 4 months ago

Refactor create_and_send_new_redcap_prod_per_project_line_items.R in preparation for service request line items.

pbchase commented 4 months ago

Instead of create_redcap_project_line_items(), let's make two functions:

get_target_projects_to_invoice <- function() {
}

get_project_service_instances <- function() {
}

Leave the write events in the ETL. That will allow data for different service_types to be bound together before the I/O.

pbchase commented 3 months ago

There's yet another function that can be--and should be--refactored out of the ETL. get_new_project_invoice_line_items() will make the invoice line items for new projects. This function will produce output much like that from create_service_request_line_items() described in Issue #203

pbchase commented 3 months ago

Addressed by PR #230