Table of Contents

Class SearchClinicalNotesCommand

Namespace
Core.CliniCore.Commands.Query
Assembly
Core.CliniCore.dll

Command that searches clinical documents by diagnosis, medication, or general text content. Supports role-based access control where patients can only search their own documents and physicians can search documents for patients under their care.

public class SearchClinicalNotesCommand : AbstractCommand, ICommand
Inheritance
SearchClinicalNotesCommand
Implements
Inherited Members

Constructors

SearchClinicalNotesCommand(ProfileService, ClinicalDocumentService)

Initializes a new instance of the SearchClinicalNotesCommand class.

public SearchClinicalNotesCommand(ProfileService profileService, ClinicalDocumentService clinicalDocService)

Parameters

profileService ProfileService

The profile service for accessing user profiles.

clinicalDocService ClinicalDocumentService

The clinical document service for searching documents.

Exceptions

ArgumentNullException

Thrown if any parameter is null.

Fields

Key

The unique key used to identify this command.

public const string Key = "searchclinicalnotes"

Field Value

string

Properties

CommandKey

Unique key identifier for this command type Generated from the class name, converted to lowercase without "Command" suffix E.g., "LoginCommand" becomes "login", "CreatePatientCommand" becomes "createpatient"

public override string CommandKey { get; }

Property Value

string

Description

Description of what this command does

public override string Description { get; }

Property Value

string

Methods

ExecuteCore(CommandParameters, SessionContext?)

Executes the core command logic - must be implemented by derived classes

protected override CommandResult ExecuteCore(CommandParameters parameters, SessionContext? session)

Parameters

parameters CommandParameters
session SessionContext

Returns

CommandResult

GetRequiredPermission()

Gets the required permission to execute this command

public override Permission? GetRequiredPermission()

Returns

Permission?

ValidateParameters(CommandParameters)

Validates command parameters - override in derived classes

protected override CommandValidationResult ValidateParameters(CommandParameters parameters)

Parameters

parameters CommandParameters

The parameters to validate (never null, but may be empty)

Returns

CommandValidationResult

Validation result indicating success or failure with error messages

ValidateSpecific(CommandParameters, SessionContext?)

Performs command-specific validation - override in derived classes if needed

protected override CommandValidationResult ValidateSpecific(CommandParameters parameters, SessionContext? session)

Parameters

parameters CommandParameters
session SessionContext

Returns

CommandValidationResult