% Predict blood CPY and urine TCPY levels
% Drinking water concentrations from Orestimba Creek Site 3 120 days.xlsx
% Adults 
% Cecilia Tan
% Jan 21, 2016


% Setting model parameters
use human_parameters_MRP
use preg_female_parameters
BWSW=1;			% Set BW to a fixed value	
BWST=72.9;	 % Set BW to 72.9 kg
PREG=0;			% Not pregnant
DT(1) = 0.0;
DORAL(1) = 0.0;
TSTOP=2880; 	% Exposure duration in hrs

%TO READ IN DOSES FROM AN EXCEL SPREADSHEET. must be saved as .xls
VOLUME=1.71062  % Water consumption volume in L/DAY
EVENTS=4        % Drinking frequency per day
DT = xlsRead("Drinkingwater.xls", "Creek", "A2:A482") ; % Dosing Times
AMTCDOSE=xlsRead("Drinkingwater.xls", "Creek", "B2:B482")*VOLUME/EVENTS; % Dose in ug/l 
prepare time rbcce cv urinetcpy cvo
start@nocallback

% Output RBC AChE, venous blood conc for cpf, urine TCPY conc, venous blood conc for oxon
mytable = [_time _rbcce _urinetcpy _cv*350.6 _cvo*334.5]; % Output unit ug/L for concentrations
save mytable @file='orestimba_adult_01222016.txt' @format=ascii

