public IActionResult Save([FromBody] PatientDemographics viewModel) { var request = new RestRequest(URL_PATH, Method.POST); var response = _restClient.Execute <PatientDemographics>(request); if (response.ErrorException != null) { throw response.ErrorException; } return(View()); }
public bool Update(int id, PatientDemographics updatePatientDemographics) { var validateResult = _validate.Validate(updatePatientDemographics); if (!validateResult.IsValid) { throw new Exception("Validation Errors"); } var save = _mapper.Map <PatientDemographics, PatientDemographicsDto>(updatePatientDemographics); return(_repo.Update(id, save)); }
public int Save(PatientDemographics newPatientDemographics) { var validateResult = _validate.Validate(newPatientDemographics); if (!validateResult.IsValid) { throw new Exception("Validation Errors"); } var save = _mapper.Map <PatientDemographics, PatientDemographicsDto>(newPatientDemographics); return(_repo.Save(save)); }
public IActionResult Update(int id, [FromBody] PatientDemographics viewModel) { var request = new RestRequest(URL_PATH + "/" + id, Method.PUT); request.AddUrlSegment("Id", id); var response = _restClient.Execute <PatientDemographics>(request); if (response.ErrorException != null) { throw response.ErrorException; } return(View()); }
public string GetJSONPatientDemographics(DataTable dtPatientDemographics, string EMRPatientID, string RequestID, string EMRID, string ModuleID, string UserID) { try { PatientDemographics objPatientDemographics = new PatientDemographics(); string JSONString = objPatientDemographics.GenerateAPIJSONString(dtPatientDemographics, EMRPatientID, RequestID, EMRID, ModuleID, UserID); return(JSONString); } catch (Exception) { throw; } }
public DataTable GetPatientDemographics(string patientid, string stagingdbconnectionstring, string requestid) { try { DataTable dtPatientData = new DataTable(); parameters["patientid"] = patientid; PatientDemographics objPatientDemographics = new PatientDemographics(); dtPatientData = objPatientDemographics.GetData(parameters); //Common objCommon = new Common(); //objCommon.InsertRecords(dtPatientData, "IntelliHAthenaPatientDemographics", stagingdbconnectionstring, requestid); return(dtPatientData); } catch (Exception) { throw; } }
public bool Put(int id, [FromBody] PatientDemographics value) { return(_serviceImplementation.Update(id, value)); }
public int Post([FromBody] PatientDemographics value) { return(_serviceImplementation.Save(value)); }