A high precision patient dosimetry method has been developed, based on the use of p-type diodes. First, entrance as well as exit dose calibration factors have to be determined under reference irradiation conditions. Secondly, a set of correction factors must be added for situations deviating from the reference conditions, i.e. for different source-skin distances, phantom (patient) thicknesses, field sizes or for insertion of a wedge into the photon beam. Finally some other detector characteristics such as the temperature dependence of the response have to be taken into account. For most irradiation conditions this procedure is sufficiently accurate to allow entrance as well as exit dose determinations with a diode to be in good agreement with dose values measured by an ionization chamber. The main factors affecting the value of the correction factors, the dependence of the diode sensitivity on the energy and the dose per pulse, have been investigated to explain some of the observed phenomena. Despite a strong energy dependence of the sensitivity, the correction factors are, for a particular type of diode, the same for 4 and 8 MV X-ray beams.