You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
okapidemo/his/model/models.go

65 lines
1.4 KiB

package model
import (
"time"
"gorm.io/gorm"
"src.whiteboxsystems.nl/DECOZO/okapi"
"src.whiteboxsystems.nl/DECOZO/okapidemo/sharedmodel"
)
type ConnectionState string
const (
ConnectionStatePending = ConnectionState("pending")
ConnectionStateCompleted = ConnectionState("completed")
)
type ServiceProvider struct {
gorm.Model
Reference string
AuthConfigID uint
AuthConfig *sharedmodel.XISAuthConfig
State ConnectionState
Addr string
Supplier string
System string
Services []Service
}
type Service struct {
gorm.Model
ServiceProviderID uint
ServiceProvider *ServiceProvider `json:"ServiceProvider,omitempty"`
ServiceID string
Name string
Description string
SubscriptionPolicy okapi.SubscriptionPolicy
ConsentPolicy okapi.ConsentPolicy
AuthConfigID uint
AuthConfig *sharedmodel.AuthConfig
Subscriptions []Patient `gorm:"many2many:service_patients;"`
}
type Consent struct {
gorm.Model
ServiceProviderID uint
ServiceID string
PatientID uint `json:"-"`
Patient Patient `json:"-"`
ConsentGivenOn *time.Time
VerbalConsent bool
Brochure string
Brochureversion string
}
type Patient struct {
gorm.Model
ExternalId string
ExternalIdSystem string
Name string
Birthdate string
PatientID string
FileBase string
Consent []Consent
}