|
| 1 | +/* |
| 2 | + * Copyright (C) 2014 Information Management Services, Inc. |
| 3 | + */ |
| 4 | +package com.imsweb.seerapi.client.staging.eod; |
| 5 | + |
| 6 | +import com.imsweb.seerapi.client.staging.StagingData; |
| 7 | + |
| 8 | +public class EodStagingData extends StagingData { |
| 9 | + |
| 10 | + /** |
| 11 | + * Default constructor |
| 12 | + */ |
| 13 | + public EodStagingData() { |
| 14 | + super(); |
| 15 | + } |
| 16 | + |
| 17 | + /** |
| 18 | + * Construct with site and histology |
| 19 | + * @param site primary site |
| 20 | + * @param hist histology |
| 21 | + */ |
| 22 | + public EodStagingData(String site, String hist) { |
| 23 | + super(site, hist); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * Construct with site, histology and discriminators |
| 28 | + * @param site primary site |
| 29 | + * @param hist histology |
| 30 | + * @param discriminator1 first discriminator |
| 31 | + */ |
| 32 | + public EodStagingData(String site, String hist, String discriminator1) { |
| 33 | + super(site, hist); |
| 34 | + |
| 35 | + setInput(EodInput.DISCRIMINATOR_1, discriminator1); |
| 36 | + } |
| 37 | + |
| 38 | + /** |
| 39 | + * Construct with site, histology and discriminators |
| 40 | + * @param site primary site |
| 41 | + * @param hist histology |
| 42 | + * @param discriminator1 first discriminator |
| 43 | + * @param discriminator2 second discriminator |
| 44 | + */ |
| 45 | + public EodStagingData(String site, String hist, String discriminator1, String discriminator2) { |
| 46 | + super(site, hist); |
| 47 | + |
| 48 | + setInput(EodInput.DISCRIMINATOR_1, discriminator1); |
| 49 | + setInput(EodInput.DISCRIMINATOR_2, discriminator2); |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * Return the specified input value |
| 54 | + * @param key input key |
| 55 | + * @return input |
| 56 | + */ |
| 57 | + public String getInput(EodInput key) { |
| 58 | + return getInput(key.toString()); |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * Set the specified input value |
| 63 | + * @param key input key |
| 64 | + * @param value value |
| 65 | + */ |
| 66 | + public void setInput(EodInput key, String value) { |
| 67 | + setInput(key.toString(), value); |
| 68 | + } |
| 69 | + |
| 70 | + /** |
| 71 | + * Return the specified output value |
| 72 | + * @param key output key |
| 73 | + * @return output |
| 74 | + */ |
| 75 | + public String getOutput(EodOutput key) { |
| 76 | + return getOutput(key.toString()); |
| 77 | + } |
| 78 | + |
| 79 | + // input key definitions |
| 80 | + public enum EodInput { |
| 81 | + PRIMARY_SITE("site"), |
| 82 | + HISTOLOGY("hist"), |
| 83 | + BEHAVIOR("behavior"), |
| 84 | + SEX("sex"), |
| 85 | + AGE_AT_DX("age_dx"), |
| 86 | + DISCRIMINATOR_1("discriminator_1"), |
| 87 | + DISCRIMINATOR_2("discriminator_2"), |
| 88 | + CLIN_T("clin_t"), |
| 89 | + CLIN_T_SUFFIX("clin_t_suffix"), |
| 90 | + CLIN_N("clin_n"), |
| 91 | + CLIN_N_SUFFIX("clin_n_suffix"), |
| 92 | + CLIN_M("clin_m"), |
| 93 | + CLIN_STAGE_GROUP_DIRECT("clin_stage_group_direct"), |
| 94 | + PATH_T("path_t"), |
| 95 | + PATH_T_SUFFIX("path_t_suffix"), |
| 96 | + PATH_N("path_n"), |
| 97 | + PATH_N_SUFFIX("path_n_suffix"), |
| 98 | + PATH_M("path_m"), |
| 99 | + PATH_STAGE_GROUP_DIRECT("path_stage_group_direct"), |
| 100 | + YPATH_T("ypath_t"), |
| 101 | + YPATH_T_SUFFIX("ypath_t_suffix"), |
| 102 | + YPATH_N("ypath_n"), |
| 103 | + YPATH_N_SUFFIX("ypath_n_suffix"), |
| 104 | + YPATH_M("ypath_m"), |
| 105 | + YPATH_STAGE_GROUP_DIRECT("ypath_stage_group_direct"), |
| 106 | + NODES_POS("nodes_pos"), |
| 107 | + NODES_EXAM("nodes_exam"), |
| 108 | + EOD_PRIMARY_TUMOR("eod_primary_tumor"), |
| 109 | + EOD_REGIONAL_NODES("eod_regional_nodes"), |
| 110 | + EOD_METS("eod_mets"), |
| 111 | + GRADE_CLIN("grade_clin"), |
| 112 | + GRADE_PATH("grade_path"), |
| 113 | + GRADE_POST_THERAPY("grade_post_therapy"), |
| 114 | + DX_YEAR("year_dx"), |
| 115 | + TUMOR_SIZE_CLIN("size_clin"), |
| 116 | + TUMOR_SIZE_PATH("size_path"), |
| 117 | + TUMOR_SIZE_SUMMARY("size_summary"), |
| 118 | + RADIATION_SURG_SEQ("radiation_surg_seq"), |
| 119 | + SYSTEMIC_SURG_SEQ("systemic_surg_seq"), |
| 120 | + SS_2018("ss2018"); |
| 121 | + |
| 122 | + private String _name; |
| 123 | + |
| 124 | + EodInput(String name) { |
| 125 | + _name = name; |
| 126 | + } |
| 127 | + |
| 128 | + @Override |
| 129 | + public String toString() { |
| 130 | + return _name; |
| 131 | + } |
| 132 | + } |
| 133 | + |
| 134 | + // output key definitions |
| 135 | + public enum EodOutput { |
| 136 | + NAACCR_SCHEMA_ID("naaccr_schema_id"), |
| 137 | + AJCC_ID("ajcc_id"), |
| 138 | + DERIVED_VERSION("derived_version"), |
| 139 | + EOD_2018_T("eod_2018_t"), |
| 140 | + EOD_2018_N("eod_2018_n"), |
| 141 | + EOD_2018_M("eod_2018_m"), |
| 142 | + EOD_2018_STAGE_GROUP("eod_2018_stage_group"), |
| 143 | + SS_2018_DERIVED("ss2018_derived"); |
| 144 | + |
| 145 | + private String _name; |
| 146 | + |
| 147 | + EodOutput(String name) { |
| 148 | + _name = name; |
| 149 | + } |
| 150 | + |
| 151 | + @Override |
| 152 | + public String toString() { |
| 153 | + return _name; |
| 154 | + } |
| 155 | + } |
| 156 | + |
| 157 | + /** |
| 158 | + * TnmStagingInputBuilder builder |
| 159 | + */ |
| 160 | + public static class EodStagingInputBuilder { |
| 161 | + |
| 162 | + private EodStagingData _data; |
| 163 | + |
| 164 | + public EodStagingInputBuilder() { |
| 165 | + _data = new EodStagingData(); |
| 166 | + } |
| 167 | + |
| 168 | + public EodStagingInputBuilder withDisciminator1(String discriminator1) { |
| 169 | + _data.setInput(EodInput.DISCRIMINATOR_1, discriminator1); |
| 170 | + return this; |
| 171 | + } |
| 172 | + |
| 173 | + public EodStagingInputBuilder withDisciminator2(String discriminator2) { |
| 174 | + _data.setInput(EodInput.DISCRIMINATOR_2, discriminator2); |
| 175 | + return this; |
| 176 | + } |
| 177 | + |
| 178 | + public EodStagingInputBuilder withInput(EodInput key, String value) { |
| 179 | + _data.setInput(key, value); |
| 180 | + return this; |
| 181 | + } |
| 182 | + |
| 183 | + public EodStagingData build() { |
| 184 | + return _data; |
| 185 | + } |
| 186 | + } |
| 187 | +} |
0 commit comments