示例#1
0
        //public int ID { get; set; }
        //public bool Active { get; set; }
        //public string First_Name { get; set; }
        //public string Middle_Name { get; set; }
        //public string Last_Name { get; set; }
        //public Nullable<System.DateTime> Date_Of_Birth { get; set; }
        //public string Home_Phone { get; set; }
        //public string Work_Phone { get; set; }
        //public string Alternate_Phone { get; set; }
        //public string Sex { get; set; }
        //public string Directions { get; set; }
        //public string SSN { get; set; }
        //public string Address1 { get; set; }
        //public string Address2 { get; set; }
        //public string City { get; set; }
        //public string State { get; set; }
        //public string Zip { get; set; }
        //public int LanguageID { get; set; }
        //public string Email { get; set; }

        public static int CreateNew(string firstName, string middleName, string lastName, System.DateTime dob,
                                    string homePhone, string workPhone, string altPhone, string sex, string directions, string ssn, string address1, string address2,
                                    string city, string state, string zip, int language, string email)
        {
            PatientModel data = new PatientModel
            {
                First_Name      = firstName,
                Middle_Name     = middleName,
                Last_Name       = lastName,
                Date_Of_Birth   = dob,
                Home_Phone      = homePhone,
                Work_Phone      = workPhone,
                Alternate_Phone = altPhone,
                Sex             = sex,
                Directions      = directions,
                SSN             = ssn,
                Address1        = address1,
                Address2        = address2,
                City            = city,
                State           = state,
                Zip             = zip,
                LanguageID      = language,
                Email           = email
            };

            string sql = @"insert into dbo.Patients (active, First_Name, Middle_Name, Last_Name, Date_Of_Birth, Home_Phone, Work_Phone,
                           Alternate_Phone, Sex, Directions, SSN, Address1, Address2, City, State, Zip, LanguageID, Email) 
                            values (1, @First_Name, @Middle_Name, @Last_Name,  @Date_Of_Birth, @Home_Phone, @Work_Phone,
                           @Alternate_Phone, @Sex, @Directions, @SSN, @Address1, @Address2, @City, @State, @Zip, @LanguageID, @Email);";

            return(SqlDataAccessProd.SaveData(sql, data));
        }
        //public string SubjectiveText { get; set; }
        //public string ObjectiveText { get; set; }
        //public string AssessmentText { get; set; }
        //public string PlanText { get; set; }
        //public int Duration { get; set; }
        //public int Resource_ID { get; set; }
        //public bool Cancellation { get; set; }
        //public bool NoShow { get; set; }

        public static int UpdateNote(int iVisitId, string sSubjectiveText, string sObjectiveText, string sAssessmentText, string sPlanText,
                                     int iDuration, int iResource_ID, bool bCancellation, bool bNoShow)
        {
            DataLibrary.Models.ViewNotesModel data = new DataLibrary.Models.ViewNotesModel
            {
                SubjectiveText = sSubjectiveText,
                ObjectiveText  = sObjectiveText,
                AssessmentText = sAssessmentText,
                PlanText       = sPlanText,
                Duration       = iDuration,
                Resource_ID    = iResource_ID,
                Cancellation   = bCancellation,
                NoShow         = bNoShow
            };

            string sqlU = @"update dbo.Patient_Visit_Notes set [SubjectiveText]=@SubjectiveText, [ObjectiveText]=@ObjectiveText 
                            where Visit_ID=" + iVisitId + ";";

            SqlDataAccessProd.SaveData(sqlU, data);

            sqlU = @"update dbo.Patient_Visits set [AssessmentText]=@AssessmentText, [PlanText]=@PlanText, [Cancellation]=@Cancellation, [No_Show]=@NoShow, [Duration]=@Duration, [Resource_ID]=@Resource_ID   
                            where ID=" + iVisitId + ";";

            return(SqlDataAccessProd.SaveData(sqlU, data));
        }
示例#3
0
        ////public class PatientVisitsBillingModel
        ////{
        ////    public short Units { get; set; }
        ////    public decimal Unit_Amount { get; set; }

        ////}
        public static int UpdateRecord(int iId, int Billing_ID, string Code, short Units, Decimal Unit_Amount)
        {
            PatientVisitsBillingModel data = new PatientVisitsBillingModel
            {
                ID          = iId,
                Billing_ID  = Billing_ID,
                Code        = Code,
                Units       = Units,
                Unit_Amount = Unit_Amount
            };

            string sqlU = @"update dbo.Patient_Visit_Billings set Billing_ID=@Billing_ID, Billing_Code=@Code, Units=@Units, 
                            Unit_Amount=@Unit_Amount  where ID=@ID; ";

            return(SqlDataAccessProd.SaveData(sqlU, data));
        }
示例#4
0
        public static int UpdateRecord(int iId, string firstName, string middleName, string lastName, DateTime dob,
                                       string homePhone, string workPhone, string altPhone, string sex, string directions, string ssn, string address1, string address2,
                                       string city, string state, string zip, int language, string email)
        {
            // remove the time part
            var dob_date = dob.Date;

            PatientModel data = new PatientModel
            {
                ID              = iId,
                First_Name      = firstName,
                Middle_Name     = middleName,
                Last_Name       = lastName,
                Date_Of_Birth   = dob_date,
                Home_Phone      = homePhone,
                Work_Phone      = workPhone,
                Alternate_Phone = altPhone,
                Sex             = sex,
                Directions      = directions,
                SSN             = ssn,
                Address1        = address1,
                Address2        = address2,
                City            = city,
                State           = state,
                Zip             = zip,
                LanguageID      = language,
                Email           = email
            };

            string sqlU = @"update dbo.Patients set First_Name=@First_Name, Middle_Name=@Middle_Name, Last_Name=@Last_Name, 
                            Date_Of_Birth=@Date_Of_Birth, Home_Phone=@Home_Phone, Work_Phone=@Work_Phone, Alternate_Phone=@Alternate_Phone, Sex=@Sex, 
                            Directions=@Directions, SSN=@SSN, Address1=@Address1, Address2=@Address2, City=@City, State=@State, 
                            Zip=@Zip, LanguageID=@LanguageID, Email=@Email 
                        where ID=@ID; ";

            return(SqlDataAccessProd.SaveData(sqlU, data));
        }