package entity import "time" type Patient struct { ID int64 FirstName string LastName string DateOfBirth string Sex Sex Phone string Address Address CaseStatus CaseStatus ReferralSource ReferralSource AssignedStaffId int64 StartDate string EndDate string } type UserMeta struct { ID uint64 `db:"id"` UserID uint64 `db:"user_id"` Name string `db:"name"` LastName string `db:"last_name"` Gender string `db:"gender"` BirthDate string `db:"birth_date"` BirthPlaceState uint16 `db:"birthPlaceState"` BirthPlaceCity uint16 `db:"birthPlaceCity"` Religion *string `db:"religion"` Nationality *string `db:"nationality"` AddressState uint16 `db:"addressState"` AddressCity uint16 `db:"addressCity"` Address string `db:"address"` Mobile *string `db:"mobile"` SpouseName *string `db:"spouseName"` SpouseAlive *bool `db:"spouseAlive"` CreatedAt *time.Time `db:"created_at"` UpdatedAt *time.Time `db:"updated_at"` } // Sex ================================== Sex type ========================================== type Sex string const ( SexUnknown Sex = "unknown" SexMale Sex = "male" SexFemale Sex = "female" SexOther Sex = "other" ) func (s Sex) SexValidation() bool { switch s { case SexUnknown, SexMale, SexFemale, SexOther: return true default: return false } } // CaseStatus =================================== Case Status ======================================= type CaseStatus string const ( Open CaseStatus = "open" Close CaseStatus = "close" InProgress CaseStatus = "inProgress" ) func (s CaseStatus) CaseStatusValidation() bool { switch s { case Open, Close, InProgress: return true default: return false } } // ReferralSource =================================== Referral source ======================================= type ReferralSource string const ( Hospital ReferralSource = "hospital" Community ReferralSource = "community" Other ReferralSource = "other" )