private AscvdClassificationResult(
     PooledCohortsEquation pooledCohortsEquation,
     AscvdRiskClassification tenYearTenYearRiskClassification,
     AscvdStatinCandidacy statinCandidacy,
     AscvdStatinRecommendation statinRecommendation,
     AscvdAspirinRecommendation aspirinRecommendation,
     List <AscvdModifiableRiskFactors> riskFactors,
     AscvdRiskClassification lifetimeRiskClassification) : this()
 {
     PooledCohortsEquation      = pooledCohortsEquation;
     LifetimeRiskClassification = lifetimeRiskClassification;
     TenYearRiskClassification  = tenYearTenYearRiskClassification;
     StatinCandidacy            = statinCandidacy;
     StatinRecommendation       = statinRecommendation;
     AspirinRecommendation      = aspirinRecommendation;
     RiskFactors = riskFactors;
 }
 internal static AscvdClassificationResult Build(
     PooledCohortsEquation pooledCohortsEquation,
     AscvdRiskClassification tenYearRiskClassification,
     AscvdStatinCandidacy statinCandidacy,
     AscvdStatinRecommendation statinRecommendation,
     AscvdAspirinRecommendation aspirinRecommendation,
     List <AscvdModifiableRiskFactors> riskFactors,
     AscvdRiskClassification lifetime)
 {
     return(new AscvdClassificationResult(
                pooledCohortsEquation,
                tenYearRiskClassification,
                statinCandidacy,
                statinRecommendation,
                aspirinRecommendation,
                riskFactors,
                lifetime));
 }
        public void Classification_GivenParams_ReturnsCorrectStatinCandicacy(GenderIdentity genderIdentity,
                                                                             int systolic, double hdl, double totalCholesterol, double ldl,
                                                                             bool diabetic, bool antiHypertensive, bool smoker, bool ascvdPresent, AscvdStatinCandidacy expected)
        {
            _patient.Gender = Gender.Build(genderIdentity);

            if (diabetic)
            {
                _patient.Comorbidities.Add(ChronicDisease.Diabetes);
            }
            if (antiHypertensive)
            {
                _patient.Comorbidities.Add(ChronicDisease.HypertensionTreated);
            }
            if (smoker)
            {
                _patient.Comorbidities.Add(ChronicDisease.TobaccoSmoker);
            }
            if (ascvdPresent)
            {
                _patient.Comorbidities.Add(ChronicDisease.DiagnosedCardiovascularDisease);
            }

            var ascvdClassification = new AscvdClassification(AscvdParameters.Build(_patient,
                                                                                    BloodPressure.Build(systolic, 75), Quantitative.Serum.CholesterolTotal(totalCholesterol),
                                                                                    Quantitative.Serum.LowDensityLipoprotein(ldl), Quantitative.Serum.HighDensityLipoprotein(hdl)));

            Assert.Equal(expected, ascvdClassification.Classification.StatinCandidacy);
        }
 public AscvdClassificationResultBuilder SetStatinCandidacy(AscvdStatinCandidacy statinCandidacy)
 {
     _statinCandidacyIsSet = true;
     _statinCandidacy      = statinCandidacy;
     return(this);
 }