penambahan All case Satu sehat
This commit is contained in:
No files matched your search
@@ -26,19 +26,16 @@ func NewService(repo Repository) Service {
|
||||
}
|
||||
|
||||
func (s *service) Create(ctx context.Context, req EpisodeOfCareRequest) (*satusehat.FHIRResponse, error) {
|
||||
fhirPayload := MapRequestToFHIR(req)
|
||||
return s.repo.Create(ctx, fhirPayload)
|
||||
return s.repo.Create(ctx, MapRequestToFHIR(req))
|
||||
}
|
||||
|
||||
func (s *service) Update(ctx context.Context, id string, req EpisodeOfCareRequest) (*satusehat.FHIRResponse, error) {
|
||||
if id == "" {
|
||||
return nil, errors.NewValidationError().Message("EpisodeOfCare ID is required").Build()
|
||||
}
|
||||
|
||||
fhirPayload := MapRequestToFHIR(req)
|
||||
fhirPayload.Set("id", id)
|
||||
|
||||
return s.repo.Update(ctx, id, fhirPayload)
|
||||
payload := MapRequestToFHIR(req)
|
||||
payload.Set("id", id)
|
||||
return s.repo.Update(ctx, id, payload)
|
||||
}
|
||||
|
||||
func (s *service) Patch(ctx context.Context, id string, req EpisodeOfCarePatchRequest) (*satusehat.FHIRResponse, error) {
|
||||
|
||||
Reference in New Issue
Block a user