Class UpdatePatientProfileCommand
Command that updates an existing patient profile. Supports updating common fields (name, address, birthdate) and patient-specific fields (gender, race). Patients can update their own profile; physicians can update their assigned patients.
public class UpdatePatientProfileCommand : AbstractCommand, ICommand
- Inheritance
-
UpdatePatientProfileCommand
- Implements
- Inherited Members
Constructors
UpdatePatientProfileCommand(ProfileService)
public UpdatePatientProfileCommand(ProfileService profileService)
Parameters
profileServiceProfileService
Fields
Key
The unique key used to identify this command.
public const string Key = "updatepatientprofile"
Field Value
Properties
CanUndo
Whether this command can be undone - defaults to false
public override bool CanUndo { get; }
Property Value
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
Description
Description of what this command does
public override string Description { get; }
Property Value
Methods
ExecuteCore(CommandParameters, SessionContext?)
Executes the core command logic - must be implemented by derived classes
protected override CommandResult ExecuteCore(CommandParameters parameters, SessionContext? session)
Parameters
parametersCommandParameterssessionSessionContext
Returns
GetRequiredPermission()
Gets the required permission to execute this command
public override Permission? GetRequiredPermission()
Returns
ValidateParameters(CommandParameters)
Validates command parameters - override in derived classes
protected override CommandValidationResult ValidateParameters(CommandParameters parameters)
Parameters
parametersCommandParametersThe 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
parametersCommandParameterssessionSessionContext