Update Worker Satu Sehat
This commit is contained in:
No files matched your search
@@ -13,15 +13,9 @@ import (
|
||||
"service/internal/infrastructure/transport/http/middleware"
|
||||
"service/internal/infrastructure/transport/http/routes"
|
||||
|
||||
antrolHttp "service/internal/infrastructure/transport/http/handlers/bpjs/antrol"
|
||||
aplicareHttp "service/internal/infrastructure/transport/http/handlers/bpjs/aplicare"
|
||||
apotekHttp "service/internal/infrastructure/transport/http/handlers/bpjs/apotek"
|
||||
vclaimHttp "service/internal/infrastructure/transport/http/handlers/bpjs/vclaim"
|
||||
authHttp "service/internal/infrastructure/transport/http/handlers/main/auth"
|
||||
healthHttp "service/internal/infrastructure/transport/http/handlers/main/health"
|
||||
roleHttp "service/internal/infrastructure/transport/http/handlers/main/master/roles"
|
||||
satuSehatRefHttp "service/internal/infrastructure/transport/http/handlers/satusehat/reference"
|
||||
satuSehatUsecaseHttp "service/internal/infrastructure/transport/http/handlers/satusehat/usecase"
|
||||
|
||||
// Inisialisasi pkg
|
||||
"service/pkg/errors"
|
||||
@@ -88,118 +82,6 @@ func NewHTTPServer(
|
||||
}
|
||||
}
|
||||
|
||||
// Inisialisasi Handlers Modul VClaim
|
||||
if registry.VClaim != nil {
|
||||
if registry.VClaim.Sep != nil {
|
||||
appHandlers.Sep = vclaimHttp.NewSepHandler(registry.VClaim.Sep)
|
||||
}
|
||||
if registry.VClaim.Peserta != nil {
|
||||
appHandlers.Peserta = vclaimHttp.NewPesertaHandler(registry.VClaim.Peserta)
|
||||
}
|
||||
}
|
||||
|
||||
// Inisialisasi Handlers Modul Antrol
|
||||
if registry.Antrol != nil {
|
||||
if registry.Antrol.Reference != nil {
|
||||
appHandlers.Antrol = antrolHttp.NewAntrolHandler(registry.Antrol.Reference)
|
||||
}
|
||||
}
|
||||
|
||||
// Inisialisasi Handlers Modul Aplicares
|
||||
if registry.Aplicare != nil {
|
||||
if registry.Aplicare.Bed != nil {
|
||||
appHandlers.AplicareBed = aplicareHttp.NewBedHandler(registry.Aplicare.Bed)
|
||||
}
|
||||
}
|
||||
|
||||
// Inisialisasi Handlers Modul Apotek
|
||||
if registry.Apotek != nil {
|
||||
if registry.Apotek.DPHO != nil && registry.Apotek.Poli != nil {
|
||||
appHandlers.ApotekReference = apotekHttp.NewReferenceHandler(registry.Apotek.DPHO, registry.Apotek.Poli)
|
||||
}
|
||||
}
|
||||
|
||||
// Inisialisasi Handlers Modul Satu Sehat
|
||||
if registry.SatuSehat != nil {
|
||||
if registry.SatuSehat.Auth != nil {
|
||||
appHandlers.SatuSehatAuth = satuSehatRefHttp.NewAuthHandler(registry.SatuSehat.Auth)
|
||||
}
|
||||
if registry.SatuSehat.Patient != nil {
|
||||
appHandlers.SatuSehatPatient = satuSehatRefHttp.NewPatientHandler(registry.SatuSehat.Patient)
|
||||
}
|
||||
if registry.SatuSehat.Practitioner != nil {
|
||||
appHandlers.SatuSehatPractitioner = satuSehatRefHttp.NewPractitionerHandler(registry.SatuSehat.Practitioner)
|
||||
}
|
||||
if registry.SatuSehat.Organization != nil {
|
||||
appHandlers.SatuSehatOrganization = satuSehatRefHttp.NewOrganizationHandler(registry.SatuSehat.Organization)
|
||||
}
|
||||
if registry.SatuSehat.Location != nil {
|
||||
appHandlers.SatuSehatLocation = satuSehatRefHttp.NewLocationHandler(registry.SatuSehat.Location)
|
||||
}
|
||||
if registry.SatuSehat.KFA != nil {
|
||||
appHandlers.SatuSehatKFA = satuSehatRefHttp.NewKFAHandler(registry.SatuSehat.KFA)
|
||||
}
|
||||
|
||||
// Inisialisasi Handlers Modul Satu Sehat Usecase
|
||||
if registry.SatuSehat.AllergyIntolerance != nil {
|
||||
appHandlers.SSAllergyIntolerance = satuSehatUsecaseHttp.NewAllergyIntoleranceHandler(registry.SatuSehat.AllergyIntolerance)
|
||||
}
|
||||
if registry.SatuSehat.CarePlan != nil {
|
||||
appHandlers.SSCarePlan = satuSehatUsecaseHttp.NewCarePlanHandler(registry.SatuSehat.CarePlan)
|
||||
}
|
||||
if registry.SatuSehat.ClinicalImpression != nil {
|
||||
appHandlers.SSClinicalImpression = satuSehatUsecaseHttp.NewClinicalImpressionHandler(registry.SatuSehat.ClinicalImpression)
|
||||
}
|
||||
if registry.SatuSehat.Composition != nil {
|
||||
appHandlers.SSComposition = satuSehatUsecaseHttp.NewCompositionHandler(registry.SatuSehat.Composition)
|
||||
}
|
||||
if registry.SatuSehat.Condition != nil {
|
||||
appHandlers.SSCondition = satuSehatUsecaseHttp.NewConditionHandler(registry.SatuSehat.Condition)
|
||||
}
|
||||
if registry.SatuSehat.DiagnosticReport != nil {
|
||||
appHandlers.SSDiagnosticReport = satuSehatUsecaseHttp.NewDiagnosticReportHandler(registry.SatuSehat.DiagnosticReport)
|
||||
}
|
||||
if registry.SatuSehat.Encounter != nil {
|
||||
appHandlers.SSEncounter = satuSehatUsecaseHttp.NewEncounterHandler(registry.SatuSehat.Encounter)
|
||||
}
|
||||
if registry.SatuSehat.EpisodeOfCare != nil {
|
||||
appHandlers.SSEpisodeOfCare = satuSehatUsecaseHttp.NewEpisodeOfCareHandler(registry.SatuSehat.EpisodeOfCare)
|
||||
}
|
||||
if registry.SatuSehat.ImagingStudy != nil {
|
||||
appHandlers.SSImagingStudy = satuSehatUsecaseHttp.NewImagingStudyHandler(registry.SatuSehat.ImagingStudy)
|
||||
}
|
||||
if registry.SatuSehat.Immunization != nil {
|
||||
appHandlers.SSImmunization = satuSehatUsecaseHttp.NewImmunizationHandler(registry.SatuSehat.Immunization)
|
||||
}
|
||||
if registry.SatuSehat.Medication != nil {
|
||||
appHandlers.SSMedication = satuSehatUsecaseHttp.NewMedicationHandler(registry.SatuSehat.Medication)
|
||||
}
|
||||
if registry.SatuSehat.MedicationDispense != nil {
|
||||
appHandlers.SSMedicationDispense = satuSehatUsecaseHttp.NewMedicationDispenseHandler(registry.SatuSehat.MedicationDispense)
|
||||
}
|
||||
if registry.SatuSehat.MedicationRequest != nil {
|
||||
appHandlers.SSMedicationRequest = satuSehatUsecaseHttp.NewMedicationRequestHandler(registry.SatuSehat.MedicationRequest)
|
||||
}
|
||||
if registry.SatuSehat.MedicationStatement != nil {
|
||||
appHandlers.SSMedicationStatement = satuSehatUsecaseHttp.NewMedicationStatementHandler(registry.SatuSehat.MedicationStatement)
|
||||
}
|
||||
if registry.SatuSehat.Observation != nil {
|
||||
appHandlers.SSObservation = satuSehatUsecaseHttp.NewObservationHandler(registry.SatuSehat.Observation)
|
||||
}
|
||||
if registry.SatuSehat.Procedure != nil {
|
||||
appHandlers.SSProcedure = satuSehatUsecaseHttp.NewProcedureHandler(registry.SatuSehat.Procedure)
|
||||
}
|
||||
if registry.SatuSehat.QuestionnaireResponse != nil {
|
||||
appHandlers.SSQuestionnaireResponse = satuSehatUsecaseHttp.NewQuestionnaireResponseHandler(registry.SatuSehat.QuestionnaireResponse)
|
||||
}
|
||||
if registry.SatuSehat.ServiceRequest != nil {
|
||||
appHandlers.SSServiceRequest = satuSehatUsecaseHttp.NewServiceRequestHandler(registry.SatuSehat.ServiceRequest)
|
||||
}
|
||||
if registry.SatuSehat.Specimen != nil {
|
||||
appHandlers.SSSpecimen = satuSehatUsecaseHttp.NewSpecimenHandler(registry.SatuSehat.Specimen)
|
||||
}
|
||||
}
|
||||
|
||||
// Inisialisasi Health Handler dengan dependensi yang benar
|
||||
// Gunakan constructor baru yang menerima cache manager
|
||||
healthHandler := healthHttp.NewHealthHandlerWithCache(registry.PrimaryDB, registry.CacheManager, registry.Config, registry.DBManager)
|
||||
|
||||
Reference in New Issue
Block a user