package patient

import (
	ecore "simrs-vx/internal/domain/base-entities/core"
	ep "simrs-vx/internal/domain/main-entities/person"
	erc "simrs-vx/internal/domain/references/common"
	"time"
)

type Patient struct {
	ecore.Main                                  // adjust this according to the needs
	Person_Id              *uint                `json:"person_id"`
	Person                 *ep.Person           `json:"person,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
	NewBornStatus          bool                 `json:"newBornStatus"`
	RegisteredAt           *time.Time           `json:"registeredAt"`
	RegisteredBy_User_Name *string              `json:"registeredBy_user_name" gorm:"size:100"`
	Status_Code            erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
	Number                 *string              `json:"number" gorm:"size:15;unique"`
	Parent_Number          *string              `json:"parent_number"`
	Parent                 *Patient             `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
}
