nx_drug_pathway.nx source
↩ module page · 279 lines · 9948 B
1// nx_drug_pathway.nx -- GTM SUITE / INVESTIGATIONAL DRUG DEVELOPMENT rung.
2// The lawful route for a substance that has no supplement channel anywhere:
3// develop it as a MEDICINE. This models the phases, the clocks, the money,
4// and the places where siting the work abroad genuinely helps.
5//
6// IT IS NOT A MARKET-ENTRY PROBLEM, IT IS A DEVELOPMENT PROBLEM. "How do I
7// get this to market in another country" has no cheap answer, because no
8// country sells unapproved drugs to consumers -- they license them after
9// evidence. What DOES differ between countries is where you can generate
10// that evidence quickly and cheaply, and that difference is large and
11// legitimate.
12//
13// AUSTRALIA IS THE REAL ANSWER TO "SOMEWHERE ELSE". Under the CTN scheme an
14// early-phase trial is NOTIFIED to the TGA after a human research ethics
15// committee approves it, rather than waiting on a regulator's review clock --
16// so Phase 1 starts in weeks rather than months. Stack the 43.5% REFUNDABLE
17// R&D tax offset on top and early clinical work lands near a third of the US
18// cost. That is why a great many biotechs run first-in-human in Australia and
19// then take the data to FDA or EMA. It is entirely lawful, well-trodden, and
20// it is the honest version of "go abroad".
21//
22// PRIOR HUMAN DATA IS THE OTHER LEVER, AND IT IS BIGGER. A substance already
23// studied in humans may be able to rely on that record -- 505(b)(2) in the US,
24// a hybrid application in the EU -- instead of repeating the work. That is the
25// difference between a ~$120M full programme and something a fraction of it.
26// It also means two peptides that look alike commercially can be very far
27// apart developmentally: one with published clinical work has an on-ramp, one
28// with mostly rodent data does not.
29//
30// WHAT NO JURISDICTION OFFERS, ENCODED AS A FUNCTION. There is no country
31// where an unapproved drug may be sold to consumers, and a foreign approval
32// does not license a sale into a market that did not grant it. Those are
33// dp_dtc_without_approval_anywhere() and dp_foreign_approval_licenses_export(),
34// both hard 0, so a planner cannot route around them.
35//
36// COSTS ARE ORDER-OF-MAGNITUDE PLANNING FIGURES for a small peptide, in
37// THOUSANDS OF USD; durations in MONTHS. Real programmes vary by an order of
38// magnitude and most fail. dp_estimate_is_indicative() exists so nothing
39// downstream presents these as a budget.
40//
41// Grounding (cited; researcher-groundable):
42// fda_ind_30_day_safe_to_proceed
43// eu_clinical_trials_regulation_536_2014_ctis
44// tga_ctn_scheme_hrec_notification
45// austrade_rd_tax_incentive_43_5_refundable_offset
46// fdc_act_505b2_reliance_on_prior_findings
47//
48// genealogy_id: drug_development + supplement_gtm
49
50import "nx_syscalls.nx"
51const DP_MAGIC_5000: i64 = 5000
52const DP_MAGIC_3500: i64 = 3500
53const DP_MAGIC_18000: i64 = 18000
54const DP_MAGIC_90000: i64 = 90000
55const DP_MAGIC_4000: i64 = 4000
56
57// ===== Phases (sealed) ================================================
58
59const DP_PRECLINICAL: i64 = 0
60const DP_PHASE1: i64 = 1
61const DP_PHASE2: i64 = 2
62const DP_PHASE3: i64 = 3
63const DP_REVIEW: i64 = 4
64const DP_N_PHASE: i64 = 5
65
66const DP_INVALID: i64 = 0 - 1
67
68func dp_phase_name(p: i64) -> *u8 {
69 if p == DP_PRECLINICAL { return "preclinical (GLP tox + CMC)" as *u8 }
70 if p == DP_PHASE1 { return "Phase 1 (safety, first-in-human)" as *u8 }
71 if p == DP_PHASE2 { return "Phase 2 (efficacy, dose-finding)" as *u8 }
72 if p == DP_PHASE3 { return "Phase 3 (confirmatory)" as *u8 }
73 if p == DP_REVIEW { return "marketing authorisation review" as *u8 }
74 return "UNKNOWN" as *u8
75}
76
77// Order-of-magnitude cost, THOUSANDS of USD, for a small peptide.
78func dp_phase_cost_k(p: i64) -> i64 {
79 if p == DP_PRECLINICAL { return DP_MAGIC_5000 }
80 if p == DP_PHASE1 { return DP_MAGIC_3500 }
81 if p == DP_PHASE2 { return DP_MAGIC_18000 }
82 if p == DP_PHASE3 { return DP_MAGIC_90000 }
83 if p == DP_REVIEW { return DP_MAGIC_4000 }
84 return DP_INVALID
85}
86
87func dp_phase_months(p: i64) -> i64 {
88 if p == DP_PRECLINICAL { return 18 }
89 if p == DP_PHASE1 { return 15 }
90 if p == DP_PHASE2 { return 27 }
91 if p == DP_PHASE3 { return 36 }
92 if p == DP_REVIEW { return 12 }
93 return DP_INVALID
94}
95
96func dp_estimate_is_indicative(p: i64) -> i64 {
97 return 1
98}
99
100// ===== Trial jurisdictions ============================================
101
102const DP_SITE_US: i64 = 0
103const DP_SITE_EU: i64 = 1
104const DP_SITE_UK: i64 = 2
105const DP_SITE_AUSTRALIA: i64 = 3
106const DP_N_SITE: i64 = 4
107
108func dp_site_name(s: i64) -> *u8 {
109 if s == DP_SITE_US { return "United States (IND)" as *u8 }
110 if s == DP_SITE_EU { return "EU (CTR 536/2014 via CTIS)" as *u8 }
111 if s == DP_SITE_UK { return "United Kingdom (MHRA CTA)" as *u8 }
112 if s == DP_SITE_AUSTRALIA { return "Australia (CTN scheme)" as *u8 }
113 return "UNKNOWN" as *u8
114}
115
116// Days from a complete submission to being allowed to dose. The CTN scheme
117// is a NOTIFICATION after ethics approval, not a regulator review -- which is
118// the whole reason it is fast.
119func dp_authorisation_days(s: i64) -> i64 {
120 if s == DP_SITE_US { return 30 }
121 if s == DP_SITE_EU { return 60 }
122 if s == DP_SITE_UK { return 30 }
123 if s == DP_SITE_AUSTRALIA { return 10 }
124 return DP_INVALID
125}
126
127// Relative trial cost, per-mil of the US baseline.
128func dp_cost_permil_of_us(s: i64) -> i64 {
129 if s == DP_SITE_US { return 1000 }
130 if s == DP_SITE_EU { return 900 }
131 if s == DP_SITE_UK { return 850 }
132 if s == DP_SITE_AUSTRALIA { return 650 }
133 return DP_INVALID
134}
135
136// Refundable R&D tax offset, per-mil. Australia's 43.5% refundable offset for
137// eligible small companies is a CASH REBATE, not a deduction -- which is what
138// makes it decisive for a pre-revenue developer.
139func dp_rd_rebate_permil(s: i64) -> i64 {
140 if s == DP_SITE_AUSTRALIA { return 435 }
141 if s == DP_SITE_UK { return 200 }
142 return 0
143}
144
145// Net cost of a phase at a site, after the rebate, in thousands USD.
146func dp_phase_cost_at_site_k(p: i64, s: i64) -> i64 {
147 let base: i64 = dp_phase_cost_k(p)
148 if base == DP_INVALID { return DP_INVALID }
149 let mult: i64 = dp_cost_permil_of_us(s)
150 if mult == DP_INVALID { return DP_INVALID }
151 let gross: i64 = base * mult / 1000
152 let reb: i64 = dp_rd_rebate_permil(s)
153 let back: i64 = gross * reb / 1000
154 return gross - back
155}
156
157// The cheapest site for a phase. Computed, not asserted.
158func dp_cheapest_site(p: i64) -> i64 {
159 var s: i64 = 0
160 var best: i64 = DP_INVALID
161 var bestc: i64 = 0
162 while s < DP_N_SITE {
163 let c: i64 = dp_phase_cost_at_site_k(p, s)
164 if c != DP_INVALID {
165 if best == DP_INVALID { best = s; bestc = c }
166 if c < bestc { best = s; bestc = c }
167 }
168 s = s + 1
169 }
170 return best
171}
172
173// ===== Full programme =================================================
174
175func dp_full_cost_k() -> i64 {
176 var p: i64 = 0
177 var sum: i64 = 0
178 while p < DP_N_PHASE {
179 let c: i64 = dp_phase_cost_k(p)
180 if c != DP_INVALID { sum = sum + c }
181 p = p + 1
182 }
183 return sum
184}
185
186func dp_full_months() -> i64 {
187 var p: i64 = 0
188 var sum: i64 = 0
189 while p < DP_N_PHASE {
190 let m: i64 = dp_phase_months(p)
191 if m != DP_INVALID { sum = sum + m }
192 p = p + 1
193 }
194 return sum
195}
196
197// ===== Reliance on prior human data ===================================
198//
199// The single largest lever available. A substance with a published clinical
200// record may rely on it (505(b)(2) in the US, hybrid application in the EU)
201// rather than repeating the work; one with only animal data cannot.
202
203const DP_DATA_NONE: i64 = 0 // in vitro / rodent only
204const DP_DATA_PHASE1: i64 = 1 // human safety exists
205const DP_DATA_PHASE2: i64 = 2 // human efficacy signal exists
206
207func dp_reliance_available(prior: i64) -> i64 {
208 if prior == DP_DATA_PHASE1 { return 1 }
209 if prior == DP_DATA_PHASE2 { return 1 }
210 return 0
211}
212
213// Phases a programme must still fund, given prior data. Reliance abbreviates
214// the early work; it never removes Phase 3 or the review.
215func dp_phase_required(p: i64, prior: i64) -> i64 {
216 if p == DP_PHASE1 {
217 if prior >= DP_DATA_PHASE1 { return 0 }
218 }
219 if p == DP_PHASE2 {
220 if prior >= DP_DATA_PHASE2 { return 0 }
221 }
222 return 1
223}
224
225func dp_programme_cost_k(prior: i64) -> i64 {
226 var p: i64 = 0
227 var sum: i64 = 0
228 while p < DP_N_PHASE {
229 let need: i64 = dp_phase_required(p, prior)
230 if need == 1 {
231 let c: i64 = dp_phase_cost_k(p)
232 if c != DP_INVALID { sum = sum + c }
233 }
234 p = p + 1
235 }
236 return sum
237}
238
239func dp_programme_months(prior: i64) -> i64 {
240 var p: i64 = 0
241 var sum: i64 = 0
242 while p < DP_N_PHASE {
243 let need: i64 = dp_phase_required(p, prior)
244 if need == 1 {
245 let m: i64 = dp_phase_months(p)
246 if m != DP_INVALID { sum = sum + m }
247 }
248 p = p + 1
249 }
250 return sum
251}
252
253// Savings unlocked by an existing human record.
254func dp_reliance_saving_k(prior: i64) -> i64 {
255 let full: i64 = dp_programme_cost_k(DP_DATA_NONE)
256 let got: i64 = dp_programme_cost_k(prior)
257 return full - got
258}
259
260// ===== The hard limits ================================================
261//
262// Functions, not comments, so no downstream planner can route around them.
263
264// No jurisdiction permits consumer sale of an unapproved drug.
265func dp_dtc_without_approval_anywhere() -> i64 {
266 return 0
267}
268
269// An approval in one market does not license a sale into another.
270func dp_foreign_approval_licenses_export() -> i64 {
271 return 0
272}
273
274// Labelling a consumer product "research use only" does not change what it
275// is. Intended use is judged on the whole circumstance -- marketing, dosing
276// instructions, customer base -- not on a disclaimer.
277func dp_research_use_label_changes_status() -> i64 {
278 return 0
279}