A method of directly or indirectly determining concentration of a second substance in a patient's blood during a medical hemodialysis treatment using a nuclear magnetic resonance sensor assembly of a hemodialysis machine, the method comprising: measuring, using the nuclear magnetic resonance sensor assembly, a quantity of a first substance in a reference fluid in a reference fluid cartridge; measuring, using the nuclear magnetic resonance sensor assembly, a quantity of the second substance in the reference fluid in the reference fluid cartridge; measuring, using the nuclear magnetic resonance sensor assembly during the medical hemodialysis treatment, a quantity of the first substance in a medical fluid in a medical fluid cartridge (500, 1500), wherein the medical fluid is one of the blood or spent dialysate of the patient undergoing the medical hemodialysis treatment and the medical fluid cartridge (500, 1500) is one of a cartridge of a blood line of the hemodialysis machine and through which the blood of the patient undergoing the medical hemodialysis treatment flows, a dialysate cartridge along a dialysate circuit of the hemodialysis machine and through which the spent dialysate of the patient undergoing the medical hemodialysis treatment flows, or a cartridge having a chamber to which the medical fluid of the patient undergoing the medical hemodialysis treatment is diverted from_the blood line or pinched off from the dialysate circuit and where the medical fluid remains static or stagnant while being tested; measuring, using the nuclear magnetic resonance sensor assembly during the medical hemodialysis treatment, a quantity of the second substance in the medical fluid in the medical fluid cartridge; and determining a concentration of the second substance in the medical fluid based on the measured quantities of the first and second substances in the reference fluid and the medical fluid. measuring, using the nuclear magnetic resonance sensor assembly, a quantity of a first substance in a reference fluid in a reference fluid cartridge; measuring, using the nuclear magnetic resonance sensor assembly, a quantity of the second substance in the reference fluid in the reference fluid cartridge; measuring, using the nuclear magnetic resonance sensor assembly during the medical hemodialysis treatment, a quantity of the first substance in a medical fluid in a medical fluid cartridge (500, 1500), wherein the medical fluid is one of the blood or spent dialysate of the patient undergoing the medical hemodialysis treatment and the medical fluid cartridge (500, 1500) is one of a cartridge of a blood line of the hemodialysis machine and through which the blood of the patient undergoing the medical hemodialysis treatment flows, a dialysate cartridge along a dialysate circuit of the hemodialysis machine and through which the spent dialysate of the patient undergoing the medical hemodialysis treatment flows, or a cartridge having a chamber to which the medical fluid of the patient undergoing the medical hemodialysis treatment is diverted from_the blood line or pinched off from the dialysate circuit and where the medical fluid remains static or stagnant while being tested; a cartridge of a blood line of the hemodialysis machine and through which the blood of the patient undergoing the medical hemodialysis treatment flows, a dialysate cartridge along a dialysate circuit of the hemodialysis machine and through which the spent dialysate of the patient undergoing the medical hemodialysis treatment flows, or a cartridge having a chamber to which the medical fluid of the patient undergoing the medical hemodialysis treatment is diverted from_the blood line or pinched off from the dialysate circuit and where the medical fluid remains static or stagnant while being tested; measuring, using the nuclear magnetic resonance sensor assembly during the medical hemodialysis treatment, a quantity of the second substance in the medical fluid in the medical fluid cartridge; and determining a concentration of the second substance in the medical fluid based on the measured quantities of the first and second substances in the reference fluid and the medical fluid.