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-intelligenceThe 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
| Concept | Primitive | Symbol |
|---|---|---|
| Graph node collections | State | ς |
| Edge variants | Sum (Coproduct) | Σ |
| Query pipelines | Sequence | σ |
| Node → result transforms | Mapping | μ |
| PRR / count comparisons | Comparison | κ |
| Signal thresholds | Boundary | ∂ |
| Numeric scores | Quantity | N |
| Optional fields | Void | ∅ |
| Constructors / builders | Existence | ∃ |
| Serialize / Deserialize | Persistence | π |
| Query trigger → result | Causality | → |
build() finalization | Irreversibility | ∝ |
§Modules
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::TherapeuticLandscape;
Modules§
- builder
- Graph builder for constructing
IntelligenceGraphinstances. - 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.