add adjustment checkout

This commit is contained in:
vanilia
2025-10-22 09:03:19 +07:00
parent 4793eb3b3f
commit a795ccd747
20 changed files with 797 additions and 61 deletions

No files matched your search

@@ -0,0 +1,62 @@
package death_cause
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type CreateDto struct {
Encounter_Id *uint `json:"-"`
Value *string `json:"value"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
Encounter_Id *uint `json:"encounter-id"`
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
}
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
Encounter_Id *uint `json:"encounter_id"`
Value *string `json:"value"`
}
func (d DeathCause) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Value: d.Value,
}
resp.Main = d.Main
return resp
}
func ToResponseList(data []DeathCause) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -96,7 +96,7 @@ type MetaDto struct {
}
type DischargeDto struct {
Id uint `json:"id"`
DischargeMethod_Code *ere.DischargeMethodCode `json:"dischargeMethod_code" validate:"maxLength=16"`
Discharge_Method_Code *ere.DischargeMethodCode `json:"discharge_method_code" validate:"maxLength=16"`
EarlyEducation *string `json:"earlyEducation"`
MedicalDischargeEducation *string `json:"medicalDischargeEducation"`
AdmDischargeEducation *string `json:"admDischargeEducation"`