/*******************************************************************************
 *  Copyright 2017-2018 Centre for Development of Advanced Computing(C-DAC), Pune
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package cdac.medinfo.sdk.dcm30_04.templates.cid;


import cdac.medinfo.sdk.dcm30_04.templates.dicomsnomedmap.EnumDICOMSNOMEDMap;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_FamilyMember;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_FamilyMember;


/**
 * This class represents FamilyMember - CID7451
 */
public class FamilyMember_CID7451 
{
	
	/**
	 * The Code Value for template.
	 */
	private String strCodeValue = null;

	/**
	 * The Code Meaning for template.
	 */
	private String strCodeMeaning = null;

	/**
	 * The Coding Scheme Designator for template.
	 */
	private String strCodingSchemeDesignator;
	
	/**
	 * The SNOMED CT ID for template.
	 */
	private String strSNOMEDCTID = null;
	
	/**
	 * Instantiates a new FamilyMember_CID7451 Template 
	 */
	public FamilyMember_CID7451()
	{

	}

	/**
	 * Retrieves the value for Code Meaning.
	 * @return String value for Code Meaning.
	 */
	public String getCodeMeaning()
	{
		return strCodeMeaning;
	}

	/**
	 * Retrieves the value for Code Value.
	 * @return String value for Code Value.
	 */
	public String getCodeValue() 
	{
		return strCodeValue;
	}

	/**
	 * Retrieves the value for Coding Scheme Designator.
	 * @return String value for Coding Scheme Designator.
	 */
	public String getCodingSchemeDesignator() 
	{
		return strCodingSchemeDesignator;
	}
	/**
	 * Retrieves the value for SNOMED-CT ID.
	 * @return String value for SNOMED-CT ID.
	 */
	public String getSNOMEDCTID() 
	{
		return strSNOMEDCTID;
	}
	
	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumFamilyMember Object of EnumCM_FamilyMember represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_FamilyMember enumFamilyMember)
	{
		switch(enumFamilyMember)
		{
		case NATURAL_MOTHER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_MOTHER_S_10121.getValue(); break;
		case NATURAL_FATHER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_FATHER_S_10131.getValue(); break;
		case NATURAL_SISTER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_SISTER_S_10151.getValue(); break;
		case NATURAL_BROTHER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_BROTHER_S_10161.getValue(); break;
		case AUNT: this.strCodeValue =EnumCV_FamilyMember.AUNT_S_101A1.getValue(); break;
		case UNCLE: this.strCodeValue =EnumCV_FamilyMember.UNCLE_S_101A2.getValue(); break;
		case HALF_SISTER: this.strCodeValue =EnumCV_FamilyMember.HALF_SISTER_S_10154.getValue(); break;
		case HALF_BROTHER: this.strCodeValue =EnumCV_FamilyMember.HALF_BROTHER_S_10164.getValue(); break;
		case NATURAL_GRAND_MOTHER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_GRAND_MOTHER_S_10115.getValue(); break;
		case NATURAL_GRAND_FATHER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_GRAND_FATHER_S_10116.getValue(); break;
		case NATURAL_DAUGHTER: this.strCodeValue =EnumCV_FamilyMember.NATURAL_DAUGHTER_S_10181.getValue(); break;
		case NATURAL_SON: this.strCodeValue =EnumCV_FamilyMember.NATURAL_SON_S_10191.getValue(); break;
		case FEMALE_FIRST_COUSIN: this.strCodeValue =EnumCV_FamilyMember.FEMALE_FIRST_COUSIN_S_101A9.getValue(); break;
		case MALE_FIRST_COUSIN: this.strCodeValue =EnumCV_FamilyMember.MALE_FIRST_COUSIN_S_101AA.getValue(); break;
		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumFamilyMember Object of EnumCM_FamilyMember represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_FamilyMember enumFamilyMember)
	{
		switch(enumFamilyMember)
		{
		case NATURAL_MOTHER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_MOTHER.getSNOMEDCTID(); break;
		case NATURAL_FATHER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_FATHER.getSNOMEDCTID(); break;
		case NATURAL_SISTER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_SISTER.getSNOMEDCTID(); break;
		case NATURAL_BROTHER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_BROTHER.getSNOMEDCTID(); break;
		case AUNT : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.AUNT.getSNOMEDCTID(); break;
		case UNCLE : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.UNCLE.getSNOMEDCTID(); break;
		case HALF_SISTER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.HALF_SISTER.getSNOMEDCTID(); break;
		case HALF_BROTHER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.HALF_BROTHER.getSNOMEDCTID(); break;
		case NATURAL_GRAND_MOTHER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_GRAND_MOTHER.getSNOMEDCTID(); break;
		case NATURAL_GRAND_FATHER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_GRAND_FATHER.getSNOMEDCTID(); break;
		case NATURAL_DAUGHTER : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_DAUGHTER.getSNOMEDCTID(); break;
		case NATURAL_SON : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.NATURAL_SON.getSNOMEDCTID(); break;
		case FEMALE_FIRST_COUSIN : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.FEMALE_FIRST_COUSIN.getSNOMEDCTID(); break;
		case MALE_FIRST_COUSIN : this.strSNOMEDCTID =EnumDICOMSNOMEDMap.MALE_FIRST_COUSIN.getSNOMEDCTID(); break;
		}
	}

	/**
	 * Sets the value for FamilyMember
	 * @param enumFamilyMember Object of EnumCM_FamilyMember.
	 */
	public void setFamilyMember(EnumCM_FamilyMember enumFamilyMember)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumFamilyMember.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumFamilyMember);
		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumFamilyMember);
	}
}
