feat(cpone): migrate medrec endpoint

This commit is contained in:
2026-08-18 15:04:14 +07:00
parent a799022bb5
commit 13bbdc1328
6 changed files with 770 additions and 1 deletions

View File

@@ -21,18 +21,24 @@ type LabRegistrationRepository interface {
AddLabServices(ctx context.Context, regID string, params repository.AddLabServicesParams) (repository.LabRegistrationOutcome, error)
}
type PatientRepository interface {
StoreMedrec(ctx context.Context, params repository.MedrecParams) (repository.MedrecOutcome, error)
}
type Handler struct {
layananRepo LayananRepository
labRepo LabRegistrationRepository
patientRepo PatientRepository
}
type CPONERepository interface {
LayananRepository
LabRegistrationRepository
PatientRepository
}
func NewHandler(repo CPONERepository) Handler {
return Handler{layananRepo: repo, labRepo: repo}
return Handler{layananRepo: repo, labRepo: repo, patientRepo: repo}
}
func (h Handler) MappingHarga(w http.ResponseWriter, r *http.Request) {