public List < NaaccrValidationError > getAllValidationErrors ( ) { List < NaaccrValidationError > results = new ArrayList <> ( getValidationErrors ( ) ) ; results . addAll ( getItems ( ) . stream ( ) . filter ( item -> item . getValidationError ( ) != null ) . map ( Item :: getValidationError ) . collect ( Collectors . toList ( ) ) ) ; for ( Tumor tumor : getTumors ( ) ) results . addAll ( tumor . getAllValidationErrors ( ) ) ; return results ; }
This methods returns all the validation errors on the patient any of its items and any of its tumors .