public async Task <IHttpActionResult> UpdatePatientHistory(PatientHistoryModel patientHistory) { if (patientHistory == null) { return(BadRequest("Please provide valid inputs!")); } //CommonResponse validatedResponse = await AuthService.ValidateUserAndToken(); //if (!validatedResponse.IsError) { if (await PatientHistoryService.UpdatePatientHistory(patientHistory)) { return(Ok("Patient History Updated Successfully!")); } else { return(BadRequest("Failed to Update Patient History!")); } //} //else //{ // return Unauthorized(); //} } }
public async Task <IHttpActionResult> SearchPatientHistory(PatientHistoryModel patientHistory) { //CommonResponse validatedResponse = await AuthService.ValidateUserAndToken(); //if (!validatedResponse.IsError) //{ var patientsHistories = await PatientHistoryService.SearchPatientHistory(patientHistory); if (patientsHistories.Count > 0) { return(Ok(patientsHistories)); } else { return(BadRequest("No Such Patient Exists!")); } //} //else //{ // return Unauthorized(); //} }
public async Task <IHttpActionResult> GetPatientHistory() { //CommonResponse validatedResponse = await AuthService.ValidateUserAndToken(); //if (!validatedResponse.IsError) //{ var patientHIstories = await PatientHistoryService.GetPatientHistory(); if (patientHIstories.Count > 0) { return(Ok(patientHIstories)); } else { return(BadRequest("No History Data Found!")); } //} //else //{ // return Unauthorized(); //} }
public List <History> getHospitalRecordByPatientID(string id) { PatientHistoryService patientHistoryService = new PatientHistoryService(); return(patientHistoryService.getHistoryByPatientId(id)); }
public string GetHospitalRecordByHospitalID(long hospital_id) { IPatientHistoryService patientHistoryService = new PatientHistoryService(); return(patientHistoryService.GetHistoryByHospitalId(hospital_id)); }
// -------------------------------- Patient History Services public string GetHospitalRecord(long id) { IPatientHistoryService patientHistoryService = new PatientHistoryService(); return(patientHistoryService.GetHistory(id)); }
public string GetHospitalRecordByDate(string date) { IPatientHistoryService patientHistoryService = new PatientHistoryService(); return(patientHistoryService.GetHistoryByDate(date)); }
public string GetHospitalRecordByDoctorID(long doctor_id) { IPatientHistoryService patientHistoryService = new PatientHistoryService(); return(patientHistoryService.GetHistoryByDoctorId(doctor_id)); }