<commit_before>package com.clinichelper.Entity;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.UUID;

/**
 * Created by eva_c on 9/25/2016.
 */
@Entity
@Table(name="consultation")
public class Consultation implements Serializable{
    // Attributes
    @Id
    private String consultationId;
    @NotNull
    private Date consultationDate;//
    @NotNull
    private Timestamp consultationTime;
    private String consultationDetail;
    @OneToOne
    @NotNull
    private Appointment appointment;

    // Constructors
    public Consultation(){

    }

    public Consultation(Date consultationDate, Timestamp consultationTime, String consultationDetail, Appointment appointment){
        this.setConsultationId(appointment.getClinic().getClinicPrefix() + "-C-" + UUID.randomUUID().toString().split("-")[0].toUpperCase());
        this.setConsultationDate(consultationDate);
        this.setConsultationTime(consultationTime);
        this.setConsultationDetail(consultationDetail);
        this.setAppointment(appointment);

    }

    //Getters and Setters
    public String getConsultationId() {
        return consultationId;
    }

    public void setConsultationId(String consultationId) {
        this.consultationId = consultationId;
    }

    public Date getConsultationDate() {
        return consultationDate;
    }

    public void setConsultationDate(Date consultationDate) {
        this.consultationDate = consultationDate;
    }<commit_msg>Reafactor Consultation entity<commit_after>package com.clinichelper.Entity;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.UUID;

/**
 * Created by eva_c on 9/25/2016.
 */
@Entity
@Table(name="consultation")
public class Consultation implements Serializable{
    // Attributes
    @Id
    private String consultationId;
    @NotNull
    private Timestamp consultationTime;
    private String consultationDetail;
    @OneToOne
    @NotNull
    private Appointment appointment;

    // Constructors
    public Consultation(){

    }

    public Consultation(Timestamp consultationTime, String consultationDetail, Appointment appointment){
        this.setConsultationId(appointment.getClinic().getClinicPrefix() + "-C-" + UUID.randomUUID().toString().split("-")[0].toUpperCase());
        this.setConsultationTime(consultationTime);
        this.setConsultationDetail(consultationDetail);
        this.setAppointment(appointment);

    }

    //Getters and Setters
    public String getConsultationId() {
        return consultationId;
    }

    public void setConsultationId(String consultationId) {
        this.consultationId = consultationId;
    }
{'fraction_non_alphanumeric': 0.09428671573781984, 'fraction_numerical': 0.005608131791097091, 'mean_word_length': 3.756666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6983711', 'n_tokens_mistral': 808, 'n_tokens_neox': 782, 'n_words': 166}