package polygenicDiseases

import "errors"

import "seekia/internal/genetics/geneticReferences/attributeLoci"

import "seekia/internal/helpers"


func getAutismDiseaseObject()PolygenicDisease{

	autismLocusReferencesMap := attributeLoci.GetAutismLoci()

	autismLociList := helpers.GetListOfMapKeys(autismLocusReferencesMap)

	referencesMap := make(map[string]string)
	referencesMap["SNPedia.com - Autism"] = "https://www.snpedia.com/index.php/Autism"

	// https://www.cdc.gov/mmwr/volumes/72/ss/ss7202a1.htm
	// For 2020, one in 36 children aged 8 years (approximately 4% of boys and 1% of girls) was estimated to have ASD.

	getAverageRiskProbabilitiesFunction := func(maleOrFemale string, inputAge int)(float64, error){

		if (maleOrFemale == "Male"){
			return 0.04, nil
		}

		if (maleOrFemale != "Female"){
			return 0, errors.New("Trying to get breast cancer risk probability for invalid maleOrFemale: " + maleOrFemale)
		}

		//TODO: Add different probabilities per age

		return 0.01, nil
	}

	autismObject := PolygenicDisease{

		DiseaseName: "Autism",
		EffectedSex: "Both",
		DiseaseDescription: "A mental disorder characterized by inability to engage in normal social interactions and intense self-absorption, and usually accompanied by other symptoms such as language dysfunctions and repetitive behavior.",
		// Taken from: The American Heritage® Dictionary of the English Language, 5th Edition 
		LocusReferencesMap: autismLocusReferencesMap,
		LociList: autismLociList,
		GetAverageRiskProbabilitiesFunction: getAverageRiskProbabilitiesFunction,
		References: referencesMap,
	}

	return autismObject
}

