Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private static ExprLeaf Map(this EXPR_LEAF model)
 {
     return(new ExprLeaf
     {
         ReferenceType = model.reference_type,
         Item = ParseExpressionItem(model.item)
     });
 }