feat: add CPONE patient registration endpoint
This commit is contained in:
@@ -35,6 +35,11 @@ func (h Handler) RegisterLab(w http.ResponseWriter, r *http.Request) {
|
||||
writeLabResponse(w, http.StatusUnprocessableEntity, false, "validation_error", err.Error(), nil)
|
||||
return
|
||||
}
|
||||
// Departemen registrasi ditentukan per instance CPONE melalui .env.
|
||||
// Payload tetap didukung untuk handler/test lama yang tidak memakai config.
|
||||
if h.departmentID != "" {
|
||||
payload["departemen_id"] = h.departmentID
|
||||
}
|
||||
|
||||
validated, validationMessage := validateLabRegistration(payload)
|
||||
if validationMessage != "" {
|
||||
|
||||
Reference in New Issue
Block a user