public IActionResult SaveMedicalRecord(MedicalRecord medicalRecord)
        {
            MedicalRecord newMedicalRecord = _medicalRecordService.CreateMedicalRecord(medicalRecord);

            if (newMedicalRecord == null)
            {
                return(BadRequest());
            }

            return(Ok());
        }
 public async Task <IActionResult> CreateMedicalRecord(CreateMedicalRecordReq request)
 {
     return(Ok(await _medicalRecordService.CreateMedicalRecord(request)));
 }
Example #3
0
        public IActionResult CreateMedicine([FromBody] MedicalRecordDTO medicalRecord)
        {
            MedicalRecordDTO newMedicalRecord = _medicalRecordService.CreateMedicalRecord(medicalRecord);

            return(CreatedAtRoute("MedicalRecordById", new { id = newMedicalRecord.Id }, newMedicalRecord));
        }