For optimal control of the analgesia level during general anesthesia an objective assessment of the realtime patient's current state is necessary. Such estimates are based on the production and processing of large amounts of data. The authors developed requirements for an automated system for measuring the level of pain experienced by patients during anesthesia, methods and algorithms for implementing such a system. To assess the patient's condition, a set of indicators is used: flow data on the respiratory cycle of the patient, the spectral characteristics of the electroencephalogram and electrocardiogram; indicators of electrical conductivity of the skin; characteristics of the pulse wave; dynamics of changes in mean blood pressure, heart rate. The article presents a block diagram of the operation of the module for calculating the integral indicator of pain and shows the results of preclinical tests.