Skip to content

Commit

Permalink
feat: fix create medical record
Browse files Browse the repository at this point in the history
  • Loading branch information
shani-asad committed May 19, 2024
1 parent 0b0c1a1 commit f2b0629
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/handler/patient_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,8 @@ func (h *PatientHandler) CreateRecord(c *gin.Context) {
}

//error 404
filter := dto.RequestGetRecord{
IdentityDetail: dto.IdentityDetail{
IdentityNumber: request.IdentityNumber,
},
}
exist, _ := h.iPatientUsecase.GetRecords(filter)
if len(exist) == 0 || err != nil {
exist, _ := h.iPatientUsecase.GetPatientByIdentityNumber(request.IdentityNumber)
if (!exist) {
log.Println("Create request is not exist >> GetRecords")
c.JSON(404, gin.H{"status": "not exist", "message": "IdentityNumber not exist"})
return
Expand Down

0 comments on commit f2b0629

Please sign in to comment.