public PatientViewModel AddPatient(PatientViewModel patient) { var response = _integration.ResponseFromAPIPost("", "v1/Person/Create", patient, "http://localhost:61820/", true); if (response != null) { var dynamicResponse = JsonConvert.DeserializeObject <PatientViewModel>(response.Message); if (dynamicResponse != null) { return(dynamicResponse); } return(null); } else { return(null); } }
public dynamic AddStaff(StaffPayloadViewModel staff) { var response = _aPIIntegration.ResponseFromAPIPost("", "v1/Staff/create", staff, "http://localhost:61036/", true); if (response != null) { var dynamicResponse = JsonConvert.DeserializeObject <dynamic>(response.Message); if (dynamicResponse != null) { return(dynamicResponse); } return(null); } else { return(null); } }