예제 #1
0
        public object Translate(TranslationContext context, ASTNode node)
        {
            if (DataTypes.Equal(node.ResultType, DataTypes.DateTimeInterval))
            {
                var result = new CREFModel.DateRange();

                var beginOpen = Convert.ToBoolean(node.GetAttribute <string>("beginOpen"));
                var endOpen   = Convert.ToBoolean(node.GetAttribute <string>("endOpen"));
                if (beginOpen || endOpen)
                {
                    throw new NotSupportedException("Translation for open intervals is not supported because CREF only supports closed interval values.");
                }

                foreach (var child in node.Children)
                {
                    result.Items.Add(context.TranslateNode(child));
                }

                return(result);
            }
            else
            {
                throw new NotSupportedException("Translation for intervals with point types other than Timestamp is not supported because CREF does not support generic interval values.");
            }
        }
예제 #2
0
        public object Translate(TranslationContext context, ASTNode node)
        {
            if (DataTypes.Equal(node.ResultType, DataTypes.TimestampInterval))
            {
                var result = new CREFModel.DateRange();

                var beginOpen = Convert.ToBoolean(node.GetAttribute<string>("beginOpen"));
                var endOpen = Convert.ToBoolean(node.GetAttribute<string>("endOpen"));
                if (beginOpen || endOpen)
                {
                    throw new NotSupportedException("Translation for open intervals is not supported because CREF only supports closed interval values.");
                }

                foreach (var child in node.Children)
                {
                    result.Items.Add(context.TranslateNode(child));
                }

                return result;
            }
            else
            {
                throw new NotSupportedException("Translation for intervals with point types other than Timestamp is not supported because CREF does not support generic interval values.");
            }
        }
예제 #3
0
 public PatientQuery() {
     this.dateRangeField = new DateRange();
     this.codesField = new List<CodedValueType>();
 }