Exemple #1
0
        // sometimes occures in a transaction with insertion of new patient record
        public void InsertAppointmentRecord(Hashtable appointmentArgs, int patientId, SqlTransaction trans)
        {
            // add our appointment stuff here
            SqlCommand apptcmd = DataAccessHelper.CreateCommand(APPT_SQL, trans);             // use the transaction from above, somehow

            apptcmd.CommandType = CommandType.Text;
            DataAccessHelper.AddIntInputParam(apptcmd, "ApptPatientId", patientId);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptFirstName", (string)appointmentArgs["ApptFirstName"]);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptLastName", (string)appointmentArgs["ApptLastName"]);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptMRN", (string)appointmentArgs["ApptMRN"]);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptPhysician", (string)appointmentArgs["ApptPhysician"]);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptVisitType", (string)appointmentArgs["ApptVisitType"]);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptDept", (string)appointmentArgs["ApptDept"]);
            DataAccessHelper.AddStringInputParam(apptcmd, "ApptNotes", (string)appointmentArgs["ApptNotes"]);
            DataAccessHelper.AddDateTimeInputParam(apptcmd, "ApptClinicDate", (DateTime)appointmentArgs["ApptClinicDate"]);
            DataAccessHelper.AddDateTimeInputParam(apptcmd, "ApptTime", (DateTime)appointmentArgs["ApptTime"]);

            SecurityController sc       = new SecurityController();
            string             username = sc.GetUserName();
            DateTime           now      = DateTime.Now;

            DataAccessHelper.AddStringInputParam(apptcmd, "EnteredBy", username);
            DataAccessHelper.AddDateTimeInputParam(apptcmd, "EnteredTime", now);
            DataAccessHelper.AddStringInputParam(apptcmd, "UpdatedBy", username);
            DataAccessHelper.AddDateTimeInputParam(apptcmd, "UpdatedTime", now);

            apptcmd.ExecuteNonQuery();
        }
Exemple #2
0
        public static DataSet GetPSADTVelocity(int patientId, DateTime startDt, DateTime endDt, string PSAThreshold)
        {
            //SqlCommand com = DataAccessHelper.CreateCommand("spGetPSADTVelocity");
            SqlCommand com = DataAccessHelper.CreateCommand("spPluginPSAGraphGetPSADTVelocity");

            DataAccessHelper.AddIntInputParam(com, "PatientId", patientId);
            DataAccessHelper.AddDateTimeInputParam(com, "StartDT", startDt);
            DataAccessHelper.AddDateTimeInputParam(com, "EndDT", endDt);
            DataAccessHelper.AddStringInputParam(com, "PSAThreshold", PSAThreshold);
            DataSet ds = DataAccessHelper.GetList(com);

            return(ds);
        }