Files
2025-05-15 13:45:45 +07:00

84 lines
4.9 KiB
Go

package encounter
import (
_struct "api-poliklinik/pkg/models/struct"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Encounter struct {
ResourceType string `json:"resourceType" bson:"resourceType"`
ID primitive.ObjectID `json:"id" bson:"_id,omitempty"`
Identifier []_struct.Identifier `json:"identifier" bson:"identifier"`
Status string `json:"status" bson:"status"`
Class []_struct.CodeableConcept `json:"class" bson:"class"`
Priority _struct.CodeableConcept `json:"priority" bson:"priority"`
Type []_struct.CodeableConcept `json:"type" bson:"type"`
ServiceType []_struct.Value `json:"serviceType" bson:"serviceType"`
Subject _struct.Reference `json:"subject" bson:"subject"`
SubjectStatus _struct.CodeableConcept `json:"subjectStatus" bson:"subjectStatus"`
EpisodeOfCare []_struct.Reference `json:"episodeOfCare" bson:"episodeOfCare"`
BaseOn []_struct.Reference `json:"baseOn" bson:"baseOn"`
CareTeam []_struct.Reference `json:"careTeam" bson:"careTeam"`
PartOf _struct.Reference `json:"partOf" bson:"partOf"`
ServiceProvider _struct.Reference `json:"serviceProvider" bson:"serviceProvider"`
Participant []Participant `json:"participant" bson:"participant"`
Appointment []_struct.Reference `json:"appointment" bson:"appointment"`
VirtualServiceDetail []_struct.VirtualServiceEncounter `json:"virtualServiceDetail" bson:"virtualServiceDetail"`
ActualPeriod _struct.Period `json:"actualPeriod" bson:"actualPeriod"`
PlannedStartDate string `json:"plannedStartDate" bson:"plannedStartDate"`
PlannedEndDate string `json:"plannedEndDate" bson:"plannedEndDate"`
Length Length `json:"length" bson:"length"`
Reason []_struct.Reasonencounter `json:"reason" bson:"reason"`
Diagnosis []_struct.Diagnosis `json:"diagnosis" bson:"diagnosis"`
Account []_struct.Reference `json:"account" bson:"account"`
DietPreference []_struct.CodeableConcept `json:"dietPreference" bson:"dietPreference"`
SpecialArrangement []_struct.CodeableConcept `json:"specialArrangement" bson:"specialArrangement"`
SpecialCourtesy []_struct.CodeableConcept `json:"specialCourtesy" bson:"specialCourtesy"`
Admission Admission `json:"admission" bson:"admission"`
Location []Location `json:"location" bson:"location"`
CreatedAt string `json:"createdAt" bson:"createdAt"`
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
Extension []_struct.Extension `json:"extension" bson:"extension"`
}
// Struktur untuk Duration dalam Length
type Duration struct {
System string `json:"system" bson:"system"`
Version string `json:"version" bson:"version"`
Code string `json:"code" bson:"code"`
Display string `json:"display" bson:"display"`
UserSelected string `json:"userSelected" bson:"userSelected"`
Value float64 `json:"value" bson:"value"`
Unit string `json:"unit" bson:"unit"`
}
// Struktur untuk Length
type Length struct {
Duration Duration `json:"duration" bson:"duration"`
}
// Struktur untuk Participant
type Participant struct {
Type []_struct.CodeableConcept `json:"type" bson:"type"`
Period _struct.Period `json:"period" bson:"period"`
Actor _struct.Reference `json:"actor" bson:"actor"`
}
// Struktur untuk Location
type Location struct {
Location _struct.Reference `json:"location" bson:"location"`
Status string `json:"status" bson:"status"`
Form _struct.CodeableConcept `json:"form" bson:"form"`
Period _struct.Period `json:"period" bson:"period"`
}
// Struktur untuk Admission
type Admission struct {
PreAdmissionIdentifier _struct.Identifier `json:"preAdmissionIdentifier" bson:"preAdmissionIdentifier"`
Origin _struct.Reference `json:"origin" bson:"origin"`
AdmitSource _struct.CodeableConcept `json:"admitSource" bson:"admitSource"`
ReadmitSource _struct.CodeableConcept `json:"readmitSource" bson:"readmitSource"`
Destination _struct.Reference `json:"destination" bson:"destination"`
DischargeDisposition _struct.CodeableConcept `json:"dischargeDisposition" bson:"dischargeDisposition"`
}