What a document record holds

Draft for Reid to review. Written by Claude from the Oct 13 and 14 calls. Plain language first; the column names are only suggestions.

The idea

Every document that arrives gets one record. Each fact pulled from it gets its own row, pointing back to the page and the exact words. The match to a deal is a separate row too, so a person can confirm or correct it without touching anything else.

1. The document

What it holdsExampleSuggested name
A unique iddoc 1042id
What kind of document it isDivision orderdoc_type
Where it came fromScanner / email / mail / uploadsource
When it arrivedOct 14, 10:12received_at
Where the file isThe SharePoint inbox filefile_location
A fingerprint of the file, so the same document never lands twice(automatic)file_hash
Pages3page_count
Where it standsArrived → read → matched → confirmed, or needs a personstatus

2. Each fact pulled from it

What it holdsExampleSuggested name
Which documentdoc 1042document_id
What the fact isDecimal interestfact_type
The value0.00215000value
Page and exact wordsPage 2, "0.00215000 RI"page, quote
What it links to, if knownTract 4, Smith leaselinked_to
Who or what pulled it outThe reader, version 3extracted_by
Checked by a person?Not yet / Kelsey, Oct 15checked_by, checked_at

3. The match to a deal

What it holdsExampleSuggested name
Which document, which dealdoc 1042 → Smith dealdocument_id, deal_id
The proof: which facts match the dealSame tract, same lease, same owner nameevidence
Other deals it could have beenJones deal (same county)other_candidates
Matched alone, or sent to a person?Sent to Reid by emaildecided_by
Confirmed or corrected by a personConfirmed by Reidconfirmed_by

Rules that come from the calls

Questions for Reid

  1. Does the inventory schema already have tables for deals, tracts and leases we should link to directly?
  2. Should facts from the test go into the same tables the real system will use, or a separate test area?
  3. Anything a division order or check stub needs that doesn't fit here?