fixing issue optimasi
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"satusehat-rssa/internal/constant"
|
||||
"satusehat-rssa/internal/model"
|
||||
"satusehat-rssa/pkg/httputil"
|
||||
@@ -93,6 +94,12 @@ func (s *SpecimenRepository) CreateSpecimen(req model.SpecimenRequest) (map[stri
|
||||
var data map[string]interface{}
|
||||
|
||||
req.ResourceType = constant.SpecimenResourceType
|
||||
req.Identifier = []model.IdentifierSpecimen{}
|
||||
req.Identifier = append(req.Identifier, model.IdentifierSpecimen{
|
||||
System: "http://sys-ids.kemkes.go.id/specimen/" + os.Getenv("ORGANIZATION_ID"), // Set this if needed, or remove if not present in IdentifierObject
|
||||
Value: "00001",
|
||||
Assigner: model.AssignerSpecimen{Reference: "Organization/" + os.Getenv("ORGANIZATION_ID")},
|
||||
})
|
||||
// Setup Patient
|
||||
var patient string
|
||||
if req.Subject.Reference != "" {
|
||||
@@ -287,6 +294,12 @@ func (s *SpecimenRepository) HandleCheckSpecimen(id string) ([]string, bool, err
|
||||
|
||||
func (s *SpecimenRepository) UpdateSpecimen(req model.SpecimenRequest) (map[string]interface{}, error) {
|
||||
req.ResourceType = constant.SpecimenResourceType
|
||||
req.Identifier = []model.IdentifierSpecimen{}
|
||||
req.Identifier = append(req.Identifier, model.IdentifierSpecimen{
|
||||
System: "http://sys-ids.kemkes.go.id/specimen/" + os.Getenv("ORGANIZATION_ID"), // Set this if needed, or remove if not present in IdentifierObject
|
||||
Value: "00001",
|
||||
Assigner: model.AssignerSpecimen{Reference: "Organization/" + os.Getenv("ORGANIZATION_ID")},
|
||||
})
|
||||
// Setup Patient
|
||||
var patient string
|
||||
if req.Subject.Reference != "" {
|
||||
|
||||
Reference in New Issue
Block a user