38 lines
1.6 KiB
Go
38 lines
1.6 KiB
Go
package composition
|
|
|
|
import (
|
|
"time"
|
|
|
|
"service/internal/satusehat/common"
|
|
)
|
|
|
|
type CompositionRequest struct {
|
|
OrganizationID string `json:"organization_id,omitempty"`
|
|
CompositionID string `json:"composition_id,omitempty"`
|
|
Status string `json:"status" binding:"required,oneof=preliminary final amended entered-in-error"`
|
|
Type *common.CodeableConceptDTO `json:"type" binding:"required"`
|
|
Category []*common.CodeableConceptDTO `json:"category,omitempty"`
|
|
PatientID string `json:"patient_id" binding:"required"`
|
|
PatientDisplay string `json:"patient_display,omitempty"`
|
|
EncounterID string `json:"encounter_id" binding:"required"`
|
|
EncounterDisplay string `json:"encounter_display,omitempty"`
|
|
Date *time.Time `json:"date" binding:"required"`
|
|
Author []common.ReferenceDTO `json:"author" binding:"required,min=1"`
|
|
Title string `json:"title" binding:"required"`
|
|
Sections []SectionDTO `json:"sections,omitempty"`
|
|
}
|
|
|
|
type SectionDTO struct {
|
|
Title string `json:"title,omitempty"`
|
|
Code *common.CodeableConceptDTO `json:"code,omitempty"`
|
|
Text *NarrativeDTO `json:"text,omitempty"`
|
|
Entries []common.ReferenceDTO `json:"entries,omitempty"`
|
|
}
|
|
|
|
type NarrativeDTO struct {
|
|
Status string `json:"status,omitempty"`
|
|
Div string `json:"div,omitempty"`
|
|
}
|
|
|
|
type CompositionPatchRequest []map[string]interface{}
|