A computer-implemented method for monitoring adherence by a patient to a medication, the method comprising the steps of: obtaining timing data in respect of each dose of a medication which has been taken by a patient over a time interval; calculating an estimate of the concentration of the medication in the patient's body over the time interval based on the dose timing data, characterised in that the concentration, d ( t), is estimated by one of a family of functions of the form: or by the function: where { t s} is the set of dose timing data, α is the decay rate of the medication, p 1 and p 2 are constant exponents, and δ t s ∈ [0,1], is the technique score associated with each dose of the medication which was taken by the patient over the time interval, wherein the technique score represents an estimate of the proportion of the full dose which was received by the patient; wherein the method is further characterised by the steps of determining the proportion of time over the time interval for which the estimated concentration of the medication in the patient's body exceeds a target concentration, θ, by applying a continuous sigmoidal threshold function, σ ( t), to the estimated concentration of the medication in the patient's body over the time interval, wherein σ ( t) is a function of the concentration d ( t) and a parameter β, and wherein the threshold function has the following properties: σ ( t) ∈ [0,1]; σ ( t) → 1 as d ( t) → ∞; σ ( t) increases monotonically with d ( t) in such a way that σ ( t) ≃ 1 when d ( t) > θ and σ ( t) ≃ 0 when d ( t) < θ; σ is differentiable with respect to d ( t), β and θ; and for large values of β the threshold function approximates a step function: σ step t = { 1, d t ≥ θ 0, d t < θ, while for small values of β the transition from 0 to 1 becomes smoother; and calculating an adherence score for the patient over the time interval, wherein the adherence score represents the proportion of time for which the concentration of the medication is above the target concentration in the patient's body, wherein the adherence score is calculated either by integrating the threshold function over the time interval or by calculating a moving average of the threshold function to obtain a time-varying adherence score. obtaining timing data in respect of each dose of a medication which has been taken by a patient over a time interval; calculating an estimate of the concentration of the medication in the patient's body over the time interval based on the dose timing data, characterised in that the concentration, d ( t), is estimated by one of a family of functions of the form: or by the function: where { t s} is the set of dose timing data, α is the decay rate of the medication, p 1 and p 2 are constant exponents, and δ t s ∈ [0,1], is the technique score associated with each dose of the medication which was taken by the patient over the time interval, wherein the technique score represents an estimate of the proportion of the full dose which was received by the patient; wherein the method is further characterised by the steps of determining the proportion of time over the time interval for which the estimated concentration of the medication in the patient's body exceeds a target concentration, θ, by applying a continuous sigmoidal threshold function, σ ( t), to the estimated concentration of the medication in the patient's body over the time interval, wherein σ ( t) is a function of the concentration d ( t) and a parameter β, and wherein the threshold function has the following properties: σ ( t) ∈ [0,1]; σ ( t) → 1 as d ( t) → ∞; σ ( t) increases monotonically with d ( t) in such a way that σ ( t) ≃ 1 when d ( t) > θ and σ ( t) ≃ 0 when d ( t) < θ; σ is differentiable with respect to d ( t), β and θ; and for large values of β the threshold function approximates a step function: σ step t = { 1, d t ≥ θ 0, d t < θ, while for small values of β the transition from 0 to 1 becomes smoother; and calculating an adherence score for the patient over the time interval, wherein the adherence score represents the proportion of time for which the concentration of the medication is above the target concentration in the patient's body, wherein the adherence score is calculated either by integrating the threshold function over the time interval or by calculating a moving average of the threshold function to obtain a time-varying adherence score. σ ( t) ∈ [0,1]; σ ( t) → 1 as d ( t) → ∞; σ ( t) increases monotonically with d ( t) in such a way that σ ( t) ≃ 1 when d ( t) > θ and σ ( t) ≃ 0 when d ( t) < θ; σ is differentiable with respect to d ( t), β and θ; and for large values of β the threshold function approximates a step function: σ step t = { 1, d t ≥ θ 0, d t < θ, while for small values of β the transition from 0 to 1 becomes smoother; and calculating an adherence score for the patient over the time interval, wherein the adherence score represents the proportion of time for which the concentration of the medication is above the target concentration in the patient's body, wherein the adherence score is calculated either by integrating the threshold function over the time interval or by calculating a moving average of the threshold function to obtain a time-varying adherence score.