caelum0x 174222bcaa feat: Builder-Track named-user tools, bio + evidence-intelligence platform, Apache-2.0
Builds PaperTrail from the base skeleton into a full evidence-verification platform
for the "Built with Claude: Life Sciences" hackathon (Builder Track).

New named-user features (Build Beyond the Bench):
- Lab Notebook Companion — rough bench notes -> structured, searchable, grounded
  experiment records (lib/labNotebook, /console/lab-notebook, migration 0059)
- Clinical Trial Matcher — de-identified patient notes -> ranked eligible
  ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning
  (lib/trialMatcher, /console/trial-matcher, migrations 0060)

Platform:
- Deterministic verification moat (biostats recompute, exact-span grounding)
- 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar,
  PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier)
- Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise
  governance (RBAC, /api/v1 gateway, metering, audit chain, retention)
- 17 OSS projects assimilated into native TypeScript on our stack (backend/engines
  retained + credited in NOTICE)
- Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site
- Next.js 16 upgrade, benchmark harness (honest smoke-test caveat)

Licensing: Apache-2.0 (LICENSE + NOTICE).
2026-07-10 16:23:13 +03:00

50 lines
1.8 KiB
Python

from pydantic import BaseModel
from typing import List, Optional, Dict
class Paper(BaseModel):
corpus_id: str
title: str
abstract: Optional[str] = ""
authors: List[Dict] = []
year: Optional[int] = None
journal: Optional[str] = "" # venue in S2
url: Optional[str] = ""
citation_count: Optional[int] = 0
is_open_access: Optional[bool] = False
fields_of_study: List[str] = []
references: List[str] = []
text: Optional[str] = ""
content_source: Optional[str] = ""
pdf_hash: Optional[str] = ""
class Config:
allow_population_by_dict = True
@classmethod
def from_s2_paper(cls, paper_data: dict):
"""Create a Paper instance from Semantic Scholar paper data."""
return cls(
corpus_id=str(paper_data.get('corpusId')),
title=paper_data.get('title', ''),
abstract=paper_data.get('abstract', ''),
authors=paper_data.get('authors', []),
year=paper_data.get('year'),
journal=paper_data.get('venue', ''),
url=paper_data.get('url', ''),
citation_count=paper_data.get('citation_count', 0),
fields_of_study=paper_data.get('fields_of_study', []),
references=paper_data.get('references', []),
text=paper_data.get('text', ''),
content_source=paper_data.get('content_source', ''),
pdf_hash=paper_data.get('pdf_hash', '')
)
class PaperMetadata:
def __init__(self, title: str, authors: list, year: int, journal: str, citation_count: int, influential_citation_count: int):
self.title = title
self.authors = authors
self.year = year
self.journal = journal
self.citation_count = citation_count
self.influential_citation_count = influential_citation_count