% Predict blood CPY and urine TCPY levels
% Drinking water concentrations from Bulb Onion_GAOnion_WirringSTD_Reservoir_Parent_TSadj.xlsx
% From 12/31/1964 to 3/31/1965
% Infants 
% Cecilia Tan
% January 22, 2016

% Setting model parameters
use human_parameters_MRP
use preg_female_parameters
BWSW=1;			% Set body weight to a fixed value
BWST=4.85;	 % Set body weight to 4.85 kg for infants 
PREG=0;			% Not pregnant
DT(1) = 0.0;
DORAL(1) = 0.0;
TSTOP=2904;	%Simulation time

%TO READ IN DOSES FROM AN EXCEL SPREADSHEET. must be saved as .xls
VOLUME=0.68557  % Water consumption volume in L/DAY
EVENTS=6        % Drinking frequency per day
DT = xlsRead("Drinkingwater.xls", "infant", "A2:A728") ; % Dosing Times
AMTCDOSE=xlsRead("Drinkingwater.xls", "infant", "B2:B728")*VOLUME/EVENTS; % Dose in ug/l 

% Output RBC AChE, venous blood conc for cpf, urine TCPY conc, venous blood conc for oxon 
prepare time rbcce cv urinetcpy cvo	
start@nocallback

mytable = [_time _rbcce _urinetcpy _cv*350.6 _cvo*334.5]; % Output unit ug/L for concentrations
save mytable @file='onion_infant_01222016.txt' @format=ascii

