protected virtual EXPR_ITEM CloneExprItem(openehr.openehr.am.archetype.assertion.EXPR_UNARY_OPERATOR o)
        {
            EXPR_UNARY_OPERATOR result = new EXPR_UNARY_OPERATOR();

            if (o.type() != null)
                result.type = o.type().ToString();

            if (o.@operator().value() >= 2001 && o.@operator().value() <= 2020)
                result.@operator = ((OPERATOR_KIND)o.@operator().value()) - 2001;

            result.precedence_overridden = o.precedence_overridden();

            if (o.operand() != null)
                result.operand = CloneExprItem(o.operand());

            return result;
        }
        protected virtual EXPR_ITEM CloneExprItem(openehr.openehr.am.archetype.assertion.EXPR_LEAF o)
        {
            EXPR_LEAF result = new EXPR_LEAF();

            result.type = o.type().ToString();

            if (result.type.StartsWith("OE_"))
                result.type = result.type.Substring(3);

            if (o.reference_type() != null)
                result.reference_type = o.reference_type().ToString();

            switch (result.type)
            {
                case "C_STRING":
                    result.item = CloneString(o.item() as openehr.openehr.am.archetype.constraint_model.primitive.Impl.C_STRING);
                    break;

                case "String":
                    result.item = o.item().ToString();
                    break;

                default:
                    throw new NotSupportedException(result.type);
            }

            return result;
        }