3.2. Processing the Measures
A Java application installed on a PC receives the readings through Bluetooth. The PGW 4502e scale can be configured to send measures only when the weight detected by the scale is stable. This feature is highly effective at removing transient artifacts, like those which may be produced by the nursing staff interacting with the commercial urine meter, or inadvertently touching the frame placed on top of the scale’s pan. The drawback of this feature is that the acquisition rate of scale measurements can vary: when this feature is enabled, the scale does not reply to the send measure command until the weight measured is stable.
Despite this disadvantage, we decided to use this feature because it is highly effective in removing artifacts. When the UO measure is not obtained at the expected time, cubic interpolation is used to generate a measure at the desired instant. In the cubic interpolation, we use the reading that was not taken at the desired instant, plus the three previous readings.
The acquisition sampling rate can be configured from the Java application itself, ranging from one minute to an hour. If the application waits more than five minutes for the response to the send measure command; i.e., the weight detected by the scale is not stable for more than five minutes, the program generates an audible warning to alert the healthcare staff that the device is malfunctioning.
The Java application allows the healthcare staff to inspect a graph showing the patient’s UO in milliliters per hour. Furthermore, the therapeutic goals for UO can be established using this program. These therapeutic goals are represented with the aid of the Fuzzy Set Theory, a tool which has proved its value for handling and representing experience-based heuristic knowledge, such as that commonly used in the medical domain [
14].
We shall introduce some basic concepts of the Fuzzy Set Theory which are the basis for our solution to supervise therapeutic goals. Given a discourse universe ℝ we define the concept of
fuzzy value A by means of a possibility distribution
πA defined over ℝ [
15]. Given a precise value
x ∈ ℝ,
πA(
x) ∈ [0, 1] represents the possibility of
A being precisely
x. A
fuzzy number [
16] is a normal and convex fuzzy value. A fuzzy value
A is normal if and only if ∃
x ∈ ℝ,
πA(
x) = 1.
A is said to be convex if and only if ∀
x, x′,
x″ ∈ ℝ,
x′ ∈ [
x, x″],
πA(
x′) ≥
min{
πA(
x),
πA(
x″)}.
We obtain a fuzzy number A from a flexible constraint given by a possibility distribution πA, which defines a mapping from ℝ to the real interval [0, 1]. A fuzzy constraint can be induced by an item of information such as “x has a high value”, where “high value” will be represented by πA=high. Given a precise number x ∈ ℝ, πA=high(x) ∈ [0, 1] represents the possibility of A being precisely x; i.e., the degree with which x fulfills the constraint induced by “high value”.
Normality and convexity properties are satisfied by representing
πA, for example, by means of a trapezoidal representation. In this way,
A = (
α,
β,
γ,
δ),
α ≤
β, ≤
γ ≤
δ, where [
β,
γ] represents the core,
core(
A) = {
x ∈ ℝ|
πA(
x) = 1}, and ]
α, δ[ represents the support,
supp(
A) = {
x ∈ ℝ|
πA(
x) > 0} (see
Figure 4). We have opted for the trapezoidal representation owing to its computational efficiency and the intuitiveness of its semantics. Furthermore in possibility theory, rather than the precise assignment of possibility degrees, what matters is the order of the possibility degrees attached to different values.
We shall represent the therapeutic goals for UO by the trapezoidal possibility distribution
πU. The beginning of the support of the distribution is a value such that if the patient is producing that amount of urine, or less, the patient clearly has oliguria. The beginning of the core is a value such that if the patient is producing that amount of urine, or more, the patient clearly does not have oliguria. The end of the core is a value such that if the patient is producing that amount of urine, or less, the patient clearly does not have polyuria. The end of the support is a value such that if the patient is producing that amount of urine, or more, the patient clearly has polyuria. The beginning and end of the core of the distribution limit the interval within which ideal values of UO lie;
i.e., the interval where the patient clearly has neither oliguria nor polyuria (see
Figure 4).
Given the definition we use for the beginning and end of the support and core of the distribution, the acquisition of the supervision criteria is simple and easily understood by the healthcare staff. On the other hand, by representing therapeutic goals with a possibility distribution we avoid errors produced by employing some arbitrary crisp limits when classifying the state of the patient in “oliguria”, “ideal state” and “polyuria”.
Physicians are accustomed to expressing the therapeutic goals for UO in milliliters per kilogram of patient body mass per hour (
mL/kg · h). Our tool allows them to specify the therapeutic goals—
πU—in these units. In order to be able to convert the information provided by the scale to
mL/kg · h, we also need physicians to indicate the weight of the patient—
P —(see
Figure 5). Let us suppose that the reading provided by the scale at the instant
ti−1,
i ≥ 1, is
Wi−1; and that the following reading, taken at
ti, is
Wi. The density of urine is between 1.005 and 1.035 g/mL, and has an average value of approximately 1.020 g/mL. Therefore, the amount of urine produced during the interval [
ti,
ti+1], measured in
mL/kg · h., will be:
where
P is the patient’s weight in kilograms,
Wi −
Wi−1 must be expressed in g, and
ti −
ti−1 must be expressed in hours.
πU can be interpreted as a computational projection of the piece of clinical knowledge “adequate UO”. Thus, the degree to which the therapeutic goals established for the patient are being met is given by πU (ui). If πU (ui) = 0, either UO is less than the minimum acceptable value—the patient clearly has oliguria or anuria, or it is greater than the maximum acceptable—the patient clearly has polyuria. If πU (ui) = 1, UO is within the range of ideal values. The closer πU (ui) is to 1, the closer the amount of urine produced by the patient is to the ideal value, and the closer πU (ui) is to 0, the closer the patient is to oliguria or polyuria.
πU (
ui) is useful information in assessing the patient’s state. However, a possibility degree between 0 and 1 is not the best representation of information that has to be presented to healthcare staff. A color code used when drawing the graph of UO is a much more suitable solution, and it has been used successfully by the authors on similar problems [
1,
17]. Red represents the null compatibility—the patient clearly has oliguria or polyuria–, followed by orange, pink, yellow, green and black, which represents the total compatibility—the UO lies within the range of ideal values. In this way, the UO graph provides instantaneous visual feedback on the patient’s state (see
Figure 5).
Besides providing visual feedback, a monitoring device should have audible warnings to alert the healthcare staff about serious deviations from therapeutic goals. The application produces an audible warning until it is turned off by the healthcare staff whenever πU (ui) = 0. It also produces a different audible warning when the scale does not respond to the send measure command within five minutes to warn of a malfunction in the device. Finally, the program can be configured to emit a third type of audible warning when the total urine production of the patient reaches a certain threshold. The purpose of this alarm is to alert healthcare staff when it is time to empty the plastic bag of the commercial urine meter. Before emptying the bag, the healthcare staff must click a button to indicate that this action is going to be performed. When the button is clicked, the program takes one last measure from the scale, stops monitoring, and informs the healthcare staff that the bag can be emptied. Once this process has been completed, the button must be clicked again to resume monitoring.
3.3. Accuracy of the Sensor
The main source of error in the measures is the approximate value used for urine density in
Equation 1. This value varies between 1.005 and 1.035 g/mL; thus by using the average value of 1.020 g/mL the maximum error in the measurements will be approximately 1.5%. The Java application allows healthcare staff to modify the urine density value if the exact value is known, although this is seldom the case.
The high-precision industrial scale we used has a maximum error ensured by the manufacturer of ±0.01 g. Thus, this error is negligible when compared to the error in estimating urine density. However, this error can only be applied to measurements in which an object is placed on the scales’ pan and the measure is immediately taken. When the scale is used to record continuous measurements over time, as in our application, room temperature variations can affect the scale and produce an additional source of noise.
To characterize this noise we performed several tests where the readings of the scale were recorded over 6 days, taking one reading every five minutes. The weight placed on the scale’s pan remained constant throughout each day. Therefore, deviations from the initial weight correspond to errors in the measure.
Figure 6 shows the scale readings taken during the six days. They are represented as six different time series, each one corresponding with the readings taken from 00:00:00 to 23:59:59 of every day. All measures started at 00:00:00; thus the value of all the time series in this instant is 0 g.
The public building where the measurements took place opens its doors at 07:00. Air conditioning is switched on at 07:30. The air conditioning is switched off at 18:00. The operation of air conditioning, in all probability, causes the increase in scale readings between these hours. The continued decrease that begins shortly after 18:00 very likely corresponds with the return to the initial state after the air conditioning has been switched off. During night hours, readings are quite stable.
In a critical care unit, room temperature is controlled by air conditioning 24 hours a day, usually remaining between 20° and 24° C. During our experiments, the variations in room temperature were up to 10° C. Therefore, we can conclude that, for our application, the situation shown in
Figure 6 corresponds with a worst case scenario of room temperature variation. In our tests, the maximum hourly variation on the scale readings was slightly over 0.3 g. This leads us to estimate that the maximum error produced by variations in room temperature when the device is employed in a critical care unit will always be within ±0.4 g ≃ ±0.4 mL per hour.
A third potential source of noise in the measures is caused by the characteristics of our experimental setup. A section of the plastic input tube of the commercial urine meter hangs between the frame located on top of the scale and the pole (see
Figure 2). When this tube is placed by the healthcare staff, it will not be in a stable state, but will slowly change its position until a stable state is reached. The changes in the tube position are imperceptible to the human eye and they are subtle enough to be ignored by the stability filter of the scale, but they do influence the values registered by the scale.
A flexible tube hanging between two fixed points at the mercy of gravity changes its position at an exponentially decreasing rate until it reaches stability. The longer the tube section located between two fixed points is, the faster the tube reaches its stable state. The tube’s movement can cause more of the tube’s weight to fall over the scale or over the pole (see
Figure 2). In the first case, the scale should register a weight increase, while in the second it should register a weight decrease.
To characterize this error we carried out a series of experiments in which we began to record the scale’s measurements just after the commercial urine meter was set up. The measures were taken every 10 seconds, for a total of five minutes. Experiments were conducted for different lengths of the section of the tube located between the frame placed on top of the scale and the pole. For each length, six different experiments were carried out. Results are shown in
Figure 7.
For a section length of 10 cm, the error during the first five minutes can reach ±2 g, but as the length of the section of the tube increases, the magnitude of the errors decreases. For a section length of 35 cm, the error during the first five minutes remains within ±0.4 g, We can also see how, for every section length, the error of each new reading decreases exponentially. For all section lengths, except for 10 cm, the tube is stable after five minutes. Most of the drop of the tube occurs during the first minute, and after the first 150 seconds the tube can be considered to be in a stable state, except for the 10 cm tests.
Based on these experiments, the following guidelines for using the device were developed. The minimum length of the hanging tube section must be 20 cm, although longer lengths should be used if possible. At least two and half minutes must pass from the set up of the commercial urine meter until the time at which the recording is started. Under these conditions, we estimate that the error that the movement of the tube may cause during the first five minutes of recording should be under ±0.2 g ≃ ±0.2 mL.
Waiting at least two and half minutes before the start of the monitoring should not be a major problem given that before the monitoring can start, it is necessary to perform the urethral catheterization. This process requires approximately five minutes. If the healthcare staff set ups our device just before starting the catheterization, the tube will be stable when they have finished the procedure.
In summary, we estimate that the maximum error of our device when measuring hourly UO is ±1.5% of the patient’s UO, plus ±0.4 mL caused by the room temperature variation. For the first hour of monitoring, we must add ±0.2 mL caused by the input tube movement. The patient that produces just under 40 mL of urine during the first hour of monitoring provides the worst case scenario according to the constraints imposed by our medical team. In this case, the maximum error of our device is ±(1.5%·40 mL + 0.4 mL + 0.2 mL) ≃ ±1.2 mL. The maximum error that our medical team specified for this scenario was ±3 mL.