Код: Выделить всё
[Authorize]
[HttpPost("pa/questionnaire")]
[ProducesResponseType(200, Type = typeof(ApiResponse))]
[ProducesResponseType(500, Type = typeof(ApiResponse))]
public async Task FillPA([FromBody] QuestionnaireData data)
Код: Выделить всё
public class QuestionnaireData
{
public string Id { get; set; }
public DateTime? SignedDate { get; set; }
public Questionnaire Questionnaire { get; set; }
}
public class Questionnaire
{
[JsonPropertyName("patient_signature_date")]
public DateTime? PatientSignatureDate { get; set; }
[JsonPropertyName("patient_dob")]
public DateTime? PatientDob { get; set; }
[JsonPropertyName("patient_email")]
public string PatientEmail { get; set; }
[JsonPropertyName("patient_gender")]
public string PatientGender { get; set; }
[JsonPropertyName("patient_cell_phone")]
public string PatientCellPhone { get; set; }
[JsonPropertyName("patient_address")]
public string PatientAddress { get; set; }
[JsonPropertyName("patient_city")]
public string PatientCity { get; set; }
}
Код: Выделить всё
{
"Id": "234567",
"signedDate": "2024-09-30T00:00:00",
"questionnaire": {
"patientEmail": "[email protected]",
"patientCellPhone": "(817)-123-4567",
"patientDob": "2001-02-02",
"patientGender": "female",
"patientAddress": "96 FOREST ST",
"patientCity":"BOSTON"
}
}
Код: Выделить всё
{
"Id": "a5UU90000002VEEMA2",
"signedDate": "2024-09-30T00:00:00",
"Questionnaire": {
"patient_dob": "2024-09-30T08:16:06.509Z",
"patient_email": "string",
"patient_gender": "string",
"patient_cell_phone": "string",
"patient_address": "string",
"patient_city": "string"
}
}
У кого-нибудь есть идеи?
Подробнее здесь: https://stackoverflow.com/questions/790 ... he-payload