/*******************************************************************************
 *  Copyright 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_AbstractPriors;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ChestComponentCategories;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AnatomicModifier;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_AbstractPriors;


/**
 * This class represents AbstractPriors - CID31
 */
public class AbstractPriors_CID31 
{
	/**
	 * 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 AnatomicModifier_CID2 Template 
	 */
	public AbstractPriors_CID31()
	{

	}

	/**
	 * 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 EnumCM_AbstractPriors Object of EnumCM_AbstractPriors represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_AbstractPriors enumEnumCM_AbstractPriors)
	{
		switch(enumEnumCM_AbstractPriors)
		{
		case ON_ADMISSION: this.strCodeValue =EnumCV_AbstractPriors.ON_ADMISSION_G_7292.getValue(); break;
		
		case INTRAOPERATIVE: this.strCodeValue =EnumCV_AbstractPriors.INTRAOPERATIVE_R_400B2.getValue(); break;
		
		case PRE_ADMISSION: this.strCodeValue =EnumCV_AbstractPriors.PRE_ADMISSION_R_41FD9.getValue(); break;
		
		case PRE_DOSE: this.strCodeValue =EnumCV_AbstractPriors.PRE_DOSE_R_411C0.getValue(); break;
		
		case POST_DOSE: this.strCodeValue =EnumCV_AbstractPriors.POST_DOSE_R_404DA.getValue(); break;
		
		case PRE_OPERATIVE: this.strCodeValue =EnumCV_AbstractPriors.PRE_OPERATIVE_R_413C5.getValue(); break;
		
		case POST_OPERATIVE: this.strCodeValue =EnumCV_AbstractPriors.POST_OPERATIVE_R_413B7.getValue(); break;
		
		case ON_ADMISSION_TO_UNIT: this.strCodeValue =EnumCV_AbstractPriors.ON_ADMISSION_TO_UNIT_109120.getValue(); break;
		
		case ON_DISCHARGE: this.strCodeValue =EnumCV_AbstractPriors.ON_DISCHARGE_109121.getValue(); break;
		
		case ON_DISCHARGE_FROM_UNIT: this.strCodeValue =EnumCV_AbstractPriors.ON_DISCHARGE_FROM_UNIT_109122.getValue(); break;
		
		case PRE_INTERVENTION: this.strCodeValue =EnumCV_AbstractPriors.PRE_INTERVENTION_109123.getValue(); break;
		
		case POST_INTERVENTION: this.strCodeValue =EnumCV_AbstractPriors.POST_INTERVENTION_109124.getValue(); break;
		
		case AT_LAST_APPOINTMENT: this.strCodeValue =EnumCV_AbstractPriors.AT_LAST_APPOINTMENT_109125.getValue(); break;
		

		}
	}
	/**
	 * Sets the SNOMED-CT ID.
	 * @param enumEnumCM_AbstractPriors Object of EnumCM_AbstractPriors represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_AbstractPriors enumEnumCM_AbstractPriors)
	{
		switch(enumEnumCM_AbstractPriors)
		{
		case ON_ADMISSION: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.ON_ADMISSION.getSNOMEDCTID();break;
		case INTRAOPERATIVE: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.INTRAOPERATIVE.getSNOMEDCTID();break;
		case PRE_ADMISSION: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.PRE_ADMISSION.getSNOMEDCTID();break;
		case PRE_DOSE: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.PRE_DOSE.getSNOMEDCTID();break;
		case POST_DOSE: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.POST_DOSE.getSNOMEDCTID();break;
		case PRE_OPERATIVE: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.PRE_OPERATIVE.getSNOMEDCTID();break;
		case POST_OPERATIVE: this.strSNOMEDCTID = EnumDICOMSNOMEDMap.POST_OPERATIVE.getSNOMEDCTID();break;
		}
	}
	
	/**
	 * Sets the value for AbstractPriors
	 * @param enumEnumCM_AbstractPriors Object of EnumCM_AbstractPriors.
	 */
	public void setAnatomicModifier(EnumCM_AbstractPriors enumEnumCM_AbstractPriors)
	{
		this.strCodeMeaning = enumEnumCM_AbstractPriors.getValue();
		if(strCodeMeaning.equalsIgnoreCase(enumEnumCM_AbstractPriors.ON_ADMISSION_TO_UNIT.getValue())
				|| strCodeMeaning.equalsIgnoreCase(enumEnumCM_AbstractPriors.ON_DISCHARGE.getValue())
				|| strCodeMeaning.equalsIgnoreCase(enumEnumCM_AbstractPriors.ON_DISCHARGE_FROM_UNIT.getValue())
				|| strCodeMeaning.equalsIgnoreCase(enumEnumCM_AbstractPriors.PRE_INTERVENTION.getValue())
				|| strCodeMeaning.equalsIgnoreCase(enumEnumCM_AbstractPriors.POST_INTERVENTION.getValue())
				|| strCodeMeaning.equalsIgnoreCase(enumEnumCM_AbstractPriors.AT_LAST_APPOINTMENT.getValue()))
		{
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.DCM.getValue();
		}
		else
			this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT.getValue();
		setCodeValue(enumEnumCM_AbstractPriors);
		
		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumEnumCM_AbstractPriors);
	}
}
