penambahan All case Satu sehat
This commit is contained in:
No files matched your search
@@ -1,20 +1,48 @@
|
||||
package observation
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"service/internal/satusehat/common"
|
||||
)
|
||||
|
||||
type ObservationRequest struct {
|
||||
PatientID string `json:"patient_id" binding:"required"`
|
||||
PatientName string `json:"patient_name" binding:"required"`
|
||||
EncounterID string `json:"encounter_id" binding:"required"`
|
||||
Status string `json:"status" binding:"required,oneof=registered preliminary final amended"` // registered, preliminary, final, amended
|
||||
CategoryCode string `json:"category_code" binding:"required"` // vital-signs, laboratory
|
||||
CategoryDisplay string `json:"category_display" binding:"required"`
|
||||
Code string `json:"code" binding:"required"` // LOINC code (e.g., 8867-4 for Heart rate)
|
||||
Display string `json:"display" binding:"required"` // Heart rate
|
||||
Value float64 `json:"value" binding:"required"`
|
||||
Unit string `json:"unit" binding:"required"`
|
||||
UnitCode string `json:"unit_code" binding:"required"` // UCUM code (e.g., /min)
|
||||
EffectiveDateTime time.Time `json:"effective_date_time" binding:"required"`
|
||||
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{}
|
||||
Reference in New Issue
Block a user