Ejemplo n.º 1
0
        public void LogUse(int MedicID, int ProgramID)
        {
            string sIPAddress;

            sIPAddress = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
            if (sIPAddress == null)
            {
                sIPAddress = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
            }

            string sp;

            sp = "wsAddIntranetLog";

            SqlParameter Param1 = new SqlParameter("@MedicID", MedicID);
            SqlParameter Param2 = new SqlParameter("@ProgramID", ProgramID);
            SqlParameter Param3 = new SqlParameter("@IPAddress", sIPAddress);

            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(Param1);
            parameters.Add(Param2);
            parameters.Add(Param3);

            clsUtility.ExecuteSP(sp, parameters);
        }
Ejemplo n.º 2
0
        //Updates a patients entry
        public int updatePatient(Patients pInfo, int PatientID)
        {
            clsUtility.Connection = getConnectionString();
            Type type = pInfo.GetType();

            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();

            foreach (PropertyInfo pi in type.GetProperties())
            {
                if (pi.GetValue(pInfo, null) == null)
                {
                    parameters.Add(new SqlParameter("@" + pi.Name, ""));
                }
                else
                {
                    parameters.Add(new SqlParameter("@" + pi.Name, pi.GetValue(pInfo, null).ToString()));
                }
            }

            parameters.Add(new SqlParameter("@EncounterStatus", "I"));
            parameters.Add(new SqlParameter("@Medic", Int32.Parse(HttpContext.Current.Session["MedicPK"].ToString())));
            parameters.Add(new SqlParameter("@PatientID", PatientID));

            int pKey = clsUtility.ExecuteSP_RETURN_VALUE("UpdatePatient", parameters);

            return(pKey);
        }
Ejemplo n.º 3
0
        public void deleteVitals(int PatientID, int VitalID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@VitalSignID", VitalID));
            parameters.Add(new SqlParameter("@PatientID", PatientID));

            clsUtility.ExecuteSP("deleteVitals", parameters);
        }
Ejemplo n.º 4
0
        public void deleteMedication(int PatientID, int MedicationID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));
            parameters.Add(new SqlParameter("@MedicationID", MedicationID));

            clsUtility.ExecuteSP("deleteMedication", parameters);
        }
Ejemplo n.º 5
0
        public void newAllergy(int AllergyID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@AllergyID", AllergyID));
            parameters.Add(new SqlParameter("@PatientID", Int32.Parse(HttpContext.Current.Session["PatientID"].ToString())));

            clsUtility.ExecuteSP("InsertAllergy", parameters);
        }
Ejemplo n.º 6
0
 public void NewMedication(int PatientID, string MedicationDesc, float Dosage, string Measurement)
 {
     clsUtility.Connection = getConnectionString();
     InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
     parameters.Add(new SqlParameter("@PatientID", PatientID));
     parameters.Add(new SqlParameter("@MedicationDesc", MedicationDesc));
     parameters.Add(new SqlParameter("@Dosage", Dosage));
     parameters.Add(new SqlParameter("@Measurement", Measurement));
     clsUtility.ExecuteSP("newPatientMedication", parameters);
 }
Ejemplo n.º 7
0
        // Returns patients' name,address,ssn,phone#,rig,and encounterdate
        public DataTable performSearch(int MedicID, string FirstName, string LastName, string SSN)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@FirstName", FirstName));
            parameters.Add(new SqlParameter("@LastName", LastName));
            parameters.Add(new SqlParameter("@SSN", SSN));
            parameters.Add(new SqlParameter("@MedicID", MedicID));


            DataTable dT = clsUtility.ExecuteSP_DataTable("getPatientSearch", parameters);

            return(dT);
        }
Ejemplo n.º 8
0
        public List <Documents> getDocumentsByPatient(int PatientID)
        {
            clsUtility.Connection = getConnectionString();
            List <Documents> lDocuments = new List <Documents>();

            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));

            SqlDataReader sqlDr = clsUtility.ExecuteSP_DataReader("getDocumentsByPatientID", parameters);

            try
            {
                while (sqlDr.Read())
                {
                    Documents tmpDoc = new Documents();
                    tmpDoc.DocumentID   = Int32.Parse(sqlDr["DocumentID"].ToString());
                    tmpDoc.DocumentLink = sqlDr["DocumentLink"].ToString();
                    tmpDoc.DocumentType = sqlDr["DocumentType"].ToString();
                    lDocuments.Add(tmpDoc);
                }
            }
            finally
            {
                sqlDr.Close();
            }
            return(lDocuments);
        }
Ejemplo n.º 9
0
        public List <Medications> getAllMedications(int patientID)
        {
            clsUtility.Connection = dbTool.getConnectionString();

            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", patientID));

            List <Medications> tmpMeds = new List <Medications>();
            SqlDataReader      sqlDR   = clsUtility.ExecuteSP_DataReader("getMedication", parameters);

            try
            {
                while (sqlDR.Read())
                {
                    Medications tmpM = new Medications();
                    tmpM.Dosage         = Single.Parse(sqlDR["Dosage"].ToString());
                    tmpM.Measurement    = sqlDR["Measurement"].ToString();
                    tmpM.MedicationDesc = sqlDR["Medication Name"].ToString();
                    tmpM.MedicationId   = Int32.Parse(sqlDR["MedicationId"].ToString());
                    tmpM.PatientID      = Int32.Parse(sqlDR["PatientID"].ToString());
                    tmpMeds.Add(tmpM);
                }
                return(tmpMeds);
            }
            finally
            {
                sqlDR.Close();
            }
        }
Ejemplo n.º 10
0
        }     // Done... Tested...

        private void LoadData(int intPatientID, bool Complete)
        {
            DataTable tblResults;

            if (AppMode)
            {
                clsUtility.Connection = enc.SimpleCrypt(ConfigurationManager.AppSettings["remoteConn"]);
            }
            else
            {
                clsUtility.Connection = enc.SimpleCrypt(ConfigurationManager.AppSettings["infiniConn"]);
            }

            string strProc;

            strProc = "wsGetPatientByID";
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", intPatientID));

            tblResults = clsUtility.ExecuteSP_DataTable(strProc, parameters);


            if (Complete == true)
            {
                LoadControls(tblResults);
            }
            else
            {
                LoadControlsIncomplete(tblResults);
            }
        }         // Obsolete...
Ejemplo n.º 11
0
        public int updateMedicalRecord(MedicalInfo mInfo)
        {
            clsUtility.Connection = getConnectionString();
            Type type = mInfo.GetType();

            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();

            foreach (PropertyInfo pi in type.GetProperties())
            {
                // Database was not saving these 2 date fields correctly if they were null.
                // Added this statement to insert DBNulls instead.
                if (pi.Name == "DepartDate" || pi.Name == "ArrivalDate")
                {
                    if (pi.GetValue(mInfo, null) == null)
                    {
                        parameters.Add(new SqlParameter("@" + pi.Name, DBNull.Value));
                    }
                    else
                    {
                        parameters.Add(new SqlParameter("@" + pi.Name, pi.GetValue(mInfo, null).ToString()));
                    }
                }
                else
                {
                    if (pi.GetValue(mInfo, null) == null)
                    {
                        parameters.Add(new SqlParameter("@" + pi.Name, ""));
                    }
                    else
                    {
                        parameters.Add(new SqlParameter("@" + pi.Name, pi.GetValue(mInfo, null).ToString()));
                    }
                }
            }

            parameters.Add(new SqlParameter("@PatientID", Int32.Parse(HttpContext.Current.Session["PatientID"].ToString())));
            // 'Gets the password for the user
            //Dim passwdOutput As New SqlParameter("@password", SqlDbType.VarChar, 35)
            //passwdOutput.Direction = ParameterDirection.Output
            //pParams.Add(passwdOutput)
            //oSQL.ExecuteSP("GetPasswordByUserName", pParams)
            //password = passwdOutput.Value.ToString()

            int pKey = clsUtility.ExecuteSP_RETURN_VALUE("InsertPatientMedical", parameters);

            return(pKey);
        }
Ejemplo n.º 12
0
        //Gets medics rig,username,and ID
        public DataTable getMedicInfo(string Username)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@Username", Username));
            DataTable dT = clsUtility.ExecuteSP_DataTable("getMedicbyUsername", parameters);

            return(dT);
        }
Ejemplo n.º 13
0
        //Gets the patients medic
        public int getMedicByPatient(int PatientID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));
            int iReturn = clsUtility.ExecuteSP_RETURN_VALUE("getMedicbyPatient", parameters);

            return(iReturn);
        }
Ejemplo n.º 14
0
        //Pulls all States and their Abbreviations
        public DataTable getStateAbbrev(int CityID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@CityID", CityID));
            DataTable dT = clsUtility.ExecuteSP_DataTable("getStateAbbrev", parameters);

            return(dT);
        }
Ejemplo n.º 15
0
        //Pulls Patients name and ID for the Medics Rig with an incomplete status
        public DataTable getRigIncomplete(string MedicID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@MedicID", MedicID));
            DataTable dT = clsUtility.ExecuteSP_DataTable("getRigPatients", parameters);

            return(dT);
        }
Ejemplo n.º 16
0
        //Pulls Employers Phone Num, address, email, city,state, and zip
        public DataTable getEmployerInfo(int EmployerID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@EmployerID", EmployerID));
            DataTable dT = clsUtility.ExecuteSP_DataTable("getEmployerInfo", parameters);

            return(dT);
        }
Ejemplo n.º 17
0
        public DataTable getVitals(int PatientID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));
            DataTable dT = clsUtility.ExecuteSP_DataTable("getVitals", parameters);

            return(dT);
        }
Ejemplo n.º 18
0
        public string JobSheetAdmin(string username)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@Username", username));
            DataSet tmpDS   = clsUtility.ExecuteSP_DataSet("isJSAdmin", parameters);
            string  tempStr = tmpDS.Tables[0].Rows[0][0].ToString();

            return(tempStr);
        }
Ejemplo n.º 19
0
        public int getNoteStatus(int PatientID)
        {
            clsUtility.Connection = getConnectionString();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));

            int NoteStatus = clsUtility.ExecuteSP_RETURN_VALUE("getPatientNotesCount", parameters);

            return(NoteStatus);
            //getPatientNotesCount
        }
Ejemplo n.º 20
0
        public void updateNote(string EncounterStatus, MedicNotes mNotes)
        {
            clsUtility.Connection = getConnectionString(); Type type = mNotes.GetType();
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();

            foreach (PropertyInfo pi in type.GetProperties())
            {
                if (pi.GetValue(mNotes, null) == null)
                {
                    parameters.Add(new SqlParameter("@" + pi.Name, ""));
                }
                else
                {
                    parameters.Add(new SqlParameter("@" + pi.Name, pi.GetValue(mNotes, null).ToString()));
                }
            }

            parameters.Add(new SqlParameter("@EncounterStatus", EncounterStatus));
            parameters.Add(new SqlParameter("@patientID", Int32.Parse(HttpContext.Current.Session["PatientID"].ToString())));
            clsUtility.ExecuteSP("updateNotes", parameters);
        }
Ejemplo n.º 21
0
        //Pulls properties for Patients object
        public DataTable getPatientInfo(int PatientID)
        {
            clsUtility.Connection = getConnectionString();
            string strProc;

            strProc = "wsGetPatientByID";
            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));

            DataTable tblResults = clsUtility.ExecuteSP_DataTable(strProc, parameters);

            return(tblResults);
            //Patients pinfo = new Patients();
        }
Ejemplo n.º 22
0
        public void newVitals(int PatientID, string Time, string BP, string Pulse, string Resp, string Temp, string TraumaScore)
        {
            clsUtility.Connection = getConnectionString();

            InfiniEdge.SqlParameterCollection parameters = new InfiniEdge.SqlParameterCollection();
            parameters.Add(new SqlParameter("@PatientID", PatientID));
            parameters.Add(new SqlParameter("@Time", Time));
            parameters.Add(new SqlParameter("@BP", BP));
            parameters.Add(new SqlParameter("@Pulse", Pulse));
            parameters.Add(new SqlParameter("@Resp", Resp));
            parameters.Add(new SqlParameter("@Temp", Temp));
            parameters.Add(new SqlParameter("@TraumaScore", TraumaScore));

            clsUtility.ExecuteSP("newPatientVital", parameters);
        }