Files
satusehat-service/internal/satusehat/usecase/observation/dto.go
T

49 lines
2.7 KiB
Go

package observation
import (
"time"
"service/internal/satusehat/common"
)
type ObservationRequest struct {
OrganizationID string `json:"organization_id,omitempty"`
ObservationID string `json:"observation_id,omitempty"`
Status string `json:"status" binding:"required,oneof=registered preliminary final amended corrected cancelled entered-in-error unknown"`
Category []*common.CodeableConceptDTO `json:"category" binding:"required,min=1"`
Code *common.CodeableConceptDTO `json:"code" binding:"required"`
Subject *common.ReferenceDTO `json:"subject" binding:"required"` // Patient
Encounter *common.ReferenceDTO `json:"encounter,omitempty"`
EffectiveDateTime *time.Time `json:"effective_datetime,omitempty"`
Issued *time.Time `json:"issued,omitempty"`
Performer []common.ReferenceDTO `json:"performer,omitempty"`
BasedOn []common.ReferenceDTO `json:"based_on,omitempty"`
PartOf []common.ReferenceDTO `json:"part_of,omitempty"`
DerivedFrom []common.ReferenceDTO `json:"derived_from,omitempty"`
Specimen *common.ReferenceDTO `json:"specimen,omitempty"`
BodySite *common.CodeableConceptDTO `json:"body_site,omitempty"`
ValueQuantity *common.QuantityDTO `json:"value_quantity,omitempty"`
ValueCodeableConcept *common.CodeableConceptDTO `json:"value_codeable_concept,omitempty"`
ValueString string `json:"value_string,omitempty"`
ValueBoolean *bool `json:"value_boolean,omitempty"`
Interpretation []*common.CodeableConceptDTO `json:"interpretation,omitempty"`
ReferenceRange []ReferenceRangeDTO `json:"reference_range,omitempty"`
Components []ComponentDTO `json:"components,omitempty"`
}
type ReferenceRangeDTO struct {
Low *common.QuantityDTO `json:"low,omitempty"`
High *common.QuantityDTO `json:"high,omitempty"`
Text string `json:"text,omitempty"`
}
type ComponentDTO struct {
Code *common.CodeableConceptDTO `json:"code,omitempty"`
ValueQuantity *common.QuantityDTO `json:"value_quantity,omitempty"`
ValueCodeableConcept *common.CodeableConceptDTO `json:"value_codeable_concept,omitempty"`
ValueString string `json:"value_string,omitempty"`
ValueBoolean *bool `json:"value_boolean,omitempty"`
}
type ObservationPatchRequest []map[string]interface{}