public bool Insert(PatientInfoModel objNewPatienInfo) { DbConnect_init(); String sql = "INSERT INTO patientInfo (rrnumber, Insurance, insuredperson_name, card_number, Relationship, Combination, name, cellphone, phone, post_number, adrress, mail, " + "patient_memo, discount_percent, discount_reason, in_charge_name, birthday, calender) VALUES ('" + objNewPatienInfo.rrnumber + "','" + objNewPatienInfo.Insurance + "','" + objNewPatienInfo.insuredperson_name + "','" + objNewPatienInfo.card_number + "','" + objNewPatienInfo.Relationship + "','" + objNewPatienInfo.Combination + "','" + objNewPatienInfo.name + "','" + objNewPatienInfo.cellphone + "','" + objNewPatienInfo.phone + "','" + objNewPatienInfo.post_number + "','" + objNewPatienInfo.adrress + "','" + objNewPatienInfo.mail + "','" + objNewPatienInfo.patient_memo + "','" + objNewPatienInfo.discount_percent + "','" + objNewPatienInfo.discount_reason + "','" + objNewPatienInfo.in_charge_name + "','" + objNewPatienInfo.birthday + "','" + objNewPatienInfo.calender + "') "; OracleCommand comm = new OracleCommand(); comm.Connection = conn; comm.CommandText = sql; try { comm.ExecuteNonQuery(); } catch (Exception error) { MessageBox.Show("올바른 환자 정보를 입력하세요"); conn.Close(); return(false); } conn.Close(); MessageBox.Show("저장되었습니다."); return(true); }
public ListViewXamlVad(PatientInfoModel patient) { curPatient = patient; #region ListViewSetup_Vad_XAML InitializeComponent(); LstViewVad.ItemsSource = VadSurvey; #endregion #region PopulateFromqGetSurvey_Vad_XAML var qSurvey = UtilDal.GetSurvey("Vad"); if (qSurvey.Any()) { foreach (var que in qSurvey) { VadSurvey.Add(new SurveyModel() { SurQuestion = que.Question, IsTrue = false }); } } else { throw new Exception("Survey list is empty for Vad"); } #endregion }
//Convert study public static StudyInfoModel StudyDb2Pa(Study dbStudy) { GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static StudyInfoModel StudyDB2PA() start"); if (null == dbStudy) { return(null); } StudyInfoModel paStudy = null; StudyDb2Pa(dbStudy, out paStudy); Patient dbPatient = null; PatientInfoModel paPatient = null; try { dbPatient = DbWrapper.GetPatientByPatientUID(dbStudy.PatientUIDFk); } catch (Exception ex) { GlobalDefinition.LoggerWrapper.LogDevError(ex.Message); return(null); } PatientDb2Pa(dbPatient, out paPatient); //ProcedureListDB2PA(dbStudy.GetProcedureList()); paStudy.Patient = paPatient; GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static StudyInfoModel StudyDB2PA() end"); return(paStudy); }
public async Task <HttpResponseMessage> UpdateStateInfo(PatientInfoModel model) { List <string> errors = new List <string>(); if (!ModelState.IsValid) { errors.AddRange(ModelState.Keys.SelectMany(k => ModelState[k].Errors).Select(m => m.ErrorMessage).ToList()); return(Request.CreateResponse(HttpStatusCode.BadRequest, errors)); } try { using (HGContext context = new HGContext()) { var user = await context.Users.Include(u => u.PatientInfo) .SingleOrDefaultAsync(u => u.Email == User.Identity.Name); user.PatientInfo.MedicalCardNumber = model.MedicalCardNumber; user.PatientInfo.MedicalCardExpirationDate = model.MedicalCardExpirationDate; user.PatientInfo.ApprovalStatus = ApproalStatus.APPLIED; context.Entry(user).State = EntityState.Modified; await context.SaveChangesAsync(); return(Request.CreateResponse(HttpStatusCode.OK)); } } catch { errors.Add("An error has occured while saving."); return(Request.CreateResponse(HttpStatusCode.BadRequest, errors.ToArray())); } }
private void OnclickNewCommend() { PatientInfo = new PatientInfoModel(); MessageBox.Show("환자정보를 입력해주세요"); ReadOn = false; Comboclick = true; }
private async void Button_Clicked_CNT_save(object sender, EventArgs e) { // Add on-screen values to a lst var list = new List <string>(); foreach (var item in CntSurvey) { list.Add(item.TextData); } // Put list items into model var answerCnt = new PatientInfoModel { Name = list[0], Surname = list[1], Said = list[2] }; // Send the ID number over to the DAL Utility to check the database if (UtilDal.QueryClient(answerCnt) == true) { // This means that the creation was a success await Navigation.PushModalAsync(new SelectionPage(answerCnt)); // success page needs creation } else { // This means a patient with that ID already exists var error = @"This patient already exists:"; // Error page needs creation } }
public static void AddNewPatient(PatientInfoModel patient) { if (Users == null) { Initialize(); } Patients.Add(patient); }
public PatientInfoModel Search(String name, String rrnumber) { DbConnect_init(); string sql = "select * from patientinfo where name= '" + name + "' AND rrnumber ='" + rrnumber + "'"; OracleCommand comm = new OracleCommand(); comm.Connection = conn; comm.CommandText = sql; OracleDataReader reader = comm.ExecuteReader(CommandBehavior.CloseConnection); PatientInfoModel patientInfoModels = new PatientInfoModel(); if (reader.Read()) { patientInfoModels.id = reader.GetInt32(reader.GetOrdinal("id")); patientInfoModels.name = reader.GetString(reader.GetOrdinal("name")); patientInfoModels.rrnumber = reader.GetString(reader.GetOrdinal("rrnumber")); patientInfoModels.Insurance = reader.GetString(reader.GetOrdinal("Insurance")); patientInfoModels.insuredperson_name = reader.GetString(reader.GetOrdinal("insuredperson_name")); patientInfoModels.card_number = reader.GetString(reader.GetOrdinal("card_number")); patientInfoModels.Relationship = reader.GetString(reader.GetOrdinal("Relationship")); patientInfoModels.Combination = reader.GetString(reader.GetOrdinal("Combination")); patientInfoModels.cellphone = reader.GetString(reader.GetOrdinal("cellphone")); patientInfoModels.phone = reader.GetString(reader.GetOrdinal("phone")); patientInfoModels.adrress = reader.GetString(reader.GetOrdinal("adrress")); patientInfoModels.mail = reader.GetString(reader.GetOrdinal("mail")); patientInfoModels.post_number = reader.GetInt32(reader.GetOrdinal("post_number")); patientInfoModels.patient_memo = reader.GetString(reader.GetOrdinal("patient_memo")); patientInfoModels.discount_percent = reader.GetString(reader.GetOrdinal("discount_percent")); patientInfoModels.discount_reason = reader.GetString(reader.GetOrdinal("discount_reason")); patientInfoModels.in_charge_name = reader.GetString(reader.GetOrdinal("in_charge_name")); patientInfoModels.insuredperson_name = reader.GetString(reader.GetOrdinal("insuredperson_name")); patientInfoModels.birthday = reader.GetString(reader.GetOrdinal("birthday")); if (reader.GetString(reader.GetOrdinal("calender")) == "lunar") { patientInfoModels.calender = true; } else { patientInfoModels.calender = false; } } else if (name == null || rrnumber == null) { MessageBox.Show("이름과 주민번호를 모두 입력해주세요."); } else { MessageBox.Show("환자가 존재하지 않습니다."); } reader.Close(); return(patientInfoModels); }
//Convert patient public static PatientInfoModel PatientDb2Pa(Patient dbPatient) { GlobalDefinition.LoggerWrapper.LogTraceInfo("public static PatientInfoModel PatientDB2PA() start"); if (null == dbPatient) { return(null); } PatientInfoModel paPatient = null; PatientDb2Pa(dbPatient, out paPatient); GlobalDefinition.LoggerWrapper.LogTraceInfo("public static PatientInfoModel PatientDB2PA() end"); return(paPatient); }
public async Task <HttpResponseMessage> UpdateUserDocuments(PatientInfoModel model) { var user = await HGContext.Users.Include(u => u.PatientInfo) .SingleOrDefaultAsync(u => u.Email == User.Identity.Name); user.PatientInfo.DriversLicenseImageUrl = model.DriversLicenseImageUrl; user.PatientInfo.RecommendationImageUrl = model.RecommendationImageUrl; HGContext.Entry(user).State = EntityState.Modified; await HGContext.SaveChangesAsync(); return(Request.CreateResponse(HttpStatusCode.OK)); }
public static void PatientDb2Pa(Patient dbPatient, out PatientInfoModel paPatient) { GlobalDefinition.LoggerWrapper.LogTraceInfo("public static void PatientDB2PA() start"); paPatient = null; if (null != dbPatient) { paPatient = new PatientInfoModel(); } else { GlobalDefinition.LoggerWrapper.LogDevError(" DB Patient is null."); } GlobalDefinition.LoggerWrapper.LogTraceInfo("public static void PatientDB2PA() end"); }
public PatientInfoModel loadData(int?tpr_id) { PatientInfoModel model = new PatientInfoModel(); try { using (InhCheckupDataContext cdc = new InhCheckupDataContext()) { var data = cdc.trn_patient_regis .Where(x => x.tpr_id == tpr_id) .Select(x => new { hn = x.trn_patient.tpt_hn_no, en = x.tpr_en_no, fullname = x.trn_patient.tpt_othername, gender = x.trn_patient.tpt_gender, dob = x.trn_patient.tpt_dob, dob_text = x.trn_patient.tpt_dob_text, arrived_date = x.trn_patient_regis_detail.tpr_real_arrived_date, address = x.tpr_other_address, picture = x.trn_patient.tpt_image, allerry = x.trn_patient.tpt_allergy, nationality = x.trn_patient.tpt_nation_desc }).FirstOrDefault(); if (data != null) { model.hn = data.hn; model.en = data.en; model.fullname = data.fullname; model.gender = data.gender == 'M' ? "Male" : data.gender == 'F' ? "Female" : "Unknown"; model.dob = data.dob_text; model.age = CalculateAge(data.dob.Value, data.arrived_date.Value); model.picture = byteArrayToImage(data.picture); model.address = data.address; model.allergy = data.allerry; model.visit_date = data.arrived_date.Value.ToString("dd MMMM yyyy"); model.visit_time = data.arrived_date.Value.ToString("hh:mm:ss"); model.nationality = data.nationality; } } } catch (Exception ex) { Program.MessageError("Models.PatientInfoModel", "loadData()", ex, false); } return(model); }
//Convert patient public static Patient PatientPa2Db(PatientInfoModel paPatient) { GlobalDefinition.LoggerWrapper.LogTraceInfo(" public static Patient PatientPA2DB() start"); if (null == DbWrapper) { GlobalDefinition.LoggerWrapper.LogDevError("DBWrapper is null"); return(null); } if (null == paPatient) { GlobalDefinition.LoggerWrapper.LogDevError("Input PA patient is null"); return(null); } Patient dbPatient = null; try { dbPatient = DbWrapper.GetPatientByPatientUID(paPatient.PatientUid); if (null == dbPatient) { dbPatient = DbWrapper.CreatePatient(); if (null == dbPatient) { GlobalDefinition.LoggerWrapper.LogDevError("Create Patient failed."); return(null); } } } catch (Exception ex) { GlobalDefinition.LoggerWrapper.LogDevError(ex.Message); return(null); } return(dbPatient); }
public bool Update(PatientInfoModel objNewPatienInfo) { DbConnect_init(); String sql = "UPDATE patientinfo " + "SET " + "Insurance = '" + objNewPatienInfo.Insurance + "'," + " insuredperson_name = '" + objNewPatienInfo.insuredperson_name + "'," + " card_number = '" + objNewPatienInfo.card_number + "'," + " Relationship = '" + objNewPatienInfo.Relationship + "'," + " Combination = ' " + objNewPatienInfo.Combination + "'," + " cellphone = '" + objNewPatienInfo.cellphone + "'," + " phone = '" + objNewPatienInfo.phone + "'," + " post_number = '" + objNewPatienInfo.post_number + "'," + " adrress = '" + objNewPatienInfo.adrress + "'," + " mail= '" + objNewPatienInfo.mail + "', " + "patient_memo = '" + objNewPatienInfo.patient_memo + "'," + " discount_percent = '" + objNewPatienInfo.discount_percent + "'," + " discount_reason = '" + objNewPatienInfo.discount_reason + "'," + " in_charge_name = '" + objNewPatienInfo.in_charge_name + "'," + " birthday = '" + objNewPatienInfo.birthday + "'," + " calender = '" + objNewPatienInfo.calender + "'" + "WHERE id = '" + objNewPatienInfo.id + "'"; OracleCommand comm = new OracleCommand(); comm.Connection = conn; comm.CommandText = sql; try { comm.ExecuteNonQuery(); } catch (Exception error) { MessageBox.Show("올바른 환자 정보를 입력하세요"); conn.Close(); return(false); } conn.Close(); MessageBox.Show("수정되었습니다."); return(true); }
public PRViewModel() { InitIdCreater(); var studyinfo = new StudyInfoModel(); var patient = new PatientInfoModel(); studyinfo.AccessionNumber = "asdasd"; patient.PatientName = "juli.hu"; studyinfo.Patient = patient; StudyInfo = studyinfo; //调用此方法为了提前初始化jason类中的数据,以便该方法在第2次调用后速度更快 //该方法在第一次调用时很慢 SerializeHelper.CloneObject <StudyInfoModel>(new StudyInfoModel()); //订阅事件 eventAggregator = ServiceLocator.Current.GetInstance <IEventAggregator>(); eventAggregator.GetEvent <PaSelectChangeEvent>().Subscribe(PrStudyInfoChange); }
public ReceiptManageViewModel() { ObjPatientInfoService = new PatientInfoService(); ObjRececiptInfoService = new ReceiptInfoService(); OnclickSearchCommand = new RelayCommand(OnclickSearchCommend, null); OnclickNewCommand = new RelayCommand(OnclickNewCommend, null); OnclickSaveCommand = new RelayCommand(OnclickSaveCommend, null); OnclickModifyCommand = new RelayCommand(OnclickModifyCommend, null); OnclickDeleteCommand = new RelayCommand(OnclickDeleteCommend, null); OnclickReceiptCommand = new RelayCommand(OnclickReceiptCommend, null); OnclickReceiptModifyCommand = new RelayCommand(OnclickReceiptModifyCommend, null); OnclickReceiptReservationCommand = new RelayCommand(OnclickReceiptReservationCommend, null); PatientInfo = new PatientInfoModel(); ReceiptInfo = new ReceiptInfoModel(); Receipted = new List <ReceiptInfoModel>(); ReadOn = true; Comboclick = false; Receipted = ObjRececiptInfoService.GetList(); }
// patientInfo 모델 복사 public void CopyData(PatientInfoModel param) { this.id = param.id; this.rrnumber = param.rrnumber; this.Insurance = param.Insurance; this.insuredperson_name = param.insuredperson_name; this.card_number = param.card_number; this.Relationship = param.Relationship; this.Combination = param.Combination; this.name = param.name; this.cellphone = param.cellphone; this.phone = param.phone; this.post_number = param.post_number; this.adrress = param.adrress; this.mail = param.mail; this.patient_memo = param.patient_memo; this.discount_percent = param.discount_percent; this.discount_reason = param.discount_reason; this.in_charge_name = param.in_charge_name; this.birthday = param.birthday; this.calender = param.calender; }
public ActionResult GetById(int TreatmentRecordId) { ResultModel resultModel = new ResultModel(); try { var patientInfoData = _treatmentRecordsServices.GetPatientInfoByTreatmentRecordId(TreatmentRecordId); var patientData = _treatmentRecordsServices.GetPatientMasterById((int)patientInfoData.PatientMasterId); var model = new PatientModel(); model.PatientMasterId = patientData.Id; model.LastUpdated = patientData.LastUpdated; model.PatientName = _encryptionService.DecryptText(model.PatientName); model.CreatedOn = patientData.CreatedOn; model.Deleted = patientData.Deleted; var patientInfo = new PatientInfoModel(); patientInfo.Date = patientInfoData.Date; patientInfo.Deleted = patientInfoData.Deleted; patientInfo.DiagnosisId = patientInfoData.DiagnosisId; patientInfo.HospitalMasterId = (int)patientInfoData.HospitalMasterId; patientInfo.PatientInfoId = patientInfoData.Id; patientInfo.LastUpdated = patientInfoData.LastUpdated; patientInfo.NurseMasterId = patientInfoData.NurseMasterId; patientInfo.ProcedureId = patientInfoData.ProcedureId; patientInfo.TreatmentRecordMasterId = patientInfoData.TreatmentRecordMasterId; model.PatientInfoData = patientInfo; resultModel.Message = ValidationMessages.Success; resultModel.Status = 1; resultModel.Response = model; return(Ok(resultModel)); } catch (Exception e) { resultModel.Message = ValidationMessages.Failure; resultModel.Status = 0; resultModel.Response = null; return(Ok(e)); } }
private async Task <ActionResult> GetPatientInfo(PatientDto patient) { PatientInfoModel model = new PatientInfoModel { Name = patient.Name, Surname = patient.Surname, DateOfBirth = patient.DateOfBirth, Email = patient.Email, IdentificationNumber = patient.IdentificationNumber, ProfileCreationDate = patient.ProfileCreationDate, Doctors = await PatientFacade.GetDoctorsForPatientAsync(patient.Id), }; patient.HealthCard = await PatientFacade.GetPatientWithHealthCardAsync(patient.Id); if (patient.HealthCard != null) { model.Diseases = await HealthCardFacade.GetDiseasesForHealthCard(patient.Id); model.BloodType = patient.HealthCard.BloodType; } return(View("PatientAskForGetInfo", model)); }
/// <summary> /// Description: Compact GET, and POST method to query the existence of an ID number /// in the client db, and add the entry if it doesn't exist. /// Status: Implemented /// </summary> /// <param name="patient">Patient South African ID number</param> /// <returns>bool "true" for new patient created, or "false" if patient already exists</returns> public static bool QueryClient(PatientInfoModel patient) { var responseGet = client.GetAsync(Route("Patient") + $"{patient.Said}").Result; var content = responseGet.IsSuccessStatusCode ? JsonConvert.DeserializeObject <string>(responseGet.Content.ReadAsStringAsync().Result) : throw new Exception($"Response from server API Failed for GET {Route("Patient")} {patient.Said}, check IP config"); if (content != "New") { return(false); } var jsonOb = JsonConvert.SerializeObject(patient, Formatting.Indented); const string medType = "application/json"; var postData = new StringContent(jsonOb, Encoding.UTF8, medType); var response = client.PostAsync(Route("Patient"), postData).Result; return(response.IsSuccessStatusCode != true ? throw new Exception( $"Response from server API Failed for POST {Route("Patient")} {patient.Said}, check IP config") : true); }
public IList <PatientInfoModel> PateintInfoData(int patientMasterId) { var patientInfoData = new List <PatientInfoModel>(); var PatientData = _treatmentRecordsServices.GetPatientMasterById(patientMasterId); foreach (var data in PatientData.PatientInfo) { var patientInfo = new PatientInfoModel(); patientInfo.Date = data.Date; patientInfo.Deleted = data.Deleted; patientInfo.DiagnosisId = data.DiagnosisId; patientInfo.HospitalMasterId = data.HospitalMasterId; patientInfo.PatientInfoId = data.Id; patientInfo.LastUpdated = data.LastUpdated; patientInfo.NurseMasterId = data.NurseMasterId; patientInfo.ProcedureId = data.ProcedureId; patientInfo.TreatmentRecordMasterId = data.TreatmentRecordMasterId; patientInfoData.Add(patientInfo); } return(patientInfoData.ToList()); }
private void OnclickDeleteCommend() { ObjPatientInfoService.Delete(PatientInfo.id); PatientInfo = new PatientInfoModel(); }
private static void Initialize() { Random rando = new Random(DateTime.Now.Millisecond); Users = new List <LoginModel>(); Users.Add(new LoginModel { Username = "******", Password = "******" }); Users.Add(new LoginModel { Username = "******", Password = "******" }); Insurance = new List <InsuranceModelDetails>(); for (int i = 1; i < 11; i++) { InsuranceModelDetails newInsurance = new InsuranceModelDetails(); newInsurance.InsuranceID = i; newInsurance.InsuranceName = "Insurance Company " + i.ToString(); newInsurance.InsuranceAddress = (i * 100).ToString() + " Tryon Street"; newInsurance.InsuranceCity = "Charlotte"; newInsurance.InsuranceState = "NC"; newInsurance.InsuranceZip = "12345-1234"; newInsurance.InsurancePhone = "555-123-123" + (i - 1).ToString(); Insurance.Add(newInsurance); } Doctors = new List <DoctorsModelDetails>(); for (int i = 1; i < 11; i++) { DoctorsModelDetails newDoctor = new DoctorsModelDetails(); newDoctor.DoctorID = i; newDoctor.DoctorName = "Doctor " + i.ToString(); newDoctor.DoctorAddress = (i * 100).ToString() + " Tryon Street"; newDoctor.DoctorCity = "Charlotte"; newDoctor.DoctorState = "NC"; newDoctor.DoctorZip = "12345-1234"; int randNum = rando.Next(0, 10); if (randNum == 0) { newDoctor.DoctorReviews = null; newDoctor.DoctorRating = null; } else { newDoctor.DoctorReviews = new List <DoctorReviewsBase>(); for (int j = 0; j < randNum; j++) { DoctorReviewsBase newReview = new DoctorReviewsBase(); newReview.DoctorReview = "Review " + (j + 1).ToString(); newReview.DoctorRating = rando.Next(1, 5); newDoctor.DoctorReviews.Add(newReview); } newDoctor.DoctorRating = newDoctor.DoctorReviews.Average(x => x.DoctorRating).ToString(); } newDoctor.AcceptedInsurance = new List <InsuranceModelBase>(); randNum = rando.Next(0, 5); for (int j = 0; j < randNum; j++) { int insuranceNum = rando.Next(1, 10); if (!newDoctor.AcceptedInsurance.Any(x => x.InsuranceID == insuranceNum)) { newDoctor.AcceptedInsurance.Add(Insurance.FirstOrDefault(x => x.InsuranceID == insuranceNum)); } } Doctors.Add(newDoctor); } Problems = new List <ProblemsModelList>(); ProblemsModelList parent = new ProblemsModelList(); parent.ProblemID = 0; parent.ProblemName = ""; parent.ProblemDescription = ""; ProblemsModelList chest = new ProblemsModelList(); chest.ProblemID = 1; chest.ProblemName = "Chest Problems"; chest.ProblemDescription = "Any issues in the chest area."; ProblemsModelList heart = new ProblemsModelList(); heart.ProblemID = 2; heart.ProblemName = "Heart Problems"; heart.ProblemDescription = "Any issues with the heart."; ProblemsModelList heartAttack = new ProblemsModelList(); heartAttack.ProblemID = 3; heartAttack.ProblemName = "Heart Attack"; heartAttack.ProblemDescription = "History of Heart Attacks"; ProblemsModelList arrythmia = new ProblemsModelList(); arrythmia.ProblemID = 4; arrythmia.ProblemName = "Arrythmia"; arrythmia.ProblemDescription = "Heart beats inconsistently or weirdly."; heart.ProblemChildren = new List <ProblemChild>(); heart.ProblemChildren.Add(new ProblemChild { ProblemID = heartAttack.ProblemID }); heart.ProblemChildren.Add(new ProblemChild { ProblemID = arrythmia.ProblemID }); ProblemsModelList breathing = new ProblemsModelList(); breathing.ProblemID = 5; breathing.ProblemName = "Breathing Issues"; breathing.ProblemDescription = "History of breathing issues."; chest.ProblemChildren = new List <ProblemChild>(); chest.ProblemChildren.Add(new ProblemChild { ProblemID = heart.ProblemID }); chest.ProblemChildren.Add(new ProblemChild { ProblemID = breathing.ProblemID }); ProblemsModelList everythingElse = new ProblemsModelList(); everythingElse.ProblemID = 6; everythingElse.ProblemName = "Everything Else"; everythingElse.ProblemDescription = "Any other kind of issue."; parent.ProblemChildren = new List <ProblemChild>(); parent.ProblemChildren.Add(new ProblemChild { ProblemID = everythingElse.ProblemID }); parent.ProblemChildren.Add(new ProblemChild { ProblemID = chest.ProblemID }); Problems.Add(parent); Problems.Add(chest); Problems.Add(heart); Problems.Add(arrythmia); Problems.Add(heartAttack); Problems.Add(breathing); Problems.Add(everythingElse); Patients = new List <PatientInfoModel>(); PatientInfoModel patient = new PatientInfoModel(); patient.PatientData = new PatientDataModel(); patient.PatientData.Address = "1 Main Street"; patient.PatientData.Birthdate = DateTime.Now.ToShortDateString(); patient.PatientData.CellPhone = "555-123-1234"; patient.PatientData.City = "Charlotte"; patient.PatientData.Email = "*****@*****.**"; patient.PatientData.EmergencyContactInfo = new List <EmergencyContactInfo>(); patient.PatientData.EmergencyContactInfo.Add(new EmergencyContactInfo { FullName = "Mom Person", Relationship = "Mom", CellPhone = "555-123-2345" }); patient.PatientData.Employer = "A Company"; patient.PatientData.FirstName = "Test"; patient.PatientData.ID = "1"; patient.PatientData.InsuranceInfo = new List <InsuranceModelPatientDetails>(); patient.PatientData.InsuranceInfo.Add(new InsuranceModelPatientDetails { InsuranceID = 1, PlanName = "Plan 1", GroupNumber = "1", EmployeeNumber = "2" }); patient.PatientData.InsuredPerson = new InsuredPerson { InsuredSSN = "123-45-6789", InsuredRelationship = "Self", InsuredBirthdate = DateTime.Now.ToShortDateString() }; patient.PatientData.LastName = "Person"; patient.PatientData.Occupation = "Job"; patient.PatientData.SSN = "123-45-6789"; patient.PatientData.State = "NC"; patient.PatientData.Zip = "12345-6789"; patient.Doctors = new List <DoctorsModelID>(); patient.Doctors.Add(new DoctorsModelID { DoctorID = 1 }); patient.Demographics = new DemographicsModel { City = "Charlotte", EducationLevel = "Bachelor's Degree", Ethnicity = "Prefer Not to Say", Gender = "Prefer Not to Say", GeneralHealthLevel = "Good", MaritalStatus = "Single", State = "NC", Zip = "12345-6789" }; patient.History = null; Patients.Add(patient); }
//[Route("/GetPatientInfo")] public async Task<IActionResult> GetPatientInfo([FromBody] PatientInfoModel value) { if (!ModelState.IsValid) return BadRequest(ModelState); var list = await _PatientDL.GetPatientInfo(value.FromDate, value.ToDate, value.EmployeeID, value.PatientName, value.PatientID); return Ok(list); }
public IActionResult GetTreatmentRecordByAppointmenDatetId(int AppointmentDateId) { ResultModel resultModel = new ResultModel(); var treatmentReocrd = _treatmentRecordServices.GetTreatmentRecordsByAppointmentDateId(AppointmentDateId); var treatmentRecodData = _reportServices.GetAllTreatmentRecordData(treatmentReocrd.Id); var treatmentRecordModel = new TreatmentRecordMasterModel(); treatmentRecordModel.TreatmentRecordNo = treatmentReocrd.TreatmentRecordNo; treatmentRecordModel.Id = treatmentReocrd.Id; treatmentRecordModel.AppointmentDateId = treatmentReocrd.AppointmentDateId; //Patient Data var patientdata = new PatientInfoModel(); patientdata.DiagnosisId = treatmentRecodData.PatientVM.DiagnosisId; patientdata.HospitalMasterId = treatmentRecodData.PatientVM.HospitalMasterId; patientdata.MarkComplete = treatmentRecodData.PatientVM.MarkComplete; patientdata.MR = (treatmentRecodData.PatientVM.MR != null)?_encryptionService.DecryptText(treatmentRecodData.PatientVM.MR):null; patientdata.NurseMasterId = treatmentRecodData.PatientVM.NurseMasterId; patientdata.PatientInfoId = treatmentRecodData.PatientVM.Id; patientdata.ProcedureId = treatmentRecodData.PatientVM.ProcedureId; patientdata.PatientMasterId = treatmentRecodData.PatientVM.PatientMasterId; patientdata.TreatmentRecordMasterId = treatmentRecodData.PatientVM.TreatmentRecordMasterId; patientdata.PatientName = (treatmentRecodData.PatientVM.PatientName != null)?_encryptionService.DecryptText(treatmentRecodData.PatientVM.PatientName) : null; patientdata.ProcedureName = treatmentRecodData.PatientVM.ProcedureName; patientdata.DaignosisName = treatmentRecodData.PatientVM.DaignosisName; patientdata.HospitalName = (treatmentRecodData.PatientVM.HospitalName != null)?_encryptionService.DecryptText(treatmentRecodData.PatientVM.HospitalName) : null; //patientdata.NurseName = treatmentRecodData.PatientVM.NurseName; patientdata.NurseName = _encryptionService.DecryptText(treatmentRecodData.PatientVM.NurseFirstName) + " " + _encryptionService.DecryptText(treatmentRecodData.PatientVM.NurseLastName); patientdata.Date = treatmentRecodData.PatientVM.Date; patientdata.Deleted = treatmentRecodData.PatientVM.Deleted; patientdata.LastUpdated = treatmentRecodData.PatientVM.LastUpdated; treatmentRecordModel.PatientInfoData = patientdata; //Doctor Data treatmentRecordModel.DoctorData = new DoctorInfoModel { Comments = treatmentRecodData.DoctorsInfo.Comments, DoctorName = treatmentRecodData.DoctorsInfo.DoctorName, EducatioPreTreatmentId = treatmentRecodData.DoctorsInfo.EducatioPreTreatmentId, Id = treatmentRecodData.DoctorsInfo.Id, OrdersReviewed = treatmentRecodData.DoctorsInfo.OrdersReviewed, OutPatient = treatmentRecodData.DoctorsInfo.OutPatient, Room = treatmentRecodData.DoctorsInfo.Room, TreatmentRecordMasterId = treatmentRecodData.DoctorsInfo.TreatmentRecordMasterId, MarkComplete = treatmentRecodData.DoctorsInfo.MarkComplete }; //Machine Data treatmentRecordModel.MachineData = new MachineModel { Id = treatmentRecodData.MachineMaster.Id, KitTypeSerial = treatmentRecodData.MachineMaster.KitTypeSerial, AlarmCheck = treatmentRecodData.MachineMaster.AlarmCheck, CleanedFrontDoorSensors = treatmentRecodData.MachineMaster.CleanedFrontDoorSensors, CleanedPressurePODSSeals = treatmentRecodData.MachineMaster.CleanedPressurePODSSeals, CleanedSensors = treatmentRecodData.MachineMaster.CleanedSensors, CleanedTrackDoors = treatmentRecodData.MachineMaster.CleanedTrackDoors, CorrectiveAction = treatmentRecodData.MachineMaster.CorrectiveAction, EquipmentId = treatmentRecodData.MachineMaster.EquipmentId, EquipSerial = treatmentRecodData.MachineMaster.EquipSerial, ExpDate = treatmentRecodData.MachineMaster.ExpDate, KitTypeId = (treatmentRecodData.MachineMaster.KitTypeId != null) ? treatmentRecodData.MachineMaster.KitTypeId : 0, MachineClean = treatmentRecodData.MachineMaster.MachineClean, PMDate = treatmentRecodData.MachineMaster.PMDate, PrimeSuccess = treatmentRecodData.MachineMaster.PrimeSuccess, SafetyChkDate = treatmentRecodData.MachineMaster.SafetyChkDate, TreatmentRecordMasterId = treatmentRecodData.MachineMaster.TreatmentRecordMasterId, MarkComplete = treatmentRecodData.MachineMaster.MarkComplete, EquipmentName = treatmentRecodData.MachineMaster.EquipmentName }; //Pre treatment Check treatmentRecordModel.PreTreatmentCheckData = new PreTreatmentCheckModel { AlarmTest = treatmentRecodData.PreTreatmentCheck.AlarmTest, BloodConsent = treatmentRecodData.PreTreatmentCheck.BloodConsent, Id = treatmentRecodData.PreTreatmentCheck.Id, InformedConsent = treatmentRecodData.PreTreatmentCheck.InformedConsent, TreatmentRecordMasterId = treatmentRecodData.PreTreatmentCheck.TreatmentRecordMasterId, UniversalPrecautions = treatmentRecodData.PreTreatmentCheck.UniversalPrecautions, MarkComplete = treatmentRecodData.PreTreatmentCheck.MarkComplete, MachinePrimeId = (treatmentRecodData.PreTreatmentCheck.MachinePrimeId != null) ? treatmentRecodData.PreTreatmentCheck.MachinePrimeId : 0 }; //Lab Values treatmentRecordModel.LabValueData = new LabValuesModel { EBV = treatmentRecodData.LabValues.EBV, ECV10 = treatmentRecodData.LabValues.ECV10, ECV15 = treatmentRecodData.LabValues.ECV15, EPV = treatmentRecodData.LabValues.EPV, Height = treatmentRecodData.LabValues.Height, HGB = treatmentRecodData.LabValues.HGB, HTC = treatmentRecodData.LabValues.HTC, Id = treatmentRecodData.LabValues.Id, MarkComplete = treatmentRecodData.LabValues.MarkComplete, TreatmentRecordMasterId = treatmentRecodData.LabValues.TreatmentRecordMasterId }; //Other Lab Values var otherLabValues = _treatmentRecordServices.GetOtherLabValueByLabValueId(treatmentRecodData.LabValues.Id); if (otherLabValues.Count() != 0) { foreach (var othervalue in otherLabValues) { var otherValuesData = new OtherLabValuesModel { ContentName = othervalue.ContentName, Id = othervalue.Id, ContentValue = othervalue.ContentValue, LabValuesId = othervalue.LabValuesId }; treatmentRecordModel.LabValueData.OtherLabValues.Add(otherValuesData); } } //Supplies And Access treatmentRecordModel.SuppliesData = new SuppliesAndAccessModel { ACDLot = treatmentRecodData.SuppliesVM.ACDLot, ACDLotExpDate = treatmentRecodData.SuppliesVM.ACDLotExpDate, ACEInhibitors = treatmentRecodData.SuppliesVM.ACEInhibitors, BloodWarmer = treatmentRecodData.SuppliesVM.BloodWarmer, Comments = treatmentRecodData.SuppliesVM.Comments, CreatedOn = treatmentRecodData.SuppliesVM.CreatedOn, CVC = treatmentRecodData.SuppliesVM.CVC, DateDC = treatmentRecodData.SuppliesVM.DateDC, Deleted = treatmentRecodData.SuppliesVM.Deleted, Id = treatmentRecodData.SuppliesVM.Id, LastDoseDate = treatmentRecodData.SuppliesVM.LastDoseDate, LastUpdated = treatmentRecodData.SuppliesVM.LastUpdated, Locations = treatmentRecodData.SuppliesVM.Locations, MarkComplete = treatmentRecodData.SuppliesVM.MarkComplete, MedsReviewed = treatmentRecodData.SuppliesVM.MedsReviewed, NSPrimeLot = treatmentRecodData.SuppliesVM.NSPrimeLot, NSPrimeLotExpDate = treatmentRecodData.SuppliesVM.NSPrimeLotExpDate, Peripheral = treatmentRecodData.SuppliesVM.Peripheral, Rate = treatmentRecodData.SuppliesVM.Rate, Serial = treatmentRecodData.SuppliesVM.Serial, TEMP = treatmentRecodData.SuppliesVM.TEMP, TreatmentRecordId = treatmentRecodData.SuppliesVM.TreatmentRecordId, Type = treatmentRecodData.SuppliesVM.Type, Vortex = treatmentRecodData.SuppliesVM.Vortex }; //Pre treatment Assessment treatmentRecordModel.PreTreatmentAssessmentData = new PreTreatmentAssessmentModel { BleendAutoTextId = treatmentRecodData.PreTreatmentAssessment.BleendAutoTextId, CreatedOn = treatmentRecodData.PreTreatmentAssessment.CreatedOn, EdemaAutoTextId = treatmentRecodData.PreTreatmentAssessment.EdemaAutoTextId, Id = treatmentRecodData.PreTreatmentAssessment.Id, IsAlert = treatmentRecodData.PreTreatmentAssessment.IsAlert, IsBleeding = treatmentRecodData.PreTreatmentAssessment.IsBleeding, IsComatose = treatmentRecodData.PreTreatmentAssessment.IsComatose, IsDeleted = treatmentRecodData.PreTreatmentAssessment.IsDeleted, IsEasy = treatmentRecodData.PreTreatmentAssessment.IsEasy, IsEdema = treatmentRecodData.PreTreatmentAssessment.IsEdema, IsFiO2 = treatmentRecodData.PreTreatmentAssessment.IsFiO2, IsLabored = treatmentRecodData.PreTreatmentAssessment.IsLabored, IsLethargic = treatmentRecodData.PreTreatmentAssessment.IsLethargic, IsMask = treatmentRecodData.PreTreatmentAssessment.IsMask, IsNC = treatmentRecodData.PreTreatmentAssessment.IsNC, IsNumbness = treatmentRecodData.PreTreatmentAssessment.IsNumbness, IsRoomAir = treatmentRecodData.PreTreatmentAssessment.IsRoomAir, IsVent = treatmentRecodData.PreTreatmentAssessment.IsVent, IsWeakness = treatmentRecodData.PreTreatmentAssessment.IsWeakness, LastUpdated = treatmentRecodData.PreTreatmentAssessment.LastUpdated, LocationAutoTextId = treatmentRecodData.PreTreatmentAssessment.LungSoundsAutoTextId, LungSoundsAutoTextId = treatmentRecodData.PreTreatmentAssessment.LungSoundsAutoTextId, MarkComplete = treatmentRecodData.PreTreatmentAssessment.MarkComplete, NumbnessAutoTextId = treatmentRecodData.PreTreatmentAssessment.NumbnessAutoTextId, OrientedX = treatmentRecodData.PreTreatmentAssessment.OrientedX, OSat = treatmentRecodData.PreTreatmentAssessment.OSat, PainAutoTextId = treatmentRecodData.PreTreatmentAssessment.PainAutoTextId, RythmAutoTextId = treatmentRecodData.PreTreatmentAssessment.RythmAutoTextId, SkinAutoTextId = treatmentRecodData.PreTreatmentAssessment.SkinAutoTextId, TreatmentRecordMasterId = treatmentRecodData.PreTreatmentAssessment.TreatmentRecordMasterId, WeaknessAutoTextId = treatmentRecodData.PreTreatmentAssessment.WeaknessAutoTextId }; //Run Values var runvaluesData = _treatmentRecordServices.GetRunValuesByTreatmentRecordId(treatmentReocrd.Id); if (runvaluesData.Count() != 0) { foreach (var runvalue in runvaluesData) { var RunValuesModel = new RunValuesModel { ACFlowRate = runvalue.ACFlowRate, ACFlowVol = runvalue.ACFlowVol, BP = runvalue.BP, CollectFlowRate = runvalue.CollectFlowRate, CollectFlowVol = runvalue.CollectFlowVol, CreatedOn = runvalue.CreatedOn, Deleted = runvalue.Deleted, Id = runvalue.Id, IntelFlowRate = runvalue.IntelFlowRate, IntelFlowVol = runvalue.IntelFlowVol, LastUpdated = runvalue.LastUpdated, LotNo = runvalue.LotNo, P = runvalue.P, T = runvalue.T, PlasmaFlowRate = runvalue.PlasmaFlowRate, PlasmaFlowVol = runvalue.PlasmaFlowVol, R = runvalue.R, ReplaceFluidId = runvalue.ReplaceFluidId, RunTime = runvalue.RunTime, TreatmentRecordMasterId = runvalue.TreatmentRecordMasterId, WarmerTemp = runvalue.WarmerTemp }; treatmentRecordModel.RunValues.runValuesList.Add(RunValuesModel); } treatmentRecordModel.RunValues.MarkComplete = runvaluesData[0].MarkComplete; } //Final Values treatmentRecordModel.FinalValuesData = new FinalValuesAndAccessPostAssessmentModel { AC = treatmentRecodData.FinalValuesVM.AC, BP = treatmentRecodData.FinalValuesVM.BP, ChlorhexidineCapApplied = treatmentRecodData.FinalValuesVM.ChlorhexidineCapApplied, Collet = treatmentRecodData.FinalValuesVM.Collet, Comments = treatmentRecodData.FinalValuesVM.Comments, CreatedOn = treatmentRecodData.FinalValuesVM.CreatedOn, Deleted = treatmentRecodData.FinalValuesVM.Deleted, FluidBalance = treatmentRecodData.FinalValuesVM.FluidBalance, Heparin = treatmentRecodData.FinalValuesVM.Heparin, Id = treatmentRecodData.FinalValuesVM.Id, Inlet = treatmentRecodData.FinalValuesVM.Inlet, Intact = treatmentRecodData.FinalValuesVM.Intact, LastUpdated = treatmentRecodData.FinalValuesVM.LastUpdated, MarkComplete = treatmentRecodData.FinalValuesVM.MarkComplete, NewDressing = treatmentRecodData.FinalValuesVM.NewDressing, P = treatmentRecodData.FinalValuesVM.P, Plasma = treatmentRecodData.FinalValuesVM.Plasma, R = treatmentRecodData.FinalValuesVM.R, Reinforced = treatmentRecodData.FinalValuesVM.Reinforced, Saline = treatmentRecodData.FinalValuesVM.Saline, T = treatmentRecodData.FinalValuesVM.T, Time = treatmentRecodData.FinalValuesVM.Time, TreatmentRecordId = treatmentRecodData.FinalValuesVM.TreatmentRecordId }; //post treatment treatmentRecordModel.PostTreatmentData = new PostTreatmentModel { Id = treatmentRecodData.PostTreatmentVM.Id, IsBiohazardWasteDisposed = treatmentRecodData.PostTreatmentVM.IsBiohazardWasteDisposed, IsEquipmentCleanedAndDisinfected = treatmentRecodData.PostTreatmentVM.IsEquipmentCleanedAndDisinfected, TreatmentRecordId = treatmentRecodData.PostTreatmentVM.TreatmentRecordId, IsPostCVCCarePerPolicy = treatmentRecodData.PostTreatmentVM.IsPostCVCCarePerPolicy, IsRinseBackComplete = treatmentRecodData.PostTreatmentVM.IsRinseBackComplete, IsSideRailsUp = treatmentRecodData.PostTreatmentVM.IsSideRailsUp, MarkComplete = treatmentRecodData.PostTreatmentVM.MarkComplete }; var Medication = _treatmentRecordServices.GetMedicationByPostTreatmentId(treatmentRecordModel.PostTreatmentData.Id); if (Medication.Count() != 0) { foreach (var medicationData in Medication) { var medicationdata = new MedicationModel { Comments = medicationData.Comments, Dosage = medicationData.Dosage, Id = medicationData.Id, Name = medicationData.Name, PostTreatmentId = medicationData.PostTreatmentId, Route = medicationData.Route }; } } //Note and Report treatmentRecordModel.NoteAndReportData = new NoteAndReportModel { CreatedOn = treatmentRecodData.NoteAndReportVM.CreatedOn, Deleted = treatmentRecodData.NoteAndReportVM.Deleted, Id = treatmentRecodData.NoteAndReportVM.Id, IsTreatmentCompletedWOIncident = treatmentRecodData.NoteAndReportVM.IsTreatmentCompletedWOIncident, LastUpdated = treatmentRecodData.NoteAndReportVM.LastUpdated, MarkComplete = treatmentRecodData.NoteAndReportVM.MarkComplete, Note = treatmentRecodData.NoteAndReportVM.Note, ReportGivenTo = treatmentRecodData.NoteAndReportVM.ReportGivenTo, TreatmentRecordMasterId = treatmentRecodData.NoteAndReportVM.TreatmentRecordMasterId }; resultModel.Message = ValidationMessages.Success; resultModel.Status = 1; resultModel.Response = treatmentRecordModel; return(Ok(resultModel)); }
public SelectionPage(PatientInfoModel patient) { InitializeComponent(); curPatient = patient; }
public bool Update(PatientInfoModel objNewreceiptInfo) { throw new NotImplementedException(); }
public bool InsertToReserve(PatientInfoModel objNewreceiptInfo) { throw new NotImplementedException(); }
public ActionResult Create(PatientInfoModel model) { ResultModel resultModel = new ResultModel(); try { if (model.PatientInfoId == 0) { //Creating New Treatment record var TreatmentRecord = new TreatmentRecordMaster(); TreatmentRecord.AppointmentDateId = model.AppointmentDateId; TreatmentRecord.TreatmentStatusId = (int)TreatmentStatus.Started; TreatmentRecord.CreatedOn = DateTime.UtcNow; TreatmentRecord.Deleted = false; _treatmentRecordsServices.InsertTreatmentRecords(TreatmentRecord); TreatmentRecord.TreatmentRecordNo = _treatmentRecordsServices.GetTreatmentRecordNo(); _treatmentRecordsServices.UpdateTreatmentRecords(TreatmentRecord); //Bhawana(07/10/2019) //Change appointment status from Created to Treatment Started var appointmentdata = _appointmentServices.GetAppointmentDateById((int)model.AppointmentDateId); appointmentdata.AppointmentStatusId = (int)AppointmentStatus.TreatmentStarted; _appointmentServices.UpdateAppointmentDate(appointmentdata); //Inser Patient Data if patient is new var PatientMaster = new PatientMaster(); if (model.PatientMasterId == 0) { PatientMaster.PatientName = _encryptionService.EncryptText(model.PatientName); PatientMaster.Deleted = false; PatientMaster.CreatedOn = DateTime.UtcNow; _treatmentRecordsServices.InsertPatientMaster(PatientMaster); } else { PatientMaster.Id = (int)model.PatientMasterId; PatientMaster.PatientName = _encryptionService.EncryptText(model.PatientName); PatientMaster.Deleted = false; PatientMaster.LastUpdated = DateTime.UtcNow; _treatmentRecordsServices.UpdatePatientMaster(PatientMaster); } //Inser PatientInfo Data in Database var PatientInfo = new PatientInfo(); PatientInfo.Date = model.Date; PatientInfo.MR = _encryptionService.EncryptText(model.MR); PatientInfo.Deleted = false; PatientInfo.CreatedOn = DateTime.UtcNow; PatientInfo.LastUpdated = DateTime.UtcNow; PatientInfo.PatientMasterId = PatientMaster.Id; PatientInfo.NurseMasterId = (model.NurseMasterId != 0)? model.NurseMasterId:null; PatientInfo.HospitalMasterId = (model.HospitalMasterId != 0) ? model.HospitalMasterId:null; PatientInfo.DiagnosisId = model.DiagnosisId; PatientInfo.ProcedureId = model.ProcedureId; PatientInfo.MarkComplete = model.MarkComplete; PatientInfo.TreatmentRecordMasterId = TreatmentRecord.Id; _treatmentRecordsServices.InsertPatientInfo(PatientInfo); //Bhawana(09/10/2019) //Change treatment Record Status _reportService.UpdateTreatmentStatusID((int)PatientInfo.TreatmentRecordMasterId); //12/10/19 aakansha //model response model.PatientInfoId = PatientInfo.Id; model.PatientMasterId = PatientInfo.PatientMasterId; model.TreatmentRecordMasterId = PatientInfo.TreatmentRecordMasterId; model.TreatmentRecordNo = TreatmentRecord.TreatmentRecordNo; resultModel.Message = ValidationMessages.Success; resultModel.Status = 1; resultModel.Response = model; return(Ok(resultModel)); } else { var patientInfoData = _treatmentRecordsServices.GetPatientInfoById(model.PatientInfoId); if (patientInfoData != null) { patientInfoData.Date = model.Date; patientInfoData.LastUpdated = DateTime.UtcNow; patientInfoData.MR = _encryptionService.EncryptText(model.MR); patientInfoData.NurseMasterId = model.NurseMasterId; patientInfoData.HospitalMasterId = model.HospitalMasterId; patientInfoData.DiagnosisId = model.DiagnosisId; patientInfoData.ProcedureId = model.ProcedureId; patientInfoData.MarkComplete = model.MarkComplete; _treatmentRecordsServices.UpdatePatientInfo(patientInfoData); //Bhawana(09/10/2019) //Change treatment Record Status _reportService.UpdateTreatmentStatusID((int)patientInfoData.TreatmentRecordMasterId); } //12/10/19 aakansha //model response model.PatientInfoId = patientInfoData.Id; model.PatientMasterId = patientInfoData.PatientMasterId; model.TreatmentRecordMasterId = patientInfoData.TreatmentRecordMasterId; var treatmentdata = _treatmentRecordsServices.GetTreatmentRecordsById((int)patientInfoData.TreatmentRecordMasterId); model.TreatmentRecordNo = treatmentdata.TreatmentRecordNo; resultModel.Message = ValidationMessages.Success; resultModel.Status = 1; resultModel.Response = model; return(Ok(resultModel)); } } catch (Exception ex) { resultModel.Message = ex.ToString(); resultModel.Status = 0; resultModel.Response = null; return(Ok(resultModel)); } }