Class RedisSettings.CacheKeys
- Namespace
- adas_core.Domain.Models.AppSettings
- Assembly
- adas-core.Domain.dll
Provides static cache key constants used throughout the application to ensure consistent key naming when storing and retrieving cached data.
public static class RedisSettings.CacheKeys
- Inheritance
-
RedisSettings.CacheKeys
- Inherited Members
Methods
Appointment(string)
Builds an appointment resource identifier by combining the "appointments" prefix with the specified appointment ID.
public static string Appointment(string apptId)
Parameters
apptIdstringThe unique identifier of the appointment.
Returns
- string
A formatted string in the form "appointments:{apptId}".
AppointmentsByPatientDay(string, DateTime)
Builds a cache key for retrieving a patient's appointments for a specific calendar day.
The key is composed of the patient identifier and the date formatted as yyyyMMdd.
public static string AppointmentsByPatientDay(string patientId, DateTime date)
Parameters
patientIdstringThe unique identifier of the patient whose appointments are being addressed.
dateDateTimeThe date for which the appointments are being requested.
Returns
- string
A formatted cache key string combining the patient identifier and the day in
yyyyMMddformat.
AppointmentsByPatientMonth(string, DateTime)
Builds a deterministic cache key used to look up a patient's appointments for the month of the supplied date.
The key is composed of the patient identifier and the date formatted as yyyyMM.
public static string AppointmentsByPatientMonth(string patientId, DateTime date)
Parameters
patientIdstringThe identifier of the patient whose appointments are being queried.
dateDateTimeThe date whose year and month determine the appointment period encoded in the key.
Returns
- string
A formatted string in the form
appointments:patient:{patientId}:{yyyyMM}suitable for use as a cache key.
ConfigDisplay(string)
Builds a configuration key for a config display by combining the configDisplays namespace with the specified identifier.
public static string ConfigDisplay(string id)
Parameters
idstringThe unique identifier of the config display to include in the key.
Returns
- string
A formatted key string in the form
configDisplays:{id}suitable for lookup or caching.
ConfigDisplaysAll()
Returns the configuration key representing the "all displays" setting, typically used to request or identify the display configuration for all available displays.
public static string ConfigDisplaysAll()
Returns
- string
The string identifier "configDisplays:all" used to reference the all-displays configuration.
GroupedObservationsByPatient(string, string?)
Builds a formatted identifier string for grouped observations associated with a specific patient, typically used as a cache key or lookup token.
public static string GroupedObservationsByPatient(string patientId, string? groupedField)
Parameters
patientIdstringThe unique identifier of the patient whose observations are being referenced.
groupedFieldstringThe optional field used to group the observations; may be null.
Returns
- string
A formatted string in the pattern "groupedObs:{groupedField}:patient:{patientId}".
GroupedObservationsByPatientDay(string, string, DateTime)
Generates a formatted cache key for grouped observations scoped to a specific patient and day.
public static string GroupedObservationsByPatientDay(string patientId, string groupedField, DateTime date)
Parameters
patientIdstringThe unique identifier of the patient.
groupedFieldstringThe field name used to group the observations.
dateDateTimeThe observation date, formatted as
yyyyMMddin the generated key.
Returns
- string
A cache key string in the format
groupedObs:{groupedField}:patient:{patientId}:{yyyyMMdd}.
GroupedObservationsByPatientMonth(string, string, DateTime)
Builds a cache key for grouped observations scoped to a specific patient and month, combining the grouping field, patient identifier, and the year-month portion of the provided date.
public static string GroupedObservationsByPatientMonth(string patientId, string groupedField, DateTime date)
Parameters
patientIdstringThe identifier of the patient whose observations are being grouped.
groupedFieldstringThe observation field used as the grouping criterion.
dateDateTimeThe date used to derive the month bucket (formatted as yyyyMM) for the cache key.
Returns
- string
A formatted cache key string in the form
groupedObs:{groupedField}:patient:{patientId}:{yyyyMM}.
GroupedObservationsLatest(string, string, int)
Generates a cache key for retrieving the most recent grouped observations for a specific patient.
public static string GroupedObservationsLatest(string patientId, string groupedField, int take)
Parameters
patientIdstringThe unique identifier of the patient whose observations are being queried.
groupedFieldstringThe field used to group the observations.
takeintThe maximum number of latest observations to include in the cache key.
Returns
- string
A formatted cache key string identifying the patient's latest grouped observations.
Patient(string)
Builds a formatted patient identifier by prefixing the provided patient ID with "patients:".
public static string Patient(string patientId)
Parameters
patientIdstringThe unique identifier of the patient to be included in the formatted string.
Returns
- string
A string in the format "patients:{patientId}" representing the patient resource key.
PumpDaily(string, DateTime)
Builds a daily pump observation identifier by composing a prefixed key with the pump identifier and the date in yyyyMMdd format.
public static string PumpDaily(string pumpId, DateTime date)
Parameters
pumpIdstringThe unique identifier of the pump used in the composed key.
dateDateTimeThe observation date whose year, month, and day are formatted into the key.
Returns
- string
A string in the form
pumpObs:pump:{pumpId}:{yyyyMMdd}representing the daily pump observation key.
PumpObservation(string)
Formats the specified observation identifier as a pump observation reference string by prefixing it with "pumpObs:".
public static string PumpObservation(string obsId)
Parameters
obsIdstringThe observation identifier to include in the formatted result.
Returns
- string
A formatted string in the form "pumpObs:{obsId}".