コード例 #1
0
        /// <summary>
        /// 创建病历控件实体
        /// </summary>
        /// <param name="type">病历类型</param>
        /// <returns></returns>
        public static EMRControl CreateEMRRecordControl(Public.EMRType type)
        {
            Control control = new Control();

            switch (type)
            {
            case Public.EMRType.门诊病历:
                control = new 门急诊病历();
                break;

            case Public.EMRType.入院记录:
                control = new 入院记录();
                break;

            case Public.EMRType.病程记录:
                control = new 病程记录();
                break;

            case Public.EMRType.出院记录:
                control = new 出院记录();
                break;

            case Public.EMRType.死亡记录:
                control = new 死亡记录();
                break;

            case Public.EMRType.手术记录:
                control = new 手术记录();
                break;
            }
            control.Dock = DockStyle.Fill;
            return((EMRControl)control);
        }
コード例 #2
0
        /// <summary>
        /// 创建病历控件实体
        /// </summary>
        /// <param name="type">控件编码</param>
        /// <param name="xmlDoc">病历内容数据</param>
        /// <returns></returns>
        public static IEMRPrint CreateEMRPrintObject(Public.EMRType type, XmlDocument xmlDoc)
        {
            IEMRPrint control = null;

            switch (type)
            {
            case Public.EMRType.门诊病历:
                control = new 门急诊病历(xmlDoc);
                break;

            case Public.EMRType.入院记录:
                control = new 入院记录(xmlDoc);
                break;

            case Public.EMRType.病程记录:
                control = new 病程记录(xmlDoc);
                break;

            case Public.EMRType.出院记录:
                control = new 出院记录(xmlDoc);
                break;

            case Public.EMRType.死亡记录:
                control = new 死亡记录(xmlDoc);
                break;

            case Public.EMRType.手术记录:
                control = new 手术记录(xmlDoc);
                break;
            }
            return(control);
        }
コード例 #3
0
        /// <summary>
        /// 病历整体模板
        /// </summary>
        /// <param name="type">病历类型</param>
        public FrmWholeMould(Public.EMRType type)
        {
            InitializeComponent();

            _currentType        = type;
            this.btSave.Visible = false;
            this.tWMould.Nodes.Clear();
            this.tVWholeLevel.SelectedNode = this.tVWholeLevel.Nodes[2];
            tVWholeLevel_AfterSelect(null, null);
        }
コード例 #4
0
        /// <summary>
        /// 病历整体模板
        /// </summary>
        /// <param name="type">病历类型</param>
        /// <param name="value">病历数据</param>
        public FrmWholeMould(Public.EMRType type, XmlDocument value)
        {
            InitializeComponent();

            this.btSure.Visible = false;
            this.plLeft.Visible = false;
            _currentType        = type;

            _control = EMRRecordControlFactory.CreateEMRRecordControl(type, value);
            this.plCenter.AutoScroll = true;
            this.plCenter.Controls.Add(_control);
        }
コード例 #5
0
ファイル: EMRControl.cs プロジェクト: yendux/BlueCloudHIS1.2
        /// <summary>
        /// 初始化打印控件
        /// </summary>
        /// <param name="wordApp"></param>
        /// <param name="xmlDoc"></param>
        /// <param name="type"></param>
        protected void InitWordApplication(Word.Application wordApp, XmlDocument xmlDoc, Public.EMRType type)
        {
            object oMissing = Missing.Value;

            wordApp.Visible = true;
            wordApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
            //设置页边距
            wordApp.ActiveDocument.PageSetup.TopMargin    = wordApp.CentimetersToPoints(float.Parse("1"));   //上页边距
            wordApp.ActiveDocument.PageSetup.BottomMargin = wordApp.CentimetersToPoints(float.Parse("1.5")); //上页边距
            wordApp.ActiveDocument.PageSetup.LeftMargin   = wordApp.CentimetersToPoints(float.Parse("2.5")); //上页边距
            wordApp.ActiveDocument.PageSetup.RightMargin  = wordApp.CentimetersToPoints(float.Parse("2.5")); //上页边距

            //设置边线
            wordApp.ActiveDocument.Sections[1].Borders.DistanceFrom = WdBorderDistanceFrom.wdBorderDistanceFromText;
            wordApp.ActiveDocument.Sections[1].Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleNone;
            wordApp.ActiveDocument.Sections[1].Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleSingle;
            wordApp.ActiveDocument.Sections[1].Borders[WdBorderType.wdBorderLeft].LineStyle   = WdLineStyle.wdLineStyleSingle;
            wordApp.ActiveDocument.Sections[1].Borders[WdBorderType.wdBorderRight].LineStyle  = WdLineStyle.wdLineStyleNone;

            // 添加页眉
            wordApp.ActiveWindow.View.Type     = WdViewType.wdOutlineView;
            wordApp.ActiveWindow.View.SeekView = WdSeekView.wdSeekPrimaryHeader;
            object styleType = "正文";
            object style     = wordApp.ActiveDocument.Styles.get_Item(ref styleType);

            wordApp.Selection.set_Style(ref style);

            //医院名称
            wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;
            wordApp.Selection.Font.Size = 16;//字体加大
            wordApp.Selection.Font.Bold = 1;
            wordApp.Selection.TypeText(HIS.SYSTEM.BussinessLogicLayer.Classes.BaseData.WorkName);
            //标题
            wordApp.Selection.TypeParagraph();
            wordApp.Selection.Font.Size = 22;
            wordApp.Selection.Font.Bold = 1;
            wordApp.Selection.TypeText("病   历   记   录");
            wordApp.Selection.TypeParagraph();
            //wordApp.Selection.TypeText(type == HIS_EMRManager.Public.EMRType.病程记录 ? "病  程  记  录" : "病   历   记   录");

            //病人基本信息
            wordApp.Selection.Font.Size = 12;
            Word.Table table = wordApp.ActiveDocument.Tables.Add(wordApp.Selection.Range, 1, 3, ref oMissing, ref oMissing);
            wordApp.Selection.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleNone;
            wordApp.Selection.Borders.InsideLineStyle  = WdLineStyle.wdLineStyleNone;
            int    columnNo = 1;
            object step     = 1;
            object unit     = Word.WdUnits.wdCharacter;
            object extend   = Word.WdMovementType.wdExtend;

            foreach (XmlNode node in xmlDoc.SelectSingleNode("病人信息/基本信息").ChildNodes)
            {
                wordApp.Selection.Font.Size = 12;
                wordApp.Selection.Font.Bold = 0;
                wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
                wordApp.Selection.TypeText("    " + (columnNo == 2?"(第     页)":node.InnerText));
                columnNo++;
                if (columnNo <= 3)
                {
                    wordApp.Selection.Move(ref unit, ref step);
                }
                else
                {
                    unit = Word.WdUnits.wdLine;
                    wordApp.Selection.MoveDown(ref unit, ref step, ref oMissing);
                    break;
                }
            }
            //画分隔线
            //wordApp.ActiveDocument.Shapes.AddLine(70, 125, 530, 125, ref oMissing);

            wordApp.ActiveWindow.View.SeekView          = WdSeekView.wdSeekMainDocument; // 跳出页眉设置
            wordApp.Selection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter;


            wordApp.Selection.ParagraphFormat.Borders[WdBorderType.wdBorderTop].LineStyle    = WdLineStyle.wdLineStyleSingle;
            wordApp.Selection.ParagraphFormat.Borders[WdBorderType.wdBorderBottom].LineStyle = WdLineStyle.wdLineStyleNone;
            wordApp.Selection.ParagraphFormat.Borders[WdBorderType.wdBorderLeft].LineStyle   = WdLineStyle.wdLineStyleNone;
            wordApp.Selection.ParagraphFormat.Borders[WdBorderType.wdBorderRight].LineStyle  = WdLineStyle.wdLineStyleNone;

            //标题
            //wordApp.Selection.TypeParagraph();
            wordApp.Selection.Font.Size = 14;
            wordApp.Selection.Font.Bold = 1;
            wordApp.Selection.TypeText(type.ToString());
            wordApp.Selection.ParagraphFormat.LineSpacing = 20;
        }