Documentation ¶
Index ¶
- Variables
- func CORSMiddleware() gin.HandlerFunc
- func ConnectDatabase()
- type Administrator
- type Doctor
- type DoctorSpecialties
- type DrugConsumptionHistory
- type HospitalizedHistory
- type ListOfDiseases
- type ListOfDrugs
- type ListOfHospitalChambers
- type LoginAdministrator
- type LoginDoctor
- type Patient
- type TreatmentHistory
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
func ConnectDatabase ¶
func ConnectDatabase()
Types ¶
type Administrator ¶
type Doctor ¶
type Doctor struct { ID string `json:"id" gorm:"primary_key"` Name string `json:"name"` Gender bool `json:"gender"` BirthDate time.Time `json:"birthdate"` Address string `json:"address"` // foreignkey DoctorSpecialitiesID string `json:"doctor_specialities_id"` DoctorSpecialties DoctorSpecialties `json:"doctor_specialities" gorm:"foreignKey:DoctorSpecialtiesID"` // status CreatedAt time.Time `json:"created_at"` IsDeleted bool `json:"is_deleted"` }
type DoctorSpecialties ¶
type DrugConsumptionHistory ¶
type DrugConsumptionHistory struct { ID string `json:"id" gorm:"primary_key"` TotalDose string `json:"total_dose"` DoseADay int `json:"dose_a_day"` // foreign PatientID string `json:"patient_id"` Patient Patient `json:"patient" gorm:"foreignKey:PatientID"` DoctorID string `json:"doctor_id"` Doctor Doctor `json:"doctor" gorm:"foreignKey:DoctorID"` ListOfDiseasesID string `json:"list_of_diseases_id"` ListOfDiseases ListOfDiseases `json:"list_of_diseases" gorm:"foreignKey:ListOfDiseasesID"` // status CreatedAt time.Time `json:"created_at"` IsDeleted bool `json:"is_deleted"` }
type HospitalizedHistory ¶
type HospitalizedHistory struct { ID string `json:"id" gorm:"primary_key"` // foreign PatientID string `json:"patient_id"` Patient Patient `json:"patient" gorm:"foreignKey:PatientID"` DoctorID string `json:"doctor_id"` Doctor Doctor `json:"doctor" gorm:"foreignKey:DoctorID"` ListOfDiseasesID string `json:"list_of_diseases_id"` ListOfDiseases ListOfDiseases `json:"list_of_diseases" gorm:"foreignKey:ListOfDiseasesID"` ChamberID string `json:"chamber_id"` Chamber ListOfHospitalChambers `json:"list_chamber" gorm:"foreignKey:ListOfHospitalChambers"` // status IsOut bool `json:"is_out"` CreatedAt time.Time `json:"created_at"` OutAt time.Time `json:"out_at"` IsDeleted bool `json:"is_deleted"` }
type ListOfDiseases ¶
type ListOfDiseases struct { ID string `json:"id" gorm:"primary_key"` Disease string `json:"disease"` // buat satu disease dengan nama kondisi baik Description string `json:"description"` Infectious bool `json:"infectious"` // apakah menular // status IsNew bool `json:"is_new"` CreatedAt time.Time `json:"created_at"` IsDeleted bool `json:"is_deleted"` }
type ListOfDrugs ¶
type ListOfDrugs struct { ID string `json:"id" gorm:"primary_key"` Drug string `json:"drug"` Description string `json:"description"` Clasification string `json:"clasification"` // list are set in the controller (obat bebas, bebas terbatas, keras, narkotika) // stauts IsNew bool `json:"is_new"` CreatedAt time.Time `json:"created_at"` IsDeleted bool `json:"is_deleted"` }
type ListOfHospitalChambers ¶
type LoginAdministrator ¶
type LoginAdministrator struct { Username string `json:"username"` Password string `json:"password"` // foreignkey AdministratorID string `json:"administrator_id"` Administrator Administrator `json:"administrator" gorm:"foreignKey:AdministratorID"` }
type LoginDoctor ¶
type Patient ¶
type Patient struct { ID string `json:"id" gorm:"primary_key"` NIK string `json:"nik"` Name string `json:"name"` Gender string `json:"gender"` BirthDate time.Time `json:"birthdate"` Address string `json:"address"` // status CreatedAt time.Time `json:"created_at"` IsDeleted bool `json:"is_deleted"` }
type TreatmentHistory ¶
type TreatmentHistory struct { ID string `json:"id" gorm:"primary_key"` DiseaseIdentificationAs string `json:"disease_identification_as"` // foreign PatientID string `json:"patient_id"` Patient Patient `json:"patient" gorm:"foreignKey:PatientID"` DoctorID string `json:"doctor_id"` Doctor Doctor `json:"doctor" gorm:"foreignKey:DoctorID"` ListOfDiseasesID string `json:"list_of_diseases_id"` ListOfDiseases ListOfDiseases `json:"list_of_diseases" gorm:"foreignKey:ListOfDiseasesID"` // status CreatedAt time.Time `json:"created_at"` IsDeleted bool `json:"is_deleted"` }
Click to show internal directories.
Click to hide internal directories.