Пример #1
0
        private void RefreshLinkedChildren()
        {
            lstChildren.Items.Clear();

            System.Data.DataSet rsTemp = null;
            if (lstParents.SelectedIndex > -1)
            {
                modGlobal.gv_sql = "SELECT MeasureCode, FieldName, CMSFieldCode, cms.FieldMeasureID FROM tbl_Setup_CMSParentFieldMeasures pf, tbl_Setup_dataDef df, tbl_Setup_CMSFieldMeasures cms";
                modGlobal.gv_sql = modGlobal.gv_sql + " WHERE df.ddid = cms.ddid AND cms.FieldMeasureID = pf.FieldMeasureID ";
                modGlobal.gv_sql = modGlobal.gv_sql + " AND CMSParentCDID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstParents, lstParents.SelectedIndex);
                modGlobal.gv_sql = modGlobal.gv_sql + " order by cmsfieldcode, df.FieldName, MeasureCode ";

                rsTemp = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
                while (!rsTemp.EOF)
                {
                    lstChildren.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(rsTemp.rdoColumns["measurecode"].Value + " - " + rsTemp.rdoColumns["FieldName"].Value + " **** " + rsTemp.rdoColumns["cmsfieldcode"].Value, rsTemp.rdoColumns["fieldmeasureid"].Value));

                    rsTemp.MoveNext();
                }

                rsTemp.Close();
                //UPGRADE_NOTE: Object rsTemp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
                rsTemp = null;

                RefreshAnswerCodes();
            }
        }
Пример #2
0
        public void RefreshSummaryFields()
        {
            var LIndex          = 0;
            var Table_ListIndex = 0;

            System.Data.DataSet rsSelected = null;

            if (My.MyProject.Forms.frmIndicatorReportSetup.lstHeading.SelectedIndex == -1)
            {
                goto DoneRefreshSummaryFields;
            }

            //
            //retrieve the list of Indicators
            //
            modGlobal.gv_sql = "Select * from vuSummaryFieldNames order by fieldname";
            modGlobal.gv_rs  = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
            //
            //
            //
            modGlobal.gv_sql = "select * from vuDenominatorSummaryFields where SubGroupID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(My.MyProject.Forms.frmIndicatorReportSetup.lstHeading, My.MyProject.Forms.frmIndicatorReportSetup.lstHeading.SelectedIndex);
            rsSelected       = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
            //
            //fill the list box
            //
            lstSummaryFields.Items.Clear();
            //UPGRADE_WARNING: Couldn't resolve default property of object Table_ListIndex. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            Table_ListIndex = -1;
            //UPGRADE_WARNING: Couldn't resolve default property of object LIndex. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            LIndex = -1;
            while (!modGlobal.gv_rs.EOF)
            {
                //UPGRADE_WARNING: Couldn't resolve default property of object LIndex. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                LIndex = LIndex + 1;
                //UPGRADE_WARNING: Couldn't resolve default property of object LIndex. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                //UPGRADE_WARNING: Couldn't resolve default property of object Table_ListIndex. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                Table_ListIndex = LIndex;

                lstSummaryFields.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(modGlobal.gv_rs.rdoColumns["FieldName"].Value + " (" + modGlobal.gv_rs.rdoColumns["SubGroupID"].Value + ")", modGlobal.gv_rs.rdoColumns["SubGroupID"].Value));
                if (rsSelected.RowCount > 0)
                {
                    rsSelected.MoveFirst();
                    while (!rsSelected.EOF)
                    {
                        if (Strings.Trim(rsSelected.rdoColumns["FieldName"].Value) == Strings.Trim(modGlobal.gv_rs.rdoColumns["FieldName"].Value))
                        {
                            //UPGRADE_ISSUE: ListBox property lstSummaryFields.NewIndex was not upgraded. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="F649E068-7137-45E5-AC20-4D80A3CC70AC"'
                            lstSummaryFields.SetItemChecked(lstSummaryFields.NewIndex, true);
                        }
                        rsSelected.MoveNext();
                    }
                }
                modGlobal.gv_rs.MoveNext();
            }

            rsSelected.Close();
            //  DoneRefreshSummaryFields:
        }
Пример #3
0
        private void RefreshAnswerCodes()
        {
            System.Data.DataSet rsAnswerCD = null;
            int li_cnt = 0;

            modGlobal.gv_sql = "Select cms.FieldMeasureID, cms.measurecode, df.ddid, df.fieldname, df.cmsfieldcode ";
            modGlobal.gv_sql = modGlobal.gv_sql + " from tbl_setup_DataDef as df ";
            modGlobal.gv_sql = modGlobal.gv_sql + " inner join tbl_setup_cmsFieldMeasures as cms ";
            modGlobal.gv_sql = modGlobal.gv_sql + " on df.ddid = cms.ddid ";

            if (lstChildren.Items.Count > 0)
            {
                modGlobal.gv_sql = modGlobal.gv_sql + " WHERE cms.FieldMeasureID NOT IN (";

                for (li_cnt = 0; li_cnt <= lstChildren.Items.Count - 1; li_cnt++)
                {
                    modGlobal.gv_sql = modGlobal.gv_sql + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstChildren, li_cnt) + ",";
                }

                modGlobal.gv_sql = Strings.Mid(modGlobal.gv_sql, 1, Strings.Len(modGlobal.gv_sql) - 1) + ")";
            }

            modGlobal.gv_sql = modGlobal.gv_sql + " order by cmsfieldcode, df.FieldName, MeasureCode ";

            rsAnswerCD = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);
            lstAvailable.Items.Clear();

            while (!rsAnswerCD.EOF)
            {
                lstAvailable.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(rsAnswerCD.rdoColumns["measurecode"].Value + " - " + rsAnswerCD.rdoColumns["FieldName"].Value + " **** " + rsAnswerCD.rdoColumns["cmsfieldcode"].Value, rsAnswerCD.rdoColumns["fieldmeasureid"].Value));

                rsAnswerCD.MoveNext();
            }

            rsAnswerCD.Close();
            //UPGRADE_NOTE: Object rsAnswerCD may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
            rsAnswerCD = null;
        }
Пример #4
0
        public void RefreshFieldsToLink()
        {
            System.Data.DataSet rsTemp = null;

            //retrieve the list of table fields only if they are already a part of the cmsfieldmeasures
            modGlobal.gv_sql = " Select * from tbl_setup_DataDef, tbl_setup_tableDef ";
            modGlobal.gv_sql = modGlobal.gv_sql + " where tbl_setup_DataDef.BaseTableID = tbl_setup_tableDef.BaseTableID AND BaseTable = 'PATIENT' ";
            modGlobal.gv_sql = modGlobal.gv_sql + " order by FieldName ";

            rsTemp = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);

            cboFieldsToLink.Items.Clear();

            while (!rsTemp.EOF)
            {
                cboFieldsToLink.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(rsTemp.rdoColumns["FieldName"].Value, rsTemp.rdoColumns["DDID"].Value));
                rsTemp.MoveNext();
            }

            rsTemp.Close();
            //UPGRADE_NOTE: Object rsTemp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
            rsTemp = null;
        }
Пример #5
0
        private void cmdPrint_Click(System.Object eventSender, System.EventArgs eventArgs)
        {
            Printer Printer = new Printer();
            short   Index   = 0;
            int     li_cnt  = 0;


            System.Data.DataSet rsTemp = null;


            //  Printer.Print MSRDCGroups.Resultset!CriteriaTitle
            rsTemp = MSRDCGroups.Resultset;

            rsTemp.MoveFirst();

            while (!rsTemp.EOF)
            {
                Printer.Print(FileSystem.TAB(15), rsTemp.rdoColumns["CriteriaTitle"]);
                rsTemp.MoveNext();
            }

            Printer.Print("End of Saved Logic List");
            Printer.EndDoc();
        }
Пример #6
0
        private void RefreshParentCriteria()
        {
            string ls_display = null;

            System.Data.DataSet rs_Criteria = null;
            int    li_SetCnt    = 0;
            short  li_SetIndex  = 0;
            string ls_SetJoinOp = null;
            int    li_MaxSet    = 0;

            lstAnswerCriteria.Items.Clear();

            modGlobal.gv_sql = "SELECT CMSParentAnswerCriteriaSet, JoinOperator FROM tbl_Setup_CMSParentAnswerCriteriaSet  " + " WHERE CMSParentCDID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstParents, lstParents.SelectedIndex) + " ORDER BY CMSParentAnswerCriteriaSet";

            modGlobal.gv_rs = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenKeyset);

            if (!modGlobal.gv_rs.EOF)
            {
                modGlobal.gv_rs.MoveLast();
                li_MaxSet = modGlobal.gv_rs.RowCount;
                modGlobal.gv_rs.MoveFirst();

                while (!modGlobal.gv_rs.EOF)
                {
                    ls_SetJoinOp = modGlobal.gv_rs.rdoColumns["JoinOperator"].Value;

                    modGlobal.gv_sql = "SELECT * FROM tbl_Setup_CMSParentAnswerCriteria  " + " WHERE CMSParentCDID = " + Microsoft.VisualBasic.Compatibility.VB6.Support.GetItemData(lstParents, lstParents.SelectedIndex) + " AND  CMSParentAnswerCriteriaSet =  " + modGlobal.gv_rs.rdoColumns["CMSParentAnswerCriteriaSet"].Value + " ORDER BY CMSParentAnswerCriteriaSet, CMSParentAnswerCriteriaID";

                    rs_Criteria = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenKeyset);
                    rs_Criteria.MoveLast();
                    li_SetCnt = rs_Criteria.RowCount;
                    rs_Criteria.MoveFirst();

                    li_SetIndex = 0;

                    ls_display = "SET " + modGlobal.gv_rs.rdoColumns["CMSParentAnswerCriteriaSet"].Value + ": ( ";

                    while (!rs_Criteria.EOF)
                    {
                        li_SetIndex = li_SetIndex + 1;

                        ls_display = ls_display + "   " + rs_Criteria.rdoColumns["CriteriaTitle"].Value;

                        if (li_SetCnt == li_SetIndex)
                        {
                            if (li_SetCnt == 1)
                            {
                                ls_display = ls_display + " (" + rs_Criteria.rdoColumns["JoinOperator"].Value + ") )";
                            }
                            else
                            {
                                ls_display = ls_display + " )";
                            }
                        }
                        else
                        {
                            ls_display = ls_display + " " + rs_Criteria.rdoColumns["JoinOperator"].Value + " ";
                        }

                        lstAnswerCriteria.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(ls_display, rs_Criteria.rdoColumns["CMSParentAnswerCriteriaID"].Value));
                        ls_display = "";

                        rs_Criteria.MoveNext();
                    }

                    rs_Criteria.Close();

                    if (modGlobal.gv_rs.rdoColumns["CMSParentAnswerCriteriaSet"].Value < li_MaxSet)
                    {
                        lstAnswerCriteria.Items.Add(ls_SetJoinOp);
                    }

                    modGlobal.gv_rs.MoveNext();
                }
            }

            modGlobal.gv_rs.Close();
        }
Пример #7
0
        private void RefreshLookupTablesList()
        {
            System.Data.DataSet rsTemp = null;
            short LookupIndex          = 0;
            short thisListIndex        = 0;

            modGlobal.gv_sql = "Select * From tbl_Setup_TableDef ";
            modGlobal.gv_sql = modGlobal.gv_sql + "Where TableType = 'LOOKUP' ";
            //UPGRADE_WARNING: Couldn't resolve default property of object gv_State. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            if (string.IsNullOrEmpty(modGlobal.gv_State))
            {
                modGlobal.gv_sql = modGlobal.gv_sql + " and (State = '' or State is null) ";
            }
            else
            {
                //UPGRADE_WARNING: Couldn't resolve default property of object gv_State. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
                modGlobal.gv_sql = modGlobal.gv_sql + " and (State = '" + modGlobal.gv_State + "' or State is null)";
            }
            modGlobal.gv_sql = modGlobal.gv_sql + "Order By BaseTable";

            rsTemp = modGlobal.gv_cn.OpenResultset(modGlobal.gv_sql, RDO.ResultsetTypeConstants.rdOpenStatic);

            cboLookup.Items.Clear();

            thisListIndex = -1;
            LookupIndex   = -1;
            while (!rsTemp.EOF)
            {
                thisListIndex = thisListIndex + 1;
                cboLookup.Items.Add(new Microsoft.VisualBasic.Compatibility.VB6.ListBoxItem(rsTemp.rdoColumns["BaseTable"].Value, rsTemp.rdoColumns["basetableid"].Value));

                if (!rdcParentFields.Resultset.EOF)
                {
                    //UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="2EED02CB-5C0E-4DC1-AE94-4FAA3A30F51A"'
                    if (!Information.IsDBNull(rdcParentFields.Resultset.rdoColumns["LookupTableID"].Value))
                    {
                        if (rdcParentFields.Resultset.rdoColumns["LookupTableID"].Value == rsTemp.rdoColumns["basetableid"].Value)
                        {
                            LookupIndex = thisListIndex;
                        }
                    }
                    else
                    {
                        //YES/NO Answer CD is DEFAULT for the CMS Output file
                        //If rsTemp!BaseTable = "YES/NO" Then
                        //    LookupIndex = thisListIndex
                        //End If
                    }
                }

                rsTemp.MoveNext();
            }

            rsTemp.Close();
            //UPGRADE_NOTE: Object rsTemp may not be destroyed until it is garbage collected. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6E35BFF6-CD74-4B09-9689-3E1A43DF8969"'
            rsTemp = null;

            if (LookupIndex > -1)
            {
                cboLookup.SelectedIndex = LookupIndex;
            }
        }