diff --git a/Rdmp.Core/CohortCommitting/Pipeline/CohortHoldoutLookupRequest.cs b/Rdmp.Core/CohortCommitting/Pipeline/CohortHoldoutLookupRequest.cs index c47be5fe97..4c0573f569 100644 --- a/Rdmp.Core/CohortCommitting/Pipeline/CohortHoldoutLookupRequest.cs +++ b/Rdmp.Core/CohortCommitting/Pipeline/CohortHoldoutLookupRequest.cs @@ -27,12 +27,14 @@ public sealed class CohortHoldoutLookupRequest : PipelineUseCase, ICanBeSummaris public string DescriptionForAuditLog { get; set; } + public string WhereQuery { get; set; } + public string Name { get; set; } public DateTime MinDate { get; set; } public DateTime MaxDate { get; set; } public string DateColumnName { get; set; } - public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string name, int count, bool isPercent, string descriptionForAuditLog,string minDate=null,string maxDate=null,string dateColumnName=null) + public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string name, int count, bool isPercent, string descriptionForAuditLog,string whereQuery,string minDate=null,string maxDate=null,string dateColumnName=null) { CIC = cic; Name = name; @@ -46,6 +48,7 @@ public CohortHoldoutLookupRequest(CohortIdentificationConfiguration cic, string DateTime.TryParseExact(maxDate, "DD/MM/YYYY", new CultureInfo("en-GB"), DateTimeStyles.None, out _MaxDate); MinDate = _MinDate; DateColumnName = dateColumnName; + WhereQuery = whereQuery; AddInitializationObject(this); } public string GetSummary(bool includeName, bool includeId) diff --git a/Rdmp.Core/CommandExecution/BasicActivateItems.cs b/Rdmp.Core/CommandExecution/BasicActivateItems.cs index cc1734c05f..7e012f057c 100644 --- a/Rdmp.Core/CommandExecution/BasicActivateItems.cs +++ b/Rdmp.Core/CommandExecution/BasicActivateItems.cs @@ -687,7 +687,7 @@ public virtual CohortHoldoutLookupRequest GetCohortHoldoutLookupRequest(External else throw new Exception("User chose not to enter a version number and none was provided"); - return new CohortHoldoutLookupRequest(cic, "empty", 1,false,""); + return new CohortHoldoutLookupRequest(cic, "empty", 1,false,"",""); } /// diff --git a/Rdmp.UI/CohortUI/CreateHoldoutLookup/CreateHoldoutLookupUI.cs b/Rdmp.UI/CohortUI/CreateHoldoutLookup/CreateHoldoutLookupUI.cs index 0ce1ec1468..3435797a36 100644 --- a/Rdmp.UI/CohortUI/CreateHoldoutLookup/CreateHoldoutLookupUI.cs +++ b/Rdmp.UI/CohortUI/CreateHoldoutLookup/CreateHoldoutLookupUI.cs @@ -89,7 +89,8 @@ private void btnOk_Click(object sender, EventArgs e) string minDate = textBox2.Text; string maxDate = textBox3.Text; string dateColumnName = textBox4.Text; - Result = new CohortHoldoutLookupRequest(_cic, name, Decimal.ToInt32(numericUpDown1.Value), comboBox1.Text == "%", "", minDate, maxDate, dateColumnName); + string whereQuery = textBox1.Text; + Result = new CohortHoldoutLookupRequest(_cic, name, Decimal.ToInt32(numericUpDown1.Value), comboBox1.Text == "%", "", whereQuery, minDate, maxDate, dateColumnName); //see if it is passing checks var notifier = new ToMemoryCheckNotifier(); //Result.Check(notifier);