Merge branch 'dev' of https://github.com/dikstub-rssa/simrs-be into feat/encounter-checkin
This commit is contained in:
@@ -16,4 +16,6 @@ type Patient struct {
|
||||
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:"unique;size:15"`
|
||||
Parent_Number *string `json:"parent_number"`
|
||||
Parent *Patient `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package specialist
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
espb "simrs-vx/internal/domain/main-entities/specialist-position/base"
|
||||
essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -52,6 +53,7 @@ type ResponseDto struct {
|
||||
Name string `json:"name"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
SpecialistPositions []espb.Basic `json:"specialistPositions,omitempty"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty"`
|
||||
}
|
||||
|
||||
func (d Specialist) ToResponse() ResponseDto {
|
||||
@@ -60,6 +62,7 @@ func (d Specialist) ToResponse() ResponseDto {
|
||||
Name: d.Name,
|
||||
Unit_Id: d.Unit_Id,
|
||||
SpecialistPositions: d.SpecialistPositions,
|
||||
Subspecialists: d.Subspecialists,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
|
||||
@@ -3,14 +3,16 @@ package specialist
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eub "simrs-vx/internal/domain/main-entities/specialist-position/base"
|
||||
essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Specialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||
SpecialistPositions []eub.Basic `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||
SpecialistPositions []eub.Basic `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package base
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Basic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
}
|
||||
|
||||
func (Basic) TableName() string {
|
||||
return "Subspecialist"
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
package subspecialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
espb "simrs-vx/internal/domain/main-entities/subspecialist-position/base"
|
||||
esb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
)
|
||||
|
||||
type Subspecialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
esb.Basic
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||
SubspecialistPositions []espb.Basic `json:"subspecialistPositions,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user