/*
DESCRIPTION:
Any functions that are used internally by the use-case
*/
package medicinemixitem

import (
	e "simrs-vx/internal/domain/main-entities/medicine-mix-item"
)

func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.MedicineMixItem) {
	var inputSrc *e.CreateDto
	if inputT, ok := any(input).(*e.CreateDto); ok {
		inputSrc = inputT
	} else {
		inputTemp := any(input).(*e.UpdateDto)
		inputSrc = &inputTemp.CreateDto
	}

	data.MedicineMix_Id = inputSrc.MedicineMix_Id
	data.Medicine_Code = inputSrc.Medicine_Code
	data.Dose = inputSrc.Dose
	data.Note = inputSrc.Note
}
