Skip to content

Instantly share code, notes, and snippets.

@Mikodes
Created September 1, 2023 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mikodes/b78195fd414bef7b1a1ed4f3966dc034 to your computer and use it in GitHub Desktop.
Save Mikodes/b78195fd414bef7b1a1ed4f3966dc034 to your computer and use it in GitHub Desktop.
export class CreateMedicinePlanDto {
@ApiProperty()
medicineId: string; //id de la medicina que seleccionad
@ApiProperty()
tomas: InTakeDto[]; // configuracion dosis / horario -> explicado en el siguiente ovbjeto
@ApiProperty()
frequencyType: FrequencyType; // CONSTATE QUE NOS DEFINE COMO FUCNIONA LA FRECUENCIA.
@ApiProperty()
frequency: number[]; // dias de la semana en caso de que sea todos los dias o dias seelcionados.
frecuency_interval: number; // numero de intervalo en caso de selecionar la modadlidad intervalo.
@ApiProperty()
duration: DurationType; // tipo de constante para decidir que tipo de finalizacion tenemos.
@ApiProperty()
startDate: Date; // fecha de inicio
@ApiProperty()
finishDate: Date; //fecha de fin.
}
export class InTakeDto {
@ApiProperty()
time: string; // tiempo horario
@ApiProperty()
dosis: string; // numero de pirulas
@ApiProperty()
scheludeId: string; //id de horario
}
export enum FrequencyType {
ALL_DAYS = 'ALL_DAYS', todos los dias
SELECTED_DAYS = 'SELECTED_DAYS', dias selecionados
INTERVAL_DAYS = 'INTERVAL_DAYS',
}
export enum DurationType {
INFINITE = 'INFINITE',
SELECTED_DATE = 'SELECTED_DATE',
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment