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

import (
	e "simrs-vx/internal/domain/main-entities/action-report"
)

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

	data.Encounter_Id = inputSrc.Encounter_Id
	data.Date = inputSrc.Date
	data.Doctor_Code = inputSrc.Doctor_Code
	data.Operator_Employe_Id = inputSrc.Operator_Employe_Id
	data.Assistant_Employe_Id = inputSrc.Assistant_Employe_Id
	data.Instrumentor_Employe_Id = inputSrc.Instrumentor_Employe_Id
	data.Nurse_Code = inputSrc.Nurse_Code
	data.Value = inputSrc.Value
}
