public ParallelPatientCohortService( ISqlCompiler compiler, PatientCountAggregator patientCountAggregator, IOptions <ClinDbOptions> clinOpts, ILogger <PatientCohortService> logger) : base(compiler, clinOpts, logger) { this.patientCountAggregator = patientCountAggregator; }
public void Single_Include_Only_Should_Equal_Output() { var context = new PartialPatientCountContext[] { new PartialPatientCountContext { PatientIds = new HashSet <string> { "123", "234", "345", "456" }, IsInclusionCriteria = true } }; var agg = new PatientCountAggregator().Aggregate(context); Assert.True(agg.SequenceEqual(context.ElementAt(0).PatientIds)); }
public void Complex_Context_Aggregates_Correctly() { var context = new PartialPatientCountContext[] { new PartialPatientCountContext { PatientIds = new HashSet <string> { "123", "234", "345", "456" }, IsInclusionCriteria = true }, new PartialPatientCountContext { PatientIds = new HashSet <string> { "234", "345", "456" }, IsInclusionCriteria = true }, new PartialPatientCountContext { PatientIds = new HashSet <string> { "456" }, IsInclusionCriteria = false } }; var expected = new string[] { "234", "345" }; var agg = new PatientCountAggregator().Aggregate(context); Assert.True(expected.SequenceEqual(agg)); }