Skip to content

domain ​

go
import "github.com/prescriptoo/prescriptoo-api/services/doctor/internal/domain"

Package domain contains doctor-owned professional data and authentication errors.

Index ​

Variables ​

go
var (
    // ErrProfileNotFound indicates that an identity has no professional profile.
    ErrProfileNotFound = errors.New("doctor profile not found")
    // ErrUnauthorized indicates invalid credentials or ineligible login.
    ErrUnauthorized = errors.New("invalid doctor credentials")
    // ErrForbidden indicates that an authenticated account cannot access doctor features.
    ErrForbidden = errors.New("active identity and doctor profile required")
    // ErrUnavailable indicates that a required authentication capability failed.
    ErrUnavailable = errors.New("doctor authentication unavailable")
)

ErrPadSettingsConflict indicates that the supplied revision is not the stored revision.

go
var ErrPadSettingsConflict = errors.New("prescription pad settings revision conflict")

type Chamber ​

Chamber stores a doctor's practice location and visiting hours.

go
type Chamber struct {
    Name    string `json:"name"`
    Address string `json:"address"`
    Hours   string `json:"hours"`
}

type PadSettings ​

PadSettings is the stored account-scoped resource with its concurrency revision.

go
type PadSettings struct {
    OwnerUserID     string
    Revision        int64
    ResourceVersion int
    Value           PadSettingsValue
    UpdatedAt       time.Time
}

type PadSettingsValue ​

PadSettingsValue is the version-one account-level design. JSON names intentionally stay camelCase to match the frontend resource and are the persisted representation.

go
type PadSettingsValue struct {
    ThemePreset              string  `json:"themePreset"`
    PrimaryColor             string  `json:"primaryColor"`
    HeaderGradientEnabled    bool    `json:"headerGradientEnabled"`
    HeaderGradientStartColor string  `json:"headerGradientStartColor"`
    HeaderGradientEndColor   string  `json:"headerGradientEndColor"`
    HeaderGradientTextColor  string  `json:"headerGradientTextColor"`
    HeaderGradientDirection  string  `json:"headerGradientDirection"`
    HeaderFontFamily         string  `json:"headerFontFamily"`
    BodyFontFamily           string  `json:"bodyFontFamily"`
    FontSizeScale            string  `json:"fontSizeScale"`
    HeaderStyle              string  `json:"headerStyle"`
    ColumnRatio              string  `json:"columnRatio"`
    ShowChamberDetails       bool    `json:"showChamberDetails"`
    ShowHeaderLogo           bool    `json:"showHeaderLogo"`
    HeaderLogoDataURL        *string `json:"headerLogoDataUrl"`
    HeaderLogoSize           string  `json:"headerLogoSize"`
    RxWatermarkEnabled       bool    `json:"rxWatermarkEnabled"`
    RxWatermarkDataURL       *string `json:"rxWatermarkDataUrl"`
    RxWatermarkSize          string  `json:"rxWatermarkSize"`
    RxWatermarkOpacity       int     `json:"rxWatermarkOpacity"`
    ShowDoctorSignature      bool    `json:"showDoctorSignature"`
    SignatureDataURL         *string `json:"signatureDataUrl"`
    ShowRegistrationNumber   bool    `json:"showRegistrationNumber"`
    HeaderLeftHTML           string  `json:"headerLeftHtml"`
    HeaderRightHTML          string  `json:"headerRightHtml"`
    PrintPaperSize           string  `json:"printPaperSize"`
    PrintColorMode           string  `json:"printColorMode"`
    FooterHTML               string  `json:"footerHtml"`
    Language                 string  `json:"language"`
}

type Profile ​

Profile stores professional details; account data remains owned by Identity.

go
type Profile struct {
    Qualifications []doctorpublic.CatalogEntry
    ID             string
    UserID         string
    LicenseNumber  string
    Speciality     doctorpublic.CatalogEntry
    Specialization []doctorpublic.CatalogEntry
    Qualification  string
    Chambers       []Chamber
    CreatedAt      time.Time
    UpdatedAt      time.Time
}

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.