Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public async Task DeletePatientDiagnose(PatientDiagnoseModel patientDiagnose)
 {
     await _client.DeleteAsync($"/patient/{patientDiagnose.Patient}/diagnose/{patientDiagnose.PatientDiagnoseId}");
 }