

package org.mskcc.cbio.oncokb.model;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author jgao
 */
public enum LevelOfEvidence {
    LEVEL_0 ("0", "FDA-approved drug in this indication irrespective of gene/variant biomarker"),
    LEVEL_1 ("1", "FDA-approved biomarker and drug in this indication"),
    LEVEL_2A ("2A", "Standard-of-care biomarker and drug in this indication but not FDA-approved"),
    LEVEL_2B ("2B", "FDA-approved biomarker and drug in another indication, but not FDA or NCCN compendium-listed for this indication"),
    LEVEL_3 ("3", "Clinical evidence links this biomarker to drug response but no FDA-approved or NCCN compendium-listed biomarker and drug association"),
    LEVEL_3A ("3A", "Clinical evidence links biomarker to drug response in this indication but neither biomarker or drug are FDA-approved or NCCN compendium-listed"),
    LEVEL_3B ("3B", "Clinical evidence links biomarker to drug response in another indication but neither biomarker or drug are FDA-approved or NCCN compendium-listed"),
    LEVEL_4 ("4", "Preclinical evidence associates this biomarker to drug response, where the biomarker and drug are NOT FDA-approved or NCCN compendium-listed"),
    LEVEL_R1 ("R1", "NCCN-compendium listed biomarker for resistance to a FDA-approved drug"),
    LEVEL_R2 ("R2", "Not NCCN compendium-listed biomarker, but clinical evidence linking this biomarker to drug resistance"),
    LEVEL_R3 ("R3", "Not NCCN compendium-listed biomarker, but preclinical evidence potentially linking this biomarker to drug resistance");
    
    private LevelOfEvidence(String level, String description) {
        this.level = level;
        this.description = description;
    }
    
    private final String level;
    private final String description;

    public String getLevel() {
        return level;
    }

    public String getDescription() {
        return description;
    }
    
    private static final Map<String, LevelOfEvidence> map = new HashMap<String, LevelOfEvidence>();
    static {
        for (LevelOfEvidence levelOfEvidence : LevelOfEvidence.values()) {
            map.put(levelOfEvidence.getLevel(), levelOfEvidence);
        }
    }
    
    /**
     *
     * @param level
     * @return
     */
    public static LevelOfEvidence getByLevel(String level) {
        return map.get(level);
    }

    public static LevelOfEvidence getByName(String name) {
        for (LevelOfEvidence levelOfEvidence : LevelOfEvidence.values()) {
            if(levelOfEvidence.name().equals(name)) {
                return levelOfEvidence;
            }
        }
        return null;
    }
}

@@ -343,12 +343,12 @@
 dard
--of-
+ of 
 care
@@ -350,34 +350,72 @@
  care biomarker 
-an
+predictive of response to an FDA-approve
 d drug in this i
@@ -427,29 +427,8 @@
 tion
- but not FDA-approved
 %22),%0A
@@ -452,33 +452,75 @@
 %22, %22
-FDA-approved biomarker an
+Standard of care biomarker predictive of response to an FDA-approve
 d dr
@@ -543,17 +543,16 @@
 dication
-,
  but not
@@ -556,37 +556,24 @@
 not 
-FDA or NCCN compendium-listed
+standard of care
  for
@@ -765,24 +765,35 @@
 3A (%223A%22, %22C
+ompelling c
 linical evid
@@ -801,41 +801,73 @@
 nce 
-links biomarker to drug response%C2%A0
+supports the biomarker as being predictive of response to a drug 
 in t
@@ -895,34 +895,35 @@
 ither biomarker 
-or
+and
  drug are FDA-ap
@@ -920,46 +920,24 @@
 are 
-FDA-approved or NCCN compendium-listed
+standard of care
 %22),%0A
@@ -954,24 +954,35 @@
 3B (%223B%22, %22C
+ompelling c
 linical evid
@@ -990,41 +990,73 @@
 nce 
-links biomarker to drug response%C2%A0
+supports the biomarker as being predictive of response to a drug 
 in a
@@ -1095,18 +1095,19 @@
 omarker 
-or
+and
  drug ar
@@ -1112,46 +1112,24 @@
 are 
-FDA-approved or NCCN compendium-listed
+standard of care
 %22),%0A
@@ -1151,15 +1151,25 @@
 %22, %22
-Preclin
+Compelling biolog
 ical
@@ -1182,23 +1182,20 @@
 nce 
-associate
+support
 s th
-is
+e
  bio
@@ -1205,35 +1205,61 @@
 ker 
-to drug response, where 
+as being predictive of response to a drug but nei
 the
+r
  bio
@@ -1282,111 +1282,89 @@
 are 
-NOT FDA-approved or NCCN compendium-listed%22),%0A    LEVEL_R1 (%22R1%22, %22NCCN-compendium listed biomarker for
+standard of care%22),%0A    LEVEL_R1 (%22R1%22, %22Standard of care biomarker predictive of
  res
@@ -1375,16 +1375,17 @@
 nce to a
+n
  FDA-app
@@ -1394,16 +1394,35 @@
 ved drug
+ in this indication
 %22),%0A    
@@ -1442,80 +1442,116 @@
 %22, %22
-Not NCCN compendium-listed biomarker, but clinical evidence linking this
+Compelling clinical evidence supports the biomarker as being predictive of resistance to a drug, but neither
  bio
@@ -1557,33 +1557,41 @@
 omarker 
-to
+nor
  drug 
+a
 re
-si
+ 
 stan
-c
+dard car
 e%22),%0A   
@@ -1612,95 +1612,118 @@
 %22, %22
-Not NCCN compendium-listed biomarker, but preclinical evidence potentially linking this
+Compelling biological evidence supports the biomarker as being predictive of resistance to a drug, but neither
  bio
@@ -1733,34 +1733,38 @@
 ker 
-to
+nor
  drug 
+a
 re
-si
+ 
 stan
-c
+dard car
 e%22);%0A
-    
 %0A   
@@ -1890,36 +1890,32 @@
 cription;%0A    %7D%0A
-    
 %0A    private fin
@@ -2097,28 +2097,24 @@
 tion;%0A    %7D%0A
-    
 %0A    private
@@ -2372,20 +2372,16 @@
 %7D%0A    %7D%0A
-    
 %0A    /**

Update descriptions of levels