/*******************************************************************************
 *  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_ProblemStatus;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_ProblemStatus;

/**
 * This class represents ProblemStatus_CID3770
 */
public class ProblemStatus_CID3770 {
	/**
	 * 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 ProblemStatus_CID3770 Template
	 */
	public ProblemStatus_CID3770() {

	}

	/**
	 * 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 enumProblemStatus
	 *            Object of EnumCM_ProblemStatus represents Code Meaning.
	 */
	private void setCodeValue(EnumCM_ProblemStatus enumProblemStatus) {
		switch (enumProblemStatus) {
		case ACTIVE_PROBLEM:
			this.strCodeValue = EnumCV_ProblemStatus.ACTIVE_PROBLEM_R_42501
					.getValue();
			break;
		case CHRONIC:
			this.strCodeValue = EnumCV_ProblemStatus.CHRONIC_G_A270.getValue();
			break;
		case INTERMITTENT:
			this.strCodeValue = EnumCV_ProblemStatus.INTERMITTENT_G_A397
					.getValue();
			break;
		case RECURRENT:
			this.strCodeValue = EnumCV_ProblemStatus.RECURRENT_G_A39A
					.getValue();
			break;
		case SUSPECTED:
			this.strCodeValue = EnumCV_ProblemStatus.SUSPECTED_G_A47B
					.getValue();
			break;
		case INACTIVE_PROBLEM:
			this.strCodeValue = EnumCV_ProblemStatus.INACTIVE_PROBLEM_R_42502
					.getValue();
			break;
		case PROBLEM_RESOLVED:
			this.strCodeValue = EnumCV_ProblemStatus.PROBLEM_RESOLVED_F_04B88
					.getValue();
			break;
		case KNOWN_ABSENT:
			this.strCodeValue = EnumCV_ProblemStatus.KNOWN_ABSENT_G_A46B
					.getValue();
			break;
		case WELL_CONTROLLED:
			this.strCodeValue = EnumCV_ProblemStatus.WELL_CONTROLLED_P0_30450
					.getValue();
			break;

		}
	}

	/**
	 * Sets the SNOMED-CT ID.
	 * 
	 * @param enumProblemStatus
	 *            Object of EnumCM_ProblemStatus represents Code Meaning.
	 */
	private void setSNOMEDCTID(EnumCM_ProblemStatus enumProblemStatus) {
		switch (enumProblemStatus) {
		case ACTIVE_PROBLEM:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.ACTIVE_PROBLEM
					.getSNOMEDCTID();
			break;
		case CHRONIC:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.CHRONIC.getSNOMEDCTID();
			break;
		case INTERMITTENT:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.INTERMITTENT
					.getSNOMEDCTID();
			break;
		case RECURRENT:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.RECURRENT.getSNOMEDCTID();
			break;
		case SUSPECTED:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.SUSPECTED.getSNOMEDCTID();
			break;
		case INACTIVE_PROBLEM:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.INACTIVE_PROBLEM
					.getSNOMEDCTID();
			break;
		case PROBLEM_RESOLVED:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.PROBLEM_RESOLVED
					.getSNOMEDCTID();
			break;
		case KNOWN_ABSENT:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.KNOWN_ABSENT
					.getSNOMEDCTID();
			break;
		case WELL_CONTROLLED:
			this.strSNOMEDCTID = EnumDICOMSNOMEDMap.WELL_CONTROLLED
					.getSNOMEDCTID();
			break;

		}
	}

	/**
	 * Sets the value for ProblemStatus
	 * 
	 * @param enumProblemStatus
	 *            Object of EnumCM_ProblemStatus.
	 */
	public void setProblemStatus(EnumCM_ProblemStatus enumProblemStatus) {
		/**
		 * Retrieves the value for CodingSchemeDesignator, CodingSchemeVersion
		 * and Code Meaning and sets the Code Value according to Code Meaning.
		 */
		this.strCodeMeaning = enumProblemStatus.getValue();
		this.strCodingSchemeDesignator = EnumCodingSchemeDesignator.SRT
				.getValue();

		/**
		 * set code Value
		 */
		setCodeValue(enumProblemStatus);

		/**
		 * set SNOMED-CT ID
		 */
		setSNOMEDCTID(enumProblemStatus);
	}
}
