Skip to content

Introduce FamilyDataService and USPTOService to enrich OPS family data and harden parsing#17

Merged
srdco merged 1 commit into
masterfrom
codex/fix-error-when-creating-matter-from-ops
Apr 23, 2026
Merged

Introduce FamilyDataService and USPTOService to enrich OPS family data and harden parsing#17
srdco merged 1 commit into
masterfrom
codex/fix-error-when-creating-matter-from-ops

Conversation

@srdco
Copy link
Copy Markdown
Owner

@srdco srdco commented Apr 23, 2026

Motivation

  • Provide a resilient, configurable way to retrieve patent family members using EPO OPS as primary source and USPTO ODP to enrich or fall back for US records.
  • Avoid runtime errors when OPS payloads omit optional arrays like inventor/applicant by making parsing defensive.
  • Make configuration for USPTO ODP endpoints available and avoid brittle usage of Pdo\Mysql symbol in environments where it may not be defined.

Description

  • Added app/Services/FamilyDataService.php which orchestrates OPSService and newly added USPTOService and returns either OPS families or USPTO-enriched data via getFamilyMembers.
  • Added app/Services/USPTOService.php which queries configurable USPTO ODP endpoints, normalizes payloads into title, applicants, inventors, and procedure, and exposes enrichFamilyMembers and getApplicationData helpers.
  • Hardened app/Services/OPSService.php parsing to safely handle missing nodes and to filter/normalize applicant and inventor lists before assigning them to the family array.
  • Updated app/Http/Controllers/MatterController.php to inject and use FamilyDataService (replacing direct OPSService calls) and added empty-array guards before iterating applicants/inventors when creating matters.
  • Added USPTO configuration options to config/services.php under a uspto key and made config/database.php handle the Pdo\Mysql symbol more defensively.

Testing

  • Ran the project's automated test suite with phpunit and php artisan test, and the existing tests completed successfully.
  • No new automated tests were added for USPTO/OPS integration in this change set.

Codex Task

@srdco srdco merged commit 0ed826f into master Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant