Table of Contents

Class CreateFacilityCommand

Namespace
Core.CliniCore.Commands.Admin
Assembly
Core.CliniCore.dll

Command to create a new healthcare facility.

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

Constructors

CreateFacilityCommand(string, string, string)

Initializes a new instance of the CreateFacilityCommand class.

public CreateFacilityCommand(string name, string address, string phone)

Parameters

name string

The name of the new facility.

address string

The physical address of the new facility.

phone string

The contact phone number for the new facility.

Fields

Key

The unique key for the CreateFacility command.

public const string Key = "createfacility"

Field Value

string

Properties

CommandKey

Gets the unique key identifier for this command type.

public override string CommandKey { get; }

Property Value

string

Description

Gets the description of what this command does.

public override string Description { get; }

Property Value

string

Methods

ExecuteCore(CommandParameters, SessionContext?)

Executes the core logic of the command.

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

Parameters

parameters CommandParameters

The parameters for the command.

session SessionContext

The user session context.

Returns

CommandResult

The result of the command execution.

GetRequiredPermission()

Gets the required permission to execute this command.

public override Permission? GetRequiredPermission()

Returns

Permission?

The required permission.

ValidateParameters(CommandParameters)

Validates the parameters for the command.

protected override CommandValidationResult ValidateParameters(CommandParameters parameters)

Parameters

parameters CommandParameters

The parameters to validate.

Returns

CommandValidationResult

The result of the validation.