Open TCI

  • Home
  • About Us
    • Disclaimer
    • Goals
    • Ground Rules
    • Meetings
    • Publications
  • Code
    • IVA-SIM
    • MATLAB
    • NONMEM
    • STANPUMP
    • STELPUMP
  • Data
    • Propofol
    • Remifentanil
  • Models
    • Alfentanil
    • Propofol
    • Remifentanil
  • Perspectives
    • Clinical
    • Industry
    • Regulatory
  • Contact Us

Mandel – Midazolam Barr 2001

MATLAB Code

Implements the midazolam model of Barr et al.[1]

Contributed by Jeff E Mandel

function sys = midazolam (mPatient, stepSize)
% Implements Barr model with a 5 minute tpeak
% Barr J, Zomorodi K, Bertaccini EJ, Shafer SL, Geller E. A double-blind,
% randomized comparison of i.v. lorazepam versus midazolam for sedation of
% ICU patients via a pharmacologic model. Anesthesiology. 2001;95:286-98.

    age = min(mPatient.Age,70);
    volume = 1';

    clearance = 2';

%     volume = 3;
%     clearance = [.43 .56 .39];
    
% Solve for the value of ke0 which yields a time to peak effect of 5
    % minutes. We search in the range of .1 to 2.0
    tpeak = 5;
    ike0 = [.001;2];
    t=0:.0005:25;
    u=zeros(size(t));
    u(1)=1;

    options = optimset('Display','off'); % Turn off Display
    ke0 = fzero(@getKe0, ike0, options);
    %disp(ke0);

        function [error] = getKe0(tke0)
            [sys] = mam2ss(clearance,volume,tke0);
            [y,t] = lsim(sys,u,t);
            s = lsiminfo(y,t,0);  % final value is 0
            error = tpeak - s.MaxTime;
        end

    sys = mam2ss(clearance,volume,ke0);

    if (nargin==2)
        sys=c2d(sys, stepSize,'zoh');
    end
    
    function [sys] = mam2ss(clearance,volume, ke0)
% returns a state space model from vectors of clearance
% and compartment volumes. All states are drug amount
% in the compartment; to get concentration, divide by compartment
% volume in the C matrix. Note that this code can handle an
% arbitrary number of compartments, but assumes the first compartment is
% the central compartment (mam is short for mamillary).
% The effect site compartment is represented as a compartment of negligible
% volume adjoined to the central compartment.

n = length(clearance);
if (nargin == 2)
    k1 = clearance./volume(1);
    k2 = clearance(2:n)./volume(2:n);
    A = [-sum(k1) k2;transpose(k1(2:n)) -diag(k2)];
    B = [1;zeros(n-1,1)];                   % Direct addition of drug into the central compartment
    C = [1/volume(1) zeros(1,n-1)];     % Observation of the central compartment concentration.
else
    EFFECT_VOL_FACTOR=10000; % ratio of central compartment vol to effect
    k1 = [clearance./volume(1) ke0/EFFECT_VOL_FACTOR];
    k2 = [clearance(2:n)./volume(2:n) ke0];
    A = [-sum(k1) k2;transpose(k1(2:n+1)) -diag(k2)];
    B = [1;zeros(n,1)];                   % Direct addition of drug into the central compartment
    C = [zeros(1,n) EFFECT_VOL_FACTOR/volume(1)];     % Observation of the effect site compartment concentration.
end


C = C/1000.; % All compartment volumes are in L, convert to ml
D=0;

sys = ss(A,B,C,D);
end
end

 


  1. Barr J, Zomorodi K, Bertaccini E, Shafer S, Geller E: A double-blind, randomized comparison of i.v. lorazepam versus midazolam for sedation of ICU patients via a pharmacologic model. Anesthesiology 2001; 95:286–98 PMID: 11506097
  1. 57 * (63 – age) + 0.322 * (mPatient.Weight – 78) + 33.9;
    131 ↩
  2. 006 * (mPatient.Weight – 78) + 0.296
    0.599 ↩
  3. 2 53 245 ↩

Search

Recent Posts

  • The Wrong Language
  • opentci.org finally back up!
  • Target-Controlled Infusions: Paths to Approval
  • Future TCI Issues and Industry
  • Two Important Aspects

Featured Posts

The Wrong Language

The following Clinical Perspective is contributed by Dr Tom Peck, Consultant Anaesthetist, Hampshire Hospitals NHS Foundation Trust The language of the TCI pump at induction is not the language of … [Read More...]

About Us

The Open TCI Initiative was developed initially by Dr Charles Minto (Sydney, Australia) & Professor Thomas Schnider (St Gallen, Switzerland) based on many discussions over the past years. This opentci.org website was born on 6 January 2008.

The three main goals of the Open TCI Initiative were further developed in discussion with our mentor, Professor Steven L. Shafer, on 17 January 2008 and others at the first meeting in Cape Town on 3 March 2008.

Learn more about us.

Recent Posts

  • The Wrong Language June 25, 2016
  • opentci.org finally back up! May 21, 2016
  • Target-Controlled Infusions: Paths to Approval May 21, 2016
  • Future TCI Issues and Industry June 17, 2009
  • Two Important Aspects December 19, 2008

Search

Copyright © 2025 · Executive Pro Theme on Genesis Framework · WordPress · Log in