package gov.va.med.esr.service.external.person;

import java.io.Serializable;

public class PIIData implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3400698038236617993L;
	private String firstName;
	private String lastName;
	private String middleName;
	private String gender;
	private String dob;
	private String vpid;
	private String maskedSsn;
	
	
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getMiddleName() {
		return middleName;
	}
	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getDob() {
		return dob;
	}
	public void setDob(String dob) {
		this.dob = dob;
	}
	public String getVpid() {
		return vpid;
	}
	public void setVpid(String vpid) {
		this.vpid = vpid;
	}
	public String getMaskedSsn() {
		return maskedSsn;
	}
	public void setMaskedSsn(String ssn) {
		this.maskedSsn = null;
		if(ssn == null) return;
		ssn = ssn.trim().replaceAll("-", "");
		if(ssn.length() == 9)			
			this.maskedSsn = "xxxxx" + ssn.substring(5, 9);
		else
			throw new IllegalArgumentException("Invalid SSN");
	}
}
