update terbaru
This commit is contained in:
@@ -33,11 +33,12 @@ type service struct {
|
||||
}
|
||||
|
||||
var (
|
||||
hostSimrs = os.Getenv("SIMRS_STAG_HOST")
|
||||
userNameSimrs = os.Getenv("SIMRS_STAG_USER")
|
||||
passwordSimrs = os.Getenv("SIMRS_STAG_PASS")
|
||||
dbNameSimrs = os.Getenv("SIMRS_STAG_NAME")
|
||||
portSimrs = os.Getenv("SIMRS_STAG_PORT")
|
||||
hostSimrs = os.Getenv("SIMRS_STAG_HOST")
|
||||
userNameSimrs = os.Getenv("SIMRS_STAG_USER")
|
||||
passwordSimrs = os.Getenv("SIMRS_STAG_PASS")
|
||||
dbNameSimrs = os.Getenv("SIMRS_STAG_NAME")
|
||||
portSimrs = os.Getenv("SIMRS_STAG_PORT")
|
||||
|
||||
hostSatudata = os.Getenv("SATUDATA_HOST")
|
||||
userNameSatudata = os.Getenv("SATUDATA_USER")
|
||||
passwordSatudata = os.Getenv("SATUDATA_PASS")
|
||||
|
||||
@@ -4,6 +4,9 @@ import (
|
||||
MasterHandler "api-poliklinik/pkg/handlers/Master"
|
||||
patientHandler "api-poliklinik/pkg/handlers/MongoHandler/Patient"
|
||||
patientRelatedHandler "api-poliklinik/pkg/handlers/MongoHandler/PatientRelated"
|
||||
AccountHandler "api-poliklinik/pkg/handlers/MongoHandler/account"
|
||||
ConditionHandler "api-poliklinik/pkg/handlers/MongoHandler/condition"
|
||||
CoverageHandler "api-poliklinik/pkg/handlers/MongoHandler/coverage"
|
||||
"api-poliklinik/pkg/handlers/MongoHandler/encounter"
|
||||
EpisodeHandler "api-poliklinik/pkg/handlers/MongoHandler/episodeofcare"
|
||||
personHandler "api-poliklinik/pkg/handlers/MongoHandler/person"
|
||||
@@ -28,7 +31,7 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
r := gin.Default()
|
||||
r.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"*"}, // or specific domains like "http://example.com"
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
|
||||
AllowHeaders: []string{"Origin", "Content-Type"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
@@ -78,6 +81,20 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
Relasi.GET("/getdatapatientrelated", patientRelatedHandler.GetAllPatientdanRelated)
|
||||
}
|
||||
|
||||
condition := v1.Group("/condition")
|
||||
{
|
||||
condition.GET("/get", ConditionHandler.GetCondition)
|
||||
}
|
||||
|
||||
account := v1.Group("/account")
|
||||
{
|
||||
account.GET("/get", AccountHandler.GetAccount)
|
||||
}
|
||||
|
||||
cover := v1.Group("/coverage")
|
||||
{
|
||||
cover.GET("/get", CoverageHandler.GetCover)
|
||||
}
|
||||
patient := v1.Group("/patient")
|
||||
{
|
||||
patient.POST("/insertpatient", patientHandler.InsertPatient)
|
||||
@@ -85,6 +102,7 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
patient.PUT("/updatepatient", patientHandler.UpdatePatient)
|
||||
patient.POST("/deletepatient", patientHandler.DeletePatient)
|
||||
patient.GET("/getdata/display/:display/value/:value", patientHandler.GetDataBY)
|
||||
patient.GET("id/:id", patientHandler.GetpasienByID)
|
||||
//patient.POST("/getdataby", patientHandler.GetDataIdentifier)
|
||||
|
||||
}
|
||||
@@ -106,6 +124,7 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
Practitionermongo := v1.Group("/practitioner")
|
||||
{
|
||||
Practitionermongo.GET("/getdatapractitioner", practitionerHandler.GetDataPractitioner)
|
||||
Practitionermongo.GET("/id/:id", practitionerHandler.GetPractitionerbyID)
|
||||
Practitionermongo.GET("/getdata/display/:display/value/:value", practitionerHandler.Getdatadokter)
|
||||
//Practitionermongo.POST("/insertpractitioner", personHandler.InsertPerson)
|
||||
//Practitionermongo.POST("/deletepractitioner", personHandler.DeletePersonHand)
|
||||
@@ -121,6 +140,7 @@ func (s *Server) RegisterRoutes() http.Handler {
|
||||
Location := v1.Group("/location")
|
||||
{
|
||||
Location.GET("/getdatalocation", LocationHandler.Getlocation)
|
||||
Location.GET("/subsistem/:subsistem", LocationHandler.Getlocationbysubs)
|
||||
//Location.POST("/insertlocation", personHandler.Inse rtPerson)
|
||||
//Location.POST("/deletelocation", personHandler.DeletePersonHand)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user