Exemplo n.º 1
0
        /*
         * OR
         *      Human Case ID = 'AAA'
         *      Human Case ID = 'BBB'
         */

        private void CreateFilterCondition3(QueryFilterControl filter, out GroupOperator rootGroup)
        {
            CriteriaOperator criteria;

            rootGroup = QueryFilterControl.AddGroupOperator(null, null, null, out criteria);
            rootGroup.OperatorType = GroupOperatorType.Or;
            QueryFilterControl.AddFieldOperator(rootGroup, CaseIDAlias, StrValue1, SearchOperator.Binary, BinaryOperatorType.Equal, false);
            QueryFilterControl.AddFieldOperator(rootGroup, CaseIDAlias, StrValue2, SearchOperator.Binary, BinaryOperatorType.Equal, false);
            filter.FilterCriteria = criteria;
            filter.HasChanges     = true;
        }
Exemplo n.º 2
0
        /*
         * AND
         *      Human Case ID = 'AAA'
         *      Human Case ID = 'BBB'
         *      Exists Human Case Test
         *          AND
         *              Human case Test Type = 6618590000000 ('Anaplasma test')
         */

        private void CreateFilterCondition1(QueryFilterControl filter, out GroupOperator rootGroup, out GroupOperator aggrGroup)
        {
            CriteriaOperator criteria;

            rootGroup = QueryFilterControl.AddGroupOperator(null, null, null, out criteria);
            QueryFilterControl.AddFieldOperator(rootGroup, CaseIDAlias, StrValue1, SearchOperator.Binary, BinaryOperatorType.Equal, false);
            QueryFilterControl.AddFieldOperator(rootGroup, CaseIDAlias, StrValue2, SearchOperator.Binary, BinaryOperatorType.Equal, false);
            AggregateOperand aggrOp = QueryFilterControl.AddAggregateOperand(rootGroup, "<Human Case Test>", false);
            CriteriaOperator aggrCriteria;

            aggrGroup = QueryFilterControl.AddGroupOperator(null, null, null, out aggrCriteria);
            QueryFilterControl.AddFieldOperator(aggrGroup, TestNameAlias, TestNameIdValue, SearchOperator.Binary, BinaryOperatorType.Equal,
                                                false);
            aggrOp.Condition      = aggrCriteria;
            filter.FilterCriteria = criteria;
            filter.HasChanges     = true;
        }