<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE segment>
<segment>
	<copyright>
		/********************************************************************
		 * Copyright © 2004 VHA. All rights reserved
		 ********************************************************************/
	</copyright>
	<package>gov.va.med.fw.hl7.segment</package>
	<imports>
		// Java classes
		import java.util.List;

		// Framework classes
		import gov.va.med.fw.hl7.Segment;
		import gov.va.med.fw.hl7.InvalidSegmentException;
		import gov.va.med.fw.hl7.constants.SegmentConstants;
	</imports>
	<header>
		/**
		 * A ZIV segment containing information about batch trailer
		 * @author Alex Yoon
		 * @version 1.0
		 */
	</header>
	<class>ZIV</class>
	<location>./src/gov/va/med/fw/hl7/segment</location>
	<constructors>
	   /**
		* Constructs an empty segment.  This constructor is ususally usd 
		* by derived segment classes to populate its own segment data.
		*/
	   public ZIV() {
		  super();
		  setName( SegmentConstants.ZIV );
	   }
	
	   /** Constructs a segment of elements from a raw data string.  This constructor 
		* is usually used to construct an inbound message from a raw message's segment 
		* data.
		* 
		* @param data A raw data string
		* @throws InvalidSegmentException Thrown if failed to construct a segment 
		* due to missing parameters or invalid segment data to parse. 
		*/
	   public ZIV(String data) throws InvalidSegmentException {
		  super(data);
	   }
	
	   /** Constructs a segment of elements from a raw data string, an array
		* of valid encoding character strings, and a element delimiter string.
		* This constructor is usually used to construct an inbound message 
		* from a raw message's segment data, a specific encoding characters, 
		* and a field delimiter. 
		* 
		* @param encodingChars An array of encoding characters
		* @param elementDelimiter A field delimiter
		* @param segmentData A raw data string
		* @throws InvalidSegmentException Thrown if failed to construct a segment 
		* due to missing parameters or invalid segment data to parse. 
		*/
	   public ZIV( String[] encodingChars, 
				   String elementDelimiter,
				   String segmentData ) 
		throws InvalidSegmentException {
		  super(encodingChars, elementDelimiter, segmentData);
	   }
	   
	   /** Constructs a segment from a segment name and a list of elements.  This constructor
		* is usually used to construct an outbound message from a list of specific segment 
		* elements, and a segment name. 
		*   
		* @param name A segment name
		* @param elements A list of segment elements
		* @throws InvalidSegmentException Thrown if failed to construct a segment 
		* due to missing parameters or invalid segment data to parse. 
		*/
	   public ZIV( String name, 
				   List elements ) 
		throws InvalidSegmentException {
		  super(name, elements);
	   }
	   
	   /** Constructs a segment from an array of encoding characters, a field delimiter,
		* a segment name, and a list of field data.  This constructor is usually used to
		* construct an outbound message from a list of specific segment elements, element
		* delimiter, and encoding characters.
		* 
		* @param encodingChars An array of encoding characters
		* @param elementDelimiter	A field delimiter
		* @param segmentName	A segment name
		* @param segmentElements	A list of field data
		* @throws InvalidSegmentException Thrown if failed to construct a segment 
		* due to missing parameters or invalid segment data to parse. 
		*/
	   public ZIV( String[] encodingChars, 
						  String elementDelimiter,
						  String segmentName, 
						  List segmentElements )
		throws InvalidSegmentException {
		  super(encodingChars, elementDelimiter, segmentName, segmentElements);
	   }
	</constructors>
	<element>
		<name>SetID</name>
		<index>0</index>
		<comment>
			Sequential Number 
		</comment>
	</element>
	<element>
		<name>IncomeYear</name>
		<index>1</index>
		<comment>
			(Imprecise)
		</comment>
	</element>
	<element>
		<name>ClientIDErrorMessage</name>
		<index>2</index>
		<comment>
			
		</comment>
	</element>
	<element>
		<name>NewClientSSN</name>
		<index>3</index>
		<comment>
			
		</comment>
	</element>
	<element>
		<name>SpouseIDErrorMessage</name>
		<index>4</index>
		<comment>
			
		</comment>
	</element>
	<element>
		<name>NewSpouseSSN</name>
		<index>5</index>
		<comment>
			
		</comment>
	</element>
	<element>
		<name>SpouseID</name>
		<index>6</index>
		<comment>
			
		</comment>
	</element>
	<element>
		<name>IvmCareStatus</name>
		<index>7</index>
		<comment>
			
		</comment>
	</element>
	<element>
		<name>IvmID</name>
		<index>8</index>
		<comment>
			REASON NOT UPLOADING INSURANCE (.08)
			1 - ALREADY HAVE INSURANCE POLICY
			2 - DATA APPEARS TO BE INCORRECT
			3 - NSURANCE COMPANY CLOSED
			4 - POLICY PLAN TYPE IS HMO
			5 - POLICY PLAN TYPE IS PPO
			6 - POLICY COVERAGE EXPIRED
			7 - POLICY BENEFITS FULLY USED
			8 - BENEFITS NOT AVAILABLE
			9 - COVERAGE FOR SPOUSE ONLY
		</comment>
	</element>
	<element>
		<name>InsuranceUploadStatus</name>
		<index>9</index>
		<comment>
			UPLOAD INSURANCE DATA (.04)
			0 - NOT UPLOADED
			1 - UPLOADED
		</comment>
	</element>
	<element>
		<name>ReasonInsuranceNotUploaded</name>
		<index>10</index>
		<comment>
			IVM SPECIFIC INTERNAL ENTRY ID (.07)
		</comment>
	</element>
	<element>
		<name>ClientDeathDate</name>
		<index>11</index>
		<comment>
			DATE OF DEATH (.351) Patient (#2) file. (Imprecise)
		</comment>
	</element>
</segment>