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

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

func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.ProcedureReport) {
	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_Name = inputSrc.Operator_Name
	data.Assistant_Name = inputSrc.Assistant_Name
	data.Instrumentor_Name = inputSrc.Instrumentor_Name
	data.Anesthesia_Doctor_Code = inputSrc.Anesthesia_Doctor_Code
	data.Anesthesia_Nurse_Name = inputSrc.Anesthesia_Nurse_Name
	data.Diagnose = inputSrc.Diagnose
	data.Nurse_Name = inputSrc.Nurse_Name
	data.ProcedureValue = inputSrc.ProcedureValue
	data.ExecutionValue = inputSrc.ExecutionValue
	data.Type = inputSrc.Type

	//PROPER
	// 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
}
