fix insert request and response

This commit is contained in:
2024-10-09 10:02:43 +07:00
parent 3c3c266536
commit 2a218dfe9e
2 changed files with 36 additions and 1 deletions

No files matched your search

+18 -1
View File
@@ -85,7 +85,24 @@ func InsertSuratKontrol(c *gin.Context) {
return
}
c.JSON(http.StatusOK, res)
response := &sk.ResponseInsertSuratKontrol{
MetaData: res.MetaData,
Response: sk.ResponseData{
NoSuratKontrol: res.Response.NoSuratKontrol,
TglRencanaKontrol: res.Response.TglRencanaKontrol,
NamaDokter: res.Response.NamaDokter,
NoKartu: res.Response.NoKartu,
Nama: res.Response.Nama,
Kelamin: res.Response.Kelamin,
TglLahir: res.Response.TglLahir,
NamaDiagnosa: res.Response.NamaDiagnosa,
SusSpesialis: req.Subspesialis,
},
}
log.Println("Response: ", response)
c.JSON(http.StatusOK, response)
}
func UpdateSuratKontrol(c *gin.Context) {
@@ -26,6 +26,7 @@ type RequestInsertRencanaKontrol struct {
NoSEP string `json:"noSEP"`
KodeHFIS string `json:"kodeHFIS"`
KodePoli string `json:"kodePoli"`
Subspesialis string `json:"subspesialis"`
TglRencanaKontrol string `json:"tglRencanaKontrol"`
User string `json:"user"`
}
@@ -80,6 +81,23 @@ type ResponseUpper struct {
Response ResponseSuratKontrol `json:"response"`
}
type ResponseInsertSuratKontrol struct {
MetaData MetadataString `json:"metaData"`
Response ResponseData `json:"response"`
}
type ResponseData struct {
NoSuratKontrol string `json:"noSuratKontrol"`
TglRencanaKontrol string `json:"tglRencanaKontrol"`
NamaDokter string `json:"namaDokter"`
NoKartu string `json:"noKartu"`
Nama string `json:"nama"`
Kelamin string `json:"kelamin"`
TglLahir string `json:"tglLahir"`
NamaDiagnosa string `json:"namaDiagnosa"`
SusSpesialis string `json:"subspesialis"`
}
type ResponseSuratKontrol struct {
NoSuratKontrol string `json:"noSuratKontrol"`
TglRencanaKontrol string `json:"tglRencanaKontrol"`