Skip to content

Add Patents Section to Profile - #221

Open
betsyecastro wants to merge 25 commits into
developfrom
add-patents-data
Open

betsyecastro wants to merge 25 commits into
developfrom
add-patents-data

Conversation

@betsyecastro

@betsyecastro betsyecastro commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Faculty Patents Grouping and Display

Adds a faculty patents section to the profiles app: imports raw patent data from a CSV, groups country filings into patent families, and renders editable patent records with hierarchical members on the profile edit view.

Includes:

Backend

  • ReadsPatentSpreadsheets trait using native PHP fgetcsv().
  • PatentFamilyGrouper service groups raw patent rows into curated families by (NetID, normalized_title, family_prefix). Includes special handling for MTI portfolio patents (Kilgard/McIntyre/Rennaker 03-026MTI-*) and collapses European countries sharing a patent number into a single EPO entry.
  • patents:import Artisan command reads a CSV, groups via the service, and bulk-inserts curated families into profile_data with type='patents'. Destructive per profile — wipes existing patents rows before inserting.
  • Co-inventor detection across UTD faculty: when multiple inventors share (prefix, country, patent_no), names are formatted (F. Last) and stored on the record.
  • ProfileData::getCitationAttribute() accessor generates citations at display time, formatted as Title - Jurisdiction - Number (MM/DD/YYYY), ... - co-inventors: F. Last. EPO collapsing applied for European jurisdictions sharing a patent number.

Frontend

  • Edit view profiles.edit.patents with parent patent records and expandable member sub-records.
  • Extended existing jQuery-based row-insertion logic to support hierarchical subrecords with add, duplicate, and remove operations via a native HTML element — duplication streamlines adding the same patent across different countries.
  • Model relations to insert and update profile_data rows for type='patents'.
  • Terminology aligns with Lens.org patent metadata conventions (jurisdiction, published_date).
  • Operational notes

    • Import is destructive per profile. Backup recommended before running in production.
    • Source CSV must be UTF-8 encoded (Excel "CSV UTF-8" export). BOM is handled.
    • Faculty manually edit member details (status, filed date, co-inventors) through the frontend after import.

    Testing

    1. Backup profile_data rows where type='patents'.
    2. Run php artisan patents:import storage/app/patents.csv --dry-run and verify counts.
    3. Run without --dry-run to persist.
    4. Spot-check a few profiles (Ahn, Kilgard, Rennaker) for correct family grouping and co-inventor detection.
    5. Open a patents edit page, verify parent records render, members expand/collapse, Add Member works, Save persists changes without errors.

@betsyecastro
betsyecastro marked this pull request as draft June 22, 2026 19:37
@betsyecastro
betsyecastro marked this pull request as ready for review July 24, 2026 18:17
@betsyecastro betsyecastro self-assigned this Jul 24, 2026
@betsyecastro betsyecastro added the ✨ enhancement New feature or request label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant