Ejemplo n.º 1
0
        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)}");
            }
        }
Ejemplo n.º 2
0
 public void Build_GivenNullTotalCholesterol_ThrowsArgumentNullException()
 {
     _totalCholesterol = null;
     Assert.Throws <ArgumentNullException>(
         () => AscvdParameters.Build(_patient, _bloodPressure, _totalCholesterol, _ldlCholesterol,
                                     _hdlCholesterol));
 }
Ejemplo n.º 3
0
        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();
 }
Ejemplo n.º 5
0
 public static AscvdParameters Build(Patient patient,
                                     BloodPressure bloodPressure,
                                     QuantitativeLab totalCholesterol,
                                     QuantitativeLab ldlCholesterol,
                                     QuantitativeLab hdlCholesterol)
 {
     return(new AscvdParameters(patient, bloodPressure, totalCholesterol, ldlCholesterol, hdlCholesterol));
 }
Ejemplo n.º 6
0
 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);
 }
Ejemplo n.º 9
0
 public ComprehensiveMetabolicPanel()
 {
     TotalProtein              = new QuantitativeLab();
     Albumin                   = new QuantitativeLab();
     AlkalinePhosphatase       = new QuantitativeLab();
     TotalBilirubin            = new QuantitativeLab();
     AlanineAminotransferase   = new QuantitativeLab();
     AspartateAminotransferase = new QuantitativeLab();
 }
Ejemplo n.º 10
0
 public BasicMetabolicPanel()
 {
     Sodium            = new QuantitativeLab();
     Potassium         = new QuantitativeLab();
     Chloride          = new QuantitativeLab();
     Bicarbonate       = new QuantitativeLab();
     BloodUreaNitrogen = new QuantitativeLab();
     Creatinine        = new QuantitativeLab();
     Glucose           = new QuantitativeLab();
 }
Ejemplo n.º 11
0
 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));
 }
Ejemplo n.º 12
0
 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);
 }
Ejemplo n.º 14
0
 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
     };
 }
Ejemplo n.º 15
0
 public static QuantitativeLab WhiteBloodCells(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.WhiteBloodCellsUrine));
 }
Ejemplo n.º 16
0
 public static QuantitativeLab Glucose(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.GlucoseSerum));
 }
Ejemplo n.º 17
0
 public static QuantitativeLab Hemoglobin(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.HemoglobinUrine));
 }
Ejemplo n.º 18
0
 public static QuantitativeLab Ketones(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.KetonesUrine));
 }
Ejemplo n.º 19
0
 public static QuantitativeLabClassificationModel GetLab(QuantitativeLab lab)
 {
     return(GetAllLabs().First(l =>
                               string.Equals(l.LabName.ToString(), lab.Type.ToString(), StringComparison.CurrentCultureIgnoreCase)));
 }
Ejemplo n.º 20
0
 public static QuantitativeLab LowDensityLipoprotein(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.LowDensityLipoproteinSerum));
 }
Ejemplo n.º 21
0
 public static QuantitativeLab AlanineTransaminase(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.AlanineTransaminaseSerum));
 }
Ejemplo n.º 22
0
 public static QuantitativeLab LdlParticleSizeMean(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.LdlParticleSizeMeanSerum));
 }
Ejemplo n.º 23
0
 public static QuantitativeLab CholesterolTotal(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.CholesterolTotalSerum));
 }
Ejemplo n.º 24
0
 public static QuantitativeLab Sodium(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.SodiumSerum));
 }
Ejemplo n.º 25
0
 public static QuantitativeLab CReactiveProtein(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.CReactiveProteinSerum));
 }
Ejemplo n.º 26
0
 public static QuantitativeLab Albumin(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.AlbuminSerum));
 }
Ejemplo n.º 27
0
 public static QuantitativeLab Protein(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.ProteinUrine));
 }
 public QuantitativeLabClassificationParameters(QuantitativeLab lab, Patient patient)
 {
     Lab     = lab;
     Patient = patient;
 }
Ejemplo n.º 29
0
 public static QuantitativeLab BilirubinTotal(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.BilirubinTotalSerum));
 }
Ejemplo n.º 30
0
 public static QuantitativeLab AlkalinePhosphatase(double result)
 {
     return(QuantitativeLab.Create(result, QuantitativeLabType.AlkalinePhosphataseSerum));
 }