/*******************************************************************************
 * Copyright 2016 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 in.cdac.medinfo.csnotk.csnolib.icdmap;

import java.util.Date;

/**
 * Mapping Component is a human readable structure of SNOMED CT to ICD-10 code mapping file. 
 * It have data members and corresponding getters and setters.
 */
class MappingComponent {

	private String id;
	private Date effectiveTime;
	private byte active;
	private long moduleId;
	private long refsetId;
	private long referencedComponentId;
	private int mapGroup;
	private int mapPriority;
	private String mapRule;
	private String mapAdvice;
	private String mapTarget;
	private long correlationId;
	private long mapCategoryId;

	/**
	 * Default constructor
	 */
	MappingComponent() {
	}

	/**
	 * Parameterized constructor
	 * @param id
	 * unique id
	 * @param effectiveTime
	 * date/time of mapping in effect
	 * @param active
	 * status of mapping
	 * @param moduleId
	 * @param refsetId
	 * @param referencedComponentId
	 * SNOMED CT (conceptId)
	 * @param mapGroup
	 * map group number
	 * @param mapPriority
	 * map priority within a group
	 * @param mapRule
	 * mapping rule
	 * @param mapAdvice
	 * mapping advice
	 * @param mapTarget
	 * ICD-10 code
	 * @param correlationId
	 * @param mapCategoryId
	 * mapping categorization
	 */
	MappingComponent(String id, Date effectiveTime, byte active, long moduleId,
			long refsetId, long referencedComponentId, int mapGroup,
			int mapPriority, String mapRule, String mapAdvice,
			String mapTarget, long correlationId, long mapCategoryId) {
		this.id = id;
		this.effectiveTime = effectiveTime;
		this.active = active;
		this.moduleId = moduleId;
		this.refsetId = refsetId;
		this.referencedComponentId = referencedComponentId;
		this.mapGroup = mapGroup;
		this.mapPriority = mapPriority;
		this.mapRule = mapRule;
		this.mapAdvice = mapAdvice;
		this.mapTarget = mapTarget;
		this.correlationId = correlationId;
		this.mapCategoryId = mapCategoryId;
	}

	/**
	 * Gets the unique id
	 * @return
	 * identifier
	 */
	String getId() {
		return this.id;
	}

	/**
	 * Sets the unique id
	 * @param id
	 * identifier
	 */
	void setId(String id) {
		this.id = id;
	}

	/**
	 * Gets the effective date/time
	 * @return
	 * date/time
	 */
	Date getEffectiveTime() {
		return this.effectiveTime;
	}

	/**
	 * Sets the effective date/time
	 * @param effectiveTime
	 * date/time
	 */
	void setEffectiveTime(Date effectiveTime) {
		this.effectiveTime = effectiveTime;
	}

	/**
	 * Gets the map member status
	 * @return
	 * 0/1 - status
	 */
	byte getActive() {
		return this.active;
	}

	/**
	 * Sets the map member status
	 * @param active
	 * 0/1 - status
	 */
	void setActive(byte active) {
		this.active = active;
	}

	/**
	 * Gets the module id
	 * @return
	 * module identifier
	 */
	long getModuleId() {
		return this.moduleId;
	}

	/**
	 * Sets the module id
	 * @param moduleId
	 * module identifier
	 */
	void setModuleId(long moduleId) {
		this.moduleId = moduleId;
	}

	/**
	 * Gets the refset id
	 * @return
	 * refset identifier
	 */
	long getRefsetId() {
		return this.refsetId;
	}

	/**
	 * Sets the refset id
	 * @param refsetId
	 * refset identifier
	 */
	void setRefsetId(long refsetId) {
		this.refsetId = refsetId;
	}

	/**
	 * Gets the component id
	 * @return
	 * SNOMED CT (conceptId)
	 */
	long getReferencedComponentId() {
		return this.referencedComponentId;
	}

	/**
	 * Sets the component id
	 * @param referencedComponentId
	 * SNOMED CT (conceptId)
	 */
	void setReferencedComponentId(long referencedComponentId) {
		this.referencedComponentId = referencedComponentId;
	}

	/**
	 * Gets the map group number
	 * @return
	 * map group
	 */
	int getMapGroup() {
		return this.mapGroup;
	}

	/**
	 * Sets the map group number
	 * @param mapGroup
	 * map group
	 */
	void setMapGroup(int mapGroup) {
		this.mapGroup = mapGroup;
	}

	/**
	 * Gets the map priority number
	 * @return
	 * map priority
	 */
	int getMapPriority() {
		return this.mapPriority;
	}

	/**
	 * Sets the map priority number
	 * @param mapPriority
	 * map priority
	 */
	void setMapPriority(int mapPriority) {
		this.mapPriority = mapPriority;
	}

	/**
	 * Gets the SNOMED CT to ICD-10 map rule
	 * @return
	 * map rule
	 */
	String getMapRule() {
		return this.mapRule;
	}

	/**
	 * Sets the SNOMED CT to ICD-10 map rule
	 * @param mapRule
	 * map rule
	 */
	void setMapRule(String mapRule) {
		this.mapRule = mapRule;
	}

	/**
	 * Gets the SNOMED CT to ICD-10 map advice
	 * @return
	 * map advice
	 */
	String getMapAdvice() {
		return this.mapAdvice;
	}

	/**
	 * Sets the SNOMED CT to ICD-10 map advice
	 * @param mapAdvice
	 * map advice
	 */
	void setMapAdvice(String mapAdvice) {
		this.mapAdvice = mapAdvice;
	}

	/**
	 * Gets the ICD-10 map target
	 * @return
	 * ICD-10 code
	 */
	String getMapTarget() {
		return this.mapTarget;
	}

	/**
	 * Sets the ICD-10 map target
	 * @param mapTarget
	 * ICD-10 code
	 */
	void setMapTarget(String mapTarget) {
		this.mapTarget = mapTarget;
	}

	/**
	 * Gets the correlation id
	 * @return
	 * correlation id
	 */
	long getCorrelationId() {
		return this.correlationId;
	}

	/**
	 * Sets the correlation id
	 * @param correlationId
	 * correlation id
	 */
	void setCorrelationId(long correlationId) {
		this.correlationId = correlationId;
	}

	/**
	 * Gets the map category id
	 * @return
	 * map category
	 */
	long getMapCategoryId() {
		return this.mapCategoryId;
	}

	/**
	 * Sets the map category id
	 * @param mapCategoryId
	 * map category
	 */
	void setMapCategoryId(long mapCategoryId) {
		this.mapCategoryId = mapCategoryId;
	}
}
