Пример #1
0
        public DataSet SeachData(PatientProcedureModel oClass)
        {
            string fname     = "";
            string lname     = "";
            string patientNo = oClass.PatientNo;
            string caseNo    = oClass.CaseNo;


            strSql = "SELECT A.*, Concat(B.FirstName, ' ', B.LastName) as PatientName  " +
                     "FROM " + TABLE_NAME + " A INNER JOIN " + TABLE_PATIENT + " B on A.PatientNo = B.PatientNo  Where 1=1 and A.IsDeleted = 0 ";

            if (fname != "")
            {
                strSql = strSql + "AND B." + COLUMN_FIRSTNAME + " like '%" + fname + "%' ";
            }
            if (lname != "")
            {
                strSql = strSql + "AND B." + COLUMN_LASTNAME + " like '%" + lname + "%' ";
            }
            if (patientNo != "")
            {
                strSql = strSql + "AND A." + COLUMN_PATIENT_NO + " = '" + patientNo + "' ";
            }
            if (caseNo != "")
            {
                strSql = strSql + "AND A." + COLUMN_CASE_NO + " like '%" + caseNo + "%' ";
            }

            return(Select(strSql));
        }
Пример #2
0
        public void InsertData(string currUser, PatientProcedureModel oClass)
        {
            strSql = strSql + "INSERT INTO " + TABLE_NAME + " (" +
                     COLUMN_ENCOUNTER_NO + ", " +
                     COLUMN_CASE_NO + ", " +
                     COLUMN_PATIENT_NO + ", " +
                     COLUMN_DATE + ", " +
                     COLUMN_CODE + ", " +
                     COLUMN_DESCRIPTION + ", " +
                     COLUMN_NOTES + ", " +
                     "created_by, created_date, updated_by, updated_date) ";
            strSql = strSql + "values ('" +
                     oClass.EncounterNo + "', '" +
                     oClass.CaseNo + "', '" +
                     oClass.PatientNo + "', '" +
                     oClass.StartDate.ToString("yyyy-MM-d HH:MM:ss") + "', '" +
                     oClass.Code + "', '" +
                     oClass.Description + "', '" +
                     oClass.Notes.Replace("'", "") + "', '" +
                     currUser + "', " +
                     "CurDate(), '" +
                     currUser + "', " +
                     "CurDate() " +
                     ") ";

            SaveData(strSql);
        }
Пример #3
0
        public DataSet SelectByEncounter(PatientProcedureModel oClass)
        {
            strSql = "SELECT * " +
                     "FROM " + TABLE_NAME + " " +
                     "WHERE " + COLUMN_ENCOUNTER_NO + " = '" + oClass.EncounterNo + "' ";

            return(Select(strSql));
        }
Пример #4
0
        public DataSet SelectByID(PatientProcedureModel oClass)
        {
            strSql = "SELECT * " +
                     "FROM " + TABLE_NAME + " " +
                     "WHERE " + COLUMN_ID + " = '" + oClass.ID + "' ";

            return(Select(strSql));
        }
Пример #5
0
        public void DeleteData(string user, PatientProcedureModel oClass)
        {
            strSql = "UPDATE " + TABLE_NAME + " SET " +
                     " isDeleted = 1, " +
                     " ReasonDelete = '" + oClass.ReasonDelete.Replace("'", "''") + "', " +
                     " updated_by = '" + user + "', " +
                     " updated_date = '" + DateTime.Now.ToString("yyyy-MM-d HH:MM:ss") + "' " +
                     " WHERE " + COLUMN_ID + " = '" + oClass.ID + "' ";

            SaveData(strSql);
        }
        private void PopulateOrders(string encounterNo)
        {
            PatientProcedureDAL   procedureDAL   = new PatientProcedureDAL();
            PatientProcedureModel procedureModel = new PatientProcedureModel();

            oDs = new DataSet();
            procedureModel.EncounterNo = encounterNo;
            oDs = procedureDAL.SelectByEncounter(procedureModel);
            gvOrders.DataSource = oDs.Tables[0];
            gvOrders.DataBind();
        }
        private void PopulateCpt(string encounterNo)
        {
            PatientProcedureDAL   cptDAL   = new PatientProcedureDAL();
            PatientProcedureModel cptModel = new PatientProcedureModel();

            oDs = new DataSet();
            cptModel.EncounterNo = encounterNo;
            oDs = cptDAL.SelectByEncounter(cptModel);

            gvCpt.DataSource = oDs.Tables[0];
            gvCpt.DataBind();
        }
Пример #8
0
        public void UpdateData(string user, PatientProcedureModel oClass)
        {
            strSql = "UPDATE " + TABLE_NAME + " SET " +
                     COLUMN_ENCOUNTER_NO + " = '" + oClass.EncounterNo + "', " +
                     COLUMN_CASE_NO + " = '" + oClass.CaseNo + "', " +
                     COLUMN_PATIENT_NO + " = '" + oClass.PatientNo + "', " +
                     COLUMN_DATE + " = '" + oClass.StartDate.ToString("yyyy-MM-d HH:MM:ss") + "', " +
                     COLUMN_CODE + " = '" + oClass.Code + "', " +
                     COLUMN_DESCRIPTION + " = '" + oClass.Description + "', " +
                     COLUMN_NOTES + " = '" + oClass.Notes.Replace("'", "''") + "', " +
                     " updated_by = '" + user + "', " +
                     " updated_date = '" + DateTime.Now.ToString("yyyy-MM-d HH:MM:ss") + "' " +
                     " WHERE " + COLUMN_ID + " = '" + oClass.ID + "' ";

            SaveData(strSql);
        }
Пример #9
0
        protected void DeleteProcedure_ServerClick(object sender, EventArgs e)
        {
            string UserName = Session["User"].ToString();
            int    ID       = Convert.ToInt32(HiddenFieldPatientProcedure.Value);

            PatientProcedureDAL   oProcedureDAL   = new PatientProcedureDAL();
            PatientProcedureModel oProcedureClass = new PatientProcedureModel();

            oProcedureClass.IsDeleted    = true;
            oProcedureClass.ReasonDelete = deleteCPTReason.InnerText;
            string lbl = lblPatientProcedure.Text;

            oProcedureClass.ID = ID;
            oProcedureDAL.DeleteData(UserName, oProcedureClass);

            PopulateProcedure(RefNo.Value);
        }
Пример #10
0
        protected void AddProcedure_ServerClick(object sender, EventArgs e)
        {
            string sUserName = Session["User"].ToString();

            PatientProcedureDAL   oProcedureDAL   = new PatientProcedureDAL();
            PatientProcedureModel oProcedureClass = new PatientProcedureModel();

            oProcedureClass.CaseNo      = RefNo.Value;
            oProcedureClass.Code        = txtCPTCode.Value;
            oProcedureClass.Description = txtCPTDescription.Value;
            oProcedureClass.PatientNo   = PatientNo.Value;
            oProcedureClass.StartDate   = DateTime.Now;
            oProcedureClass.Notes       = "";
            oProcedureDAL.InsertData(sUserName, oProcedureClass);

            PopulateProcedure(RefNo.Value);
        }
Пример #11
0
        private void PopulateProcedure(string caseNo)
        {
            PatientProcedureDAL   procedureDAL   = new PatientProcedureDAL();
            PatientProcedureModel procedureModel = new PatientProcedureModel();

            oDs = new DataSet();

            procedureModel.CaseNo    = caseNo;
            procedureModel.PatientNo = PatientNo.Value;
            oDs = procedureDAL.SeachData(procedureModel);

            if (oDs != null)
            {
                gvProcedure.DataSource = oDs.Tables[0];
                gvProcedure.DataBind();
            }
        }