public async Task <PatientDiagnoseModel> InsertPatientDiagnose(PatientDiagnoseModel patentDiagnose) { var response = await _client.PostAsJsonAsync($"/patient/{patentDiagnose.Patient}/diagnose", patentDiagnose); string responseMessage = await response.Content.ReadAsStringAsync(); PatientDiagnoseModel responseModel = JsonSerializer.Deserialize <PatientDiagnoseModel>(responseMessage); foreach (var symptom in patentDiagnose.Symptoms) { await InsertPatientSymptom(responseModel.Patient, responseModel.PatientDiagnoseId, symptom); } return(responseModel); }
public async Task DeletePatientDiagnose(PatientDiagnoseModel patientDiagnose) { await _client.DeleteAsync($"/patient/{patientDiagnose.Patient}/diagnose/{patientDiagnose.PatientDiagnoseId}"); }