diff --git a/service/src/main/inse/patents/elastic_search_client.py b/service/src/main/inse/patents/elastic_search_client.py index 64d5865e..f10694e6 100644 --- a/service/src/main/inse/patents/elastic_search_client.py +++ b/service/src/main/inse/patents/elastic_search_client.py @@ -97,13 +97,15 @@ class PatentSearchClient: "kind", "date_publication", "date_publication_year", + "application_number", + "application_filing_date", "title_en", "title_de", "abstract", "inventors_name", "applicants_name", "ipc", - "ipc_text", + "cpc", ], "query": query, } @@ -150,13 +152,17 @@ class PatentSearchClient: "country", "publication_date", "publication_year", + "application_number", + "application_date", + "application_type", "title", "abstract", "inventors_names", - "inventors_names_text", "assignees_orgs", "ipcr", - "ipcr_text", + "cpc", + "number_of_claims", + "status", ], "query": query, } @@ -179,4 +185,4 @@ class PatentSearchClient: json=payload, ) response.raise_for_status() - return response.json() + return response.json() \ No newline at end of file diff --git a/service/src/main/inse/patents/logic.py b/service/src/main/inse/patents/logic.py index 7e82cc31..d5227bcc 100644 --- a/service/src/main/inse/patents/logic.py +++ b/service/src/main/inse/patents/logic.py @@ -87,6 +87,7 @@ def _parse_epo_hits(data: dict) -> list[model.PatentEntry]: inventors = src.get("inventors_name") or [] applicants = src.get("applicants_name") or [] ipc = src.get("ipc") or [] + cpc = src.get("cpc") or [] patents.append(model.PatentEntry( patent_id=f"EP{src.get('doc_number', hit.get('_id', ''))}", source="EPO", @@ -94,9 +95,13 @@ def _parse_epo_hits(data: dict) -> list[model.PatentEntry]: abstract=src.get("abstract"), publication_date=str(src.get("date_publication")) if src.get("date_publication") else None, publication_year=str(src.get("date_publication_year")) if src.get("date_publication_year") else None, + application_number=src.get("application_number"), + application_date=src.get("application_filing_date"), + kind=src.get("kind"), inventors=inventors if isinstance(inventors, list) else [inventors], assignees=applicants if isinstance(applicants, list) else [applicants], ipc=ipc if isinstance(ipc, list) else [ipc], + cpc=cpc if isinstance(cpc, list) else [cpc], country=src.get("country", "EP"), )) return patents @@ -109,6 +114,7 @@ def _parse_uspto_hits(data: dict) -> list[model.PatentEntry]: inventors = src.get("inventors_names") or [] assignees = src.get("assignees_orgs") or [] ipc = src.get("ipcr") or [] + cpc = src.get("cpc") or [] patents.append(model.PatentEntry( patent_id=f"US{src.get('publication_number', hit.get('_id', ''))}", source="USPTO", @@ -116,9 +122,15 @@ def _parse_uspto_hits(data: dict) -> list[model.PatentEntry]: abstract=src.get("abstract"), publication_date=str(src.get("publication_date")) if src.get("publication_date") else None, publication_year=str(src.get("publication_year")) if src.get("publication_year") else None, + application_number=src.get("application_number"), + application_date=str(src.get("application_date")) if src.get("application_date") else None, + application_type=src.get("application_type"), + number_of_claims=src.get("number_of_claims"), + status=src.get("status"), inventors=inventors if isinstance(inventors, list) else [inventors], assignees=assignees if isinstance(assignees, list) else [assignees], ipc=ipc if isinstance(ipc, list) else [ipc], + cpc=cpc if isinstance(cpc, list) else [cpc], country=src.get("country", "US"), )) return patents diff --git a/service/src/main/inse/patents/model.py b/service/src/main/inse/patents/model.py index 31ebc18c..dd622b70 100644 --- a/service/src/main/inse/patents/model.py +++ b/service/src/main/inse/patents/model.py @@ -8,13 +8,21 @@ class PatentEntry(BaseModel): abstract: str | None = None publication_date: str | None = None publication_year: str | None = None + application_number: str | None = None + application_date: str | None = None + kind: str | None = None # EPO only + application_type: str | None = None # USPTO only + number_of_claims: int | None = None # USPTO only + status: str | None = None # USPTO only inventors: list[str] = Field(default_factory=list) assignees: list[str] = Field(default_factory=list) ipc: list[str] = Field(default_factory=list) + cpc: list[str] = Field(default_factory=list) country: str | None = None + class PatentsByAuthorResponse(BaseModel): author_id: str author_name: str | None = None patent_count: int - patents: list[PatentEntry] + patents: list[PatentEntry] \ No newline at end of file diff --git a/webapp/src/app/api/api/patents.service.ts b/webapp/src/app/api/api/patents.service.ts index 6a0e0b8a..33d7412b 100644 --- a/webapp/src/app/api/api/patents.service.ts +++ b/webapp/src/app/api/api/patents.service.ts @@ -28,12 +28,17 @@ export interface PatentEntry { abstract: string | null; publication_date: string | null; publication_year: string | null; + application_number: string | null; + application_date: string | null; + kind: string | null; + application_type: string | null; + number_of_claims: number | null; + status: string | null; inventors: string[]; assignees: string[]; ipc: string[]; + cpc: string[]; country: string | null; - confidence_score: number; - } export interface PatentsByAuthorResponse { diff --git a/webapp/src/app/modules/person-patents/person-patents.component.html b/webapp/src/app/modules/person-patents/person-patents.component.html index 559aa284..db0c6bbb 100644 --- a/webapp/src/app/modules/person-patents/person-patents.component.html +++ b/webapp/src/app/modules/person-patents/person-patents.component.html @@ -6,20 +6,6 @@
} @else {- {{ filteredPatents.length }} - Patente -
-- {{ getEpoCount() }} - EPO -
-- {{ getUsptoCount() }} - USPTO -
-{{ selectedPatent.application_number }}
+{{ formatDate(selectedPatent.application_date) }}
+{{ selectedPatent.kind }}
+{{ selectedPatent.application_type }}
+{{ selectedPatent.number_of_claims }}
+{{ selectedPatent.status }}
+Klicke auf ein Patent für Details.
+Patentübersicht
+Alle Patente dieser Person im Überblick.
+Wähle links ein Patent aus, um die Details zu sehen.