feat (reference): done
This commit is contained in:
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package reference
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
e "simrs-vx/internal/domain/bpjs-entities/reference"
|
||||
ibpjs "simrs-vx/internal/infra/bpjs"
|
||||
)
|
||||
|
||||
func endpointMapper(input *e.ReadListDto) string {
|
||||
switch input.ReferenceType {
|
||||
case e.RTProvince:
|
||||
return ibpjs.O.BaseUrl + "provinces"
|
||||
case e.RTCities:
|
||||
return ibpjs.O.BaseUrl + "cities/" + input.PathValue1
|
||||
case e.RTDistrict:
|
||||
return ibpjs.O.BaseUrl + "districts/" + input.PathValue1
|
||||
case e.RTDiagnose:
|
||||
return ibpjs.O.BaseUrl + "diagnosa/" + input.PathValue1
|
||||
case e.RTDiagnosePrb:
|
||||
return ibpjs.O.BaseUrl + "diagnosaprb"
|
||||
case e.RTMedicinePrb:
|
||||
return ibpjs.O.BaseUrl + "obatprb/" + input.PathValue1
|
||||
case e.RTUnit:
|
||||
if input.QParam == "" {
|
||||
return ibpjs.O.BaseUrl + "referensi/poli"
|
||||
}
|
||||
return ibpjs.O.BaseUrl + "referensi/poli/" + input.QParam
|
||||
case e.RTHealthcare:
|
||||
return fmt.Sprintf("%sreferensi/faskes?faskes=%s&jenis-faskes=%s", ibpjs.O.BaseUrl, input.PathValue1, input.PathValue2)
|
||||
case e.RTDoctor:
|
||||
return fmt.Sprintf("%sreferensi/dokter-dpjp?jenis-pelayanan=%s&tgl-pelayanan=%s&kode-spesialis=%s", ibpjs.O.BaseUrl, input.PathValue1, input.PathValue2, input.PathValue3)
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user