feat(patents): extend patent details with CPC, application info, claims and status
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -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()
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
@@ -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 {
|
||||
|
||||
@@ -6,20 +6,6 @@
|
||||
<p class="message">Keine Patente gefunden.</p>
|
||||
} @else {
|
||||
<div class="patents-container">
|
||||
<div class="patents-summary">
|
||||
<p class="summary-line">
|
||||
<span class="summary-value">{{ filteredPatents.length }}</span>
|
||||
<span class="summary-label"> Patente</span>
|
||||
</p>
|
||||
<p class="summary-line">
|
||||
<span class="summary-value">{{ getEpoCount() }}</span>
|
||||
<span class="summary-label"> EPO</span>
|
||||
</p>
|
||||
<p class="summary-line">
|
||||
<span class="summary-value">{{ getUsptoCount() }}</span>
|
||||
<span class="summary-label"> USPTO</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@if (showDetail && selectedPatent) {
|
||||
<button class="back-btn" (click)="showDetail = false">
|
||||
@@ -69,6 +55,60 @@
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.cpc.length > 0) {
|
||||
<div class="detail-section">
|
||||
<h4>Klassifikation (CPC)</h4>
|
||||
<ul class="tag-list tag-list--compact">
|
||||
@for (cpc of selectedPatent.cpc; track cpc) {
|
||||
<li class="tag">{{ cpc }}</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.application_number) {
|
||||
<div class="detail-section">
|
||||
<h4>Anmeldungsnummer</h4>
|
||||
<p>{{ selectedPatent.application_number }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.application_date) {
|
||||
<div class="detail-section">
|
||||
<h4>Anmeldedatum</h4>
|
||||
<p>{{ formatDate(selectedPatent.application_date) }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.kind) {
|
||||
<div class="detail-section">
|
||||
<h4>Patentart</h4>
|
||||
<p>{{ selectedPatent.kind }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.application_type) {
|
||||
<div class="detail-section">
|
||||
<h4>Anmeldungstyp</h4>
|
||||
<p>{{ selectedPatent.application_type }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.number_of_claims) {
|
||||
<div class="detail-section">
|
||||
<h4>Anzahl Ansprüche</h4>
|
||||
<p>{{ selectedPatent.number_of_claims }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.status) {
|
||||
<div class="detail-section">
|
||||
<h4>Status</h4>
|
||||
<p>{{ selectedPatent.status }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -148,8 +188,24 @@
|
||||
</div>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="patent-detail empty">
|
||||
<p>Klicke auf ein Patent für Details.</p>
|
||||
<div class="patent-detail overview">
|
||||
<p class="overview-title">Patentübersicht</p>
|
||||
<p class="overview-subtitle">Alle Patente dieser Person im Überblick.</p>
|
||||
<div class="overview-stats">
|
||||
<div class="overview-stat">
|
||||
<span class="overview-value">{{ patents.length }}</span>
|
||||
<span class="overview-label">Patente</span>
|
||||
</div>
|
||||
<div class="overview-stat">
|
||||
<span class="overview-value">{{ getEpoCount() }}</span>
|
||||
<span class="overview-label">EPO</span>
|
||||
</div>
|
||||
<div class="overview-stat">
|
||||
<span class="overview-value">{{ getUsptoCount() }}</span>
|
||||
<span class="overview-label">USPTO</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="overview-hint"> Wähle links ein Patent aus, um die Details zu sehen.</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -10,27 +10,6 @@
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.patents-summary {
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
|
||||
.summary-line {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.summary-value {
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.sort-control {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -154,6 +133,60 @@
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
&.overview {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
|
||||
.overview-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.overview-subtitle {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.overview-stats {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.overview-stat {
|
||||
background: white;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 12px 8px;
|
||||
text-align: center;
|
||||
|
||||
.overview-value {
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.overview-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.overview-hint {
|
||||
font-size: 12px;
|
||||
color: #aaa;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0 0 16px 0;
|
||||
font-size: 16px;
|
||||
@@ -239,7 +272,7 @@
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
padding: 0;
|
||||
align-self: flex-start; // NEU
|
||||
align-self: flex-start;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
|
||||
Reference in New Issue
Block a user