private AscvdParameters(Patient patient, BloodPressure bloodPressure, QuantitativeLab totalCholesterol, QuantitativeLab ldlCholesterol, QuantitativeLab hdlCholesterol) { Patient = patient ?? throw new ArgumentNullException(nameof(patient)); BloodPressure = bloodPressure ?? throw new ArgumentNullException(nameof(bloodPressure)); TotalCholesterol = totalCholesterol ?? throw new ArgumentNullException(nameof(totalCholesterol)); LdlCholesterol = ldlCholesterol ?? throw new ArgumentNullException(nameof(ldlCholesterol)); HdlCholesterol = hdlCholesterol ?? throw new ArgumentNullException(nameof(hdlCholesterol)); if (totalCholesterol.Type != QuantitativeLabType.CholesterolTotalSerum) { throw new InvalidEnumArgumentException( $"{nameof(totalCholesterol.Type)}. Should be {nameof(QuantitativeLabType.CholesterolTotalSerum)}"); } if (ldlCholesterol.Type != QuantitativeLabType.LowDensityLipoproteinSerum) { throw new InvalidEnumArgumentException( $"{nameof(ldlCholesterol.Type)}. Should be {nameof(QuantitativeLabType.LowDensityLipoproteinSerum)}"); } if (hdlCholesterol.Type != QuantitativeLabType.HighDensityLipoproteinSerum) { throw new InvalidEnumArgumentException( $"{nameof(hdlCholesterol.Type)}. Should be {nameof(QuantitativeLabType.HighDensityLipoproteinSerum)}"); } }
public void Build_GivenNullTotalCholesterol_ThrowsArgumentNullException() { _totalCholesterol = null; Assert.Throws <ArgumentNullException>( () => AscvdParameters.Build(_patient, _bloodPressure, _totalCholesterol, _ldlCholesterol, _hdlCholesterol)); }
public PooledCohortsEquation(PooledCohortEquationParameters parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } _hdlCholesterol = parameters.HdlCholesterol ?? throw new ArgumentNullException(nameof(parameters.HdlCholesterol)); _totalCholesterol = parameters.TotalCholesterol ?? throw new ArgumentNullException(nameof(parameters.TotalCholesterol)); _bloodPressure = parameters.BloodPressure ?? throw new ArgumentNullException(nameof(parameters.BloodPressure)); _patient = parameters.Patient ?? throw new ArgumentNullException(nameof(parameters.Patient)); _hypertensionTreatment = parameters.HypertensionTreatment; _smoker = parameters.Smoker; _diabetic = parameters.Diabetic; if (parameters.TotalCholesterol.Type != QuantitativeLabType.CholesterolTotalSerum) { throw new InvalidEnumArgumentException( $"{nameof(parameters.TotalCholesterol)} should have an enum 'Type' of {nameof(QuantitativeLabType.CholesterolTotalSerum)}."); } if (parameters.HdlCholesterol.Type != QuantitativeLabType.HighDensityLipoproteinSerum) { throw new InvalidEnumArgumentException( $"{nameof(parameters.HdlCholesterol)} should have an enum 'Type' of {nameof(QuantitativeLabType.HighDensityLipoproteinSerum)}."); } }
internal PooledCohortEquationParameters() { Patient = new Patient(); BloodPressure = new BloodPressure(); TotalCholesterol = new QuantitativeLab(); HdlCholesterol = new QuantitativeLab(); }
public static AscvdParameters Build(Patient patient, BloodPressure bloodPressure, QuantitativeLab totalCholesterol, QuantitativeLab ldlCholesterol, QuantitativeLab hdlCholesterol) { return(new AscvdParameters(patient, bloodPressure, totalCholesterol, ldlCholesterol, hdlCholesterol)); }
public CompleteBloodCountWithDifferential() { Neutrophils = new QuantitativeLab(); Lymphocytes = new QuantitativeLab(); Basophils = new QuantitativeLab(); Eosinophils = new QuantitativeLab(); Monocytes = new QuantitativeLab(); }
internal static PooledCohortEquationParameters Build( Patient patient, BloodPressure bloodPressure, QuantitativeLab totalCholesterol, QuantitativeLab hdlCholesterol) { return(new PooledCohortEquationParameters(patient, bloodPressure, totalCholesterol, hdlCholesterol)); }
public QuantitativeLabClassification( QuantitativeLabClassificationParameters quantitativeLabClassificationParameters) { _lab = quantitativeLabClassificationParameters.Lab ?? throw new ArgumentNullException(nameof(quantitativeLabClassificationParameters.Lab)); _patient = quantitativeLabClassificationParameters.Patient ?? throw new ArgumentNullException(nameof(quantitativeLabClassificationParameters.Patient)); Lab = QuantitativeLabRepository.GetLab(quantitativeLabClassificationParameters.Lab); }
public ComprehensiveMetabolicPanel() { TotalProtein = new QuantitativeLab(); Albumin = new QuantitativeLab(); AlkalinePhosphatase = new QuantitativeLab(); TotalBilirubin = new QuantitativeLab(); AlanineAminotransferase = new QuantitativeLab(); AspartateAminotransferase = new QuantitativeLab(); }
public BasicMetabolicPanel() { Sodium = new QuantitativeLab(); Potassium = new QuantitativeLab(); Chloride = new QuantitativeLab(); Bicarbonate = new QuantitativeLab(); BloodUreaNitrogen = new QuantitativeLab(); Creatinine = new QuantitativeLab(); Glucose = new QuantitativeLab(); }
private void CheckForNullParameters(AscvdParameters ascvdParameters) { _cholesterolHdlC = ascvdParameters.HdlCholesterol ?? throw new ArgumentNullException(nameof(ascvdParameters.HdlCholesterol)); _cholesterolTotal = ascvdParameters.TotalCholesterol ?? throw new ArgumentNullException(nameof(ascvdParameters.TotalCholesterol)); _ldlCholesterol = ascvdParameters.LdlCholesterol ?? throw new ArgumentNullException(nameof(ascvdParameters.LdlCholesterol)); _bloodPressure = ascvdParameters.BloodPressure ?? throw new ArgumentNullException(nameof(ascvdParameters.BloodPressure)); _patient = ascvdParameters.Patient ?? throw new ArgumentNullException(nameof(ascvdParameters.Patient)); }
public CompleteBloodCount() { WhiteBloodCells = new QuantitativeLab(); RedBloodCells = new QuantitativeLab(); MeanCorpuscularVolume = new QuantitativeLab(); MeanCorpuscularHemoglobin = new QuantitativeLab(); MeanCorpuscularHemoglobinConcentration = new QuantitativeLab(); RedCellDistributionWidth = new QuantitativeLab(); Hemoglobin = new QuantitativeLab(); Hematocrit = new QuantitativeLab(); Platelets = new QuantitativeLab(); }
private PooledCohortEquationParameters( Patient patient, BloodPressure bloodPressure, QuantitativeLab totalCholesterol, QuantitativeLab hdlCholesterol) : this() { Patient = patient ?? throw new ArgumentNullException(nameof(patient)); BloodPressure = bloodPressure ?? throw new ArgumentNullException(nameof(bloodPressure)); TotalCholesterol = totalCholesterol ?? throw new ArgumentNullException(nameof(totalCholesterol)); HdlCholesterol = hdlCholesterol ?? throw new ArgumentNullException(nameof(hdlCholesterol)); HypertensionTreatment = patient.Comorbidities.Contains(ChronicDisease.HypertensionTreated); Smoker = patient.Comorbidities.Contains(ChronicDisease.TobaccoSmoker); Diabetic = patient.Comorbidities.Contains(ChronicDisease.Diabetes); }
public AscvdParameters() { Patient = new Patient(); BloodPressure = new BloodPressure(); TotalCholesterol = new QuantitativeLab { Type = QuantitativeLabType.CholesterolTotalSerum }; HdlCholesterol = new QuantitativeLab { Type = QuantitativeLabType.HighDensityLipoproteinSerum }; LdlCholesterol = new QuantitativeLab { Type = QuantitativeLabType.LowDensityLipoproteinSerum }; }
public static QuantitativeLab WhiteBloodCells(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.WhiteBloodCellsUrine)); }
public static QuantitativeLab Glucose(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.GlucoseSerum)); }
public static QuantitativeLab Hemoglobin(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.HemoglobinUrine)); }
public static QuantitativeLab Ketones(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.KetonesUrine)); }
public static QuantitativeLabClassificationModel GetLab(QuantitativeLab lab) { return(GetAllLabs().First(l => string.Equals(l.LabName.ToString(), lab.Type.ToString(), StringComparison.CurrentCultureIgnoreCase))); }
public static QuantitativeLab LowDensityLipoprotein(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.LowDensityLipoproteinSerum)); }
public static QuantitativeLab AlanineTransaminase(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.AlanineTransaminaseSerum)); }
public static QuantitativeLab LdlParticleSizeMean(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.LdlParticleSizeMeanSerum)); }
public static QuantitativeLab CholesterolTotal(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.CholesterolTotalSerum)); }
public static QuantitativeLab Sodium(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.SodiumSerum)); }
public static QuantitativeLab CReactiveProtein(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.CReactiveProteinSerum)); }
public static QuantitativeLab Albumin(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.AlbuminSerum)); }
public static QuantitativeLab Protein(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.ProteinUrine)); }
public QuantitativeLabClassificationParameters(QuantitativeLab lab, Patient patient) { Lab = lab; Patient = patient; }
public static QuantitativeLab BilirubinTotal(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.BilirubinTotalSerum)); }
public static QuantitativeLab AlkalinePhosphatase(double result) { return(QuantitativeLab.Create(result, QuantitativeLabType.AlkalinePhosphataseSerum)); }