Skip to main content

Crate nexcore_pv_intelligence

Crate nexcore_pv_intelligence 

Source
Expand description

§nexcore-pv-intelligence

Pharmacovigilance intelligence graph — Company × Drug × Disease composition with competitive analysis queries.

§Architecture

Company --owns--> Drug --treats--> Disease
   |                |                |
   v                v                v
CompanyAnalysis  DrugAnalysis   DiseaseAnalysis
         \          |           /
          nexcore-pv-intelligence

The graph uses string IDs throughout. Entity crates (nexcore-pharma, nexcore-drug, nexcore-disease) supply the data; this crate supplies the query engine. They connect at runtime through the builder::GraphBuilder.

§Quick Start

use nexcore_pv_intelligence::build_top10_graph;

let graph = build_top10_graph();
let rankings = graph.safest_company_for_disease("t2dm");
assert!(!rankings.is_empty());

§T1 Primitive Grounding

ConceptPrimitiveSymbol
Graph node collectionsStateς
Edge variantsSum (Coproduct)Σ
Query pipelinesSequenceσ
Node → result transformsMappingμ
PRR / count comparisonsComparisonκ
Signal thresholdsBoundary
Numeric scoresQuantityN
Optional fieldsVoid
Constructors / buildersExistence
Serialize / DeserializePersistenceπ
Query trigger → resultCausality
build() finalizationIrreversibility

§Modules

  • graph: Node types (CompanyNode, DrugNode, DiseaseNode) and Edge enum
  • builder: GraphBuilder — consuming builder for constructing graphs
  • ranking: Result types for all query methods
  • queries: IntelligenceGraph query methods (impl block)

Re-exports§

pub use builder::GraphBuilder;
pub use graph::CompanyNode;
pub use graph::DiseaseNode;
pub use graph::DrugNode;
pub use graph::Edge;
pub use graph::IntelligenceGraph;
pub use ranking::ClassEffectResult;
pub use ranking::CompanyRanking;
pub use ranking::HeadToHead;
pub use ranking::PipelineOverlap;
pub use ranking::SafetyGap;
pub use ranking::SharedSignal;
pub use ranking::TherapeuticLandscape;

Modules§

builder
Graph builder for constructing IntelligenceGraph instances.
graph
Intelligence graph node and edge types.
queries
Intelligence query methods on IntelligenceGraph.
ranking
Result types for intelligence graph queries.

Functions§

build_top10_graph
Build a pre-seeded graph with top-10 pharma companies, key drugs, and the 10 major disease states with all ownership and indication edges.