update mappping

This commit is contained in:
meninjar
2026-08-04 11:46:50 +00:00
parent b8e219868d
commit ccd5a0974d
4 changed files with 21 additions and 25 deletions

No files matched your search

@@ -6,18 +6,18 @@ type ServiceRequestRequest struct {
OrganizationID string `json:"organization_id,omitempty"`
ServiceRequestID string `json:"service_request_id,omitempty"`
PatientID string `json:"patient_id,omitempty"`
PatientName string `json:"patient_name,omitempty"`
EncounterID string `json:"encounter_id,omitempty"`
RequesterID string `json:"requester_id,omitempty"`
PerformerID string `json:"performer_id,omitempty"`
RequesterName string `json:"requester_name,omitempty"`
PerformerName string `json:"performer_name,omitempty"`
Status string `json:"status,omitempty" binding:"omitempty,oneof=draft active on-hold revoked completed entered-in-error unknown"`
Intent string `json:"intent,omitempty" binding:"omitempty,oneof=proposal plan directive order original-order reflex-order filler-order instance-order option"`
Code string `json:"code,omitempty"`
System string `json:"system,omitempty"`
Display string `json:"display,omitempty"`
AuthoredOn time.Time `json:"authored_on,omitempty"`
PatientName string `json:"patient_name,omitempty"`
EncounterID string `json:"encounter_id,omitempty"`
RequesterID string `json:"requester_id,omitempty"`
PerformerID string `json:"performer_id,omitempty"`
RequesterName string `json:"requester_name,omitempty"`
PerformerName string `json:"performer_name,omitempty"`
Status string `json:"status,omitempty" binding:"omitempty,oneof=draft active on-hold revoked completed entered-in-error unknown"`
Intent string `json:"intent,omitempty" binding:"omitempty,oneof=proposal plan directive order original-order reflex-order filler-order instance-order option"`
Code []string `json:"code,omitempty"`
System string `json:"system,omitempty"`
Display string `json:"display,omitempty"`
AuthoredOn time.Time `json:"authored_on,omitempty"`
}
type ServiceRequestPatchRequest []map[string]interface{}
@@ -27,7 +27,7 @@ func MapRequestToFHIR(req ServiceRequestRequest) satusehat.FHIRPayload {
payload.Set("intent", req.Intent)
}
if req.Code != "" {
if len(req.Code) > 0 {
system := "http://snomed.info/sct"
if req.System != "" {
system = req.System