Exemplo n.º 1
0
        private void 更新引用ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            HCViewData   vTopData  = FEmrView.ActiveSectionTopLevelData() as HCViewData;
            HCDomainInfo vDomain   = vTopData.ActiveDomain;
            HCViewData   vPageData = FEmrView.ActiveSection.Page;

            string vText = "";

            if (vTopData == vPageData)
            {
                vText = FEmrView.GetDataForwardDeGroupText(vPageData, vDomain.BeginNo);
            }
            else
            {
                vText = "";
            }

            if (vText != "")
            {
                FEmrView.BeginUpdate();
                try
                {
                    FEmrView.SetDeGroupText(vTopData, vDomain.BeginNo, vText);
                    FEmrView.FormatSection(FEmrView.ActiveSectionIndex);
                }
                finally
                {
                    FEmrView.EndUpdate();
                }
            }
        }
Exemplo n.º 2
0
        private void SyncDeGroupByStruct(HCEmrView aEmrView)
        {
            for (int i = 0; i < aEmrView.Sections.Count; i++)
            {
                HCViewData vData  = aEmrView.Sections[0].Page;
                int        vIndex = vData.Items.Count - 1;

                while (vIndex >= 0)
                {
                    if (HCDomainItem.IsBeginMark(vData.Items[vIndex]))                            // 是数据组开始位置
                    {
                        string    vDeGroupIndex = (vData.Items[vIndex] as DeGroup)[DeProp.Index]; // 数据组标识
                        DataRow[] vRows         = FDataElementSetMacro.Select("MacroType=3 and ObjID=" + vDeGroupIndex);
                        if (vRows.Length > 0)                                                     // 有该数据组的引用替换配置信息
                        {
                            // 得到指定的数据集对应的病历结构xml文档,并从xml中找该数据组的节点
                            XmlElement vXmlNode = GetDeItemNodeFromStructDoc(PatientInfo.PatID,
                                                                             int.Parse(vRows[0]["Macro"].ToString()), vDeGroupIndex);

                            if (vXmlNode != null)  // 找到了该数据组对应的节点
                            {
                                string vText = "";
                                for (int j = 0; j < vXmlNode.ChildNodes.Count; j++)
                                {
                                    vText = vText + vXmlNode.ChildNodes[j].InnerText;
                                }

                                if (vText != "")  // 得到不为空的节点内容并赋值给数据组
                                {
                                    aEmrView.SetDeGroupText(vData, vIndex, vText);
                                }
                            }
                        }
                    }

                    vIndex--;
                }
            }
        }
Exemplo n.º 3
0
        private void SyncDeGroupByStruct(HCEmrView aEmrView)
        {
            for (int i = 0; i < aEmrView.Sections.Count; i++)
            {
                HCViewData vData  = aEmrView.Sections[0].Page;
                int        vIndex = vData.Items.Count - 1;

                while (vIndex >= 0)
                {
                    if (HCDomainItem.IsBeginMark(vData.Items[vIndex]))
                    {
                        string    vDeGroupIndex = (vData.Items[vIndex] as DeGroup)[DeProp.Index];
                        DataRow[] vRows         = FDataElementSetMacro.Select("MacroType=3 and ObjID=" + vDeGroupIndex);
                        if (vRows.Length > 0)
                        {
                            XmlElement vXmlNode = GetDeItemNodeFromStructDoc(PatientInfo.PatID,
                                                                             int.Parse(vRows[0]["Macro"].ToString()), vDeGroupIndex);

                            if (vXmlNode != null)
                            {
                                string vText = "";
                                for (int j = 0; j < vXmlNode.ChildNodes.Count; j++)
                                {
                                    vText = vText + vXmlNode.ChildNodes[j].InnerText;
                                }

                                if (vText != "")
                                {
                                    aEmrView.SetDeGroupText(vData, vIndex, vText);
                                }
                            }
                        }
                    }

                    vIndex--;
                }
            }
        }