Exemplo n.º 1
0
        public void MoveTextTo(int newPosition, Guid textId)
        {
            Text aText = Texts.Find(x => x.Id == textId);

            Texts.Remove(aText);
            Texts.Insert(newPosition, aText);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:手术时间 手术项目
            if (Item == null) // 如果没有项目,则默认为显示内容为空
            {
                return;
            }

            Texts.Insert(0, new OutputInfoStruct("行 " + Item.Name.Trim(), OrderOutputTextType.ItemName));

            if (AnesthesiaOperation.KeyInitialized)
            {
                if (String.IsNullOrEmpty(AnesthesiaOperation.Name.Trim()))
                {
                    AnesthesiaOperation.ReInitializeProperties();
                }
                Texts.Insert(0, new OutputInfoStruct("在 " + AnesthesiaOperation.Name.Trim() + " 下 ", OrderOutputTextType.NormalText));
            }
            if (OperationTime > DateTime.MinValue)
            {
                Texts.Insert(0, new OutputInfoStruct(OperationTime.ToString("M月d日 HH:mm", CultureInfo.CurrentCulture) + " "
                                                     , OrderOutputTextType.EntrustContent));
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:项目 数量单位 [用法] [频次] [嘱托]
            if (Item == null) // 如果没有项目,则默认为显示内容为空
            {
                return;
            }

            string tail = ""; // 长度大于1表示已经有结尾了,已便于在各项内容间插入空格

            if (!String.IsNullOrEmpty(EntrustContent))
            {
                Texts.Insert(0, new OutputInfoStruct(EntrustContent.Trim()
                                                     , OrderOutputTextType.EntrustContent));
                tail = " ";
            }
            // 长期医嘱才显示频次
            if ((ParentOrder == null) || (ParentOrder.GetType() == typeof(LongOrder)))
            {
                if ((ItemFrequency != null) && (ItemFrequency.KeyInitialized))
                {
                    Texts.Insert(0, new OutputInfoStruct(ItemFrequency.ToString().Trim() + tail
                                                         , OrderOutputTextType.ItemFrequency));
                    if (tail.Length == 0)
                    {
                        tail = " ";
                    }
                }
            }
            if ((ItemUsage != null) && (ItemUsage.KeyInitialized))
            {
                Texts.Insert(0, new OutputInfoStruct(ItemUsage.ToString().Trim() + tail
                                                     , OrderOutputTextType.ItemUsage));
                if (tail.Length == 0)
                {
                    tail = " ";
                }
            }

            // 要根据项目的显示控制属性来决定显示的内容
            ChargeItem chargeItem = Item as ChargeItem;

            if ((chargeItem.PrintAttributes & ItemPrintAttributeFlag.NotShowAmount) == 0)
            {
                Texts.Insert(0
                             //, new OutputInfoStruct(Amount.ToString("#.##", CultureInfo.CurrentCulture) + CurrentUnit.Name.Trim() + tail
                             , new OutputInfoStruct(Amount.ToString() + CurrentUnit.Name.Trim() + tail
                                                    , OrderOutputTextType.ItemAmount));
                if (tail.Length == 0)
                {
                    tail = " ";
                }
            }

            Texts.Insert(0, new OutputInfoStruct(Item.Name.Trim() + tail
                                                 , OrderOutputTextType.ItemName));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            if (ShiftDept.KeyInitialized && ShiftWard.KeyInitialized)
            {
                Texts.Insert(0, new OutputInfoStruct(String.Format(CultureInfo.CurrentCulture, "转往 {0}[{1}]", ShiftDept.Name.Trim(), ShiftWard.Name.Trim())
                                                     , OrderOutputTextType.ItemName));
            }
            else
            {
                Texts.Insert(0, new OutputInfoStruct("转科医嘱", OrderOutputTextType.ItemName));
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:出院时间 “出院”
            if (LeaveHospitalTime == DateTime.MinValue)
            {
                Texts.Insert(0, new OutputInfoStruct("出院医嘱", OrderOutputTextType.ItemName));
            }
            else
            {
                Texts.Insert(0, new OutputInfoStruct(LeaveHospitalTime.ToString("yyyy-MM-dd HH:mm", CultureInfo.CurrentCulture) + "出院"
                                                     , OrderOutputTextType.ItemName));
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:项目 数量单位 [用法] [频次] [嘱托]
            if (Item == null) // 如果没有项目,则默认为显示内容为空
            {
                return;
            }

            string tail = ""; // 长度大于1表示已经有结尾了,已便于在各项内容间插入空格

            if ((Attributes & OrderAttributeFlag.Provide4Oneself) > 0)
            {
                Texts.Insert(0, new OutputInfoStruct("自备", OrderOutputTextType.SelfProvide));
                tail = " ";
            }
            if (!String.IsNullOrEmpty(EntrustContent))
            {
                Texts.Insert(0, new OutputInfoStruct(EntrustContent.Trim(), OrderOutputTextType.EntrustContent));
                tail = " ";
            }
            // 长期医嘱才显示频次
            if ((ParentOrder == null) || (ParentOrder.GetType() == typeof(LongOrder)))
            {
                if ((ItemFrequency != null) && (ItemFrequency.KeyInitialized))
                {
                    Texts.Insert(0, new OutputInfoStruct(ItemFrequency.ToString().Trim() + tail, OrderOutputTextType.ItemFrequency));
                    if (tail.Length == 0)
                    {
                        tail = " ";
                    }
                }
            }
            if ((ItemUsage != null) && (ItemUsage.KeyInitialized))
            {
                Texts.Insert(0, new OutputInfoStruct(ItemUsage.ToString().Trim() + tail, OrderOutputTextType.ItemUsage));
                if (tail.Length == 0)
                {
                    tail = " ";
                }
            }

            Texts.Insert(0, new OutputInfoStruct(Amount.ToString() + CurrentUnit.Name.Trim() + tail, OrderOutputTextType.ItemAmount));

            Texts.Insert(0, new OutputInfoStruct(Item.ToString().Trim() + " ", OrderOutputTextType.ItemName));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:[项目名称] 嘱托
            string tail = ""; // 长度大于1表示已经有结尾了,已便于在各项内容间插入空格

            if (!String.IsNullOrEmpty(EntrustContent))
            {
                Texts.Insert(0, new OutputInfoStruct(EntrustContent.Trim()
                                                     , OrderOutputTextType.EntrustContent));
                tail = " ";
            }
            if ((Item != null) && (Item.KeyInitialized))
            {
                Texts.Insert(0, new OutputInfoStruct(Item.ToString().Trim() + tail
                                                     , OrderOutputTextType.ItemName));
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:项目 数量单位 [用法] [频次] 天数 [嘱托]
            if (Item == null) // 如果没有项目,则默认为显示内容为空
            {
                return;
            }

            string tail = ""; // 长度大于1表示已经有结尾了,已便于在各项内容间插入空格

            if ((Attributes & OrderAttributeFlag.Provide4Oneself) > 0)
            {
                Texts.Insert(0, new OutputInfoStruct("自备", OrderOutputTextType.SelfProvide));
                tail = " ";
            }
            if (!String.IsNullOrEmpty(EntrustContent))
            {
                Texts.Insert(0, new OutputInfoStruct(EntrustContent.Trim(), OrderOutputTextType.EntrustContent));
                tail = " ";
            }
            Texts.Insert(0, new OutputInfoStruct(ExecuteDays.ToString("#'天'", CultureInfo.CurrentCulture), OrderOutputTextType.ItemDays));
            if (tail.Length == 0)
            {
                tail = " ";
            }

            if ((ItemFrequency != null) && (ItemFrequency.KeyInitialized))
            {
                Texts.Insert(0, new OutputInfoStruct(ItemFrequency.ToString().Trim() + tail, OrderOutputTextType.ItemFrequency));
            }
            if ((ItemUsage != null) && (ItemUsage.KeyInitialized))
            {
                Texts.Insert(0, new OutputInfoStruct(ItemUsage.ToString().Trim() + tail, OrderOutputTextType.ItemUsage));
            }

            Texts.Insert(0, new OutputInfoStruct(Amount.ToString("#.##", CultureInfo.CurrentCulture) + CurrentUnit.Name.Trim() + tail, OrderOutputTextType.ItemAmount));

            Texts.Insert(0, new OutputInfoStruct(Item.ToString().Trim() + tail, OrderOutputTextType.ItemName));
        }
Exemplo n.º 9
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            // 顺序为:项目 [嘱托]
            if (Item == null) // 如果没有项目,则默认为显示内容为空
            {
                return;
            }

            string tail = ""; // 长度大于1表示已经有结尾了,已便于在各项内容间插入空格

            if (EntrustContent.Length > 0)
            {
                Texts.Insert(0, new OutputInfoStruct(EntrustContent.Trim()
                                                     , OrderOutputTextType.EntrustContent));
                tail = " ";
            }
            Texts.Insert(0, new OutputInfoStruct(Item.ToString().Trim() + tail
                                                 , OrderOutputTextType.ItemName));
        }
Exemplo n.º 10
0
        /// <summary>
        /// 重设当前可显示的内容,为各项内容间加上空格
        /// </summary>
        protected override void ResetDisplayTexts()
        {
            InitBaseDisplayTexts();

            Texts.Insert(0, new OutputInfoStruct("术后医嘱", OrderOutputTextType.ItemName));
        }
Exemplo n.º 11
0
 public void PutTextAt(int position, Text aText)
 {
     aText.BodyId = this.Id;
     Texts.Insert(position, aText);
 }