add new main erd and update const list
This commit is contained in:
No files matched your search
@@ -0,0 +1,70 @@
|
||||
package diagnosesrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"maxLength=10"`
|
||||
Name string `json:"name" validate:"maxLength=2048"`
|
||||
IndName string `json:"indName" validate:"maxLength=2048"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Sort string `json:"sort"`
|
||||
Pagination ecore.Pagination
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
}
|
||||
|
||||
func (d DiagnoseSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
IndName: d.IndName,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DiagnoseSrc) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package diagnosesrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type DiagnoseSrc struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:2048"`
|
||||
IndName string `json:"indName" gorm:"size:2048"`
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package edu_assessment
|
||||
|
||||
import (
|
||||
"simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
)
|
||||
|
||||
type EduAssessment struct {
|
||||
core.Main
|
||||
Encounter_Id *uint `json:"encounter_id" gorm:"not null"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
|
||||
GeneralEdus *string `json:"generalEdus"`
|
||||
SpecialEdus *string `json:"specialEdus"`
|
||||
Assessments *string `json:"assessments"`
|
||||
Plan *string `json:"plan"`
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package general_consent
|
||||
|
||||
import (
|
||||
"simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
)
|
||||
|
||||
type GeneralConsent struct {
|
||||
core.Main
|
||||
Encounter_Id *uint `json:"encounter_id" gorm:"not null"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package therapy_protol
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
|
||||
common "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type TherapyEntity struct {
|
||||
ecore.Main
|
||||
Encounter_Id *uint `json:"encounter_id" gorm:"not null"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
|
||||
Anamnesis *string `json:"anamnesis" gorm:"size:2048"`
|
||||
MedicalDiagnoses *string `json:"medicalDiagnoses"`
|
||||
FunctionDiagnoses *string `json:"functionDiagnoses"`
|
||||
Procedures *string `json:"procedures"`
|
||||
SupportingExams *string `json:"supportingExams" gorm:"size:2048"`
|
||||
Instruction *string `json:"instruction" gorm:"size:2048"`
|
||||
Evaluation *string `json:"evaluation" gorm:"size:2048"`
|
||||
WorkCauseStatus *string `json:"workCauseStatus" gorm:"size:2048"`
|
||||
Frequency *uint `json:"frequency"`
|
||||
IntervalUnit_Code *common.TimeUnitCode `json:"intervalUnit_Code" gorm:"size:10"`
|
||||
Duration *uint `json:"duration"`
|
||||
DurationUnit_Code *common.TimeUnitCode `json:"durationUnit_Code" gorm:"size:10"`
|
||||
}
|
||||
Reference in New Issue
Block a user