/** * Test if the coded concept name of the content item matches the specified code value and coding * scheme designator. * * <p>This is more robust than checking code meaning, which may have synomyms, and there is no * need to also test code meaning. * * @param csdWanted * @param cvWanted * @return true if matches */ public boolean contentItemNameMatchesCodeValueAndCodingSchemeDesignator( String cvWanted, String csdWanted) { boolean isMatch = false; if (conceptName != null) { String csd = conceptName.getCodingSchemeDesignator(); String cv = conceptName.getCodeValue(); if (csd != null && csd.trim().equals(csdWanted.trim()) && cv != null && cv.trim().equals(cvWanted.trim())) { isMatch = true; } } return isMatch; }
/** * Get the value of the coding scheme designator of the Concept Name as a string, if present and * applicable. * * @return the coding scheme designator of the Concept Name, or an empty string */ public String getConceptNameCodingSchemeDesignator() { return conceptName == null ? "" : conceptName.getCodingSchemeDesignator(); }