Skip to contents

Joins the IRS index rows of the missing filings to what fetch_irs_xml() extracted and to each file's return header, and writes the result to dest.

Usage

build_patch_index(miss, got, dest, build)

Arguments

miss

Output of diff_irs_gt().

got

Output of fetch_irs_xml().

dest

Folder holding the extracted XML files; the index CSV is written there too.

build

Build name, e.g. "v2_3".

Value

The patch index as a data.table, invisibly. Written to <dest>/PATCH-INDEX-<build>-<YYYY-MM-DD>.csv.

Details

The output has the IRS index columns, plus the columns a GTDC index has that update_db() and combine_index() use: ObjectId, URL, TaxYear, FormType. It also has ZipFile, PATCH_BUILD, and PATCH_CREATED. Only filings whose XML was extracted are included.