bib: ingest OIG Compliance Program Guidance and fraud alerts into library #307
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
OIG publishes compliance guidance, fraud alerts, and advisory bulletins that define what constitutes healthcare fraud.
Key documents:
Source: https://oig.hhs.gov/compliance/compliance-guidance/
Create Source items tagged with source:oig.
Closed. OIG Compliance Program Guidance + fraud alerts ingested, attached, and synced to Zotero under
Healthcare Data Platform / OIG Guidance.What ships
Store.attach_file.Architecture
Follows the same shape as the IOM pipeline (#304/#305/#306) so the two share scraping conventions, SHA-256 idempotency, and the Zotero-sync plumbing.
Module:
src/bib/oig.pyfetch_cpgs(client)— scrapesoig.hhs.gov/compliance/compliance-guidance/via_DOC_LINKregex (anchors to/documents/…pdf|html)._SKIP_HINTSfilters navigation noise.fetch_alerts(client)— scrapesoig.hhs.gov/compliance/alerts/._classify_type(title, href)— maps each doc tocpg | sfa | sab | ea | open_letter | othervia title regex first, URL substring second._classify_sector(title)— keyword-table lookup (hospital → hospitals,dme → dme,nursing → nursing, …) for routing.ingest_all(store, client, *, kinds=None)— upserts eachOIGDocas abib.item.Sourcewithdoc_type=<human-readable>,institution=OIG, and tagsagency:oig,guidance:<kind>,sector:<X>when classified.download_attachments(store, client, *, force=False)— same SHA-256 idempotency as IOM's.Routing
_zotero_collection_path()inbib/sync.pyrecognises OIG items by theagency:oigtag and sends them toHealthcare Data Platform / OIG Guidance / <sector>(when tagged) or…/OIG Guidance / <guidance_type>otherwise. Sub-collections are created on the fly viaDb.ensure_collection.CLI
stack bib ingest-oig [--kind cpg] [--kind alerts]stack bib attach-oig [--force]stack bib refresh-oig— one-shot: ingest → attach → Zotero sync (with the usualdocker stop/start zoterobracket).Verified state
agency:oig, all with attachmentsdocument, 30 attachment children typedattachment(linkMode=1)Known cosmetic issue
Sector labels are title-cased via Python's
.title(), so the collection reads "Dme" instead of "DME" and "Pharmaceutical" instead of "Pharmaceuticals". Trivial fix in_zotero_collection_path; deferred as not-blocking.