baru master

This commit is contained in:
2025-05-11 22:15:40 +07:00
parent 4d3cc4b7d9
commit dc0b822440
18 changed files with 1758 additions and 87 deletions
+25 -3
View File
@@ -1,6 +1,8 @@
package server
import (
MasterHandler "api-poliklinik/pkg/handlers/Master"
//MigrasiExtension "api-poliklinik/pkg/handlers/Migrasi/extension"
patientHandler "api-poliklinik/pkg/handlers/MongoHandler/Patient"
patientRelatedHandler "api-poliklinik/pkg/handlers/MongoHandler/PatientRelated"
personHandler "api-poliklinik/pkg/handlers/MongoHandler/person"
@@ -10,6 +12,7 @@ import (
datapractitionerHandler "api-poliklinik/pkg/handlers/Practitioner"
dataAlamatHandler "api-poliklinik/pkg/handlers/address"
MigrasiHandler "api-poliklinik/pkg/handlers/migrasi"
MigrasiAddress "api-poliklinik/pkg/handlers/migrasi/address"
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"net/http"
@@ -34,6 +37,12 @@ func (s *Server) RegisterRoutes() http.Handler {
{
migrasi.POST("/migrate/practitioners", MigrasiHandler.MigratePractitionerToFHIR)
migrasi.POST("/migrate/pasien", MigrasiHandler.MigratePasienToFHIR)
migrasi.POST("/migrate/provinsi", MigrasiAddress.Migrasiprovinsi)
migrasi.POST("/migrate/kota", MigrasiAddress.Migrasikota)
migrasi.POST("/migrate/kecamatan", MigrasiAddress.Migrasikecamatan)
migrasi.POST("/migrate/kelurahan", MigrasiAddress.Migrasikelurahan)
//migrasi.POST("/migrate/bahasa", MigrasiExtension.Migrasibahasa)
}
Poliklinik := v1.Group("/poliklinik")
@@ -50,6 +59,8 @@ func (s *Server) RegisterRoutes() http.Handler {
Alamat := v1.Group("/Alamat")
{
Alamat.GET("/getdata", dataAlamatHandler.GetDataAlamat)
//Alamat.GET("/getprovinsi", MigrasiAddress.GetProvinsi)
}
Relasi := v1.Group("/relasi")
@@ -60,7 +71,7 @@ func (s *Server) RegisterRoutes() http.Handler {
patient := v1.Group("/patient")
{
//patient.POST("/insertpatient", patientHandler.InsertPatient)
patient.POST("/insertpatient", patientHandler.InsertPatient)
patient.GET("/getallpatient", patientHandler.GetAllPatient)
patient.PUT("/updatepatient", patientHandler.UpdatePatient)
patient.POST("/deletepatient", patientHandler.DeletePatient)
@@ -104,10 +115,21 @@ func (s *Server) RegisterRoutes() http.Handler {
//Location.POST("/deletelocation", personHandler.DeletePersonHand)
}
Master := v1.Group("createdocument")
Master := v1.Group("/master")
{
Master.GET("/getdatamaster", personHandler.GetDataPerson)
Master.GET("/getdataprovinsi", MasterHandler.GetProvinsi)
Master.GET("/getdatakota", MasterHandler.GetKota)
Master.GET("/getdatakecamatan", MasterHandler.GetKecamatan)
Master.GET("/getdatakelurahan", MasterHandler.GetKelurahan)
Master.GET("/kelurahan/search", MasterHandler.SearchKelurahan)
Master.GET("/address/kelurahan/id/:id", MasterHandler.GetHierarchyByKelurahan)
Master.GET("/hierarchy/provinsi/:id", MasterHandler.GetHierarchyFromProvinsi)
}
// Extension := v1.Group("/extension")
//{
// //Extension.GET("/getcommunication", MasterHandler.Getsuku )
//}
return r