add patient

This commit is contained in:
vanilia
2025-11-19 13:21:04 +07:00
parent 7ea69720bb
commit 8644bcaedc
26 changed files with 1454 additions and 79 deletions

No files matched your search

@@ -6,16 +6,29 @@ import (
"io"
"net/http"
"gorm.io/gorm"
e "simrs-vx/internal/domain/main-entities/patient"
"gorm.io/gorm"
plugin "simrs-vx/internal/use-case/simgos-sync-plugin/patient"
)
// example of middleware
func init() {
createPreMw = append(createPreMw,
createMw{Name: "check-vclaim-member", Func: checkVclaimMember},
)
createMw{Name: "check-vclaim-member", Func: checkVclaimMember})
createSimxSyncMw = append(createSimxSyncMw,
createSyncMw{Name: "sync-create-patient", Func: plugin.Create})
createSimxLogMw = append(createSimxLogMw,
createLogMw{Name: "create-sync-log", Func: plugin.CreateLog})
updatePreMw = append(updatePreMw,
updateMw{Name: "sync-update-patient", Func: plugin.Update})
deletePreMw = append(deletePreMw,
deleteMw{Name: "sync-delete-patient", Func: plugin.Delete})
}
func checkVclaimMember(input *e.CreateDto, data *e.Patient, tx *gorm.DB) error {