Skip to content

usecase ​

go
import "github.com/prescriptoo/prescriptoo-api/services/prescription/internal/usecase"

Package usecase defines documentation-first prescription operations.

Package usecase defines documentation-first prescription operations.

Package usecase defines documentation-first prescription operations.

Package usecase defines documentation-first prescription operations.

Package usecase defines documentation-first prescription operations.

Package usecase defines documentation-first prescription operations.

Package usecase defines documentation-first prescription operations.

Index ​

type CancelPrescriptionUseCase ​

CancelPrescriptionUseCase owns the future cancel prescription workflow.

go
type CancelPrescriptionUseCase struct{}

func NewCancelPrescriptionUseCase ​

go
func NewCancelPrescriptionUseCase() *CancelPrescriptionUseCase

NewCancelPrescriptionUseCase creates the documentation-first operation.

func (*CancelPrescriptionUseCase) Execute ​

go
func (uc *CancelPrescriptionUseCase) Execute(_ context.Context, _ servicepublic.CancelPrescriptionInput) (*servicepublic.Prescription, error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type CreateChiefComplaintUseCase ​

CreateChiefComplaintUseCase validates and atomically records a catalog creation.

go
type CreateChiefComplaintUseCase struct{ Store ports.MutationStore }

func (CreateChiefComplaintUseCase) Execute ​

go
func (uc CreateChiefComplaintUseCase) Execute(ctx context.Context, input c.CreateChiefComplaintInput) (c.ChiefComplaint, error)

Execute creates an ID and commits the catalog record with administrator audit.

type CreateHistorySuggestionUseCase ​

CreateHistorySuggestionUseCase validates and atomically records a catalog creation.

go
type CreateHistorySuggestionUseCase struct{ Store ports.MutationStore }

func (CreateHistorySuggestionUseCase) Execute ​

go
func (uc CreateHistorySuggestionUseCase) Execute(ctx context.Context, input c.CreateHistoryInput) (c.HistorySuggestion, error)

Execute creates an ID and commits the catalog record with administrator audit.

type CreatePrescriptionUseCase ​

CreatePrescriptionUseCase owns the future create prescription workflow.

go
type CreatePrescriptionUseCase struct{}

func NewCreatePrescriptionUseCase ​

go
func NewCreatePrescriptionUseCase() *CreatePrescriptionUseCase

NewCreatePrescriptionUseCase creates the documentation-first operation.

func (*CreatePrescriptionUseCase) Execute ​

go
func (uc *CreatePrescriptionUseCase) Execute(_ context.Context, _ servicepublic.CreatePrescriptionInput) (*servicepublic.Prescription, error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type CreateSuggestionAdviceUseCase ​

CreateSuggestionAdviceUseCase creates a shared advice suggestion.

go
type CreateSuggestionAdviceUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateSuggestionAdviceUseCase ​

go
func NewCreateSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *CreateSuggestionAdviceUseCase

NewCreateSuggestionAdviceUseCase injects the advice repository.

func (*CreateSuggestionAdviceUseCase) Execute ​

go
func (uc *CreateSuggestionAdviceUseCase) Execute(ctx context.Context, input servicepublic.SuggestionAdviceParams) (*servicepublic.SuggestionAdvice, error)

Execute validates the label and assigns a server-generated identifier.

type CreateSuggestionDiagnosisUseCase ​

CreateSuggestionDiagnosisUseCase creates a shared diagnosis suggestion.

go
type CreateSuggestionDiagnosisUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateSuggestionDiagnosisUseCase ​

go
func NewCreateSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *CreateSuggestionDiagnosisUseCase

NewCreateSuggestionDiagnosisUseCase injects the diagnosis repository.

func (*CreateSuggestionDiagnosisUseCase) Execute ​

go
func (uc *CreateSuggestionDiagnosisUseCase) Execute(ctx context.Context, input servicepublic.SuggestionDiagnosisParams) (*servicepublic.SuggestionDiagnosis, error)

Execute validates the label and assigns a server-generated identifier.

type CreateSuggestionInvestigationUseCase ​

CreateSuggestionInvestigationUseCase creates a shared investigation suggestion.

go
type CreateSuggestionInvestigationUseCase struct {
    // contains filtered or unexported fields
}

func NewCreateSuggestionInvestigationUseCase ​

go
func NewCreateSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *CreateSuggestionInvestigationUseCase

NewCreateSuggestionInvestigationUseCase injects the investigation repository.

func (*CreateSuggestionInvestigationUseCase) Execute ​

go
func (uc *CreateSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.SuggestionInvestigationParams) (*servicepublic.SuggestionInvestigation, error)

Execute validates the label and assigns a server-generated identifier.

type DeleteChiefComplaintUseCase ​

DeleteChiefComplaintUseCase soft-deletes without modifying clinical document snapshots.

go
type DeleteChiefComplaintUseCase struct{ Store ports.MutationStore }

func (DeleteChiefComplaintUseCase) Execute ​

go
func (uc DeleteChiefComplaintUseCase) Execute(ctx context.Context, input c.DeleteInput) error

Execute is idempotent for an already deleted record and audits only its first deletion.

type DeleteHistorySuggestionUseCase ​

DeleteHistorySuggestionUseCase soft-deletes without modifying clinical document snapshots.

go
type DeleteHistorySuggestionUseCase struct{ Store ports.MutationStore }

func (DeleteHistorySuggestionUseCase) Execute ​

go
func (uc DeleteHistorySuggestionUseCase) Execute(ctx context.Context, input c.DeleteInput) error

Execute is idempotent for an already deleted record and audits only its first deletion.

type DeleteSuggestionAdviceUseCase ​

DeleteSuggestionAdviceUseCase permanently removes an advice suggestion.

go
type DeleteSuggestionAdviceUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteSuggestionAdviceUseCase ​

go
func NewDeleteSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *DeleteSuggestionAdviceUseCase

NewDeleteSuggestionAdviceUseCase injects the advice repository.

func (*DeleteSuggestionAdviceUseCase) Execute ​

go
func (uc *DeleteSuggestionAdviceUseCase) Execute(ctx context.Context, id string) error

Execute deletes the catalog entry without rewriting saved clinical content.

type DeleteSuggestionDiagnosisUseCase ​

DeleteSuggestionDiagnosisUseCase permanently removes a diagnosis suggestion.

go
type DeleteSuggestionDiagnosisUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteSuggestionDiagnosisUseCase ​

go
func NewDeleteSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *DeleteSuggestionDiagnosisUseCase

NewDeleteSuggestionDiagnosisUseCase injects the diagnosis repository.

func (*DeleteSuggestionDiagnosisUseCase) Execute ​

go
func (uc *DeleteSuggestionDiagnosisUseCase) Execute(ctx context.Context, id string) error

Execute deletes the catalog entry without rewriting saved clinical content.

type DeleteSuggestionInvestigationUseCase ​

DeleteSuggestionInvestigationUseCase permanently removes an investigation suggestion.

go
type DeleteSuggestionInvestigationUseCase struct {
    // contains filtered or unexported fields
}

func NewDeleteSuggestionInvestigationUseCase ​

go
func NewDeleteSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *DeleteSuggestionInvestigationUseCase

NewDeleteSuggestionInvestigationUseCase injects the investigation repository.

func (*DeleteSuggestionInvestigationUseCase) Execute ​

go
func (uc *DeleteSuggestionInvestigationUseCase) Execute(ctx context.Context, id string) error

Execute deletes the catalog entry without rewriting saved clinical content.

type GetChiefComplaintUseCase ​

GetChiefComplaintUseCase validates a clinical catalog read before storage access.

go
type GetChiefComplaintUseCase struct {
    Repository ports.ChiefComplaintRepository
}

func (GetChiefComplaintUseCase) Execute ​

go
func (uc GetChiefComplaintUseCase) Execute(ctx context.Context, input string) (c.ChiefComplaint, error)

Execute applies query bounds and returns domain values, never HTTP DTOs.

type GetHistorySuggestionUseCase ​

GetHistorySuggestionUseCase validates a clinical catalog read before storage access.

go
type GetHistorySuggestionUseCase struct{ Repository ports.HistoryRepository }

func (GetHistorySuggestionUseCase) Execute ​

go
func (uc GetHistorySuggestionUseCase) Execute(ctx context.Context, input string) (c.HistorySuggestion, error)

Execute applies query bounds and returns domain values, never HTTP DTOs.

type GetPatientHistoryUseCase ​

GetPatientHistoryUseCase owns the future get patient history workflow.

go
type GetPatientHistoryUseCase struct{}

func NewGetPatientHistoryUseCase ​

go
func NewGetPatientHistoryUseCase() *GetPatientHistoryUseCase

NewGetPatientHistoryUseCase creates the documentation-first operation.

func (*GetPatientHistoryUseCase) Execute ​

go
func (uc *GetPatientHistoryUseCase) Execute(_ context.Context, _ servicepublic.GetPatientHistoryInput) (*servicepublic.PatientPrescriptionHistory, error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type GetPrescriptionUseCase ​

GetPrescriptionUseCase owns the future get prescription workflow.

go
type GetPrescriptionUseCase struct{}

func NewGetPrescriptionUseCase ​

go
func NewGetPrescriptionUseCase() *GetPrescriptionUseCase

NewGetPrescriptionUseCase creates the documentation-first operation.

func (*GetPrescriptionUseCase) Execute ​

go
func (uc *GetPrescriptionUseCase) Execute(_ context.Context, _ servicepublic.GetPrescriptionInput) (*servicepublic.Prescription, error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type GetSuggestionAdviceUseCase ​

GetSuggestionAdviceUseCase reads a shared advice suggestion.

go
type GetSuggestionAdviceUseCase struct {
    // contains filtered or unexported fields
}

func NewGetSuggestionAdviceUseCase ​

go
func NewGetSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *GetSuggestionAdviceUseCase

NewGetSuggestionAdviceUseCase injects the advice repository.

func (*GetSuggestionAdviceUseCase) Execute ​

go
func (uc *GetSuggestionAdviceUseCase) Execute(ctx context.Context, id string) (*servicepublic.SuggestionAdvice, error)

Execute retrieves a globally shared suggestion.

type GetSuggestionDiagnosisUseCase ​

GetSuggestionDiagnosisUseCase reads a shared diagnosis suggestion.

go
type GetSuggestionDiagnosisUseCase struct {
    // contains filtered or unexported fields
}

func NewGetSuggestionDiagnosisUseCase ​

go
func NewGetSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *GetSuggestionDiagnosisUseCase

NewGetSuggestionDiagnosisUseCase injects the diagnosis repository.

func (*GetSuggestionDiagnosisUseCase) Execute ​

go
func (uc *GetSuggestionDiagnosisUseCase) Execute(ctx context.Context, id string) (*servicepublic.SuggestionDiagnosis, error)

Execute retrieves a globally shared suggestion.

type GetSuggestionInvestigationUseCase ​

GetSuggestionInvestigationUseCase reads a shared investigation suggestion.

go
type GetSuggestionInvestigationUseCase struct {
    // contains filtered or unexported fields
}

func NewGetSuggestionInvestigationUseCase ​

go
func NewGetSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *GetSuggestionInvestigationUseCase

NewGetSuggestionInvestigationUseCase injects the investigation repository.

func (*GetSuggestionInvestigationUseCase) Execute ​

go
func (uc *GetSuggestionInvestigationUseCase) Execute(ctx context.Context, id string) (*servicepublic.SuggestionInvestigation, error)

Execute retrieves a globally shared suggestion.

type IssuePrescriptionUseCase ​

IssuePrescriptionUseCase owns the future issue prescription workflow.

go
type IssuePrescriptionUseCase struct{}

func NewIssuePrescriptionUseCase ​

go
func NewIssuePrescriptionUseCase() *IssuePrescriptionUseCase

NewIssuePrescriptionUseCase creates the documentation-first operation.

func (*IssuePrescriptionUseCase) Execute ​

go
func (uc *IssuePrescriptionUseCase) Execute(_ context.Context, _ servicepublic.IssuePrescriptionInput) (*servicepublic.Prescription, error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type ListChiefComplaintsUseCase ​

ListChiefComplaintsUseCase validates a clinical catalog read before storage access.

go
type ListChiefComplaintsUseCase struct {
    Repository ports.ChiefComplaintRepository
}

func (ListChiefComplaintsUseCase) Execute ​

go
func (uc ListChiefComplaintsUseCase) Execute(ctx context.Context, input c.CatalogQuery) (c.Page[c.ChiefComplaint], error)

Execute applies query bounds and returns domain values, never HTTP DTOs.

type ListHistorySuggestionsUseCase ​

ListHistorySuggestionsUseCase validates a clinical catalog read before storage access.

go
type ListHistorySuggestionsUseCase struct{ Repository ports.HistoryRepository }

func (ListHistorySuggestionsUseCase) Execute ​

go
func (uc ListHistorySuggestionsUseCase) Execute(ctx context.Context, input c.HistoryCatalogQuery) (c.Page[c.HistorySuggestion], error)

Execute applies query bounds and returns domain values, never HTTP DTOs.

type ListPrescriptionsUseCase ​

ListPrescriptionsUseCase owns the future list prescriptions workflow.

go
type ListPrescriptionsUseCase struct{}

func NewListPrescriptionsUseCase ​

go
func NewListPrescriptionsUseCase() *ListPrescriptionsUseCase

NewListPrescriptionsUseCase creates the documentation-first operation.

func (*ListPrescriptionsUseCase) Execute ​

go
func (uc *ListPrescriptionsUseCase) Execute(_ context.Context, _ servicepublic.ListPrescriptionsInput) (*servicepublic.Page[servicepublic.Summary], error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type ListSuggestionAdviceUseCase ​

ListSuggestionAdviceUseCase searches the global advice suggestion catalog.

go
type ListSuggestionAdviceUseCase struct {
    // contains filtered or unexported fields
}

func NewListSuggestionAdviceUseCase ​

go
func NewListSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *ListSuggestionAdviceUseCase

NewListSuggestionAdviceUseCase injects the advice repository.

func (*ListSuggestionAdviceUseCase) Execute ​

go
func (uc *ListSuggestionAdviceUseCase) Execute(ctx context.Context, input servicepublic.ListSuggestionsInput) (*servicepublic.Page[servicepublic.SuggestionAdvice], error)

Execute returns advice suggestions ordered by label and ID with a catalog-bound cursor.

type ListSuggestionDiagnosisUseCase ​

ListSuggestionDiagnosisUseCase searches the global diagnosis suggestion catalog.

go
type ListSuggestionDiagnosisUseCase struct {
    // contains filtered or unexported fields
}

func NewListSuggestionDiagnosisUseCase ​

go
func NewListSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *ListSuggestionDiagnosisUseCase

NewListSuggestionDiagnosisUseCase injects the diagnosis repository.

func (*ListSuggestionDiagnosisUseCase) Execute ​

go
func (uc *ListSuggestionDiagnosisUseCase) Execute(ctx context.Context, input servicepublic.ListSuggestionsInput) (*servicepublic.Page[servicepublic.SuggestionDiagnosis], error)

Execute returns diagnosis suggestions ordered by label and ID with a catalog-bound cursor.

type ListSuggestionInvestigationUseCase ​

ListSuggestionInvestigationUseCase searches the global investigation suggestion catalog.

go
type ListSuggestionInvestigationUseCase struct {
    // contains filtered or unexported fields
}

func NewListSuggestionInvestigationUseCase ​

go
func NewListSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *ListSuggestionInvestigationUseCase

NewListSuggestionInvestigationUseCase injects the investigation repository.

func (*ListSuggestionInvestigationUseCase) Execute ​

go
func (uc *ListSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.ListSuggestionsInput) (*servicepublic.Page[servicepublic.SuggestionInvestigation], error)

Execute returns investigation suggestions ordered by label and ID with a catalog-bound cursor.

type PatchChiefComplaintUseCase ​

PatchChiefComplaintUseCase merges only explicitly supplied catalog fields.

go
type PatchChiefComplaintUseCase struct{ Store ports.MutationStore }

func (PatchChiefComplaintUseCase) Execute ​

go
func (uc PatchChiefComplaintUseCase) Execute(ctx context.Context, input c.PatchChiefComplaintInput) (c.ChiefComplaint, error)

Execute locks current state, validates the merged record and audits real changes.

type PatchHistorySuggestionUseCase ​

PatchHistorySuggestionUseCase merges only explicitly supplied catalog fields.

go
type PatchHistorySuggestionUseCase struct{ Store ports.MutationStore }

func (PatchHistorySuggestionUseCase) Execute ​

go
func (uc PatchHistorySuggestionUseCase) Execute(ctx context.Context, input c.PatchHistoryInput) (c.HistorySuggestion, error)

Execute locks current state, validates the merged record and audits real changes.

type PatchPrescriptionUseCase ​

PatchPrescriptionUseCase owns the future patch prescription workflow.

go
type PatchPrescriptionUseCase struct{}

func NewPatchPrescriptionUseCase ​

go
func NewPatchPrescriptionUseCase() *PatchPrescriptionUseCase

NewPatchPrescriptionUseCase creates the documentation-first operation.

func (*PatchPrescriptionUseCase) Execute ​

go
func (uc *PatchPrescriptionUseCase) Execute(_ context.Context, _ servicepublic.PatchPrescriptionInput) (*servicepublic.Prescription, error)

Execute returns ErrNotImplemented without persistence, authorization or events.

type SuggestChiefComplaintsUseCase ​

SuggestChiefComplaintsUseCase validates a clinical catalog read before storage access.

go
type SuggestChiefComplaintsUseCase struct {
    Repository ports.ChiefComplaintRepository
}

func (SuggestChiefComplaintsUseCase) Execute ​

go
func (uc SuggestChiefComplaintsUseCase) Execute(ctx context.Context, input c.SuggestionQuery) ([]c.ChiefComplaint, error)

Execute applies query bounds and returns domain values, never HTTP DTOs.

type SuggestHistoryUseCase ​

SuggestHistoryUseCase validates a clinical catalog read before storage access.

go
type SuggestHistoryUseCase struct{ Repository ports.HistoryRepository }

func (SuggestHistoryUseCase) Execute ​

go
func (uc SuggestHistoryUseCase) Execute(ctx context.Context, input c.HistorySuggestionQuery) ([]c.HistorySuggestion, error)

Execute applies query bounds and returns domain values, never HTTP DTOs.

type UpdateSuggestionAdviceUseCase ​

UpdateSuggestionAdviceUseCase changes an advice suggestion's label.

go
type UpdateSuggestionAdviceUseCase struct {
    // contains filtered or unexported fields
}

func NewUpdateSuggestionAdviceUseCase ​

go
func NewUpdateSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *UpdateSuggestionAdviceUseCase

NewUpdateSuggestionAdviceUseCase injects the advice repository.

func (*UpdateSuggestionAdviceUseCase) Execute ​

go
func (uc *UpdateSuggestionAdviceUseCase) Execute(ctx context.Context, input servicepublic.UpdateSuggestionAdviceInput) (*servicepublic.SuggestionAdvice, error)

Execute changes only the label, preserving the identifier.

type UpdateSuggestionDiagnosisUseCase ​

UpdateSuggestionDiagnosisUseCase changes a diagnosis suggestion's label.

go
type UpdateSuggestionDiagnosisUseCase struct {
    // contains filtered or unexported fields
}

func NewUpdateSuggestionDiagnosisUseCase ​

go
func NewUpdateSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *UpdateSuggestionDiagnosisUseCase

NewUpdateSuggestionDiagnosisUseCase injects the diagnosis repository.

func (*UpdateSuggestionDiagnosisUseCase) Execute ​

go
func (uc *UpdateSuggestionDiagnosisUseCase) Execute(ctx context.Context, input servicepublic.UpdateSuggestionDiagnosisInput) (*servicepublic.SuggestionDiagnosis, error)

Execute changes only the label, preserving the identifier.

type UpdateSuggestionInvestigationUseCase ​

UpdateSuggestionInvestigationUseCase changes an investigation suggestion's label.

go
type UpdateSuggestionInvestigationUseCase struct {
    // contains filtered or unexported fields
}

func NewUpdateSuggestionInvestigationUseCase ​

go
func NewUpdateSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *UpdateSuggestionInvestigationUseCase

NewUpdateSuggestionInvestigationUseCase injects the investigation repository.

func (*UpdateSuggestionInvestigationUseCase) Execute ​

go
func (uc *UpdateSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.UpdateSuggestionInvestigationInput) (*servicepublic.SuggestionInvestigation, error)

Execute changes only the label, preserving the identifier.

Generated by gomarkdoc

Documentation follows the source. Planned contracts are marked explicitly.