/*******************************************************************************
 *  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.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_OBGYNDates;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_OBGYNDates;


/**
 * This class represents OBGYNDates - CID12003
 */
public class OBGYNDates_CID12003 
{
	
	/**
	 * 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;

	/**
	 * Instantiates a new OBGYNDates_CID12003 Template 
	 */
	public OBGYNDates_CID12003()
	{

	}

	/**
	 * 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;
	}

	/**
	 * Sets the Code Value according to Code Meaning.
	 * @param enumOBGYNDates Object of EnumCM_OBGYNDates represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_OBGYNDates enumOBGYNDates)
	{
		switch(enumOBGYNDates)
		{
		case EDD: this.strCodeValue =EnumCV_OBGYNDates.EDD_11778_8.getValue(); break;
		case EDD_FROM_LMP: this.strCodeValue =EnumCV_OBGYNDates.EDD_FROM_LMP_11779_6.getValue(); break;
		case EDD_FROM_AVERAGE_ULTRASOUND_AGE: this.strCodeValue =EnumCV_OBGYNDates.EDD_FROM_AVERAGE_ULTRASOUND_AGE_11781_2.getValue(); break;
		case EDD_FROM_OVULATION_DATE: this.strCodeValue =EnumCV_OBGYNDates.EDD_FROM_OVULATION_DATE_11780_4.getValue(); break;
		case LMP: this.strCodeValue =EnumCV_OBGYNDates.LMP_11955_2.getValue(); break;
		case ESTIMATED_LMP_BY_EDD: this.strCodeValue =EnumCV_OBGYNDates.ESTIMATED_LMP_BY_EDD_33066_2.getValue(); break;
		case OVULATION_DATE: this.strCodeValue =EnumCV_OBGYNDates.OVULATION_DATE_11976_8.getValue(); break;
		case CONCEPTION_DATE: this.strCodeValue =EnumCV_OBGYNDates.CONCEPTION_DATE_33067_0.getValue(); break;
		}
	}

	/**
	 * Sets the value for OBGYNDates
	 * @param enumOBGYNDates Object of EnumCM_OBGYNDates.
	 */
	public void setOBGYNDates(EnumCM_OBGYNDates enumOBGYNDates)
	{
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion and Code Meaning and 
		 * sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumOBGYNDates.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.LN.getValue();
		
		/**
		 * set code Value
		 */
		setCodeValue(enumOBGYNDates);
	}
}
