/*******************************************************************************
 *  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.breastimagingreporttemplates;

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.MammographyAssessment_CID6026;
import cdac.medinfo.sdk.dcm30_04.templates.cid.MammographyRecommendedFollowup_CID6028;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Side_CID6022;
import cdac.medinfo.sdk.dcm30_04.templates.cid.UnitsOfFollowupInterval_CID6046;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_AssessmentFromBI_RADS;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_BreastImagingAssessment;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_RecommendedFollowupFromBI_RADS;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_SideFromBI_RADS;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_UnitsOfFollowupInterval;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_BreastImagingAssessment;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents BreastImagingAssessment - TID4203
 */
public class BreastImagingAssessment_TID4203 extends Template
{
	/**
	 * Object of BreastImagingPathologyResults_TID4207
	 */

	private BreastImagingPathologyResults_TID4207 objBreastImagingPathologyResultsTID4207;

	/**
	 * Object of UnitsOfFollowupInterval_CID6046
	 */
	private UnitsOfFollowupInterval_CID6046 objUnitsOfFollowupIntervalCID6046;

	/**
	 * Object of Side_CID6022
	 */
	private Side_CID6022 objSideCID6022;

	/**
	 * Object of MammographyAssessment_CID6026
	 */
	private MammographyAssessment_CID6026 objMammographyAssessmentCID6026;

	/**
	 * Object of MammographyRecommendedFollowup_CID6028
	 */
	private MammographyRecommendedFollowup_CID6028 objRecommendedFollowupCID6028;

	/**
	 * Instantiates BreastImagingAssessment_TID4203 Template.
	 * @param objTree Object of SRTree.
	 */
	public BreastImagingAssessment_TID4203(SRTree objTree)
	{
		super(objTree);
	}

	/**
	 * Retrieves BreastImagingPathologyResults 
	 * @return objBreastImagingPathologyResultsTID4207 Object of BreastImagingPathologyResults_TID4207 
	 */
	public BreastImagingPathologyResults_TID4207 getBreastImagingPathologyResults() 
	{
		if(null == this.objBreastImagingPathologyResultsTID4207)
			this.objBreastImagingPathologyResultsTID4207 = new BreastImagingPathologyResults_TID4207(getSRTree());
		return this.objBreastImagingPathologyResultsTID4207;
	}

	/**
	 * Sets value for Assessment Category.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumAssessmentFromBI_RADS Enumerated value for AssessmentFromBI_RADS
	 */
	public void setAssessmentCategory(int[] arrPosition, EnumCM_AssessmentFromBI_RADS enumAssessmentFromBI_RADS)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_BreastImagingAssessment.ASSESSMENT_CATEGORY.getValue();
		String strCodeValue = EnumCV_BreastImagingAssessment.ASSESSMENT_CATEGORY_111005.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for ComplicationOfProcedure
		 */
		if(null== this.objMammographyAssessmentCID6026)
			this.objMammographyAssessmentCID6026 = new MammographyAssessment_CID6026();
		this.objMammographyAssessmentCID6026.setMammographyAssessment(enumAssessmentFromBI_RADS);

		String strCM = objMammographyAssessmentCID6026.getCodeMeaning();
		String strCV = objMammographyAssessmentCID6026.getCodeValue();
		String strCSD = objMammographyAssessmentCID6026.getCodingSchemeDesignator();
		String strCSV = objMammographyAssessmentCID6026.getCodingSchemeVersion();

		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, strCV, strCSD, strCSV, strCM);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets value for Assessment Category.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumRecommendedFollowupFromBIRADS Enumerated value for RecommendedFollowupFromBIRADS.
	 */
	public void setAssessmentCategory(int[] arrPosition, EnumCM_RecommendedFollowupFromBI_RADS enumRecommendedFollowupFromBIRADS)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_BreastImagingAssessment.RECOMMENDED_FOLLOW_UP.getValue();
		String strCodeValue = EnumCV_BreastImagingAssessment.RECOMMENDED_FOLLOW_UP_111053.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Setting value for ComplicationOfProcedure
		 */
		if(null== this.objRecommendedFollowupCID6028)
			this.objRecommendedFollowupCID6028 = new MammographyRecommendedFollowup_CID6028();
		this.objRecommendedFollowupCID6028.setMammographyRecommendedFollowup(enumRecommendedFollowupFromBIRADS);

		String strCM = objRecommendedFollowupCID6028.getCodeMeaning();
		String strCV = objRecommendedFollowupCID6028.getCodeValue();
		String strCSD = objRecommendedFollowupCID6028.getCodingSchemeDesignator();
		String strCSV = objRecommendedFollowupCID6028.getCodingSchemeVersion();
		String strSNOMEDCTID = objRecommendedFollowupCID6028.getSNOMEDCTID();

		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, strCV, strCSD, strCSV, strCM,strSNOMEDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets value for Laterality.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumSideFromBI_RADS Enumerated value for SideFromBI_RADS.
	 */
	public void setLaterality(int[] arrPosition, EnumCM_SideFromBI_RADS enumSideFromBI_RADS)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_BreastImagingAssessment.LATERALITY.getValue();
		String strCodeValue = EnumCV_BreastImagingAssessment.LATERALITY_G_C171.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();

		/**
		 * Setting value for ComplicationOfProcedure
		 */
		if(null== this.objSideCID6022)
			this.objSideCID6022 = new Side_CID6022();
		this.objSideCID6022.setSide(enumSideFromBI_RADS);

		String strCM = objSideCID6022.getCodeMeaning();
		String strCV = objSideCID6022.getCodeValue();
		String strCSD = objSideCID6022.getCodingSchemeDesignator();
		String strCSV = objSideCID6022.getCodingSchemeVersion();

		/**
		 * Creating a node of Value Type CODE and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createCodeNode(arrPosition, strCodeMeaning, strCodeValue, strCSDesg, strCV, strCSD, strCSV, strCM);
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Recommended Follow-up Interval
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 * @param enumUnitsOfFollowupInterval Enumerated value for UnitsOfFollowupInterval.
	 */
	public void setRecommendedFollowUpInterval(int[] arrPosition,String[] arrNumericValue, EnumCM_UnitsOfFollowupInterval enumUnitsOfFollowupInterval)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		if(null== this.objUnitsOfFollowupIntervalCID6046)
			this.objUnitsOfFollowupIntervalCID6046 = new UnitsOfFollowupInterval_CID6046();
		this.objUnitsOfFollowupIntervalCID6046.setUnitsOfFollowupInterval(enumUnitsOfFollowupInterval);

		String strCMForUnit = objUnitsOfFollowupIntervalCID6046.getCodeMeaning();
		String strCVForUnit = objUnitsOfFollowupIntervalCID6046.getCodeValue();
		String strCSDForUnit = objUnitsOfFollowupIntervalCID6046.getCodingSchemeDesignator();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_BreastImagingAssessment.RECOMMENDED_FOLLOW_UP_INTERVAL.getValue();
		String strCodeValue = EnumCV_BreastImagingAssessment.RECOMMENDED_FOLLOW_UP_INTERVAL_111055.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}

	/**
	 * Sets the value for Recommended Follow-up Date.
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param strRecommendedFollowUpDate String value for DateTime of Intervention.
	 */
	public void setRecommendedFollowUpDate(int[] arrPosition, String strRecommendedFollowUpDate)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_BreastImagingAssessment.RECOMMENDED_FOLLOW_UP_DATE.getValue();
		String strCodeValue = EnumCV_BreastImagingAssessment.RECOMMENDED_FOLLOW_UP_DATE_111054.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type DATETIME and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createDateTimeNode(arrPosition, strCodeMeaning, strCodeValue, strCSD, strRecommendedFollowUpDate);
		getSRTree().addChild(objContentSequenceItem);
	}
}
