diagnoses

package
v0.0.0-...-884fdb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PatientIDURLParam     = "patientID"
	PatientNameQueryParam = "patientName"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddDiagnosisRequest

type AddDiagnosisRequest struct {
	Diagnosis    string  `json:"diagnosis"`
	Prescription *string `json:"prescription"`
}

type GetDiagnosesResponse

type GetDiagnosesResponse struct {
	PatientName string                 `json:"patient_name"`
	Diagnoses   []*diagnoses.Diagnosis `json:"patient_diagnoses"`
}

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL