update All feture and service

This commit is contained in:
meninjar
2026-06-03 02:54:26 +00:00
parent af32d9cfdd
commit ce0fa1a291
98 changed files with 272469 additions and 1606 deletions

No files matched your search

+48 -36
View File
@@ -2,47 +2,59 @@ 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"`
}
OrganizationID string `json:"organization_id,omitempty"`
ObservationID string `json:"observation_id,omitempty"`
type ReferenceRangeDTO struct {
Low *common.QuantityDTO `json:"low,omitempty"`
High *common.QuantityDTO `json:"high,omitempty"`
Text string `json:"text,omitempty"`
}
Status string `json:"status" binding:"required,oneof=registered preliminary final amended corrected cancelled entered-in-error unknown"`
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"`
CategorySystem string `json:"category_system,omitempty"`
CategoryCode string `json:"category_code" binding:"required"`
CategoryDisplay string `json:"category_display,omitempty"`
CodeSystem string `json:"code_system,omitempty"`
Code string `json:"code" binding:"required"`
CodeDisplay string `json:"code_display,omitempty"`
PatientID string `json:"patient_id" binding:"required"`
PatientName string `json:"patient_name,omitempty"`
EncounterID string `json:"encounter_id,omitempty"`
EffectiveDateTime *time.Time `json:"effective_datetime,omitempty"`
Issued *time.Time `json:"issued,omitempty"`
PerformerID string `json:"performer_id,omitempty"`
PerformerName string `json:"performer_name,omitempty"`
SpecimenID string `json:"specimen_id,omitempty"`
BodySiteSystem string `json:"body_site_system,omitempty"`
BodySiteCode string `json:"body_site_code,omitempty"`
BodySiteDisplay string `json:"body_site_display,omitempty"`
ValueQuantityValue *float64 `json:"value_quantity_value,omitempty"`
ValueQuantityUnit string `json:"value_quantity_unit,omitempty"`
ValueQuantitySystem string `json:"value_quantity_system,omitempty"`
ValueQuantityCode string `json:"value_quantity_code,omitempty"`
ValueCodeSystem string `json:"value_code_system,omitempty"`
ValueCode string `json:"value_code,omitempty"`
ValueCodeDisplay string `json:"value_code_display,omitempty"`
ValueString string `json:"value_string,omitempty"`
ValueBoolean *bool `json:"value_boolean,omitempty"`
InterpretationSystem string `json:"interpretation_system,omitempty"`
InterpretationCode string `json:"interpretation_code,omitempty"`
InterpretationDisplay string `json:"interpretation_display,omitempty"`
ReferenceRangeLowValue *float64 `json:"reference_range_low_value,omitempty"`
ReferenceRangeHighValue *float64 `json:"reference_range_high_value,omitempty"`
ReferenceRangeUnit string `json:"reference_range_unit,omitempty"`
ReferenceRangeText string `json:"reference_range_text,omitempty"`
}
type ObservationPatchRequest []map[string]interface{}