public void UpdatePatientAssessment(PatientAssesment pa) { PatientAssesment ExistingPatAss = this.GetPatientAssessment(pa.PatientAssesmentId); Entities.Entry(ExistingPatAss).CurrentValues.SetValues(pa); Entities.SaveChanges(); }
public void testFormatDate() { PatientAssesment pa = new PatientAssesment(); Assert.IsNotNull(pa); DateTime dt = new DateTime(); string formattedDate = pa.formatDate(dt); Assert.IsNotNull(formattedDate); }
public void testCreateGetPatientAssesmentDictionary() { String assesmentId = "1"; PatientAssesment pa = new PatientAssesment(); Assert.IsNotNull(pa); Dictionary <String, String> dict = pa.createGetPatientDictionary(assesmentId); Assert.IsNotNull(dict); Assert.IsTrue(dict.ContainsKey("@patientId")); Assert.AreSame(dict["@patientId"], assesmentId); }
public void getPatientEMRAccordingToDate() { PatientAssesment pa = new PatientAssesment(); Assert.IsNotNull(pa); String emrDate = "2011/11/11"; String assesmentId = "1"; Dictionary <String, String> d = pa.createEmrRequest(assesmentId, emrDate); // DatabaseConnector con=new DatabaseConnector(); // DataTable dat = pa.getPatientEMRAccordingToDate(d,con); // Assert.IsNotNull(dat); // testing for just for one value // Assert.AreEqual(dat.Rows[0][1].ToString(),"2"); }
public void testcreateEmrRequest() { PatientAssesment pa = new PatientAssesment(); Assert.IsNotNull(pa); String emrDate = "11/23/2013"; String assesmentId = "1"; Dictionary <String, String> d = pa.createEmrRequest(assesmentId, emrDate); Assert.IsNotNull(d); Assert.IsTrue(d.ContainsKey("@patientId")); Assert.IsTrue(d.ContainsKey("@emrDate")); Assert.AreSame(d["@patientId"], assesmentId); Assert.AreSame(d["@emrDate"], emrDate); }
public ActionResult Assessments(Guid patddlTypes, Guid patddlGrades, string patRemarks, string PatientAssessmentId, int patPatient) { if (checkDropdowns(patddlTypes, 4) && checkDropdowns(patddlGrades, 5) && IsValidText(patRemarks)) { PatientAssesment pa = new PatientAssesment() { Remark = patRemarks, Grade = patddlGrades, Type = patddlTypes, PatientId_fk = patPatient }; //if completely new if (PatientAssessmentId == null || PatientAssessmentId.Equals("")) { pa.PatientAssesmentId = Guid.NewGuid(); new BusinessLayer.PatientAssessBL().AddPatientAssessment(pa); } else { //if update try { pa.PatientAssesmentId = new Guid(PatientAssessmentId); new BusinessLayer.PatientAssessBL().UpdatePatientAssessment(pa); } catch (FormatException) { pa.PatientAssesmentId = Guid.Empty; TempData["InvalidData"] = true; return(RedirectToAction("Index", "Assessments")); } } } else { ViewBag.Message = "Invalid data sent!"; } return(RedirectToAction("Index", "Assessments")); //return RedirectToAction("Index", "Assessments", new { prodid = aid, qty = pqty }); }
public void testPatientAssesmentObjects() { PatientAssesment pa = new PatientAssesment(); Assert.IsNotNull(pa); }
public void testPatientAssesmentCreate() { PatientAssesment pa = new PatientAssesment(); Assert.IsNotNull(pa); }
public void UpdatePatientAssessment(PatientAssesment pa) { new PatientAssessHandler().UpdatePatientAssessment(pa); }
public void AddPatientAssessment(PatientAssesment ass) { new PatientAssessHandler().AddPatientAssessment(ass); }