Example #1
0
    protected long GetPatientTreatmentLookup()
    {
        long lvalue = 0;

        CPatient patTreatIDChk     = new CPatient();
        DataSet  patTreatmentIDChk = new DataSet();

        patTreatmentIDChk = patTreatIDChk.GetPatientTreatmentIdDS(Master);

        //load all available fields
        if (patTreatIDChk != null)
        {
            foreach (DataTable patTreatmentTable in patTreatmentIDChk.Tables)
            {
                foreach (DataRow patTreatmentRow in patTreatmentTable.Rows)
                {
                    if (!patTreatmentRow.IsNull("TREATMENT_ID"))
                    {
                        lvalue = Convert.ToInt64(patTreatmentRow["TREATMENT_ID"].ToString());
                    }
                }
            }
        }
        return(lvalue);
    }
Example #2
0
        public SelectDocumentForm(
            ISelectedDocumentForm form,
            bool[] existInfo,
            CPatient patientInfo,
            CHospitalization hospitalization,
            COperationWorker operationWorker,
            CDischargeEpicrisis dischargeEpicrisis,
            CGlobalSettings globalSettings)
        {
            InitializeComponent();

            _patientInfo                   = patientInfo;
            _hospitalization               = hospitalization;
            _operationWorker               = operationWorker;
            _dischargeEpicrisis            = dischargeEpicrisis;
            _globalSettings                = globalSettings;
            _selectedForm                  = form;
            _selectedForm.SelectedDocument = string.Empty;

            if (existInfo.Length != 4)
            {
                throw new ArgumentException("Lenght of existInfo array should be 4");
            }

            _existInfo = new bool[existInfo.Length];
            existInfo.CopyTo(_existInfo, 0);
            _additionalDocumentsFolderPath = Path.Combine(Application.StartupPath, AdditionalDocumentsFolderName);
        }
Example #3
0
        /// <summary>
        /// Обновить информацию о пациенте
        /// </summary>
        /// <param name="patientInfo">Информация о пациенте</param>
        public void Update(CPatient patientInfo)
        {
            CPatient tempPatient = GetByGeneralData(
                patientInfo.GetFullName(),
                patientInfo.Nosology,
                patientInfo.Id);

            if (tempPatient != null)
            {
                throw new Exception("Пациент с такими ФИО и нозологией уже содержится в базе. Измените ФИО или нозологию пациента.");
            }

            int n = 0;

            while (n < _patientList.Count && _patientList[n].Id != patientInfo.Id)
            {
                n++;
            }

            if (n == _patientList.Count)
            {
                _patientList.Add(patientInfo);
            }
            else
            {
                _patientList[n] = patientInfo;
            }

            Save();
        }
Example #4
0
        /// <summary>
        /// Удалить выделенного пациента
        /// </summary>
        /// <param name="sender">Объект, пославший сообщение</param>
        /// <param name="e">Объект, содержащий данные посланного сообщения</param>
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            try
            {
                int currentNumber = PatientList.CurrentCellAddress.Y;
                if (currentNumber < 0)
                {
                    MessageBox.ShowDialog("Нет выделенных записей", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                CPatient patientInfo = GetSelectedPatient();
                if (patientInfo.OpenedPatientViewForm != null && !patientInfo.OpenedPatientViewForm.IsDisposed)
                {
                    MessageBox.ShowDialog("Данный пациент заблокирован для удаления,\r\nтак как он в данный момент редактируется.\r\nЗакройте окно просмотра информации по данному пациенту\r\nи попробуйте ещё раз.", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                if (DialogResult.Yes == MessageBox.ShowDialog("Вы уверены, что хотите удалить все данные о пациенте " + patientInfo.GetFullName() + "?\r\nДанная операция необратима.", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
                {
                    _patientWorker.Remove(patientInfo.Id);
                }

                ShowPatients();
            }
            catch (Exception ex)
            {
                MessageBox.ShowDialog(ex.ToString(), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #5
0
        /// <summary>
        /// Скопировать переданную госпитализацию
        /// </summary>
        /// <param name="hospitalizationInfo">Госпитализация, которую надо скопировать</param>
        /// <param name="patient">Пациент, к которому относится госпитализация</param>
        public void Copy(CHospitalization hospitalizationInfo, CPatient patient)
        {
            var newHospitalization = new CHospitalization(hospitalizationInfo)
            {
                Id = GetNewID()
            };

            do
            {
                newHospitalization.DeliveryDate = newHospitalization.DeliveryDate.AddDays(1);
            }while (GetByGeneralData(
                        newHospitalization.DeliveryDate,
                        patient.GetFullName(),
                        patient.Nosology,
                        newHospitalization.Id) != null);

            _hospitalizationList.Add(newHospitalization);

            CopyHospitalizationsEssenses(
                hospitalizationInfo.Id,
                newHospitalization.Id,
                hospitalizationInfo.PatientId);

            Save();
        }
Example #6
0
        /// <summary>
        /// Обновить информацию о консультации
        /// </summary>
        /// <param name="visitInfo">Информация о консультации</param>
        /// <param name="patientInfo">Информация о пациенте</param>
        public void Update(CVisit visitInfo, CPatient patientInfo)
        {
            CVisit tempVisit = GetByGeneralData(
                visitInfo.VisitDate,
                patientInfo.GetFullName(),
                patientInfo.Nosology,
                visitInfo.Id);

            if (tempVisit != null)
            {
                throw new Exception("Консультация с такой датой для этого пациента уже содержится в базе. Измените дату или время консультации.");
            }

            int n = 0;

            while (n < _visitList.Count && _visitList[n].Id != visitInfo.Id)
            {
                n++;
            }

            if (n == _visitList.Count)
            {
                _visitList.Add(visitInfo);
            }
            else
            {
                _visitList[n] = visitInfo;
            }

            Save();
        }
Example #7
0
    protected void btndeletePatient_Click(object sender, EventArgs e)
    {
        CPatient patient = patientFactory.getByName(ddlPatientName.SelectedItem.Text);

        patientFactory.deletePatient(patient);
        Response.Redirect(Request.Url.ToString());
    }
Example #8
0
        /// <summary>
        /// Обновить информацию о госпитализации
        /// </summary>
        /// <param name="hospitalizationInfo">Информация о госпитализации</param>
        /// <param name="patientInfo">Информация о пациенте</param>
        public void Update(CHospitalization hospitalizationInfo, CPatient patientInfo)
        {
            CHospitalization tempHospitalization = GetByGeneralData(
                hospitalizationInfo.DeliveryDate,
                patientInfo.GetFullName(),
                patientInfo.Nosology,
                hospitalizationInfo.Id);

            if (tempHospitalization != null)
            {
                throw new Exception("Госпитализация для этого пациента с такой датой поступления уже содержится в базе. Измените дату или время поступления.");
            }

            int n = 0;

            while (n < _hospitalizationList.Count && _hospitalizationList[n].Id != hospitalizationInfo.Id)
            {
                n++;
            }

            if (n == _hospitalizationList.Count)
            {
                _hospitalizationList.Add(hospitalizationInfo);
            }
            else
            {
                _hospitalizationList[n] = hospitalizationInfo;
            }

            Save();
        }
Example #9
0
        /// <summary>
        /// Изменение данных об операции
        /// </summary>
        /// <param name="operationInfo">Информация про операцию</param>
        public void Update(COperation operationInfo)
        {
            CPatient         patientInfo         = _workersKeeper.PatientWorker.GetById(operationInfo.PatientId);
            CHospitalization hospitalizationInfo = _workersKeeper.HospitalizationWorker.GetById(operationInfo.HospitalizationId);

            COperation tempOperation = GetByGeneralData(
                operationInfo.Name,
                hospitalizationInfo.DeliveryDate,
                patientInfo.GetFullName(),
                patientInfo.Nosology,
                operationInfo.Id);

            if (tempOperation != null)
            {
                throw new Exception("Операция с таким названием для этой госпитализации уже содержится в базе. Измените название операции.");
            }

            int n = 0;

            while (n < _operationList.Count && _operationList[n].Id != operationInfo.Id)
            {
                n++;
            }

            if (n == _operationList.Count)
            {
                _operationList.Add(operationInfo);
            }
            else
            {
                _operationList[n] = operationInfo;
            }

            Save();
        }
Example #10
0
    protected void ddlPatientID_SelectedIndexChanged(object sender, EventArgs e)
    {
        CPatient patient = patientFactory.getById(ddlPatientID.SelectedItem.Text);

        tbPatientName2.Text             = patient.name;
        tbPatientIDCard2.Text           = patient.idcard;
        calPatientBirthday2.VisibleDate = patient.birthday;
    }
Example #11
0
    protected void ibtnSearch_Click(object sender, ImageClickEventArgs e)
    {
        string   patientName = Request.Form["tboxPatient"].ToString();
        CPatient patient     = patientFactory.getByName(patientName);
        string   pid         = patient.id;

        Response.Redirect("index.aspx?pid=" + pid);
    }
Example #12
0
    //病患資料表相關操作
    protected void btnGetByBirthday_Click(object sender, EventArgs e)
    {
        CPatient patient = patientFactory.getByBirthday(DateTime.Parse(tbBirthday.Text));

        lblPID.Text       = patient.id;
        lblPName.Text     = patient.name;
        lblPIDCard.Text   = patient.idcard;
        lblPBirthday.Text = patient.birthday.ToShortDateString();
    }
Example #13
0
    protected void GetPatientID()
    {
        CPatient   pat          = new CPatient();
        CDataUtils utils        = new CDataUtils();
        DataSet    dsPat        = pat.GetPatientIDRS(BaseMstr, BaseMstr.FXUserID);
        string     strPatientID = utils.GetDSStringValue(dsPat, "PATIENT_ID");

        BaseMstr.SelectedPatientID = strPatientID;
    }
Example #14
0
    protected void btndeletePatient_Click(object sender, EventArgs e)
    {
        if (ddlPatientName.SelectedIndex != 0)
        {
            CPatient patient = patientFactory.getByName(ddlPatientName.SelectedItem.Text);

            patientFactory.deletePatient(patient);
            Response.Redirect("patient.aspx");
        }
    }
Example #15
0
 protected void ddlPatientID_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlPatientID.SelectedIndex != 0)
     {
         CPatient patient = patientFactory.getById(ddlPatientID.SelectedItem.Text);
         tbPatientName2.Text    = patient.name;
         tbPatientIDCard2.Text  = patient.idcard;
         tbPatientBirthday.Text = patient.birthday.ToShortDateString();
     }
 }
Example #16
0
        /*Запуск хранимой процедуры по проверке пользователя на существование в БД*/
        public bool CheckUserExist(CPatient patient)
        {
            conn.Open();
            bool init              = false;
            NpgsqlTransaction t    = conn.BeginTransaction();
            NpgsqlCommand     comm = new NpgsqlCommand("\"CheckUser2\"", conn);

            NpgsqlParameter ini   = new NpgsqlParameter("ini", NpgsqlTypes.NpgsqlDbType.Varchar);
            NpgsqlParameter amb   = new NpgsqlParameter("amb", NpgsqlTypes.NpgsqlDbType.Varchar);
            NpgsqlParameter sex   = new NpgsqlParameter("sex", NpgsqlTypes.NpgsqlDbType.Varchar);
            NpgsqlParameter birth = new NpgsqlParameter("birth", NpgsqlTypes.NpgsqlDbType.Varchar);
            NpgsqlParameter child = new NpgsqlParameter("child", NpgsqlTypes.NpgsqlDbType.Varchar);
            NpgsqlParameter pid   = new NpgsqlParameter("pid", NpgsqlTypes.NpgsqlDbType.Integer);

            ini.Direction   = ParameterDirection.Input;
            amb.Direction   = ParameterDirection.Input;
            sex.Direction   = ParameterDirection.Input;
            birth.Direction = ParameterDirection.Input;
            child.Direction = ParameterDirection.Input;
            pid.Direction   = ParameterDirection.Input;

            comm.Parameters.Add(ini);
            comm.Parameters.Add(amb);
            comm.Parameters.Add(sex);
            comm.Parameters.Add(birth);
            comm.Parameters.Add(child);
            comm.Parameters.Add(pid);

            comm.Parameters[0].Value = patient.initials.surname;
            comm.Parameters[1].Value = patient.amb_card;
            comm.Parameters[2].Value = patient.sex;
            comm.Parameters[3].Value = patient.birth_date.date;
            comm.Parameters[4].Value = patient.is_child;
            comm.Parameters[5].Value = patient.pid;

            comm.CommandType = CommandType.StoredProcedure;

            try
            {
                var result = comm.ExecuteScalar();
                patient.pid = (int)result;

                if (patient.pid != 0)
                {
                    init = true;
                }
            }
            finally
            {
                t.Commit();
                conn.Close();
            }
            return(init);
        }
Example #17
0
    protected void loadEmergencyContactInput()
    {
        //demographic Emergency Contact State
        CDropDownList emergStateList        = new CDropDownList();
        CDropDownList emergRelationshipList = new CDropDownList();

        CPatient pat             = new CPatient();
        DataSet  patEmergContact = pat.GetPatientEmergencyContactDS(Master);

        //load all available fields
        if (patEmergContact != null)
        {
            foreach (DataTable patTable in patEmergContact.Tables)
            {
                foreach (DataRow patRow in patTable.Rows)
                {
                    if (!patRow.IsNull("NAME"))
                    {
                        txtEmergencyName.Text = patRow["NAME"].ToString();
                    }
                    if (!patRow.IsNull("RELATIONSHIP_ID"))
                    {
                        emergRelationshipList.SelectValue(cboEmergencyRelationship, Convert.ToString(patRow["RELATIONSHIP_ID"]));
                    }
                    if (!patRow.IsNull("ADDRESS1"))
                    {
                        txtEmergencyAddress1.Text = patRow["ADDRESS1"].ToString();
                    }
                    if (!patRow.IsNull("CITY"))
                    {
                        txtEmergencyCity.Text = patRow["CITY"].ToString();
                    }
                    if (!patRow.IsNull("POSTAL_CODE"))
                    {
                        txtEmergencyPostCode.Text = patRow["POSTAL_CODE"].ToString();
                    }
                    if (!patRow.IsNull("WORKPHONE"))
                    {
                        txtEmergencyWPhone.Text = patRow["WORKPHONE"].ToString();
                    }
                    if (!patRow.IsNull("HOMEPHONE"))
                    {
                        txtEmergencyHPhone.Text = patRow["HOMEPHONE"].ToString();
                    }
                    if (!patRow.IsNull("STATE_ID"))
                    {
                        emergStateList.SelectValue(cboEmergencyState, Convert.ToString(patRow["STATE_ID"]));
                    }
                }
            }
        }
    }
Example #18
0
    protected void LoadPatientsData()
    {
        //load users list
        CPatient patadmin   = new CPatient();
        DataSet  dsPatients = patadmin.GetPatientPortalListDS(BaseMstr);

        storePatAccount.DataSource = m_utils.GetDataTable(dsPatients);
        storePatAccount.DataBind();

        //generates user data JSON string
        ProcessPatientData(dsPatients);
        htxtPatientData.Value = utils.GetJSONString(dsPatients);
    }
Example #19
0
    protected void btnAddPatient_Click(object sender, EventArgs e)
    {
        CPatient patient = new CPatient();

        patient.name      = tbPatientName.Text;
        patient.idcard    = tbPatientIDCard.Text;
        patient.birthday  = calPatientBirthday.SelectedDate.Date;
        patient.photoPath = "pics/" + fuPatientPhoto.FileName;

        fuPatientPhoto.SaveAs(this.MapPath("pics\\") + fuPatientPhoto.FileName);

        patientFactory.addPatient(patient);
        Response.Redirect(Request.Url.ToString());
    }
Example #20
0
    protected void btnUpdatePatient_Click(object sender, EventArgs e)
    {
        CPatient patient = patientFactory.getById(ddlPatientID.SelectedItem.Text);

        patient.name      = tbPatientName2.Text;
        patient.idcard    = tbPatientIDCard2.Text;
        patient.birthday  = calPatientBirthday2.SelectedDate.Date;
        patient.photoPath = "pics/" + fuPatientPhoto2.FileName;

        fuPatientPhoto2.SaveAs(this.MapPath("pics\\") + fuPatientPhoto2.FileName);

        patientFactory.updatePatient(patient);
        Response.Redirect(Request.Url.ToString());
    }
Example #21
0
        public VisitViewForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CVisit visitInfo,
            PatientViewForm patientViewForm,
            AddUpdate action)
        {
            _stopSaveParameters = true;

            InitializeComponent();

            _additionalDocumentsFolderPath = Path.Combine(Application.StartupPath, AdditionalDocumentsFolderName);
            _workersKeeper = workersKeeper;
            _visitWorker   = workersKeeper.VisitWorker;

            _patientInfo     = patientInfo;
            _patientViewForm = patientViewForm;

            _configurationEngine = workersKeeper.ConfigurationEngine;

            _action        = action;
            _visitInfo     = visitInfo;
            _saveVisitInfo = new CVisit(_visitInfo);

            PutSurgeonsToComboBox();

            dateTimePickerVisitDate.Value     = _visitInfo.VisitDate;
            textBoxDiagnose.Text              = _visitInfo.Diagnose;
            textBoxRecommendation.Text        = _visitInfo.Recommendation;
            textBoxComments.Text              = _visitInfo.Comments;
            textBoxEvenly.Text                = _visitInfo.Evenly;
            checkBoxLastParagraph.Checked     = _visitInfo.IsLastParagraphForCertificateNeeded;
            checkBoxLastParagraphOdkb.Checked = _visitInfo.IsLastOdkbParagraphForCertificateNeeded;
            comboBoxDoctor.Text               = _visitInfo.Doctor;

            textBoxPassInfoSeries.Text          = _patientInfo.PassInformation.Series;
            textBoxPassInfoNumber.Text          = _patientInfo.PassInformation.Number;
            textBoxPassInfoSubdivisionCode.Text = _patientInfo.PassInformation.SubdivisionCode;
            textBoxPassInfoOrganization.Text    = _patientInfo.PassInformation.Organization;

            if (_patientInfo.PassInformation.DeliveryDate.HasValue)
            {
                dateTimePickerPassInfoDeliveryDate.Checked = true;
                dateTimePickerPassInfoDeliveryDate.Value   = _patientInfo.PassInformation.DeliveryDate.Value;
            }

            Text = _action == AddUpdate.Add
                ? "Добавление новой консультации"
                : "Просмотр данных о консультации";
        }
Example #22
0
        public OperationViewForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CHospitalization hospitalizationInfo,
            COperation operationInfo,
            HospitalizationViewForm hospitalizationViewForm,
            AddUpdate action)
        {
            _stopSaveParameters = true;
            InitializeComponent();

            _workersKeeper    = workersKeeper;
            _operationWorker  = workersKeeper.OperationWorker;
            _orderlyWorker    = workersKeeper.OrderlyWorker;
            _scrubNurseWorker = workersKeeper.ScrubNurseWorker;

            _patientInfo             = patientInfo;
            _hospitalizationInfo     = hospitalizationInfo;
            _hospitalizationViewForm = hospitalizationViewForm;

            _configurationEngine = workersKeeper.ConfigurationEngine;

            PutObjectsToComboBox(_orderlyWorker.OrderlyList, comboBoxOrderly);
            PutObjectsToComboBox(_scrubNurseWorker.ScrubNurseList, comboBoxScrubNurse);

            _action            = action;
            _operationInfo     = operationInfo;
            _saveOperationInfo = new COperation(_operationInfo);

            textBoxName.Text           = _operationInfo.Name;
            textBoxAssistents.Text     = ListToMultilineString(_operationInfo.Assistents);
            textBoxSurgeons.Text       = ListToMultilineString(_operationInfo.Surgeons);
            textBoxOperationTypes.Text = ListToMultilineString(_operationInfo.OperationTypes);
            comboBoxScrubNurse.Text    = _operationInfo.ScrubNurse;
            textBoxSheAnestethist.Text = _operationInfo.SheAnaesthetist;
            textBoxHeAnestethist.Text  = _operationInfo.HeAnaesthetist;
            comboBoxOrderly.Text       = _operationInfo.Orderly;

            dateTimePickerDateOfOperation.Value      = _operationInfo.DateOfOperation;
            dateTimePickerStartTimeOfOperation.Value = _operationInfo.StartTimeOfOperation;
            dateTimePickerEndTimeOfOperation.Checked = _operationInfo.EndTimeOfOperation.HasValue;
            if (_operationInfo.EndTimeOfOperation.HasValue)
            {
                dateTimePickerEndTimeOfOperation.Value = _operationInfo.EndTimeOfOperation.Value;
            }

            Text = action == AddUpdate.Add
                ? "Добавление операции"
                : "Просмотр данных об операции";
        }
Example #23
0
//-------------------------------------------------------------------------------------
//INDEX = AVERAGE OF Q1, Q3, Q6
//BMI	= WEIGHT / HEIGHT * HEIGHT NOTE: HEIGHT and WEIGHT must be in Kg and Meters)
//AGE	= years
//GENDER = 1 for male, 0 for female
//X = 8.16 + (1.299 * INDEX) + (0.163 * BMI) - (0.028 * INDEX * BMI) + (0.032 * AGE) + (1.278 * GENDER)
//
//MAP SCORE  = EXP(x)  / (1 + EXP(x))
//LRMAP = EXP(x - 0.45)
//------------------------------------------------------------------------------------
    protected bool Score(long lEncIntakeID, long lMID, long nScore, long lScoreType)
    {
        if (lScoreType == -1)
        {
            return true;
        }

        CPatient pat = new CPatient();

        long lGender = pat.GetPatientGender(Master);
        double dGender = Convert.ToDouble(lGender);

        long lAge = pat.GetPatientAge(Master);
        double dAge = Convert.ToDouble(lAge);

        double dHeight = pat.GetPatientHeight(Master);
        double dWeight = pat.GetPatientWeight(Master);

        if ((lAge == 0) || (dHeight == 0) || (dWeight == 0))
        {
            return false;
        }

        double nAvgIndex = nScore / 3;
        double dBMI = dWeight / (dHeight * dHeight);

        double dX = -8.16 + (1.299 * nAvgIndex) + (0.163 * dBMI) - (0.028 * nAvgIndex * dBMI) + (0.032 * dAge) + (1.278 * dGender);

        double dMapScore = Math.Exp(dX) / (1 + Math.Exp(dX));


        //write intake score
        //long lMapScore = Convert.ToInt64(dMapScore);

        // interpretation
        String strInterpret = "";
        if (nScore > 11)
        {
            strInterpret = "excessive daytime sleepiness";
        }


        CIntake intake = new CIntake();
        if (intake.InsertEncIntakeScore(Master, Master.SelectedEncounterID, lEncIntakeID, lMID, lScoreType, dMapScore, 0, strInterpret, 1, lGRP) == false)
        {
            return false;
        }

        return true;
    }
Example #24
0
        public HospitalizationViewForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CHospitalization hospitalizationInfo,
            PatientViewForm patientviewForm,
            AddUpdate action)
        {
            _stopSaveParameters = true;

            InitializeComponent();

            _workersKeeper         = workersKeeper;
            _hospitalizationWorker = workersKeeper.HospitalizationWorker;
            _operationWorker       = workersKeeper.OperationWorker;

            _patientInfo     = patientInfo;
            _patientViewForm = patientviewForm;

            _configurationEngine = workersKeeper.ConfigurationEngine;

            PutSurgeonsToComboBox();

            _realPrivateFolder = CConvertEngine.GetFullPrivateFolderPath(_patientInfo.PrivateFolder);

            _action = action;
            _hospitalizationInfo     = hospitalizationInfo;
            _saveHospitalizationInfo = new CHospitalization(_hospitalizationInfo);

            dateTimePickerDeliveryDate.Value = _hospitalizationInfo.DeliveryDate;
            if (_hospitalizationInfo.ReleaseDate.HasValue)
            {
                dateTimePickerReleaseDate.Checked = true;
                dateTimePickerReleaseDate.Value   = _hospitalizationInfo.ReleaseDate.Value;
            }
            else
            {
                dateTimePickerReleaseDate.Checked = false;
            }

            textBoxFotoFolderName.Text           = _hospitalizationInfo.FotoFolderName;
            textBoxCaseHistory.Text              = _hospitalizationInfo.NumberOfCaseHistory;
            textBoxDiagnose.Text                 = _hospitalizationInfo.Diagnose;
            comboBoxDoctorInChargeOfTheCase.Text = _hospitalizationInfo.DoctorInChargeOfTheCase;

            Text = _action == AddUpdate.Add
                ? "Добавление новой госпитализации"
                : "Просмотр данных о госпитализации";
        }
        public LineOfCommunicationEpicrisisForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CHospitalization hospitalizationInfo,
            CLineOfCommunicationEpicrisis lineOfCommunicationEpicrisis)
        {
            InitializeComponent();

            _patientInfo         = patientInfo;
            _hospitalizationInfo = hospitalizationInfo;
            _lineOfCommunicationEpicrisisInfo = lineOfCommunicationEpicrisis;
            _operationWorker = workersKeeper.OperationWorker;
            _lineOfCommunicationEpicrisisWorker = workersKeeper.LineOfCommunicationEpicrisisWorker;
            _globalSettings      = workersKeeper.GlobalSettings;
            _configurationEngine = workersKeeper.ConfigurationEngine;
        }
Example #26
0
        public TransferableEpicrisisForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CHospitalization hospitalizationInfo,
            CTransferableEpicrisis transferableEpicrisisInfo)
        {
            InitializeComponent();

            _patientInfo                 = patientInfo;
            _hospitalizationInfo         = hospitalizationInfo;
            _transferableEpicrisisInfo   = transferableEpicrisisInfo;
            _operationWorker             = workersKeeper.OperationWorker;
            _transferableEpicrisisWorker = workersKeeper.TransferableEpicrisisWorker;
            _globalSettings              = workersKeeper.GlobalSettings;
            _configurationEngine         = workersKeeper.ConfigurationEngine;
        }
Example #27
0
    protected string UserLoggedOn()
    {
        string     strUserName = "";
        CDataUtils utils       = new CDataUtils();


        if (this.APPMaster.UserType == (long)(SUATUserType.PATIENT))
        {
            CPatient pat = new CPatient();

            //attempt to grab the user's profile
            strUserName = pat.GetPatientUserName(this);
        }
        else
        {
            CUserAdmin RevampUser   = new CUserAdmin();
            DataSet    dsRevampUser = new DataSet();
            //attempt to grab the user's profile
            dsRevampUser = RevampUser.GetSuatUserNameDS(this);

            //load SUAT User Name Name Field
            if (dsRevampUser != null)
            {
                foreach (DataTable table0 in dsRevampUser.Tables)
                {
                    foreach (DataRow row in table0.Rows)
                    {
                        if (!row.IsNull("NAME"))
                        {
                            strUserName = row["NAME"].ToString();
                        }

                        if (!row.IsNull("GRAPH_PREF"))
                        {
                            this.GraphicOption = Convert.ToInt32(row["GRAPH_PREF"]);
                        }

                        if (!row.IsNull("DIMS_ID"))
                        {
                            this.APPMaster.UserDMISID = row["DIMS_ID"].ToString();
                        }
                    }
                }
            }
        }
        return(strUserName);
    }
Example #28
0
    protected void btnPopupPatlookupSearch_Click(object sender, EventArgs e)
    {
        divPatLookupStatus.InnerHtml = String.Empty;

        CPatient pat = new CPatient();

        string strSearchText = "";

        strSearchText = txtSearch.Text.ToUpper();

        //TIU SUPPORT - transfer MDWS patient
        if (BaseMstr.APPMaster.TIU)
        {
            //1 = last name, 2 = LSSN
            long lMatchType = Convert.ToInt32(rblSearchType.SelectedValue);
            if (lMatchType == 3)
            {
                lMatchType = 2;
            }

            //transfer patients from MDWS to revamp db
            MDWSPatientTransfer(lMatchType, strSearchText);
        }

        DataSet ds = pat.GetPatientLookupDS(BaseMstr,
                                            1,
                                            Convert.ToInt32(rblSearchType.SelectedValue),
                                            strSearchText
                                            );

        if (ds != null)
        {
            Store1.DataSource = m_utils.GetDataTable(ds);
            Store1.DataBind();

            if (ds.Tables[0].Rows.Count < 1)
            {
                ShowLookupMesage();
            }
        }
        else
        {
            ShowLookupMesage();
        }

        ScriptManager.RegisterClientScriptBlock(upPatLookup, typeof(string), "initRadios", "InitRadios();", true);
    }
Example #29
0
        /// <summary>
        /// Скопировать данные о пациенте в переданного пациента
        /// </summary>
        /// <param name="patientInfo">Информация о пациенте</param>
        public void Copy(CPatient patientInfo)
        {
            var newPatient = new CPatient(patientInfo)
            {
                Id = GetNewID()
            };

            do
            {
                newPatient.LastName += "_copy";
            }while (GetByGeneralData(newPatient.GetFullName(), newPatient.Nosology, -1) != null);

            Update(newPatient);

            _workersKeeper.HospitalizationWorker.CopyByPatientId(patientInfo.Id, newPatient.Id);
            _workersKeeper.VisitWorker.CopyByPatientId(patientInfo.Id, newPatient.Id);
        }
        public OperationProtocolForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CHospitalization hospitalizationInfo,
            COperation operationInfo,
            COperationProtocol operationProtocolInfo)
        {
            InitializeComponent();

            _patientInfo             = patientInfo;
            _hospitalizationInfo     = hospitalizationInfo;
            _operationProtocolInfo   = operationProtocolInfo;
            _operationInfo           = operationInfo;
            _operationProtocolWorker = workersKeeper.OperationProtocolWorker;
            _globalSettings          = workersKeeper.GlobalSettings;
            _configurationEngine     = workersKeeper.ConfigurationEngine;
        }