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

import cdac.medinfo.sdk.dcm30_04.baselibs.ContentSequenceItem;
import cdac.medinfo.sdk.dcm30_04.enums.EnumContinuityOfContent;
import cdac.medinfo.sdk.dcm30_04.srtree.SRTree;
import cdac.medinfo.sdk.dcm30_04.templates.cid.ECGPatientStateValues_CID3262;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Pacemakers_CID3672;
import cdac.medinfo.sdk.dcm30_04.templates.cid.Sex_CID7455;
import cdac.medinfo.sdk.dcm30_04.templates.enums.EnumCodingSchemeDesignator;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_ECGPatientStateValues;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Pacemakers;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_PatientCharacteristicsForECG;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Sex;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cm.EnumCM_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_PatientCharacteristicsForECG;
import cdac.medinfo.sdk.dcm30_04.templates.enums.cv.EnumCV_Unit;
import cdac.medinfo.sdk.dcm30_04.templates.generaltemplates.Template;

/**
 * This class represents PatientCharacteristicsForECG - TID3704
 */
public class PatientCharacteristicsForECG_TID3704 extends Template{
	private Sex_CID7455 objSex_CID7455;
	
	
	private ECGPatientStateValues_CID3262 objECGPatientStateValues_CID3262;
	
	private Pacemakers_CID3672 objPacemakers_CID3672;
	/**
	 * Instantiates a new PatientCharacteristicsForECG_TID3704 Template.
	 * @param objTree Object of SRTree.
	 */
	public PatientCharacteristicsForECG_TID3704(SRTree objTree)
	{
		super(objTree);
	}
	
	/**
	 * Sets the value for Patient Characteristics 
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param enumContinuityOfContent Enumerated Value for ContinuityOfContent.
	 */
	public void setPatientCharacteristics(int[] arrPosition, EnumContinuityOfContent enumContinuityOfContent)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.PATIENT_CHARACTERISTICS.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.PATIENT_CHARACTERISTICS_121118.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		/**
		 * Creating a node of Value Type Container and adding this node at specified identifier in the SR Tree.
		 */
		ContentSequenceItem objContentSequenceItem = getSRTree().createContainer(arrPosition, strCodeMeaning, strCodeValue, strCSD, enumContinuityOfContent);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for Subject Age
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setSubjectAge(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.SUBJECT_AGE.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.SUBJECT_AGE_121033.getValue();
		String strCSD = EnumCodingSchemeDesignator.DCM.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,"","","","","","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setSubjectSex(int[] arrPosition,EnumCM_Sex enumSex)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.SUBJECT_SEX.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.SUBJECT_SEX_121032.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD;

		if(null== this.objSex_CID7455)
			this.objSex_CID7455 = new Sex_CID7455();
		this.objSex_CID7455.setSex(enumSex);
		 strCM = objSex_CID7455.getCodeMeaning();
		 strCV = objSex_CID7455.getCodeValue();
		 strCSD = objSex_CID7455.getCodingSchemeDesignator();
		
		
		/**
		 * 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, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for PatientHeight
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setPatientHeight(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.CM.getValue();
		String strCVForUnit = EnumCV_Unit.CM.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.PATIENT_HEIGHT.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.PATIENT_HEIGHT_8302_2.getValue();
		String strCSD = EnumCodingSchemeDesignator.LN.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for PatientHeight
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setPatientWeight(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCMForUnit = EnumCM_Unit.KG.getValue();
		String strCVForUnit = EnumCV_Unit.KG.getValue();
		String strCSDForUnit = EnumCodingSchemeDesignator.UCUM.getValue();

		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.PATIENT_WEIGHT.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.PATIENT_WEIGHT_29463_7.getValue();
		String strCSD = EnumCodingSchemeDesignator.LN.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,strCVForUnit,strCSDForUnit,"",strCMForUnit,"","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	/**
	 * Sets the value for SystolicBlood Pressure
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setSystolicBloodPressure(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.SYSTOLIC_BLOOD_PRESSURE.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.SYSTOLIC_BLOOD_PRESSURE_F_008EC.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,"","","","","","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	
	/**
	 * Sets the value for DiastolicBlood Pressure
	 * @param arrPosition Identifier which shows the position of the node in the SR Tree.
	 * @param arrNumericValue String array for Numeric Value.
	 */
	public void setDiastolicBloodPressure(int[] arrPosition,String[] arrNumericValue)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.DIASTOLIC_BLOOD_PRESSURE.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.DIASTOLIC_BLOOD_PRESSURE_F_008ED.getValue();
		String strCSD = EnumCodingSchemeDesignator.SRT.getValue();

		ContentSequenceItem objContentSequenceItem = getSRTree().createNumNode(arrPosition,strCodeMeaning,strCodeValue,strCSD,arrNumericValue,"","","","","","","","");
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setPatientState(int[] arrPosition, EnumCM_ECGPatientStateValues enumECGPatientStateValues)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.PATIENT_STATE.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.PATIENT_STATE_109054.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.DCM.getValue();
		String strCM,strCV,strCSD,strSNMDCTID;

		if(null== this.objECGPatientStateValues_CID3262)
			this.objECGPatientStateValues_CID3262 = new ECGPatientStateValues_CID3262();
		this.objECGPatientStateValues_CID3262.setECGPatientStateValues(enumECGPatientStateValues);
		 strCM = objECGPatientStateValues_CID3262.getCodeMeaning();
		 strCV = objECGPatientStateValues_CID3262.getCodeValue();
		 strCSD = objECGPatientStateValues_CID3262.getCodingSchemeDesignator();
		 strSNMDCTID = objECGPatientStateValues_CID3262.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, "", strCM,strSNMDCTID);
		getSRTree().addChild(objContentSequenceItem);
	}
	public void setPacemakerInSitu(int[] arrPosition,EnumCM_Pacemakers enumPacemakers)
	{
		/**
		 * Retrieves the corresponding values of CodeMeaning,CodeValue and CodingSchemeDesignator.
		 */
		String strCodeMeaning = EnumCM_PatientCharacteristicsForECG.PACEMAKER_IN_SITU.getValue();
		String strCodeValue = EnumCV_PatientCharacteristicsForECG.PACEMAKER_IN_SITU_R_00728.getValue();
		String strCSDesg = EnumCodingSchemeDesignator.SRT.getValue();
		String strCM,strCV,strCSD;
		if(null== this.objPacemakers_CID3672)
			this.objPacemakers_CID3672 = new Pacemakers_CID3672();
		this.objPacemakers_CID3672.setPacemakers(enumPacemakers);
		
		 strCM = objPacemakers_CID3672.getCodeMeaning();
		 strCV = objPacemakers_CID3672.getCodeValue();
		 strCSD = objPacemakers_CID3672.getCodingSchemeDesignator();
		
		
		/**
		 * 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, "", strCM);
		getSRTree().addChild(objContentSequenceItem);
	}
	
	
}
