コード例 #1
0
        protected virtual CODE_PHRASE CloneCodePhrase(openehr.openehr.rm.data_types.text.CODE_PHRASE o)
        {
            CODE_PHRASE result = null;

            if (o != null)
            {
                result = new CODE_PHRASE();

                if (o.code_string() != null)
                    result.code_string = o.code_string().ToString();
                else
                    result.code_string = "";

                if (o.terminology_id() != null)
                {
                    TERMINOLOGY_ID terminologyId = new TERMINOLOGY_ID();
                    terminologyId.value = o.terminology_id().value().ToString();
                    result.terminology_id = terminologyId;
                }
            }

            return result;
        }
コード例 #2
0
        protected virtual object Visit(openehr.openehr.am.openehr_profile.data_types.text.Impl.C_CODE_PHRASE o, int depth)
        {
            C_CODE_PHRASE result = new C_CODE_PHRASE();
            CloneC_Object(result, o);

            if (o.terminology_id() != null)
            {
                TERMINOLOGY_ID terminologyId = new TERMINOLOGY_ID();
                terminologyId.value = o.terminology_id().value().ToString();
                result.terminology_id = terminologyId;
            }

            if (o.code_list() != null)
            {
                result.code_list = new string[o.code_list().count()];

                for (int i = 1; i <= result.code_list.Length; i++)
                    result.code_list[i - 1] = o.code_list().i_th(i).ToString();
            }

            if (o.has_assumed_value())
                result.assumed_value = CloneCodePhrase((openehr.openehr.rm.data_types.text.Impl.CODE_PHRASE)o.assumed_value());

            return result;
        }