Add doc to script file
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* Pharmacokinetic Calculation Utilities
|
||||
*
|
||||
* Combines multiple dose profiles over time to create complete concentration
|
||||
* curves. Handles steady-state calculations, dose accumulation, and empty
|
||||
* value filtering for robust simulation.
|
||||
*
|
||||
* @author Andreas Weyer
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { timeToMinutes } from './timeUtils';
|
||||
import { calculateSingleDoseConcentration } from './pharmacokinetics';
|
||||
import type { Dose, Deviation, SteadyStateConfig, PkParams, ConcentrationPoint } from '../constants/defaults';
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* Pharmacokinetic Model
|
||||
*
|
||||
* Implements single-dose concentration calculations for lisdexamfetamine (LDX)
|
||||
* and its active metabolite dextroamphetamine (d-amph). Uses first-order
|
||||
* absorption and elimination kinetics.
|
||||
*
|
||||
* @author Andreas Weyer
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { LDX_TO_DAMPH_CONVERSION_FACTOR, type PkParams } from '../constants/defaults';
|
||||
|
||||
interface ConcentrationResult {
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* Dose Correction Suggestion Engine
|
||||
*
|
||||
* Generates dose correction suggestions when deviations occur from the planned
|
||||
* medication schedule. Calculates required dose adjustments and optimal timing
|
||||
* to maintain therapeutic concentrations.
|
||||
*
|
||||
* @author Andreas Weyer
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { timeToMinutes } from './timeUtils';
|
||||
import { calculateCombinedProfile } from './calculations';
|
||||
import type { Dose, Deviation, SteadyStateConfig, PkParams } from '../constants/defaults';
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
// Time utility functions
|
||||
/**
|
||||
* Time Utility Functions
|
||||
*
|
||||
* Provides time format conversion utilities for working with HH:MM time strings
|
||||
* and minute-based calculations throughout the application.
|
||||
*
|
||||
* @author Andreas Weyer
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
export const timeToMinutes = (timeStr: string): number => {
|
||||
if (!timeStr || !timeStr.includes(':')) return 0;
|
||||
const [hours, minutes] = timeStr.split(':').map(Number);
|
||||
|
||||
Reference in New Issue
Block a user