Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrICDRecordNotFound = errors.New("no record found for this code")
Functions ¶
func IsErrNotFound ¶
func IsValidEmail ¶
Types ¶
type CreateICDRequest ¶
type CreateICDRequest struct {
// CategoryCode always at least a 3lettered and above code
CategoryCode string `conform:"trim" json:"categoryCode" validate:"required|min_len:3"`
// DiagnosisCode could be null but has a max of 1 digits (9)
DiagnosisCode *string `conform:"trim" json:"diagnosisCode" validate:""`
// AbbreviatedDescription is a brief description of the diagnosis
AbbreviatedDescription string `conform:"trim" json:"abbreviatedDescription" validate:"required|min_len:4"`
// FullDescription is a description of the diagnosis in full.
FullDescription string `conform:"trim" json:"fullDescription" validate:"required|min_len:4"`
// CategoryTitle title of category
CategoryTitle string `conform:"trim" json:"categoryTitle" validate:"required|min_len:3"`
}
CreateICDRequest handles the create ICD request body
func (CreateICDRequest) GetFullCode ¶
func (req CreateICDRequest) GetFullCode() string
FullCode is a combination of categorycode and DiagnosisCode
type CreateICDResponse ¶
type EditICDRequest ¶
type EditICDRequest struct {
CategoryCode string `conform:"trim" json:"categoryCode" validate:"required|min_len:3"`
DiagnosisCode *string `conform:"trim" json:"diagnosisCode" validate:""`
AbbreviatedDescription string `conform:"trim" json:"abbreviatedDescription" validate:"required|min_len:4"`
FullDescription string `conform:"trim" json:"fullDescription" validate:"required|min_len:4"`
CategoryTitle string `conform:"trim" json:"categoryTitle" validate:"required|min_len:3"`
}
EditICDRequest handles the edit ICD request body
func (EditICDRequest) GetFullCode ¶
func (req EditICDRequest) GetFullCode() string
FullCode is a combination of categorycode and DiagnosisCode
type ICD ¶
type ICD struct {
bun.BaseModel `bun:"table:icd10_codes"`
CategoryCode string `json:"categoryCode"`
DiagnosisCode *string `json:"diagnosisCode"`
FullCode string `json:"fullCode" bun:",pk"`
AbbreviatedDescription string `json:"abbreviatedDeScription"`
FullDescription string `json:"fullDecription"`
CategoryTitle string `json:"categoryTitle"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type IICDRepository ¶
type IICDRepository interface {
CreateRecord(ctx context.Context, in CreateICDRequest) (*ICD, error)
UpdateRecord(ctx context.Context, fullCode string, in ICD) (*ICD, error)
GetRecord(ctx context.Context, id string) (*ICD, error)
DeleteRecord(ctx context.Context, id string) error
ListRecords(ctx context.Context, limit int, cursor string) (nextCursor *string, results []ICD, e error)
HasPrevPage(ctx context.Context, onFirstPage bool, cursor string) (cursorPrevPage *string, err error)
}
Click to show internal directories.
Click to hide internal directories.