feat: add lab result endpoint

This commit is contained in:
2026-08-19 10:41:07 +07:00
parent 13bbdc1328
commit 21196d8227
6 changed files with 677 additions and 4 deletions

View File

@@ -25,20 +25,26 @@ type PatientRepository interface {
StoreMedrec(ctx context.Context, params repository.MedrecParams) (repository.MedrecOutcome, error)
}
type LabResultRepository interface {
GetLabResult(ctx context.Context, labNumber string) (repository.LabResultOutcome, error)
}
type Handler struct {
layananRepo LayananRepository
labRepo LabRegistrationRepository
patientRepo PatientRepository
layananRepo LayananRepository
labRepo LabRegistrationRepository
patientRepo PatientRepository
labResultRepo LabResultRepository
}
type CPONERepository interface {
LayananRepository
LabRegistrationRepository
PatientRepository
LabResultRepository
}
func NewHandler(repo CPONERepository) Handler {
return Handler{layananRepo: repo, labRepo: repo, patientRepo: repo}
return Handler{layananRepo: repo, labRepo: repo, patientRepo: repo, labResultRepo: repo}
}
func (h Handler) MappingHarga(w http.ResponseWriter, r *http.Request) {