Documentation ¶
Index ¶
Constants ¶
View Source
const ( PatientIDURLParam = "patientID" PatientNameQueryParam = "patientName" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDiagnosisRequest ¶
type GetDiagnosesResponse ¶
type HTTPError ¶
type HTTPError struct { Code int `json:"code" example:"400"` Message string `json:"message" example:"status bad request"` }
HTTP HTTPError
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(diagnosisServices app.DiagnosisServices) *Handler
func (*Handler) AddDiagnosis ¶
func (h *Handler) AddDiagnosis(writer http.ResponseWriter, request *http.Request)
AddDiagnosis godoc
@Summary Add patient diagnosis @Description Add patient diagnosis @Tags diagnosis @Accept json @Produce json @Param patientID path string true "patient ID" @Param diagnosis body AddDiagnosisRequest true "add diagnosis" @Success 201 {string} status created @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /patient/{patientID}/diagnoses [post]
func (*Handler) GetDiagnoses ¶
func (h *Handler) GetDiagnoses(writer http.ResponseWriter, request *http.Request)
GetDiagnoses godoc
@Summary Get patient diagnoses @Description Get patient diagnoses @Tags diagnosis @Accept json @Produce json @Param patientName query string true "diagnoses search by patient name" @Success 200 {object} GetDiagnosesResponse @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Router /patient/diagnoses [get]
Click to show internal directories.
Click to hide internal directories.