Ejemplo n.º 1
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.º 2
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.º 3
0
        public List <Patients> getIncompletes()
        {
            clsUtility.Connection = getConnectionString();
            List <Patients> tmpList = new List <Patients>();
            SqlDataReader   sqlDR   = clsUtility.ExecuteSP_DataReader("getAllPatients", null);

            while (sqlDR.Read())
            {
                Patients tmpPatient = new Patients();
                Type     type       = tmpPatient.GetType();
                foreach (PropertyInfo pi in type.GetProperties())
                {
                    if (sqlDR["PatientName"].ToString() != "")
                    {
                        if (pi.Name == "FirstName")
                        {
                            char[]   splitter = { ',' };
                            string[] pName    = sqlDR["PatientName"].ToString().Split(splitter);
                            if (pName[1] != "")
                            {
                                pi.SetValue(tmpPatient, pName[1].ToString().Trim(), null);
                            }
                        }
                        else if (pi.Name == "LastName")
                        {
                            char[]   splitter = { ',' };
                            string[] pName    = sqlDR["PatientName"].ToString().Split(splitter);
                            if (pName[0] != "")
                            {
                                pi.SetValue(tmpPatient, pName[0].ToString().Trim(), null);
                            }
                        }
                    }
                }
                tmpList.Add(tmpPatient);
            }
            sqlDR.Close();
            return(tmpList);
        }
Ejemplo n.º 4
0
        public List <Tips> pullAllTips()
        {
            clsUtility.Connection = getConnectionString();
            List <Tips>   lTips = new List <Tips>();
            SqlDataReader sqlDR = clsUtility.ExecuteSP_DataReader("pullAllTips", null);

            try
            {
                while (sqlDR.Read())
                {
                    Tips tmpTips = new Tips();
                    tmpTips.TipID       = Int32.Parse(sqlDR["ExplanationID"].ToString());
                    tmpTips.Description = sqlDR["Description"].ToString();
                    tmpTips.TipText     = sqlDR["Text"].ToString();
                    lTips.Add(tmpTips);
                }
            }
            finally
            {
                sqlDR.Close();
            }
            return(lTips);
        }