usecase
import "github.com/prescriptoo/prescriptoo-api/services/admin/internal/usecase"Package usecase contains single-task use case implementations.
Index
- Variables
- type ActivateDoctorAccountUseCase
- type ActivateOrganizationUseCase
- func NewActivateOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *ActivateOrganizationUseCase
- func (uc *ActivateOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)
- type AdminLoginInput
- type AdminLoginUseCase
- type AdminPrincipal
- type AdminUser
- type AdminUserPage
- type ApproveDoctorVerificationInput
- type ApproveDoctorVerificationParams
- type ApproveDoctorVerificationUseCase
- type ApproveVerificationUseCase
- type ArchiveBillingPlanUseCase
- type AssignDoctorsToOrganizationUseCase
- type ChangeOrganizationDoctorUseCase
- type ClinicalCreateChiefComplaintUseCase
- type ClinicalCreateHistorySuggestionUseCase
- type ClinicalDeleteChiefComplaintUseCase
- type ClinicalDeleteHistorySuggestionUseCase
- type ClinicalGetChiefComplaintUseCase
- type ClinicalGetHistorySuggestionUseCase
- type ClinicalListChiefComplaintUseCase
- type ClinicalListHistorySuggestionUseCase
- type ClinicalPatchChiefComplaintUseCase
- type ClinicalPatchHistorySuggestionUseCase
- type CreateAdminDTO
- type CreateAdminUseCase
- type CreateAdminUserInput
- type CreateAdminUserUseCase
- func NewCreateAdminUserUseCase(admins ports.AdminRepository, accounts ports.AdminIdentityService, bus events.Bus) *CreateAdminUserUseCase
- func (uc *CreateAdminUserUseCase) Execute(ctx context.Context, _ types.AdminPrincipal, input domain.CreateAdminUserInput) (*types.AdminUser, error)
- func (uc *CreateAdminUserUseCase) SetMutationRunner(work ports.MutationRunner)
- type CreateBillingInvoiceUseCase
- type CreateBillingPlanUseCase
- type CreateBillingSubscriptionUseCase
- func NewCreateBillingSubscriptionUseCase(provider subscriptionpublic.CreateBillingSubscriptionCapability, access ...*DoctorManagementAccess) *CreateBillingSubscriptionUseCase
- func (uc *CreateBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.CreateBillingSubscriptionInput) (*types.BillingSubscription, error)
- type CreateBrandUseCase
- type CreateDrugUseCase
- type CreateGenericUseCase
- type CreateManufacturerUseCase
- type CreateOrganizationInput
- type CreateOrganizationMemberInput
- type CreateOrganizationMemberUseCase
- func NewCreateOrganizationMemberUseCase(accounts ports.AdminIdentityService, organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, subscription ...MemberSubscriptionPolicy) *CreateOrganizationMemberUseCase
- func (uc *CreateOrganizationMemberUseCase) Execute(ctx context.Context, input domain.CreateOrganizationMemberInput) (*domain.OrganizationMember, error)
- type CreateOrganizationUseCase
- func NewCreateOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, authorization types.IAuthorizationService) *CreateOrganizationUseCase
- func (uc *CreateOrganizationUseCase) Execute(ctx context.Context, input domain.CreateOrganizationInput) (*types.Organization, error)
- type DeleteBillingSubscriptionUseCase
- func NewDeleteBillingSubscriptionUseCase(provider subscriptionpublic.DeleteBillingSubscriptionCapability, access ...*DoctorManagementAccess) *DeleteBillingSubscriptionUseCase
- func (uc *DeleteBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.DeleteBillingSubscriptionInput) (*types.Empty, error)
- type DeleteBrandUseCase
- type DeleteDrugUseCase
- type DeleteGenericUseCase
- type DeleteManufacturerUseCase
- type DeleteOrganizationUseCase
- func NewDeleteOrganizationUseCase(v ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *DeleteOrganizationUseCase
- func (uc *DeleteOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)
- type DoctorCatalogs
- func (uc *DoctorCatalogs) Create(ctx context.Context, header string, kind doctor.CatalogKind, values doctor.CatalogValues) (*doctor.CatalogEntry, error)
- func (uc *DoctorCatalogs) Delete(ctx context.Context, header string, kind doctor.CatalogKind, id string) error
- func (uc *DoctorCatalogs) Get(ctx context.Context, header string, kind doctor.CatalogKind, id string) (*doctor.CatalogEntry, error)
- func (uc *DoctorCatalogs) List(ctx context.Context, header string, kind doctor.CatalogKind, options doctor.CatalogListOptions) ([]doctor.CatalogEntry, error)
- func (uc *DoctorCatalogs) Update(ctx context.Context, header string, kind doctor.CatalogKind, id string, values doctor.CatalogValues) (*doctor.CatalogEntry, error)
- type DoctorManagementAccess
- type DoctorManagementDependencies
- type EditBillingInvoiceUseCase
- type EditBillingPlanUseCase
- type EditBillingSubscriptionUseCase
- func NewEditBillingSubscriptionUseCase(provider subscriptionpublic.EditBillingSubscriptionCapability, access ...*DoctorManagementAccess) *EditBillingSubscriptionUseCase
- func (uc *EditBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.EditBillingSubscriptionInput) (*types.BillingSubscription, error)
- type ExtendBillingSubscriptionUseCase
- func NewExtendBillingSubscriptionUseCase(provider subscriptionpublic.ExtendBillingSubscriptionCapability, access ...*DoctorManagementAccess) *ExtendBillingSubscriptionUseCase
- func (uc *ExtendBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.ExtendBillingSubscriptionInput) (*types.BillingSubscription, error)
- type GetAdminBrandUseCase
- type GetAdminDrugUseCase
- type GetAdminGenericUseCase
- type GetAdminManufacturerUseCase
- type GetAdminProfileUseCase
- func NewGetAdminProfileUseCase(identity types.IIdentityService, admins ports.AdminRepository, accounts identitypublic.AccountReader, authorization authorizationpublic.MemberAuthorizationReader) *GetAdminProfileUseCase
- func (uc *GetAdminProfileUseCase) Execute(ctx context.Context, input domain.AdminAuthenticatedInput) (*domain.AdminProfile, error)
- func (uc *GetAdminProfileUseCase) SetAuthorizationReader(reader authorizationpublic.MemberAuthorizationReader)
- type GetAdminUserUseCase
- type GetBillingInvoiceUseCase
- type GetBillingPaymentUseCase
- type GetBillingPlanUseCase
- type GetBillingSubscriptionUseCase
- func NewGetBillingSubscriptionUseCase(provider subscriptionpublic.GetBillingSubscriptionCapability, access ...*DoctorManagementAccess) *GetBillingSubscriptionUseCase
- func (uc *GetBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.GetBillingSubscriptionInput) (*types.BillingSubscription, error)
- type GetDoctorUseCase
- type GetDoctorVerificationInput
- type GetDoctorVerificationUseCase
- type GetIdentityAccountInput
- type GetIdentityAccountUseCase
- type GetOrganizationDoctorUseCase
- type GetOrganizationSummaryUseCase
- type GetOrganizationUseCase
- type GetVerificationUseCase
- type IdentityAccount
- type IdentitySource
- type IssueBillingInvoiceUseCase
- type ListAdminBrandsUseCase
- type ListAdminDrugsUseCase
- type ListAdminGenericsUseCase
- type ListAdminManufacturersUseCase
- type ListAdminUsersQuery
- type ListAdminUsersUseCase
- type ListAdminsUseCase
- type ListBillingInvoicesUseCase
- func NewListBillingInvoicesUseCase(provider subscriptionpublic.ListBillingInvoicesCapability, access ...*DoctorManagementAccess) *ListBillingInvoicesUseCase
- func (uc *ListBillingInvoicesUseCase) Execute(ctx context.Context, input domain.ListBillingInvoicesInput) (*types.Page[types.BillingInvoice], error)
- type ListBillingPaymentsUseCase
- func NewListBillingPaymentsUseCase(provider subscriptionpublic.ListBillingPaymentsCapability, access ...*DoctorManagementAccess) *ListBillingPaymentsUseCase
- func (uc *ListBillingPaymentsUseCase) Execute(ctx context.Context, input domain.ListBillingPaymentsInput) (*types.Page[types.BillingPayment], error)
- type ListBillingPlansUseCase
- type ListBillingSubscriptionsUseCase
- func NewListBillingSubscriptionsUseCase(provider subscriptionpublic.ListBillingSubscriptionsCapability, access ...*DoctorManagementAccess) *ListBillingSubscriptionsUseCase
- func (uc *ListBillingSubscriptionsUseCase) Execute(ctx context.Context, input domain.ListBillingSubscriptionsInput) (*types.Page[types.BillingSubscription], error)
- type ListDoctorOrganizationsUseCase
- type ListDoctorsUseCase
- type ListIdentityAccountsInput
- type ListIdentityAccountsUseCase
- type ListInvoicePaymentsUseCase
- func NewListInvoicePaymentsUseCase(provider subscriptionpublic.ListInvoicePaymentsCapability, access ...*DoctorManagementAccess) *ListInvoicePaymentsUseCase
- func (uc *ListInvoicePaymentsUseCase) Execute(ctx context.Context, input domain.ListInvoicePaymentsInput) (*types.Page[types.BillingPayment], error)
- type ListOrganizationDoctorsUseCase
- type ListOrganizationsUseCase
- type ListPendingDoctorVerificationsInput
- type ListPendingDoctorVerificationsUseCase
- type ListPendingVerificationsUseCase
- type ListSubscriptionInvoicesUseCase
- func NewListSubscriptionInvoicesUseCase(provider subscriptionpublic.ListSubscriptionInvoicesCapability, access ...*DoctorManagementAccess) *ListSubscriptionInvoicesUseCase
- func (uc *ListSubscriptionInvoicesUseCase) Execute(ctx context.Context, input domain.ListSubscriptionInvoicesInput) (*types.Page[types.BillingInvoice], error)
- type ManagementEmpty
- type ManagementPage
- type Member
- type MemberSubscriptionPolicy
- type NewIdentityInput
- type Organization
- type OrganizationDoctorManagement
- type OrganizationMember
- type OrganizationPage
- type OrganizationStatusInput
- type OrganizationViews
- type PatchBrandUseCase
- type PatchDrugUseCase
- type PatchGenericUseCase
- type PatchIdentityAccountStatusInput
- type PatchIdentityAccountStatusParams
- type PatchIdentityAccountStatusUseCase
- type PatchManufacturerUseCase
- type ProvisioningError
- type RecordBillingPaymentUseCase
- type RejectDoctorVerificationInput
- type RejectDoctorVerificationParams
- type RejectDoctorVerificationUseCase
- type RejectVerificationUseCase
- type ResolveAdminPrincipalUseCase
- type RestoreBrandUseCase
- type RestoreDrugUseCase
- type RestoreGenericUseCase
- type RestoreManufacturerUseCase
- type RestoreOrganizationUseCase
- func NewRestoreOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *RestoreOrganizationUseCase
- func (uc *RestoreOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)
- type RevokeAdminUserInput
- type RevokeAdminUserUseCase
- type SubmitDoctorVerificationInput
- type SubmitDoctorVerificationParams
- type SubmitDoctorVerificationUseCase
- type SubmitVerificationDTO
- type SubmitVerificationUseCase
- type SuspendDoctorAccountUseCase
- type SuspendOrganizationUseCase
- func NewSuspendOrganizationUseCase(v ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *SuspendOrganizationUseCase
- func (uc *SuspendOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)
- type UpdateOrganizationInput
- type UpdateOrganizationUseCase
- func NewUpdateOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *UpdateOrganizationUseCase
- func (uc *UpdateOrganizationUseCase) Execute(ctx context.Context, input domain.UpdateOrganizationInput) (*types.Organization, error)
- type VoidBillingInvoiceUseCase
- type VoidBillingPaymentUseCase
Variables
ErrManagementNotImplemented marks documentation-first administration operations.
var ErrManagementNotImplemented = errors.New("admin management operation is not implemented")type ActivateDoctorAccountUseCase
ActivateDoctorAccountUseCase enables the account without restoring revoked sessions.
type ActivateDoctorAccountUseCase struct {
// contains filtered or unexported fields
}func NewActivateDoctorAccountUseCase
func NewActivateDoctorAccountUseCase(deps DoctorManagementDependencies) *ActivateDoctorAccountUseCaseNewActivateDoctorAccountUseCase wires the account activation capabilities.
func (*ActivateDoctorAccountUseCase) Execute
func (uc *ActivateDoctorAccountUseCase) Execute(ctx context.Context, input domain.DoctorInput) (*domain.Doctor, error)Execute reactivates the account after checking the administrator permission.
type ActivateOrganizationUseCase
ActivateOrganizationUseCase coordinates organization activation.
type ActivateOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewActivateOrganizationUseCase
func NewActivateOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *ActivateOrganizationUseCaseNewActivateOrganizationUseCase wires organization activation and actor resolution.
func (*ActivateOrganizationUseCase) Execute
func (uc *ActivateOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)Execute authenticates the administrator and activates an organization that is not deleted.
type AdminLoginInput
AdminLoginInput contains credentials and session metadata.
type AdminLoginInput = domain.AdminLoginInputtype AdminLoginUseCase
AdminLoginUseCase authenticates credentials and requires active admin membership.
type AdminLoginUseCase struct {
// contains filtered or unexported fields
}func NewAdminLoginUseCase
func NewAdminLoginUseCase(authentication identitypublic.AuthenticationService, admins ports.AdminRepository) *AdminLoginUseCaseNewAdminLoginUseCase wires identity authentication and administrator lookup.
func (*AdminLoginUseCase) Execute
func (uc *AdminLoginUseCase) Execute(ctx context.Context, input domain.AdminLoginInput) (*types.TokenPair, error)Execute creates a session only for an active identity with active admin membership.
type AdminPrincipal
AdminPrincipal identifies an authenticated administrator.
type AdminPrincipal = types.AdminPrincipaltype AdminUser
AdminUser contains an administrator and their identity details.
type AdminUser = types.AdminUsertype AdminUserPage
AdminUserPage contains a page of administrator accounts.
type AdminUserPage = types.AdminUserPagetype ApproveDoctorVerificationInput
ApproveDoctorVerificationInput identifies a verification to approve and its notes.
type ApproveDoctorVerificationInput = domain.ApproveDoctorVerificationInputtype ApproveDoctorVerificationParams
ApproveDoctorVerificationParams contains verification approval notes.
type ApproveDoctorVerificationParams = domain.ApproveDoctorVerificationParamstype ApproveDoctorVerificationUseCase
ApproveDoctorVerificationUseCase performs an authenticated professional verification operation.
type ApproveDoctorVerificationUseCase struct {
// contains filtered or unexported fields
}func NewApproveDoctorVerificationUseCase
func NewApproveDoctorVerificationUseCase(deps DoctorManagementDependencies) *ApproveDoctorVerificationUseCaseNewApproveDoctorVerificationUseCase wires the authoritative review store and admin authorization.
func (*ApproveDoctorVerificationUseCase) Execute
func (uc *ApproveDoctorVerificationUseCase) Execute(ctx context.Context, input domain.ApproveDoctorVerificationInput) (*types.DoctorVerification, error)Execute enforces the operation permission before reading or changing review state.
type ApproveVerificationUseCase
ApproveVerificationUseCase handles approving a verification.
type ApproveVerificationUseCase struct {
// contains filtered or unexported fields
}func NewApproveVerificationUseCase
func NewApproveVerificationUseCase(repo ports.DoctorVerificationRepository) *ApproveVerificationUseCaseNewApproveVerificationUseCase instantiates a new ApproveVerificationUseCase.
func (*ApproveVerificationUseCase) Execute
func (uc *ApproveVerificationUseCase) Execute(ctx context.Context, verificationID string, adminUserID string, notes string) errorExecute approves a verification.
type ArchiveBillingPlanUseCase
ArchiveBillingPlanUseCase orchestrates a platform-admin billing operation.
type ArchiveBillingPlanUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewArchiveBillingPlanUseCase
func NewArchiveBillingPlanUseCase(provider subscriptionpublic.ArchiveBillingPlanCapability, access ...*DoctorManagementAccess) *ArchiveBillingPlanUseCaseNewArchiveBillingPlanUseCase accepts only the capability used by this operation.
func (*ArchiveBillingPlanUseCase) Execute
func (uc *ArchiveBillingPlanUseCase) Execute(ctx context.Context, input domain.ArchiveBillingPlanInput) (*types.Empty, error)Execute authenticates and authorizes before calling the Subscription capability.
type AssignDoctorsToOrganizationUseCase
AssignDoctorsToOrganizationUseCase validates every profile before an atomic organization-owned write.
type AssignDoctorsToOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewAssignDoctorsToOrganizationUseCase
func NewAssignDoctorsToOrganizationUseCase(deps DoctorManagementDependencies) *AssignDoctorsToOrganizationUseCaseNewAssignDoctorsToOrganizationUseCase wires directory validation and organization-owned assignment.
func (*AssignDoctorsToOrganizationUseCase) Execute
func (uc *AssignDoctorsToOrganizationUseCase) Execute(ctx context.Context, input domain.AssignDoctorsToOrganizationInput) (*domain.DoctorAssignment, error)Execute validates the entire batch before committing its affiliations.
type ChangeOrganizationDoctorUseCase
ChangeOrganizationDoctorUseCase authorizes organization-scoped affiliation changes.
type ChangeOrganizationDoctorUseCase struct{ Dependencies OrganizationDoctorManagement }func (*ChangeOrganizationDoctorUseCase) Execute
func (uc *ChangeOrganizationDoctorUseCase) Execute(ctx context.Context, in domain.ChangeOrganizationDoctorInput) (*domain.DoctorAffiliation, error)Execute requires an existing relationship; active accounts are rechecked under Identity row locks by the Organization writer, without gating on verification.
type ClinicalCreateChiefComplaintUseCase
ClinicalCreateChiefComplaintUseCase enforces the active Admin session and clinical catalog manage grant.
type ClinicalCreateChiefComplaintUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalCreateChiefComplaintUseCase) Execute
func (uc ClinicalCreateChiefComplaintUseCase) Execute(ctx context.Context, authorization string, input c.CreateChiefComplaintInput) (c.ChiefComplaint, error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalCreateHistorySuggestionUseCase
ClinicalCreateHistorySuggestionUseCase enforces the active Admin session and clinical catalog manage grant.
type ClinicalCreateHistorySuggestionUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalCreateHistorySuggestionUseCase) Execute
func (uc ClinicalCreateHistorySuggestionUseCase) Execute(ctx context.Context, authorization string, input c.CreateHistoryInput) (c.HistorySuggestion, error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalDeleteChiefComplaintUseCase
ClinicalDeleteChiefComplaintUseCase enforces the active Admin session and clinical catalog manage grant.
type ClinicalDeleteChiefComplaintUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalDeleteChiefComplaintUseCase) Execute
func (uc ClinicalDeleteChiefComplaintUseCase) Execute(ctx context.Context, authorization string, input c.DeleteInput) errorExecute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalDeleteHistorySuggestionUseCase
ClinicalDeleteHistorySuggestionUseCase enforces the active Admin session and clinical catalog manage grant.
type ClinicalDeleteHistorySuggestionUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalDeleteHistorySuggestionUseCase) Execute
func (uc ClinicalDeleteHistorySuggestionUseCase) Execute(ctx context.Context, authorization string, input c.DeleteInput) errorExecute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalGetChiefComplaintUseCase
ClinicalGetChiefComplaintUseCase enforces the active Admin session and clinical catalog read grant.
type ClinicalGetChiefComplaintUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalGetChiefComplaintUseCase) Execute
func (uc ClinicalGetChiefComplaintUseCase) Execute(ctx context.Context, authorization string, input string) (c.ChiefComplaint, error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalGetHistorySuggestionUseCase
ClinicalGetHistorySuggestionUseCase enforces the active Admin session and clinical catalog read grant.
type ClinicalGetHistorySuggestionUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalGetHistorySuggestionUseCase) Execute
func (uc ClinicalGetHistorySuggestionUseCase) Execute(ctx context.Context, authorization string, input string) (c.HistorySuggestion, error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalListChiefComplaintUseCase
ClinicalListChiefComplaintUseCase enforces the active Admin session and clinical catalog read grant.
type ClinicalListChiefComplaintUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalListChiefComplaintUseCase) Execute
func (uc ClinicalListChiefComplaintUseCase) Execute(ctx context.Context, authorization string, input c.CatalogQuery) (c.Page[c.ChiefComplaint], error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalListHistorySuggestionUseCase
ClinicalListHistorySuggestionUseCase enforces the active Admin session and clinical catalog read grant.
type ClinicalListHistorySuggestionUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalListHistorySuggestionUseCase) Execute
func (uc ClinicalListHistorySuggestionUseCase) Execute(ctx context.Context, authorization string, input c.HistoryCatalogQuery) (c.Page[c.HistorySuggestion], error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalPatchChiefComplaintUseCase
ClinicalPatchChiefComplaintUseCase enforces the active Admin session and clinical catalog manage grant.
type ClinicalPatchChiefComplaintUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalPatchChiefComplaintUseCase) Execute
func (uc ClinicalPatchChiefComplaintUseCase) Execute(ctx context.Context, authorization string, input c.PatchChiefComplaintInput) (c.ChiefComplaint, error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type ClinicalPatchHistorySuggestionUseCase
ClinicalPatchHistorySuggestionUseCase enforces the active Admin session and clinical catalog manage grant.
type ClinicalPatchHistorySuggestionUseCase struct {
Access *DoctorManagementAccess
Service ports.AdminClinicalSuggestionService
}func (ClinicalPatchHistorySuggestionUseCase) Execute
func (uc ClinicalPatchHistorySuggestionUseCase) Execute(ctx context.Context, authorization string, input c.PatchHistoryInput) (c.HistorySuggestion, error)Execute authorizes before delegation; mutation attribution always comes from the verified principal.
type CreateAdminDTO
CreateAdminDTO contains parameters to create an admin.
type CreateAdminDTO = domain.CreateAdminInputtype CreateAdminUseCase
CreateAdminUseCase handles admin creation.
type CreateAdminUseCase struct {
// contains filtered or unexported fields
}func NewCreateAdminUseCase
func NewCreateAdminUseCase(repo ports.AdminRepository) *CreateAdminUseCaseNewCreateAdminUseCase instantiates a new CreateAdminUseCase.
func (*CreateAdminUseCase) Execute
func (uc *CreateAdminUseCase) Execute(ctx context.Context, dto domain.CreateAdminInput) (*domain.Admin, error)Execute creates a new admin.
type CreateAdminUserInput
CreateAdminUserInput identifies the identity receiving administrator access.
type CreateAdminUserInput = domain.CreateAdminUserInputtype CreateAdminUserUseCase
CreateAdminUserUseCase provisions administrator membership for an identity account.
type CreateAdminUserUseCase struct {
// contains filtered or unexported fields
}func NewCreateAdminUserUseCase
func NewCreateAdminUserUseCase(admins ports.AdminRepository, accounts ports.AdminIdentityService, bus events.Bus) *CreateAdminUserUseCaseNewCreateAdminUserUseCase wires administrator persistence, identity capabilities, and events.
func (*CreateAdminUserUseCase) Execute
func (uc *CreateAdminUserUseCase) Execute(ctx context.Context, _ types.AdminPrincipal, input domain.CreateAdminUserInput) (*types.AdminUser, error)Execute resolves an identity account and creates its administrator membership.
func (*CreateAdminUserUseCase) SetMutationRunner
func (uc *CreateAdminUserUseCase) SetMutationRunner(work ports.MutationRunner)SetMutationRunner supplies transactional recording for membership creation.
type CreateBillingInvoiceUseCase
CreateBillingInvoiceUseCase orchestrates a platform-admin billing operation.
type CreateBillingInvoiceUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewCreateBillingInvoiceUseCase
func NewCreateBillingInvoiceUseCase(provider subscriptionpublic.CreateBillingInvoiceCapability, access ...*DoctorManagementAccess) *CreateBillingInvoiceUseCaseNewCreateBillingInvoiceUseCase accepts only the capability used by this operation.
func (*CreateBillingInvoiceUseCase) Execute
func (uc *CreateBillingInvoiceUseCase) Execute(ctx context.Context, input domain.CreateBillingInvoiceInput) (*types.BillingInvoice, error)Execute authenticates and authorizes before calling the Subscription capability.
type CreateBillingPlanUseCase
CreateBillingPlanUseCase orchestrates a platform-admin billing operation.
type CreateBillingPlanUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewCreateBillingPlanUseCase
func NewCreateBillingPlanUseCase(provider subscriptionpublic.CreateBillingPlanCapability, access ...*DoctorManagementAccess) *CreateBillingPlanUseCaseNewCreateBillingPlanUseCase accepts only the capability used by this operation.
func (*CreateBillingPlanUseCase) Execute
func (uc *CreateBillingPlanUseCase) Execute(ctx context.Context, input domain.CreateBillingPlanInput) (*types.BillingPlan, error)Execute authenticates and authorizes before calling the Subscription capability.
type CreateBillingSubscriptionUseCase
CreateBillingSubscriptionUseCase orchestrates a platform-admin billing operation.
type CreateBillingSubscriptionUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewCreateBillingSubscriptionUseCase
func NewCreateBillingSubscriptionUseCase(provider subscriptionpublic.CreateBillingSubscriptionCapability, access ...*DoctorManagementAccess) *CreateBillingSubscriptionUseCaseNewCreateBillingSubscriptionUseCase accepts only the capability used by this operation.
func (*CreateBillingSubscriptionUseCase) Execute
func (uc *CreateBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.CreateBillingSubscriptionInput) (*types.BillingSubscription, error)Execute authenticates and authorizes before calling the Subscription capability.
type CreateBrandUseCase
CreateBrandUseCase orchestrates a medicine catalog administration operation.
type CreateBrandUseCase struct {
// contains filtered or unexported fields
}func NewCreateBrandUseCase
func NewCreateBrandUseCase(provider medicinepublic.CreateBrandCapability) *CreateBrandUseCaseNewCreateBrandUseCase accepts only the operation's required capability.
func (*CreateBrandUseCase) Execute
func (uc *CreateBrandUseCase) Execute(ctx context.Context, input domain.MedicineCreateBrandInput) (*types.MedicineBrand, error)Execute delegates to medicine; authentication and audit are not enabled.
type CreateDrugUseCase
CreateDrugUseCase orchestrates a medicine catalog administration operation.
type CreateDrugUseCase struct {
// contains filtered or unexported fields
}func NewCreateDrugUseCase
func NewCreateDrugUseCase(provider medicinepublic.CreateDrugCapability) *CreateDrugUseCaseNewCreateDrugUseCase accepts only the operation's required capability.
func (*CreateDrugUseCase) Execute
func (uc *CreateDrugUseCase) Execute(ctx context.Context, input domain.MedicineCreateDrugInput) (*types.MedicineDrug, error)Execute delegates to medicine; authentication and audit are not enabled.
type CreateGenericUseCase
CreateGenericUseCase orchestrates a medicine catalog administration operation.
type CreateGenericUseCase struct {
// contains filtered or unexported fields
}func NewCreateGenericUseCase
func NewCreateGenericUseCase(provider medicinepublic.CreateGenericCapability) *CreateGenericUseCaseNewCreateGenericUseCase accepts only the operation's required capability.
func (*CreateGenericUseCase) Execute
func (uc *CreateGenericUseCase) Execute(ctx context.Context, input domain.MedicineCreateGenericInput) (*types.MedicineGeneric, error)Execute delegates to medicine; authentication and audit are not enabled.
type CreateManufacturerUseCase
CreateManufacturerUseCase orchestrates a medicine catalog administration operation.
type CreateManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewCreateManufacturerUseCase
func NewCreateManufacturerUseCase(provider medicinepublic.CreateManufacturerCapability) *CreateManufacturerUseCaseNewCreateManufacturerUseCase accepts only the operation's required capability.
func (*CreateManufacturerUseCase) Execute
func (uc *CreateManufacturerUseCase) Execute(ctx context.Context, input domain.MedicineCreateManufacturerInput) (*types.MedicineManufacturer, error)Execute delegates to medicine; authentication and audit are not enabled.
type CreateOrganizationInput
CreateOrganizationInput contains fields for creating an organization.
type CreateOrganizationInput = domain.CreateOrganizationInputtype CreateOrganizationMemberInput
CreateOrganizationMemberInput contains the identity and role for a new member.
type CreateOrganizationMemberInput = domain.CreateOrganizationMemberInputtype CreateOrganizationMemberUseCase
CreateOrganizationMemberUseCase provisions organization administrator memberships.
type CreateOrganizationMemberUseCase struct {
Subscription MemberSubscriptionPolicy
// contains filtered or unexported fields
}func NewCreateOrganizationMemberUseCase
func NewCreateOrganizationMemberUseCase(accounts ports.AdminIdentityService, organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, subscription ...MemberSubscriptionPolicy) *CreateOrganizationMemberUseCaseNewCreateOrganizationMemberUseCase wires identity, membership, and actor capabilities.
func (*CreateOrganizationMemberUseCase) Execute
func (uc *CreateOrganizationMemberUseCase) Execute(ctx context.Context, input domain.CreateOrganizationMemberInput) (*domain.OrganizationMember, error)Execute authenticates the administrator and adds an admin member to an active organization.
type CreateOrganizationUseCase
CreateOrganizationUseCase verifies identity and permission before provisioning.
type CreateOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewCreateOrganizationUseCase
func NewCreateOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, authorization types.IAuthorizationService) *CreateOrganizationUseCaseNewCreateOrganizationUseCase wires the provider and shared security services.
func (*CreateOrganizationUseCase) Execute
func (uc *CreateOrganizationUseCase) Execute(ctx context.Context, input domain.CreateOrganizationInput) (*types.Organization, error)Execute verifies the caller's permission and creates an organization with audit context.
type DeleteBillingSubscriptionUseCase
DeleteBillingSubscriptionUseCase orchestrates a platform-admin billing operation.
type DeleteBillingSubscriptionUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewDeleteBillingSubscriptionUseCase
func NewDeleteBillingSubscriptionUseCase(provider subscriptionpublic.DeleteBillingSubscriptionCapability, access ...*DoctorManagementAccess) *DeleteBillingSubscriptionUseCaseNewDeleteBillingSubscriptionUseCase accepts only the capability used by this operation.
func (*DeleteBillingSubscriptionUseCase) Execute
func (uc *DeleteBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.DeleteBillingSubscriptionInput) (*types.Empty, error)Execute authenticates and authorizes before calling the Subscription capability.
type DeleteBrandUseCase
DeleteBrandUseCase orchestrates a medicine catalog administration operation.
type DeleteBrandUseCase struct {
// contains filtered or unexported fields
}func NewDeleteBrandUseCase
func NewDeleteBrandUseCase(provider medicinepublic.DeleteBrandCapability) *DeleteBrandUseCaseNewDeleteBrandUseCase accepts only the operation's required capability.
func (*DeleteBrandUseCase) Execute
func (uc *DeleteBrandUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.Empty, error)Execute delegates to medicine; authentication and audit are not enabled.
type DeleteDrugUseCase
DeleteDrugUseCase orchestrates a medicine catalog administration operation.
type DeleteDrugUseCase struct {
// contains filtered or unexported fields
}func NewDeleteDrugUseCase
func NewDeleteDrugUseCase(provider medicinepublic.DeleteDrugCapability) *DeleteDrugUseCaseNewDeleteDrugUseCase accepts only the operation's required capability.
func (*DeleteDrugUseCase) Execute
func (uc *DeleteDrugUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.Empty, error)Execute delegates to medicine; authentication and audit are not enabled.
type DeleteGenericUseCase
DeleteGenericUseCase orchestrates a medicine catalog administration operation.
type DeleteGenericUseCase struct {
// contains filtered or unexported fields
}func NewDeleteGenericUseCase
func NewDeleteGenericUseCase(provider medicinepublic.DeleteGenericCapability) *DeleteGenericUseCaseNewDeleteGenericUseCase accepts only the operation's required capability.
func (*DeleteGenericUseCase) Execute
func (uc *DeleteGenericUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.Empty, error)Execute delegates to medicine; authentication and audit are not enabled.
type DeleteManufacturerUseCase
DeleteManufacturerUseCase orchestrates a medicine catalog administration operation.
type DeleteManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewDeleteManufacturerUseCase
func NewDeleteManufacturerUseCase(provider medicinepublic.DeleteManufacturerCapability) *DeleteManufacturerUseCaseNewDeleteManufacturerUseCase accepts only the operation's required capability.
func (*DeleteManufacturerUseCase) Execute
func (uc *DeleteManufacturerUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.Empty, error)Execute delegates to medicine; authentication and audit are not enabled.
type DeleteOrganizationUseCase
DeleteOrganizationUseCase coordinates organization deletion.
type DeleteOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewDeleteOrganizationUseCase
func NewDeleteOrganizationUseCase(v ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *DeleteOrganizationUseCaseNewDeleteOrganizationUseCase wires organization deletion and actor resolution.
func (*DeleteOrganizationUseCase) Execute
func (uc *DeleteOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)Execute authenticates the administrator and marks an organization as deleted.
type DoctorCatalogs
DoctorCatalogs authenticates administrators before exposing Doctor-owned catalogs.
type DoctorCatalogs struct {
Access *DoctorManagementAccess
Catalogs doctor.CatalogManager
}func (*DoctorCatalogs) Create
func (uc *DoctorCatalogs) Create(ctx context.Context, header string, kind doctor.CatalogKind, values doctor.CatalogValues) (*doctor.CatalogEntry, error)Create requires the catalog management permission.
func (*DoctorCatalogs) Delete
func (uc *DoctorCatalogs) Delete(ctx context.Context, header string, kind doctor.CatalogKind, id string) errorDelete requires the catalog management permission.
func (*DoctorCatalogs) Get
func (uc *DoctorCatalogs) Get(ctx context.Context, header string, kind doctor.CatalogKind, id string) (*doctor.CatalogEntry, error)Get requires the catalog read permission.
func (*DoctorCatalogs) List
func (uc *DoctorCatalogs) List(ctx context.Context, header string, kind doctor.CatalogKind, options doctor.CatalogListOptions) ([]doctor.CatalogEntry, error)List requires the catalog read permission.
func (*DoctorCatalogs) Update
func (uc *DoctorCatalogs) Update(ctx context.Context, header string, kind doctor.CatalogKind, id string, values doctor.CatalogValues) (*doctor.CatalogEntry, error)Update requires the catalog management permission.
type DoctorManagementAccess
DoctorManagementAccess authenticates active administrators and enforces current grants. Permission wiring is configured once by the composition root before serving requests.
type DoctorManagementAccess struct {
Identity types.IIdentityService
Admins ports.AdminRepository
Accounts identity.AccountReader
Permissions authorization.AdminPermissionChecker
}func (*DoctorManagementAccess) Check
func (a *DoctorManagementAccess) Check(ctx context.Context, header, key string) errorCheck adapts the shared administrator authorization path for HTTP handlers that only need a permission decision. It reloads active account/membership state and checks the requested grant through authorize; no principal or audit context is returned to the read-only caller.
type DoctorManagementDependencies
DoctorManagementDependencies selects provider-owned capabilities without exposing repositories across services.
type DoctorManagementDependencies struct {
Access *DoctorManagementAccess
Directory doctor.Directory
Accounts identity.AccountReader
Statuses identity.AccountStatusManager
Organizations organization.AdminOrganizationService
Affiliations organization.AdminDoctorAffiliations
Verifications ports.VerificationStore
}type EditBillingInvoiceUseCase
EditBillingInvoiceUseCase orchestrates a platform-admin billing operation.
type EditBillingInvoiceUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewEditBillingInvoiceUseCase
func NewEditBillingInvoiceUseCase(provider subscriptionpublic.EditBillingInvoiceCapability, access ...*DoctorManagementAccess) *EditBillingInvoiceUseCaseNewEditBillingInvoiceUseCase accepts only the capability used by this operation.
func (*EditBillingInvoiceUseCase) Execute
func (uc *EditBillingInvoiceUseCase) Execute(ctx context.Context, input domain.EditBillingInvoiceInput) (*types.BillingInvoice, error)Execute authenticates and authorizes before calling the Subscription capability.
type EditBillingPlanUseCase
EditBillingPlanUseCase orchestrates a platform-admin billing operation.
type EditBillingPlanUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewEditBillingPlanUseCase
func NewEditBillingPlanUseCase(provider subscriptionpublic.EditBillingPlanCapability, access ...*DoctorManagementAccess) *EditBillingPlanUseCaseNewEditBillingPlanUseCase accepts only the capability used by this operation.
func (*EditBillingPlanUseCase) Execute
func (uc *EditBillingPlanUseCase) Execute(ctx context.Context, input domain.EditBillingPlanInput) (*types.BillingPlan, error)Execute authenticates and authorizes before calling the Subscription capability.
type EditBillingSubscriptionUseCase
EditBillingSubscriptionUseCase orchestrates a platform-admin billing operation.
type EditBillingSubscriptionUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewEditBillingSubscriptionUseCase
func NewEditBillingSubscriptionUseCase(provider subscriptionpublic.EditBillingSubscriptionCapability, access ...*DoctorManagementAccess) *EditBillingSubscriptionUseCaseNewEditBillingSubscriptionUseCase accepts only the capability used by this operation.
func (*EditBillingSubscriptionUseCase) Execute
func (uc *EditBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.EditBillingSubscriptionInput) (*types.BillingSubscription, error)Execute authenticates and authorizes before calling the Subscription capability.
type ExtendBillingSubscriptionUseCase
ExtendBillingSubscriptionUseCase orchestrates a platform-admin billing operation.
type ExtendBillingSubscriptionUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewExtendBillingSubscriptionUseCase
func NewExtendBillingSubscriptionUseCase(provider subscriptionpublic.ExtendBillingSubscriptionCapability, access ...*DoctorManagementAccess) *ExtendBillingSubscriptionUseCaseNewExtendBillingSubscriptionUseCase accepts only the capability used by this operation.
func (*ExtendBillingSubscriptionUseCase) Execute
func (uc *ExtendBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.ExtendBillingSubscriptionInput) (*types.BillingSubscription, error)Execute authenticates and authorizes before calling the Subscription capability.
type GetAdminBrandUseCase
GetAdminBrandUseCase orchestrates a medicine catalog administration operation.
type GetAdminBrandUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminBrandUseCase
func NewGetAdminBrandUseCase(provider medicinepublic.GetAdminBrandCapability) *GetAdminBrandUseCaseNewGetAdminBrandUseCase accepts only the operation's required capability.
func (*GetAdminBrandUseCase) Execute
func (uc *GetAdminBrandUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineBrand, error)Execute delegates to medicine; authentication and audit are not enabled.
type GetAdminDrugUseCase
GetAdminDrugUseCase orchestrates a medicine catalog administration operation.
type GetAdminDrugUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminDrugUseCase
func NewGetAdminDrugUseCase(provider medicinepublic.GetAdminDrugCapability) *GetAdminDrugUseCaseNewGetAdminDrugUseCase accepts only the operation's required capability.
func (*GetAdminDrugUseCase) Execute
func (uc *GetAdminDrugUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineDrug, error)Execute delegates to medicine; authentication and audit are not enabled.
type GetAdminGenericUseCase
GetAdminGenericUseCase orchestrates a medicine catalog administration operation.
type GetAdminGenericUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminGenericUseCase
func NewGetAdminGenericUseCase(provider medicinepublic.GetAdminGenericCapability) *GetAdminGenericUseCaseNewGetAdminGenericUseCase accepts only the operation's required capability.
func (*GetAdminGenericUseCase) Execute
func (uc *GetAdminGenericUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineGeneric, error)Execute delegates to medicine; authentication and audit are not enabled.
type GetAdminManufacturerUseCase
GetAdminManufacturerUseCase orchestrates a medicine catalog administration operation.
type GetAdminManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminManufacturerUseCase
func NewGetAdminManufacturerUseCase(provider medicinepublic.GetAdminManufacturerCapability) *GetAdminManufacturerUseCaseNewGetAdminManufacturerUseCase accepts only the operation's required capability.
func (*GetAdminManufacturerUseCase) Execute
func (uc *GetAdminManufacturerUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineManufacturer, error)Execute delegates to medicine; authentication and audit are not enabled.
type GetAdminProfileUseCase
GetAdminProfileUseCase retrieves the authenticated administrator's own profile.
type GetAdminProfileUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminProfileUseCase
func NewGetAdminProfileUseCase(identity types.IIdentityService, admins ports.AdminRepository, accounts identitypublic.AccountReader, authorization authorizationpublic.MemberAuthorizationReader) *GetAdminProfileUseCaseNewGetAdminProfileUseCase wires the identity, membership and authorization readers.
func (*GetAdminProfileUseCase) Execute
func (uc *GetAdminProfileUseCase) Execute(ctx context.Context, input domain.AdminAuthenticatedInput) (*domain.AdminProfile, error)Execute derives every lookup from verified credentials, without requiring management permissions.
func (*GetAdminProfileUseCase) SetAuthorizationReader
func (uc *GetAdminProfileUseCase) SetAuthorizationReader(reader authorizationpublic.MemberAuthorizationReader)SetAuthorizationReader supplies scoped authorization before requests are served.
type GetAdminUserUseCase
GetAdminUserUseCase retrieves administrator membership and identity details.
type GetAdminUserUseCase struct {
// contains filtered or unexported fields
}func NewGetAdminUserUseCase
func NewGetAdminUserUseCase(admins ports.AdminRepository, accounts ports.AdminIdentityService) *GetAdminUserUseCaseNewGetAdminUserUseCase wires administrator and identity account readers.
func (*GetAdminUserUseCase) Execute
func (uc *GetAdminUserUseCase) Execute(ctx context.Context, input domain.GetAdminUserInput) (*types.AdminUser, error)Execute retrieves an administrator by record ID and includes its identity account details.
type GetBillingInvoiceUseCase
GetBillingInvoiceUseCase orchestrates a platform-admin billing operation.
type GetBillingInvoiceUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewGetBillingInvoiceUseCase
func NewGetBillingInvoiceUseCase(provider subscriptionpublic.GetBillingInvoiceCapability, access ...*DoctorManagementAccess) *GetBillingInvoiceUseCaseNewGetBillingInvoiceUseCase accepts only the capability used by this operation.
func (*GetBillingInvoiceUseCase) Execute
func (uc *GetBillingInvoiceUseCase) Execute(ctx context.Context, input domain.GetBillingInvoiceInput) (*types.BillingInvoice, error)Execute authenticates and authorizes before calling the Subscription capability.
type GetBillingPaymentUseCase
GetBillingPaymentUseCase orchestrates a platform-admin billing operation.
type GetBillingPaymentUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewGetBillingPaymentUseCase
func NewGetBillingPaymentUseCase(provider subscriptionpublic.GetBillingPaymentCapability, access ...*DoctorManagementAccess) *GetBillingPaymentUseCaseNewGetBillingPaymentUseCase accepts only the capability used by this operation.
func (*GetBillingPaymentUseCase) Execute
func (uc *GetBillingPaymentUseCase) Execute(ctx context.Context, input domain.GetBillingPaymentInput) (*types.BillingPayment, error)Execute authenticates and authorizes before calling the Subscription capability.
type GetBillingPlanUseCase
GetBillingPlanUseCase orchestrates a platform-admin billing operation.
type GetBillingPlanUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewGetBillingPlanUseCase
func NewGetBillingPlanUseCase(provider subscriptionpublic.GetBillingPlanCapability, access ...*DoctorManagementAccess) *GetBillingPlanUseCaseNewGetBillingPlanUseCase accepts only the capability used by this operation.
func (*GetBillingPlanUseCase) Execute
func (uc *GetBillingPlanUseCase) Execute(ctx context.Context, input domain.GetBillingPlanInput) (*types.BillingPlan, error)Execute authenticates and authorizes before calling the Subscription capability.
type GetBillingSubscriptionUseCase
GetBillingSubscriptionUseCase orchestrates a platform-admin billing operation.
type GetBillingSubscriptionUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewGetBillingSubscriptionUseCase
func NewGetBillingSubscriptionUseCase(provider subscriptionpublic.GetBillingSubscriptionCapability, access ...*DoctorManagementAccess) *GetBillingSubscriptionUseCaseNewGetBillingSubscriptionUseCase accepts only the capability used by this operation.
func (*GetBillingSubscriptionUseCase) Execute
func (uc *GetBillingSubscriptionUseCase) Execute(ctx context.Context, input domain.GetBillingSubscriptionInput) (*types.BillingSubscription, error)Execute authenticates and authorizes before calling the Subscription capability.
type GetDoctorUseCase
GetDoctorUseCase retrieves a professional profile with account, review and organization details.
type GetDoctorUseCase struct {
// contains filtered or unexported fields
}func NewGetDoctorUseCase
func NewGetDoctorUseCase(deps DoctorManagementDependencies) *GetDoctorUseCaseNewGetDoctorUseCase wires the professional directory and management readers.
func (*GetDoctorUseCase) Execute
func (uc *GetDoctorUseCase) Execute(ctx context.Context, input domain.DoctorInput) (*domain.Doctor, error)Execute returns details only after checking the doctor read permission.
type GetDoctorVerificationInput
GetDoctorVerificationInput identifies a doctor verification to retrieve.
type GetDoctorVerificationInput = domain.GetDoctorVerificationInputtype GetDoctorVerificationUseCase
GetDoctorVerificationUseCase performs an authenticated professional verification operation.
type GetDoctorVerificationUseCase struct {
// contains filtered or unexported fields
}func NewGetDoctorVerificationUseCase
func NewGetDoctorVerificationUseCase(deps DoctorManagementDependencies) *GetDoctorVerificationUseCaseNewGetDoctorVerificationUseCase wires the authoritative review store and admin authorization.
func (*GetDoctorVerificationUseCase) Execute
func (uc *GetDoctorVerificationUseCase) Execute(ctx context.Context, input domain.GetDoctorVerificationInput) (*types.DoctorVerification, error)Execute enforces the operation permission before reading or changing review state.
type GetIdentityAccountInput
GetIdentityAccountInput identifies an identity account to retrieve.
type GetIdentityAccountInput = domain.GetIdentityAccountInputtype GetIdentityAccountUseCase
GetIdentityAccountUseCase defines the unimplemented get identity account operation.
type GetIdentityAccountUseCase struct{}func NewGetIdentityAccountUseCase
func NewGetIdentityAccountUseCase() *GetIdentityAccountUseCaseNewGetIdentityAccountUseCase creates the documentation-first operation.
func (*GetIdentityAccountUseCase) Execute
func (uc *GetIdentityAccountUseCase) Execute(_ context.Context, _ domain.GetIdentityAccountInput) (*types.IdentityAccount, error)Execute returns a stub error without authentication, persistence or state changes.
type GetOrganizationDoctorUseCase
GetOrganizationDoctorUseCase enforces Admin access to one scoped affiliation.
type GetOrganizationDoctorUseCase struct{ Dependencies OrganizationDoctorManagement }func (*GetOrganizationDoctorUseCase) Execute
func (uc *GetOrganizationDoctorUseCase) Execute(ctx context.Context, in domain.OrganizationDoctorInput) (*domain.OrganizationDoctor, error)Execute never substitutes a global doctor lookup for a missing scoped affiliation.
type GetOrganizationSummaryUseCase
GetOrganizationSummaryUseCase authorizes administrators and composes organization data.
type GetOrganizationSummaryUseCase struct {
Access *DoctorManagementAccess
Organizations org.AdminOrganizationService
Views *OrganizationViews
}func (*GetOrganizationSummaryUseCase) Execute
func (uc *GetOrganizationSummaryUseCase) Execute(ctx context.Context, header, id string) (*domain.OrganizationSummary, error)Execute requires the current administrator/account and organization-read grant, then loads a real organization before requesting usage or billing. Authorized administrators may inspect inactive organizations; missing records retain the Organization provider's not-found error instead of receiving a fabricated mock.
type GetOrganizationUseCase
GetOrganizationUseCase retrieves an organization through its public service contract.
type GetOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewGetOrganizationUseCase
func NewGetOrganizationUseCase(organizations ports.AdminOrganizationService) *GetOrganizationUseCaseNewGetOrganizationUseCase wires the organization reader.
func (*GetOrganizationUseCase) Execute
func (uc *GetOrganizationUseCase) Execute(ctx context.Context, input domain.GetOrganizationInput) (*types.Organization, error)Execute retrieves an organization by its ID.
type GetVerificationUseCase
GetVerificationUseCase handles retrieving a verification.
type GetVerificationUseCase struct {
// contains filtered or unexported fields
}func NewGetVerificationUseCase
func NewGetVerificationUseCase(repo ports.DoctorVerificationRepository) *GetVerificationUseCaseNewGetVerificationUseCase instantiates a new GetVerificationUseCase.
func (*GetVerificationUseCase) Execute
func (uc *GetVerificationUseCase) Execute(ctx context.Context, id string) (*domain.DoctorVerification, error)Execute retrieves a verification by ID.
type IdentityAccount
IdentityAccount contains identity account details.
type IdentityAccount = types.IdentityAccounttype IdentitySource
IdentitySource selects an existing identity or a new one to create.
type IdentitySource = domain.IdentitySourcetype IssueBillingInvoiceUseCase
IssueBillingInvoiceUseCase orchestrates a platform-admin billing operation.
type IssueBillingInvoiceUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewIssueBillingInvoiceUseCase
func NewIssueBillingInvoiceUseCase(provider subscriptionpublic.IssueBillingInvoiceCapability, access ...*DoctorManagementAccess) *IssueBillingInvoiceUseCaseNewIssueBillingInvoiceUseCase accepts only the capability used by this operation.
func (*IssueBillingInvoiceUseCase) Execute
func (uc *IssueBillingInvoiceUseCase) Execute(ctx context.Context, input domain.IssueBillingInvoiceInput) (*types.BillingInvoice, error)Execute authenticates and authorizes before calling the Subscription capability.
type ListAdminBrandsUseCase
ListAdminBrandsUseCase orchestrates a medicine catalog administration operation.
type ListAdminBrandsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminBrandsUseCase
func NewListAdminBrandsUseCase(provider medicinepublic.ListAdminBrandsCapability) *ListAdminBrandsUseCaseNewListAdminBrandsUseCase accepts only the operation's required capability.
func (*ListAdminBrandsUseCase) Execute
func (uc *ListAdminBrandsUseCase) Execute(ctx context.Context, input domain.MedicineListInput) (*types.MedicinePage[types.MedicineBrand], error)Execute delegates to medicine; authentication and audit are not enabled.
type ListAdminDrugsUseCase
ListAdminDrugsUseCase orchestrates a medicine catalog administration operation.
type ListAdminDrugsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminDrugsUseCase
func NewListAdminDrugsUseCase(provider medicinepublic.ListAdminDrugsCapability) *ListAdminDrugsUseCaseNewListAdminDrugsUseCase accepts only the operation's required capability.
func (*ListAdminDrugsUseCase) Execute
func (uc *ListAdminDrugsUseCase) Execute(ctx context.Context, input domain.MedicineListInput) (*types.MedicinePage[types.MedicineDrug], error)Execute delegates to medicine; authentication and audit are not enabled.
type ListAdminGenericsUseCase
ListAdminGenericsUseCase orchestrates a medicine catalog administration operation.
type ListAdminGenericsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminGenericsUseCase
func NewListAdminGenericsUseCase(provider medicinepublic.ListAdminGenericsCapability) *ListAdminGenericsUseCaseNewListAdminGenericsUseCase accepts only the operation's required capability.
func (*ListAdminGenericsUseCase) Execute
func (uc *ListAdminGenericsUseCase) Execute(ctx context.Context, input domain.MedicineListInput) (*types.MedicinePage[types.MedicineGeneric], error)Execute delegates to medicine; authentication and audit are not enabled.
type ListAdminManufacturersUseCase
ListAdminManufacturersUseCase orchestrates a medicine catalog administration operation.
type ListAdminManufacturersUseCase struct {
// contains filtered or unexported fields
}func NewListAdminManufacturersUseCase
func NewListAdminManufacturersUseCase(provider medicinepublic.ListAdminManufacturersCapability) *ListAdminManufacturersUseCaseNewListAdminManufacturersUseCase accepts only the operation's required capability.
func (*ListAdminManufacturersUseCase) Execute
func (uc *ListAdminManufacturersUseCase) Execute(ctx context.Context, input domain.MedicineListInput) (*types.MedicinePage[types.MedicineManufacturer], error)Execute delegates to medicine; authentication and audit are not enabled.
type ListAdminUsersQuery
ListAdminUsersQuery selects administrator filters, ordering, and pagination.
type ListAdminUsersQuery = domain.ListAdminUsersQuerytype ListAdminUsersUseCase
ListAdminUsersUseCase combines administrator memberships with identity account details.
type ListAdminUsersUseCase struct {
// contains filtered or unexported fields
}func NewListAdminUsersUseCase
func NewListAdminUsersUseCase(admins ports.AdminRepository, accounts ports.AdminIdentityService) *ListAdminUsersUseCaseNewListAdminUsersUseCase wires administrator and identity account readers.
func (*ListAdminUsersUseCase) Execute
func (uc *ListAdminUsersUseCase) Execute(ctx context.Context, query domain.ListAdminUsersQuery) (*types.AdminUserPage, error)Execute returns a filtered, sorted page of administrators with identity account details.
type ListAdminsUseCase
ListAdminsUseCase handles listing all admins.
type ListAdminsUseCase struct {
// contains filtered or unexported fields
}func NewListAdminsUseCase
func NewListAdminsUseCase(repo ports.AdminRepository) *ListAdminsUseCaseNewListAdminsUseCase instantiates a new ListAdminsUseCase.
func (*ListAdminsUseCase) Execute
func (uc *ListAdminsUseCase) Execute(ctx context.Context) ([]*domain.Admin, error)Execute lists all admins.
type ListBillingInvoicesUseCase
ListBillingInvoicesUseCase orchestrates a platform-admin billing operation.
type ListBillingInvoicesUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewListBillingInvoicesUseCase
func NewListBillingInvoicesUseCase(provider subscriptionpublic.ListBillingInvoicesCapability, access ...*DoctorManagementAccess) *ListBillingInvoicesUseCaseNewListBillingInvoicesUseCase accepts only the capability used by this operation.
func (*ListBillingInvoicesUseCase) Execute
func (uc *ListBillingInvoicesUseCase) Execute(ctx context.Context, input domain.ListBillingInvoicesInput) (*types.Page[types.BillingInvoice], error)Execute authenticates and authorizes before calling the Subscription capability.
type ListBillingPaymentsUseCase
ListBillingPaymentsUseCase orchestrates a platform-admin billing operation.
type ListBillingPaymentsUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewListBillingPaymentsUseCase
func NewListBillingPaymentsUseCase(provider subscriptionpublic.ListBillingPaymentsCapability, access ...*DoctorManagementAccess) *ListBillingPaymentsUseCaseNewListBillingPaymentsUseCase accepts only the capability used by this operation.
func (*ListBillingPaymentsUseCase) Execute
func (uc *ListBillingPaymentsUseCase) Execute(ctx context.Context, input domain.ListBillingPaymentsInput) (*types.Page[types.BillingPayment], error)Execute authenticates and authorizes before calling the Subscription capability.
type ListBillingPlansUseCase
ListBillingPlansUseCase orchestrates a platform-admin billing operation.
type ListBillingPlansUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewListBillingPlansUseCase
func NewListBillingPlansUseCase(provider subscriptionpublic.ListBillingPlansCapability, access ...*DoctorManagementAccess) *ListBillingPlansUseCaseNewListBillingPlansUseCase accepts only the capability used by this operation.
func (*ListBillingPlansUseCase) Execute
func (uc *ListBillingPlansUseCase) Execute(ctx context.Context, input domain.ListBillingPlansInput) (*types.Page[types.BillingPlan], error)Execute authenticates and authorizes before calling the Subscription capability.
type ListBillingSubscriptionsUseCase
ListBillingSubscriptionsUseCase orchestrates a platform-admin billing operation.
type ListBillingSubscriptionsUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewListBillingSubscriptionsUseCase
func NewListBillingSubscriptionsUseCase(provider subscriptionpublic.ListBillingSubscriptionsCapability, access ...*DoctorManagementAccess) *ListBillingSubscriptionsUseCaseNewListBillingSubscriptionsUseCase accepts only the capability used by this operation.
func (*ListBillingSubscriptionsUseCase) Execute
func (uc *ListBillingSubscriptionsUseCase) Execute(ctx context.Context, input domain.ListBillingSubscriptionsInput) (*types.Page[types.BillingSubscription], error)Execute authenticates and authorizes before calling the Subscription capability.
type ListDoctorOrganizationsUseCase
ListDoctorOrganizationsUseCase authorizes administrative affiliation reads.
type ListDoctorOrganizationsUseCase struct {
Access *DoctorManagementAccess
Directory doctor.Directory
Insights org.Insights
Billing sub.CurrentSubscriptions
}func (*ListDoctorOrganizationsUseCase) Execute
func (uc *ListDoctorOrganizationsUseCase) Execute(ctx context.Context, in domain.DoctorOrganizationsInput) (*domain.DoctorOrganizationsPage, error)Execute lists a doctor's Organization-owned affiliations after checking both doctor-read and organization-read grants. It distinguishes an unknown doctor from an existing doctor with no affiliations, includes inactive relationships unless filtered, and decorates only the selected page with billing projections.
type ListDoctorsUseCase
ListDoctorsUseCase composes provider-owned data and applies directory filters and pagination.
type ListDoctorsUseCase struct {
// contains filtered or unexported fields
}func NewListDoctorsUseCase
func NewListDoctorsUseCase(deps DoctorManagementDependencies) *ListDoctorsUseCaseNewListDoctorsUseCase wires the professional directory and management readers.
func (*ListDoctorsUseCase) Execute
func (uc *ListDoctorsUseCase) Execute(ctx context.Context, input domain.ListDoctorsInput) (*domain.DoctorPage, error)Execute returns a filtered cursor page after checking the doctor list permission.
type ListIdentityAccountsInput
ListIdentityAccountsInput selects identity account filters and pagination.
type ListIdentityAccountsInput = domain.ListIdentityAccountsInputtype ListIdentityAccountsUseCase
ListIdentityAccountsUseCase defines the unimplemented list identity accounts operation.
type ListIdentityAccountsUseCase struct{}func NewListIdentityAccountsUseCase
func NewListIdentityAccountsUseCase() *ListIdentityAccountsUseCaseNewListIdentityAccountsUseCase creates the documentation-first operation.
func (*ListIdentityAccountsUseCase) Execute
func (uc *ListIdentityAccountsUseCase) Execute(_ context.Context, _ domain.ListIdentityAccountsInput) (*types.Page[types.IdentityAccount], error)Execute returns a stub error without authentication, persistence or state changes.
type ListInvoicePaymentsUseCase
ListInvoicePaymentsUseCase orchestrates a platform-admin billing operation.
type ListInvoicePaymentsUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewListInvoicePaymentsUseCase
func NewListInvoicePaymentsUseCase(provider subscriptionpublic.ListInvoicePaymentsCapability, access ...*DoctorManagementAccess) *ListInvoicePaymentsUseCaseNewListInvoicePaymentsUseCase accepts only the capability used by this operation.
func (*ListInvoicePaymentsUseCase) Execute
func (uc *ListInvoicePaymentsUseCase) Execute(ctx context.Context, input domain.ListInvoicePaymentsInput) (*types.Page[types.BillingPayment], error)Execute authenticates and authorizes before calling the Subscription capability.
type ListOrganizationDoctorsUseCase
ListOrganizationDoctorsUseCase enforces Admin-only access before reading the roster.
type ListOrganizationDoctorsUseCase struct{ Dependencies OrganizationDoctorManagement }func (*ListOrganizationDoctorsUseCase) Execute
func (uc *ListOrganizationDoctorsUseCase) Execute(ctx context.Context, in domain.OrganizationDoctorsInput) (*domain.OrganizationDoctorsPage, error)Execute lists affiliations in any organization lifecycle state after both grants.
type ListOrganizationsUseCase
ListOrganizationsUseCase lists organizations through their public service contract.
type ListOrganizationsUseCase struct {
// contains filtered or unexported fields
}func NewListOrganizationsUseCase
func NewListOrganizationsUseCase(organizations ports.AdminOrganizationService) *ListOrganizationsUseCaseNewListOrganizationsUseCase wires the organization reader.
func (*ListOrganizationsUseCase) Execute
func (uc *ListOrganizationsUseCase) Execute(ctx context.Context, query domain.ListOrganizationsQuery) (*types.OrganizationPage, error)Execute retrieves a page of organizations matching the query.
type ListPendingDoctorVerificationsInput
ListPendingDoctorVerificationsInput selects pagination for pending verifications.
type ListPendingDoctorVerificationsInput = domain.ListPendingDoctorVerificationsInputtype ListPendingDoctorVerificationsUseCase
ListPendingDoctorVerificationsUseCase performs an authenticated professional verification operation.
type ListPendingDoctorVerificationsUseCase struct {
// contains filtered or unexported fields
}func NewListPendingDoctorVerificationsUseCase
func NewListPendingDoctorVerificationsUseCase(deps DoctorManagementDependencies) *ListPendingDoctorVerificationsUseCaseNewListPendingDoctorVerificationsUseCase wires the authoritative review store and admin authorization.
func (*ListPendingDoctorVerificationsUseCase) Execute
func (uc *ListPendingDoctorVerificationsUseCase) Execute(ctx context.Context, input domain.ListPendingDoctorVerificationsInput) (*types.DoctorVerificationPage, error)Execute enforces the operation permission before reading or changing review state.
type ListPendingVerificationsUseCase
ListPendingVerificationsUseCase handles listing pending verifications.
type ListPendingVerificationsUseCase struct {
// contains filtered or unexported fields
}func NewListPendingVerificationsUseCase
func NewListPendingVerificationsUseCase(repo ports.DoctorVerificationRepository) *ListPendingVerificationsUseCaseNewListPendingVerificationsUseCase instantiates a new ListPendingVerificationsUseCase.
func (*ListPendingVerificationsUseCase) Execute
func (uc *ListPendingVerificationsUseCase) Execute(ctx context.Context) ([]*domain.DoctorVerification, error)Execute lists pending verifications.
type ListSubscriptionInvoicesUseCase
ListSubscriptionInvoicesUseCase orchestrates a platform-admin billing operation.
type ListSubscriptionInvoicesUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewListSubscriptionInvoicesUseCase
func NewListSubscriptionInvoicesUseCase(provider subscriptionpublic.ListSubscriptionInvoicesCapability, access ...*DoctorManagementAccess) *ListSubscriptionInvoicesUseCaseNewListSubscriptionInvoicesUseCase accepts only the capability used by this operation.
func (*ListSubscriptionInvoicesUseCase) Execute
func (uc *ListSubscriptionInvoicesUseCase) Execute(ctx context.Context, input domain.ListSubscriptionInvoicesInput) (*types.Page[types.BillingInvoice], error)Execute authenticates and authorizes before calling the Subscription capability.
type ManagementEmpty
ManagementEmpty represents an operation without response data.
type ManagementEmpty = types.Emptytype ManagementPage
ManagementPage contains a page of management results.
type ManagementPage[T any] = types.Page[T]type Member
Member contains organization membership details.
type Member = types.OrganizationMembertype MemberSubscriptionPolicy
MemberSubscriptionPolicy rejects ineligible provisioning before Identity can create an account. Organization repeats the authoritative check under its lock.
type MemberSubscriptionPolicy struct {
Service sub.SubscriptionService
Current sub.CurrentSubscriptions
Insights org.Insights
Enforce bool
}func (MemberSubscriptionPolicy) Check
func (p MemberSubscriptionPolicy) Check(ctx context.Context, id string) errorCheck evaluates application policy before the protected business mutation.
type NewIdentityInput
NewIdentityInput contains fields for creating an identity.
type NewIdentityInput = domain.NewIdentityInputtype Organization
Organization contains organization details.
type Organization = types.Organizationtype OrganizationDoctorManagement
OrganizationDoctorManagement selects public providers for Admin roster operations.
type OrganizationDoctorManagement struct {
Access *DoctorManagementAccess
Organizations org.AdminOrganizationService
Reader org.OrganizationDoctorReader
Writer org.DoctorAffiliationStatusWriter
Directory doctor.Directory
Insights org.Insights
}type OrganizationMember
OrganizationMember contains a membership and its associated identity.
type OrganizationMember = domain.OrganizationMembertype OrganizationPage
OrganizationPage contains a page of organizations.
type OrganizationPage = types.OrganizationPagetype OrganizationStatusInput
OrganizationStatusInput identifies an organization whose status will change.
type OrganizationStatusInput = domain.OrganizationStatusInputtype OrganizationViews
OrganizationViews batches real usage and billing projections for existing records.
type OrganizationViews struct {
Insights org.Insights
Billing sub.CurrentSubscriptions
}func (*OrganizationViews) Execute
func (uc *OrganizationViews) Execute(ctx context.Context, organizations []types.Organization) ([]domain.OrganizationView, error)Execute enriches existing organization records with batched usage and billing reads while preserving the input order. Callers authenticate and load the records first; this helper performs no access check and never creates organizations.
Missing usage is a provider failure rather than an empty organization. Missing billing is allowed and represents no current subscription; IsMock is preserved so presentation can distinguish sample billing from authoritative usage.
type PatchBrandUseCase
PatchBrandUseCase orchestrates a medicine catalog administration operation.
type PatchBrandUseCase struct {
// contains filtered or unexported fields
}func NewPatchBrandUseCase
func NewPatchBrandUseCase(provider medicinepublic.PatchBrandCapability) *PatchBrandUseCaseNewPatchBrandUseCase accepts only the operation's required capability.
func (*PatchBrandUseCase) Execute
func (uc *PatchBrandUseCase) Execute(ctx context.Context, input domain.MedicinePatchBrandInput) (*types.MedicineBrand, error)Execute delegates to medicine; authentication and audit are not enabled.
type PatchDrugUseCase
PatchDrugUseCase orchestrates a medicine catalog administration operation.
type PatchDrugUseCase struct {
// contains filtered or unexported fields
}func NewPatchDrugUseCase
func NewPatchDrugUseCase(provider medicinepublic.PatchDrugCapability) *PatchDrugUseCaseNewPatchDrugUseCase accepts only the operation's required capability.
func (*PatchDrugUseCase) Execute
func (uc *PatchDrugUseCase) Execute(ctx context.Context, input domain.MedicinePatchDrugInput) (*types.MedicineDrug, error)Execute delegates to medicine; authentication and audit are not enabled.
type PatchGenericUseCase
PatchGenericUseCase orchestrates a medicine catalog administration operation.
type PatchGenericUseCase struct {
// contains filtered or unexported fields
}func NewPatchGenericUseCase
func NewPatchGenericUseCase(provider medicinepublic.PatchGenericCapability) *PatchGenericUseCaseNewPatchGenericUseCase accepts only the operation's required capability.
func (*PatchGenericUseCase) Execute
func (uc *PatchGenericUseCase) Execute(ctx context.Context, input domain.MedicinePatchGenericInput) (*types.MedicineGeneric, error)Execute delegates to medicine; authentication and audit are not enabled.
type PatchIdentityAccountStatusInput
PatchIdentityAccountStatusInput identifies an account and its new status.
type PatchIdentityAccountStatusInput = domain.PatchIdentityAccountStatusInputtype PatchIdentityAccountStatusParams
PatchIdentityAccountStatusParams contains the replacement account status.
type PatchIdentityAccountStatusParams = domain.PatchIdentityAccountStatusParamstype PatchIdentityAccountStatusUseCase
PatchIdentityAccountStatusUseCase defines the unimplemented update identity account status operation.
type PatchIdentityAccountStatusUseCase struct{}func NewPatchIdentityAccountStatusUseCase
func NewPatchIdentityAccountStatusUseCase() *PatchIdentityAccountStatusUseCaseNewPatchIdentityAccountStatusUseCase creates the documentation-first operation.
func (*PatchIdentityAccountStatusUseCase) Execute
func (uc *PatchIdentityAccountStatusUseCase) Execute(_ context.Context, _ domain.PatchIdentityAccountStatusInput) (*types.IdentityAccount, error)Execute returns a stub error without authentication, persistence or state changes.
type PatchManufacturerUseCase
PatchManufacturerUseCase orchestrates a medicine catalog administration operation.
type PatchManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewPatchManufacturerUseCase
func NewPatchManufacturerUseCase(provider medicinepublic.PatchManufacturerCapability) *PatchManufacturerUseCaseNewPatchManufacturerUseCase accepts only the operation's required capability.
func (*PatchManufacturerUseCase) Execute
func (uc *PatchManufacturerUseCase) Execute(ctx context.Context, input domain.MedicinePatchManufacturerInput) (*types.MedicineManufacturer, error)Execute delegates to medicine; authentication and audit are not enabled.
type ProvisioningError
ProvisioningError identifies an account created before a later provisioning step failed.
type ProvisioningError struct {
UserID string
Err error
}func (*ProvisioningError) Error
func (e *ProvisioningError) Error() stringError returns the underlying provisioning failure message.
func (*ProvisioningError) Unwrap
func (e *ProvisioningError) Unwrap() errorUnwrap returns the underlying provisioning failure.
type RecordBillingPaymentUseCase
RecordBillingPaymentUseCase orchestrates a platform-admin billing operation.
type RecordBillingPaymentUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewRecordBillingPaymentUseCase
func NewRecordBillingPaymentUseCase(provider subscriptionpublic.RecordBillingPaymentCapability, access ...*DoctorManagementAccess) *RecordBillingPaymentUseCaseNewRecordBillingPaymentUseCase accepts only the capability used by this operation.
func (*RecordBillingPaymentUseCase) Execute
func (uc *RecordBillingPaymentUseCase) Execute(ctx context.Context, input domain.RecordBillingPaymentInput) (*types.BillingPayment, error)Execute authenticates and authorizes before calling the Subscription capability.
type RejectDoctorVerificationInput
RejectDoctorVerificationInput identifies a verification and its rejection details.
type RejectDoctorVerificationInput = domain.RejectDoctorVerificationInputtype RejectDoctorVerificationParams
RejectDoctorVerificationParams contains the rejection reason and notes.
type RejectDoctorVerificationParams = domain.RejectDoctorVerificationParamstype RejectDoctorVerificationUseCase
RejectDoctorVerificationUseCase performs an authenticated professional verification operation.
type RejectDoctorVerificationUseCase struct {
// contains filtered or unexported fields
}func NewRejectDoctorVerificationUseCase
func NewRejectDoctorVerificationUseCase(deps DoctorManagementDependencies) *RejectDoctorVerificationUseCaseNewRejectDoctorVerificationUseCase wires the authoritative review store and admin authorization.
func (*RejectDoctorVerificationUseCase) Execute
func (uc *RejectDoctorVerificationUseCase) Execute(ctx context.Context, input domain.RejectDoctorVerificationInput) (*types.DoctorVerification, error)Execute enforces the operation permission before reading or changing review state.
type RejectVerificationUseCase
RejectVerificationUseCase handles rejecting a verification.
type RejectVerificationUseCase struct {
// contains filtered or unexported fields
}func NewRejectVerificationUseCase
func NewRejectVerificationUseCase(repo ports.DoctorVerificationRepository) *RejectVerificationUseCaseNewRejectVerificationUseCase instantiates a new RejectVerificationUseCase.
func (*RejectVerificationUseCase) Execute
func (uc *RejectVerificationUseCase) Execute(ctx context.Context, verificationID string, adminUserID string, reason string) errorExecute rejects a verification.
type ResolveAdminPrincipalUseCase
ResolveAdminPrincipalUseCase verifies identity and active administrator membership.
type ResolveAdminPrincipalUseCase struct {
// contains filtered or unexported fields
}func NewResolveAdminPrincipalUseCase
func NewResolveAdminPrincipalUseCase(identity types.IIdentityService, admins ports.AdminRepository) *ResolveAdminPrincipalUseCaseNewResolveAdminPrincipalUseCase wires identity verification and administrator lookup.
func (*ResolveAdminPrincipalUseCase) Execute
func (uc *ResolveAdminPrincipalUseCase) Execute(ctx context.Context, input domain.AdminAuthenticatedInput) (*types.AdminPrincipal, error)Execute resolves an authenticated user with active administrator membership.
type RestoreBrandUseCase
RestoreBrandUseCase orchestrates a medicine catalog administration operation.
type RestoreBrandUseCase struct {
// contains filtered or unexported fields
}func NewRestoreBrandUseCase
func NewRestoreBrandUseCase(provider medicinepublic.RestoreBrandCapability) *RestoreBrandUseCaseNewRestoreBrandUseCase accepts only the operation's required capability.
func (*RestoreBrandUseCase) Execute
func (uc *RestoreBrandUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineBrand, error)Execute delegates to medicine; authentication and audit are not enabled.
type RestoreDrugUseCase
RestoreDrugUseCase orchestrates a medicine catalog administration operation.
type RestoreDrugUseCase struct {
// contains filtered or unexported fields
}func NewRestoreDrugUseCase
func NewRestoreDrugUseCase(provider medicinepublic.RestoreDrugCapability) *RestoreDrugUseCaseNewRestoreDrugUseCase accepts only the operation's required capability.
func (*RestoreDrugUseCase) Execute
func (uc *RestoreDrugUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineDrug, error)Execute delegates to medicine; authentication and audit are not enabled.
type RestoreGenericUseCase
RestoreGenericUseCase orchestrates a medicine catalog administration operation.
type RestoreGenericUseCase struct {
// contains filtered or unexported fields
}func NewRestoreGenericUseCase
func NewRestoreGenericUseCase(provider medicinepublic.RestoreGenericCapability) *RestoreGenericUseCaseNewRestoreGenericUseCase accepts only the operation's required capability.
func (*RestoreGenericUseCase) Execute
func (uc *RestoreGenericUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineGeneric, error)Execute delegates to medicine; authentication and audit are not enabled.
type RestoreManufacturerUseCase
RestoreManufacturerUseCase orchestrates a medicine catalog administration operation.
type RestoreManufacturerUseCase struct {
// contains filtered or unexported fields
}func NewRestoreManufacturerUseCase
func NewRestoreManufacturerUseCase(provider medicinepublic.RestoreManufacturerCapability) *RestoreManufacturerUseCaseNewRestoreManufacturerUseCase accepts only the operation's required capability.
func (*RestoreManufacturerUseCase) Execute
func (uc *RestoreManufacturerUseCase) Execute(ctx context.Context, input domain.MedicineRecordInput) (*types.MedicineManufacturer, error)Execute delegates to medicine; authentication and audit are not enabled.
type RestoreOrganizationUseCase
RestoreOrganizationUseCase coordinates organization restoration.
type RestoreOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewRestoreOrganizationUseCase
func NewRestoreOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *RestoreOrganizationUseCaseNewRestoreOrganizationUseCase wires organization restoration and actor resolution.
func (*RestoreOrganizationUseCase) Execute
func (uc *RestoreOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)Execute authenticates the administrator and restores an organization that is not suspended.
type RevokeAdminUserInput
RevokeAdminUserInput identifies an administrator whose access will be revoked.
type RevokeAdminUserInput = domain.RevokeAdminUserInputtype RevokeAdminUserUseCase
RevokeAdminUserUseCase defines the unimplemented revoke platform admin access operation.
type RevokeAdminUserUseCase struct{}func NewRevokeAdminUserUseCase
func NewRevokeAdminUserUseCase() *RevokeAdminUserUseCaseNewRevokeAdminUserUseCase creates the documentation-first operation.
func (*RevokeAdminUserUseCase) Execute
func (uc *RevokeAdminUserUseCase) Execute(_ context.Context, _ domain.RevokeAdminUserInput) (*types.Empty, error)Execute returns a stub error without authentication, persistence or state changes.
type SubmitDoctorVerificationInput
SubmitDoctorVerificationInput contains evidence for a doctor verification.
type SubmitDoctorVerificationInput = domain.SubmitDoctorVerificationInputtype SubmitDoctorVerificationParams
SubmitDoctorVerificationParams contains verification documents and notes.
type SubmitDoctorVerificationParams = domain.SubmitDoctorVerificationParamstype SubmitDoctorVerificationUseCase
SubmitDoctorVerificationUseCase derives professional identity from the authenticated doctor.
type SubmitDoctorVerificationUseCase struct {
// contains filtered or unexported fields
}func NewSubmitDoctorVerificationUseCase
func NewSubmitDoctorVerificationUseCase(deps DoctorManagementDependencies) *SubmitDoctorVerificationUseCaseNewSubmitDoctorVerificationUseCase wires authentication, professional lookup and submission storage.
func (*SubmitDoctorVerificationUseCase) Execute
func (uc *SubmitDoctorVerificationUseCase) Execute(ctx context.Context, input domain.SubmitDoctorVerificationInput) (*types.DoctorVerification, error)Execute submits evidence for the authenticated doctor without accepting a caller-selected profile.
type SubmitVerificationDTO
SubmitVerificationDTO contains parameters to submit a verification request.
type SubmitVerificationDTO = domain.SubmitVerificationInputtype SubmitVerificationUseCase
SubmitVerificationUseCase handles submitting a doctor verification request.
type SubmitVerificationUseCase struct {
// contains filtered or unexported fields
}func NewSubmitVerificationUseCase
func NewSubmitVerificationUseCase(repo ports.DoctorVerificationRepository) *SubmitVerificationUseCaseNewSubmitVerificationUseCase instantiates a new SubmitVerificationUseCase.
func (*SubmitVerificationUseCase) Execute
func (uc *SubmitVerificationUseCase) Execute(ctx context.Context, dto domain.SubmitVerificationInput) (*domain.DoctorVerification, error)Execute submits a verification request.
type SuspendDoctorAccountUseCase
SuspendDoctorAccountUseCase disables the doctor's Identity account and all sessions.
type SuspendDoctorAccountUseCase struct {
// contains filtered or unexported fields
}func NewSuspendDoctorAccountUseCase
func NewSuspendDoctorAccountUseCase(deps DoctorManagementDependencies) *SuspendDoctorAccountUseCaseNewSuspendDoctorAccountUseCase wires the account suspension capabilities.
func (*SuspendDoctorAccountUseCase) Execute
func (uc *SuspendDoctorAccountUseCase) Execute(ctx context.Context, input domain.DoctorInput) (*domain.Doctor, error)Execute suspends the account after checking the administrator permission.
type SuspendOrganizationUseCase
SuspendOrganizationUseCase coordinates organization suspension.
type SuspendOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewSuspendOrganizationUseCase
func NewSuspendOrganizationUseCase(v ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *SuspendOrganizationUseCaseNewSuspendOrganizationUseCase wires organization suspension and actor resolution.
func (*SuspendOrganizationUseCase) Execute
func (uc *SuspendOrganizationUseCase) Execute(ctx context.Context, input domain.OrganizationStatusInput) (*types.Organization, error)Execute authenticates the administrator and suspends an organization.
type UpdateOrganizationInput
UpdateOrganizationInput contains replacement organization details.
type UpdateOrganizationInput = domain.UpdateOrganizationInputtype UpdateOrganizationUseCase
UpdateOrganizationUseCase coordinates updates to organization details.
type UpdateOrganizationUseCase struct {
// contains filtered or unexported fields
}func NewUpdateOrganizationUseCase
func NewUpdateOrganizationUseCase(organizations ports.AdminOrganizationService, identity types.IIdentityService, admins ports.AdminRepository, accounts ports.AdminIdentityService) *UpdateOrganizationUseCaseNewUpdateOrganizationUseCase wires organization editing and actor resolution.
func (*UpdateOrganizationUseCase) Execute
func (uc *UpdateOrganizationUseCase) Execute(ctx context.Context, input domain.UpdateOrganizationInput) (*types.Organization, error)Execute authenticates the administrator and updates organization details with audit context.
type VoidBillingInvoiceUseCase
VoidBillingInvoiceUseCase orchestrates a platform-admin billing operation.
type VoidBillingInvoiceUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewVoidBillingInvoiceUseCase
func NewVoidBillingInvoiceUseCase(provider subscriptionpublic.VoidBillingInvoiceCapability, access ...*DoctorManagementAccess) *VoidBillingInvoiceUseCaseNewVoidBillingInvoiceUseCase accepts only the capability used by this operation.
func (*VoidBillingInvoiceUseCase) Execute
func (uc *VoidBillingInvoiceUseCase) Execute(ctx context.Context, input domain.VoidBillingInvoiceInput) (*types.BillingInvoice, error)Execute authenticates and authorizes before calling the Subscription capability.
type VoidBillingPaymentUseCase
VoidBillingPaymentUseCase orchestrates a platform-admin billing operation.
type VoidBillingPaymentUseCase struct {
Access *DoctorManagementAccess
// contains filtered or unexported fields
}func NewVoidBillingPaymentUseCase
func NewVoidBillingPaymentUseCase(provider subscriptionpublic.VoidBillingPaymentCapability, access ...*DoctorManagementAccess) *VoidBillingPaymentUseCaseNewVoidBillingPaymentUseCase accepts only the capability used by this operation.
func (*VoidBillingPaymentUseCase) Execute
func (uc *VoidBillingPaymentUseCase) Execute(ctx context.Context, input domain.VoidBillingPaymentInput) (*types.BillingPayment, error)Execute authenticates and authorizes before calling the Subscription capability.
Generated by gomarkdoc