package org.pdxfinder.dao;

import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

/*
 * Created by csaba on 23/10/2017.
 */


@NodeEntity
public class TreatmentProtocol {

    @GraphId
    private Long id;

    private String regime;

    private String drug;
    private String drugManufacturer;
    private String dose;
    private String duration;
    private String frequency;
    private String armSize;
    private String responseCalculationMethod;
    private String passages;


    /**
     * @param drug                      Which drug(s) were used in the treatment
     * @param drugManufacturer          What company manufactured the drug
     * @param dose                      What was the concentration of the drug used
     * @param duration                  For how long was the treatment administered
     * @param frequency                 How often the treatment was administered
     * @param armSize                   The number of animals used in the study arm
     * @param response                  A recist classification of the response to the treatment
     * @param responseCalculationMethod The method used to determine the response classification
     * @param passages                  The list of passages at which this treatment was applied
     */

    @Relationship(type = "RESPONSE")
    private Response response;

    public TreatmentProtocol() {
    }


    public String getRegime() {
        return regime;
    }

    public void setRegime(String regime) {
        this.regime = regime;
    }

    public String getDrug() {
        return drug;
    }

    public void setDrug(String drug) {
        this.drug = drug;
    }

    public String getDrugManufacturer() {
        return drugManufacturer;
    }

    public void setDrugManufacturer(String drugManufacturer) {
        this.drugManufacturer = drugManufacturer;
    }

    public String getDose() {
        return dose;
    }

    public void setDose(String dose) {
        this.dose = dose;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getFrequency() {
        return frequency;
    }

    public void setFrequency(String frequency) {
        this.frequency = frequency;
    }

    public String getArmSize() {
        return armSize;
    }

    public void setArmSize(String armSize) {
        this.armSize = armSize;
    }


    public String getResponseCalculationMethod() {
        return responseCalculationMethod;
    }

    public void setResponseCalculationMethod(String responseCalculationMethod) {
        this.responseCalculationMethod = responseCalculationMethod;
    }

    public String getPassages() {
        return passages;
    }

    public void setPassages(String passages) {
        this.passages = passages;
    }

    public Response getResponse() {
        return response;
    }

    public void setResponse(Response response) {
        this.response = response;
    }
}

@@ -153,16 +153,68 @@
 nship;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.List;%0A%0A
 /*%0A * Cr
@@ -374,21 +374,94 @@
 ate 
+List%3C
 String
+%3E
  drug;%0A
+    private List%3CString%3E type;%0A    private List%3CString%3E target;%0A%0A%0A%0A
     
@@ -763,32 +763,177 @@
 n the treatment%0A
+     * @param type                      Type of the treatment, ie drug/control%0A     * @param target                    Drug target, ie DNA, EGFR%0A
      * @param dr
@@ -1721,24 +1721,144 @@
 Protocol() %7B
+%0A%0A        this.drug = new ArrayList%3C%3E();%0A        this.type = new ArrayList%3C%3E();%0A        this.target = new ArrayList%3C%3E();
 %0A    %7D%0A%0A%0A   
@@ -1999,38 +1999,44 @@
   %7D%0A%0A    public 
+List%3C
 String
+%3E
  getDrug() %7B%0A   
@@ -2084,22 +2084,28 @@
 setDrug(
+List%3C
 String
+%3E
  drug) %7B
@@ -3500,10 +3500,532 @@
 ;%0A    %7D%0A
+%0A%0A    public List%3CString%3E getType() %7B%0A        return type;%0A    %7D%0A%0A    public void setType(List%3CString%3E type) %7B%0A        this.type = type;%0A    %7D%0A%0A    public List%3CString%3E getTarget() %7B%0A        return target;%0A    %7D%0A%0A    public void setTarget(List%3CString%3E target) %7B%0A        this.target = target;%0A    %7D%0A%0A    public String getDrugString()%7B%0A%0A        String ret = %22%22;%0A        for(String s:drug)%7B%0A%0A            if(!ret.equals(%22%22))%7B%0A                ret+=%22 and %22;%0A            %7D%0A            ret+=s;%0A        %7D%0A%0A        return ret;%0A    %7D%0A
 %7D%0A

Add type and target to TreatmentProtocol