@@ -120,6 +120,8 @@ private static Map<CmoSampleClass, String> initCmoSampleClassAbbrevMap() {
120120 * 1. cmo patient id prefix
121121 * 2. sample type abbreviation
122122 * 3. nucleic acid abbreviation
123+ * Note: if an existing label and the updated label both have sample type abbreviation 'F'
124+ * then keep the existing label since update is not meaningful to begin with
123125 * @param newCmoLabel
124126 * @param existingCmoLabel
125127 * @return Boolean
@@ -155,28 +157,36 @@ public Boolean igoSampleRequiresLabelUpdate(String newCmoLabel, String existingC
155157 + "from database. Sample will be published to IGO_SAMPLE_UPDATE topic." );
156158 return Boolean .TRUE ;
157159 }
160+
158161 // compare sample type abbreviation
159- if (!compareMatcherGroups (matcherNewLabel , matcherExistingLabel , CMO_SAMPLE_TYPE_ABBREV_GROUP )) {
160- String newSampleType = parseSampleTypeAbbrevFromCmoLabel (newCmoLabel );
161- String existingSampleType = parseSampleTypeAbbrevFromCmoLabel (existingCmoLabel );
162+ Boolean isMatchingSampleTypeAbbrev = compareMatcherGroups (matcherNewLabel ,
163+ matcherExistingLabel , CMO_SAMPLE_TYPE_ABBREV_GROUP );
164+ String newSampleType = parseSampleTypeAbbrevFromCmoLabel (newCmoLabel );
165+ String existingSampleType = parseSampleTypeAbbrevFromCmoLabel (existingCmoLabel );
166+ if (!isMatchingSampleTypeAbbrev ) {
162167 if (!isSameKindOfSampleTypeAbbreviation (newSampleType , existingSampleType )) {
163168 LOG .info ("Sample Type abbreviation differs between incoming IGO sample and matching IGO "
164169 + "sample from database. Sample will be published to IGO_SAMPLE_UPDATE topic." );
165170 return Boolean .TRUE ;
166171 }
172+ } else if (isMatchingSampleTypeAbbrev && existingSampleType .equals ("F" )) {
173+ return Boolean .FALSE ;
167174 }
175+
168176 // compare sample counter (may change if alt id numbering corrections are being made)
169177 if (!compareMatcherGroups (matcherNewLabel , matcherExistingLabel , CMO_SAMPLE_COUNTER_GROUP )) {
170178 LOG .info ("Sample Type counter differs between incoming IGO sample and matching IGO sample "
171179 + "from database. Sample will be published to IGO_SAMPLE_UPDATE topic." );
172180 return Boolean .TRUE ;
173181 }
182+
174183 // compare nucleic acid abbreviation
175184 if (!compareMatcherGroups (matcherNewLabel , matcherExistingLabel , CMO_SAMPLE_NUCACID_ABBREV_GROUP )) {
176185 LOG .info ("Nucleic Acid abbreviation differs between incoming IGO sample and matching IGO sample "
177186 + "from database. Sample will be published to IGO_SAMPLE_UPDATE topic." );
178187 return Boolean .TRUE ;
179188 }
189+
180190 // compare nucleic acid counter (may change if alt id numbering corrections are being made)
181191 if (!compareNucleicAcidCounterGroups (matcherNewLabel , matcherExistingLabel )) {
182192 LOG .info ("Nucleic Acid counter differs between incoming IGO sample and matching IGO sample "
0 commit comments