usecase
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
- type CreateChiefComplaintUseCase
- type CreateHistorySuggestionUseCase
- type CreatePrescriptionUseCase
- type CreateSuggestionAdviceUseCase
- type CreateSuggestionDiagnosisUseCase
- type CreateSuggestionInvestigationUseCase
- func NewCreateSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *CreateSuggestionInvestigationUseCase
- func (uc *CreateSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.SuggestionInvestigationParams) (*servicepublic.SuggestionInvestigation, error)
- type DeleteChiefComplaintUseCase
- type DeleteHistorySuggestionUseCase
- type DeleteSuggestionAdviceUseCase
- type DeleteSuggestionDiagnosisUseCase
- type DeleteSuggestionInvestigationUseCase
- type GetChiefComplaintUseCase
- type GetHistorySuggestionUseCase
- type GetPatientHistoryUseCase
- type GetPrescriptionUseCase
- type GetSuggestionAdviceUseCase
- type GetSuggestionDiagnosisUseCase
- type GetSuggestionInvestigationUseCase
- type IssuePrescriptionUseCase
- type ListChiefComplaintsUseCase
- type ListHistorySuggestionsUseCase
- type ListPrescriptionsUseCase
- type ListSuggestionAdviceUseCase
- type ListSuggestionDiagnosisUseCase
- type ListSuggestionInvestigationUseCase
- func NewListSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *ListSuggestionInvestigationUseCase
- func (uc *ListSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.ListSuggestionsInput) (*servicepublic.Page[servicepublic.SuggestionInvestigation], error)
- type PatchChiefComplaintUseCase
- type PatchHistorySuggestionUseCase
- type PatchPrescriptionUseCase
- type SuggestChiefComplaintsUseCase
- type SuggestHistoryUseCase
- type UpdateSuggestionAdviceUseCase
- type UpdateSuggestionDiagnosisUseCase
- type UpdateSuggestionInvestigationUseCase
- func NewUpdateSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *UpdateSuggestionInvestigationUseCase
- func (uc *UpdateSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.UpdateSuggestionInvestigationInput) (*servicepublic.SuggestionInvestigation, error)
type CancelPrescriptionUseCase
CancelPrescriptionUseCase owns the future cancel prescription workflow.
type CancelPrescriptionUseCase struct{}func NewCancelPrescriptionUseCase
func NewCancelPrescriptionUseCase() *CancelPrescriptionUseCaseNewCancelPrescriptionUseCase creates the documentation-first operation.
func (*CancelPrescriptionUseCase) Execute
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.
type CreateChiefComplaintUseCase struct{ Store ports.MutationStore }func (CreateChiefComplaintUseCase) Execute
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.
type CreateHistorySuggestionUseCase struct{ Store ports.MutationStore }func (CreateHistorySuggestionUseCase) Execute
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.
type CreatePrescriptionUseCase struct{}func NewCreatePrescriptionUseCase
func NewCreatePrescriptionUseCase() *CreatePrescriptionUseCaseNewCreatePrescriptionUseCase creates the documentation-first operation.
func (*CreatePrescriptionUseCase) Execute
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.
type CreateSuggestionAdviceUseCase struct {
// contains filtered or unexported fields
}func NewCreateSuggestionAdviceUseCase
func NewCreateSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *CreateSuggestionAdviceUseCaseNewCreateSuggestionAdviceUseCase injects the advice repository.
func (*CreateSuggestionAdviceUseCase) Execute
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.
type CreateSuggestionDiagnosisUseCase struct {
// contains filtered or unexported fields
}func NewCreateSuggestionDiagnosisUseCase
func NewCreateSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *CreateSuggestionDiagnosisUseCaseNewCreateSuggestionDiagnosisUseCase injects the diagnosis repository.
func (*CreateSuggestionDiagnosisUseCase) Execute
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.
type CreateSuggestionInvestigationUseCase struct {
// contains filtered or unexported fields
}func NewCreateSuggestionInvestigationUseCase
func NewCreateSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *CreateSuggestionInvestigationUseCaseNewCreateSuggestionInvestigationUseCase injects the investigation repository.
func (*CreateSuggestionInvestigationUseCase) Execute
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.
type DeleteChiefComplaintUseCase struct{ Store ports.MutationStore }func (DeleteChiefComplaintUseCase) Execute
func (uc DeleteChiefComplaintUseCase) Execute(ctx context.Context, input c.DeleteInput) errorExecute is idempotent for an already deleted record and audits only its first deletion.
type DeleteHistorySuggestionUseCase
DeleteHistorySuggestionUseCase soft-deletes without modifying clinical document snapshots.
type DeleteHistorySuggestionUseCase struct{ Store ports.MutationStore }func (DeleteHistorySuggestionUseCase) Execute
func (uc DeleteHistorySuggestionUseCase) Execute(ctx context.Context, input c.DeleteInput) errorExecute is idempotent for an already deleted record and audits only its first deletion.
type DeleteSuggestionAdviceUseCase
DeleteSuggestionAdviceUseCase permanently removes an advice suggestion.
type DeleteSuggestionAdviceUseCase struct {
// contains filtered or unexported fields
}func NewDeleteSuggestionAdviceUseCase
func NewDeleteSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *DeleteSuggestionAdviceUseCaseNewDeleteSuggestionAdviceUseCase injects the advice repository.
func (*DeleteSuggestionAdviceUseCase) Execute
func (uc *DeleteSuggestionAdviceUseCase) Execute(ctx context.Context, id string) errorExecute deletes the catalog entry without rewriting saved clinical content.
type DeleteSuggestionDiagnosisUseCase
DeleteSuggestionDiagnosisUseCase permanently removes a diagnosis suggestion.
type DeleteSuggestionDiagnosisUseCase struct {
// contains filtered or unexported fields
}func NewDeleteSuggestionDiagnosisUseCase
func NewDeleteSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *DeleteSuggestionDiagnosisUseCaseNewDeleteSuggestionDiagnosisUseCase injects the diagnosis repository.
func (*DeleteSuggestionDiagnosisUseCase) Execute
func (uc *DeleteSuggestionDiagnosisUseCase) Execute(ctx context.Context, id string) errorExecute deletes the catalog entry without rewriting saved clinical content.
type DeleteSuggestionInvestigationUseCase
DeleteSuggestionInvestigationUseCase permanently removes an investigation suggestion.
type DeleteSuggestionInvestigationUseCase struct {
// contains filtered or unexported fields
}func NewDeleteSuggestionInvestigationUseCase
func NewDeleteSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *DeleteSuggestionInvestigationUseCaseNewDeleteSuggestionInvestigationUseCase injects the investigation repository.
func (*DeleteSuggestionInvestigationUseCase) Execute
func (uc *DeleteSuggestionInvestigationUseCase) Execute(ctx context.Context, id string) errorExecute deletes the catalog entry without rewriting saved clinical content.
type GetChiefComplaintUseCase
GetChiefComplaintUseCase validates a clinical catalog read before storage access.
type GetChiefComplaintUseCase struct {
Repository ports.ChiefComplaintRepository
}func (GetChiefComplaintUseCase) Execute
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.
type GetHistorySuggestionUseCase struct{ Repository ports.HistoryRepository }func (GetHistorySuggestionUseCase) Execute
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.
type GetPatientHistoryUseCase struct{}func NewGetPatientHistoryUseCase
func NewGetPatientHistoryUseCase() *GetPatientHistoryUseCaseNewGetPatientHistoryUseCase creates the documentation-first operation.
func (*GetPatientHistoryUseCase) Execute
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.
type GetPrescriptionUseCase struct{}func NewGetPrescriptionUseCase
func NewGetPrescriptionUseCase() *GetPrescriptionUseCaseNewGetPrescriptionUseCase creates the documentation-first operation.
func (*GetPrescriptionUseCase) Execute
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.
type GetSuggestionAdviceUseCase struct {
// contains filtered or unexported fields
}func NewGetSuggestionAdviceUseCase
func NewGetSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *GetSuggestionAdviceUseCaseNewGetSuggestionAdviceUseCase injects the advice repository.
func (*GetSuggestionAdviceUseCase) Execute
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.
type GetSuggestionDiagnosisUseCase struct {
// contains filtered or unexported fields
}func NewGetSuggestionDiagnosisUseCase
func NewGetSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *GetSuggestionDiagnosisUseCaseNewGetSuggestionDiagnosisUseCase injects the diagnosis repository.
func (*GetSuggestionDiagnosisUseCase) Execute
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.
type GetSuggestionInvestigationUseCase struct {
// contains filtered or unexported fields
}func NewGetSuggestionInvestigationUseCase
func NewGetSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *GetSuggestionInvestigationUseCaseNewGetSuggestionInvestigationUseCase injects the investigation repository.
func (*GetSuggestionInvestigationUseCase) Execute
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.
type IssuePrescriptionUseCase struct{}func NewIssuePrescriptionUseCase
func NewIssuePrescriptionUseCase() *IssuePrescriptionUseCaseNewIssuePrescriptionUseCase creates the documentation-first operation.
func (*IssuePrescriptionUseCase) Execute
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.
type ListChiefComplaintsUseCase struct {
Repository ports.ChiefComplaintRepository
}func (ListChiefComplaintsUseCase) Execute
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.
type ListHistorySuggestionsUseCase struct{ Repository ports.HistoryRepository }func (ListHistorySuggestionsUseCase) Execute
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.
type ListPrescriptionsUseCase struct{}func NewListPrescriptionsUseCase
func NewListPrescriptionsUseCase() *ListPrescriptionsUseCaseNewListPrescriptionsUseCase creates the documentation-first operation.
func (*ListPrescriptionsUseCase) Execute
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.
type ListSuggestionAdviceUseCase struct {
// contains filtered or unexported fields
}func NewListSuggestionAdviceUseCase
func NewListSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *ListSuggestionAdviceUseCaseNewListSuggestionAdviceUseCase injects the advice repository.
func (*ListSuggestionAdviceUseCase) Execute
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.
type ListSuggestionDiagnosisUseCase struct {
// contains filtered or unexported fields
}func NewListSuggestionDiagnosisUseCase
func NewListSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *ListSuggestionDiagnosisUseCaseNewListSuggestionDiagnosisUseCase injects the diagnosis repository.
func (*ListSuggestionDiagnosisUseCase) Execute
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.
type ListSuggestionInvestigationUseCase struct {
// contains filtered or unexported fields
}func NewListSuggestionInvestigationUseCase
func NewListSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *ListSuggestionInvestigationUseCaseNewListSuggestionInvestigationUseCase injects the investigation repository.
func (*ListSuggestionInvestigationUseCase) Execute
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.
type PatchChiefComplaintUseCase struct{ Store ports.MutationStore }func (PatchChiefComplaintUseCase) Execute
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.
type PatchHistorySuggestionUseCase struct{ Store ports.MutationStore }func (PatchHistorySuggestionUseCase) Execute
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.
type PatchPrescriptionUseCase struct{}func NewPatchPrescriptionUseCase
func NewPatchPrescriptionUseCase() *PatchPrescriptionUseCaseNewPatchPrescriptionUseCase creates the documentation-first operation.
func (*PatchPrescriptionUseCase) Execute
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.
type SuggestChiefComplaintsUseCase struct {
Repository ports.ChiefComplaintRepository
}func (SuggestChiefComplaintsUseCase) Execute
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.
type SuggestHistoryUseCase struct{ Repository ports.HistoryRepository }func (SuggestHistoryUseCase) Execute
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.
type UpdateSuggestionAdviceUseCase struct {
// contains filtered or unexported fields
}func NewUpdateSuggestionAdviceUseCase
func NewUpdateSuggestionAdviceUseCase(repo ports.SuggestionAdviceRepository) *UpdateSuggestionAdviceUseCaseNewUpdateSuggestionAdviceUseCase injects the advice repository.
func (*UpdateSuggestionAdviceUseCase) Execute
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.
type UpdateSuggestionDiagnosisUseCase struct {
// contains filtered or unexported fields
}func NewUpdateSuggestionDiagnosisUseCase
func NewUpdateSuggestionDiagnosisUseCase(repo ports.SuggestionDiagnosisRepository) *UpdateSuggestionDiagnosisUseCaseNewUpdateSuggestionDiagnosisUseCase injects the diagnosis repository.
func (*UpdateSuggestionDiagnosisUseCase) Execute
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.
type UpdateSuggestionInvestigationUseCase struct {
// contains filtered or unexported fields
}func NewUpdateSuggestionInvestigationUseCase
func NewUpdateSuggestionInvestigationUseCase(repo ports.SuggestionInvestigationRepository) *UpdateSuggestionInvestigationUseCaseNewUpdateSuggestionInvestigationUseCase injects the investigation repository.
func (*UpdateSuggestionInvestigationUseCase) Execute
func (uc *UpdateSuggestionInvestigationUseCase) Execute(ctx context.Context, input servicepublic.UpdateSuggestionInvestigationInput) (*servicepublic.SuggestionInvestigation, error)Execute changes only the label, preserving the identifier.
Generated by gomarkdoc