# Sources every model file in dependency order. Used by the app and tests
# instead of packaging this as a formal R package (kept lightweight for now).
# Caller must source this file with chdir = TRUE, e.g.:
#   source("../R/load_all.R", chdir = TRUE)
# so the relative paths below resolve against R/'s own directory regardless
# of the caller's working directory.

`%||%` <- function(a, b) if (is.null(a)) b else a

files <- c(
  "pk_models.R",
  "target_engagement.R",
  "natural_history.R",
  "mechanism_core.R",
  "clinical_translation.R",
  "drug_registry.R",
  "simulate.R"
)
for (f in files) source(f)
