package imagingstudy

import (
	"database/sql"
	"time"
)

// ImagingStudyDB merepresentasikan struktur tabel dari SIMRS
type ImagingStudyDB struct {
	ID               int64          `db:"id"`
	SourceID         string         // Holds the UUID from the source table (data_service_requests)
	CreatedAt        time.Time      // Holds the Created_at from the source table for tracking
	NoMR             sql.NullString `db:"nomr"`
	PatientIHS       sql.NullString `db:"patient_ihs"`
	PractitionerIHS  sql.NullString `db:"practitioner_ihs"`
	EncounterIHS     sql.NullString `db:"encounter_ihs"`
	AccessionNumber  sql.NullString `db:"accession_number"`
	ServiceRequestID sql.NullString `db:"service_request_id"`
	Modality         sql.NullString `db:"modality"`
	StartedDate      sql.NullTime   `db:"started_date"`
}

// SyncLog menyimpan log sinkronisasi untuk diaudit di database
type SyncLog struct {
	ImagingStudyID  string
	SatuSehatID     string
	RequestPayload  string
	ResponsePayload string
	Status          string
	ErrorMessage    string
}
