Пример #1
0
        private void GetClientSummaryData()
        {
            Streamline.UserBusinessServices.DataSets.DataSetClientMedications DataSetClientMedications;
            Streamline.UserBusinessServices.ClientMedication objectClientMedications = null;
            DataSet dataSetClientSummary = null;

            Session["DataSetClientSummary"] = null;
            try
            {
                objectClientMedications = new Streamline.UserBusinessServices.ClientMedication();
                CommonFunctions.Event_Trap(this);
                string _ClientRowIdentifier    = "";
                string _ClinicianrowIdentifier = "";

                DataSetClientMedications = new Streamline.UserBusinessServices.DataSets.DataSetClientMedications();
                try
                {
                    _ClinicianrowIdentifier = ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).ClinicianRowIdentifier;
                }
                catch (Exception ex)
                {
                    if (ex.Data["CustomExceptionInformation"] == null)
                    {
                        ex.Data["CustomExceptionInformation"] = "";
                    }

                    string ParseMessage = ex.Message;
                    if (ParseMessage.Contains("Object") == true)
                    {
                        throw new Exception("Session Expired");
                    }
                }
                _ClientRowIdentifier = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientRowIdentifier;

                if (_ClientRowIdentifier != "" && _ClinicianrowIdentifier != "")
                {
                    dataSetClientSummary = objectClientMedications.DownloadClientMedicationSummary(_ClientRowIdentifier, _ClinicianrowIdentifier);
                    Session["DataSetClientMedications"] = null;
                    Session["DataSetClientSummary"]     = dataSetClientSummary;

                    DataSetClientMedications.EnforceConstraints = false;
                    DataSetClientMedications.Tables["ClientMedications"].Merge(dataSetClientSummary.Tables["ClientMedications"]);
                    DataSetClientMedications.Tables["ClientMedicationInstructions"].Merge(dataSetClientSummary.Tables["ClientMedicationInstructions"]);
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                objectClientMedications = null;
            }
        }
Пример #2
0
    /// <summary>
    /// Purpose:This function will be used to Get Client Medication Summary Data
    /// </summary>
    private void GetClientSummaryData()
    {
        Streamline.UserBusinessServices.DataSets.DataSetClientMedications DataSetClientMedications;

        try
        {
            objectClientMedications = new ClientMedication();
            //objectCommonFunctions = new ApplicationCommonFunctions();
            CommonFunctions.Event_Trap(this);
            string _ClientRowIdentifier    = "";
            string _ClinicianrowIdentifier = "";

            DataSetClientMedications = new Streamline.UserBusinessServices.DataSets.DataSetClientMedications();
            try
            {
                _ClinicianrowIdentifier = ((Streamline.BaseLayer.StreamlineIdentity)Context.User.Identity).ClinicianRowIdentifier;
            }
            catch (Exception ex)
            {
                if (ex.Data["CustomExceptionInformation"] == null)
                {
                    ex.Data["CustomExceptionInformation"] = "";
                }

                string ParseMessage = ex.Message;
                if (ParseMessage.Contains("Object") == true)
                {
                    throw new Exception("Session Expired");
                }
            }
            _ClientRowIdentifier = ((Streamline.BaseLayer.StreamlinePrinciple)Context.User).Client.ClientRowIdentifier;

            if (_ClientRowIdentifier != "" && _ClinicianrowIdentifier != "")
            {
                _DataSetClientSummary = objectClientMedications.DownloadClientMedicationSummary(_ClientRowIdentifier, _ClinicianrowIdentifier);
                Session["DataSetClientMedications"]           = null;
                Session["DataSetPrescribedClientMedications"] = null;//Added As per task#3323 By Pradeep on 4 March 2011
                Session["DataSetClientSummary"] = _DataSetClientSummary;

                DataSetClientMedications.EnforceConstraints = false;
                DataSetClientMedications.Tables["ClientMedications"].Merge(_DataSetClientSummary.Tables["ClientMedications"]);
                DataSetClientMedications.Tables["ClientMedicationInstructions"].Merge(_DataSetClientSummary.Tables["ClientMedicationInstructions"]);

                //Activate the MedicationClientPersonalInformation Control
                //MedicationClientPersonalInformation1.showEditableAllergyList = true;
                //MedicationClientPersonalInformation1.Activate();
                //LabelClientName.Text = "";
                //LabelClientName.Text = _DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString(); //DataSetClientSummary.Tables["ClientInformation"].Rows[0]["ClientInformationLabel"].ToString();
            }
        }
        catch (Exception ex)
        {
            if (ex.Data["CustomExceptionInformation"] == null)
            {
                ex.Data["CustomExceptionInformation"] = "";
            }
            else
            {
                ex.Data["CustomExceptionInformation"] = "";
            }
            if (ex.Data["DatasetInfo"] == null)
            {
                ex.Data["DatasetInfo"] = _DataSetClientSummary;
            }
            Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this);
        }
        finally
        {
            objectClientMedications = null;
            //objectCommonFunctions = null;
        }
    }