Class ConsultationController

java.lang.Object
com.mirna.hospitalmanagementapi.application.controllers.ConsultationController

@RestController @RequestMapping("/api/v1.0/consultations") public class ConsultationController extends Object
A Spring REST controller for managing consultations.
Version:
1.0
Author:
Mirna Gama
  • Constructor Details

    • ConsultationController

      public ConsultationController()
  • Method Details

    • postConsultation

      @PostMapping public org.springframework.http.ResponseEntity<Object> postConsultation(@RequestBody @Valid @Valid ConsultationDTO consultationDTO) throws ConsultationValidationException
      Post method to create a new Consultation object based on the provided DTO.
      Parameters:
      consultationDTO - The data transfer object containing data for Consultation entity.
      Returns:
      A response entity containing the saved consultation and ok status if successful, or a 400-level error if there is a validation error
      Throws:
      ConsultationValidationException - if there is a validation error