Extract toImageClassificationRecord helper function to eliminate duplicated transformation code between getImageClassifications and createImageClassification. Replace hardcoded fake disease object with explicit error when diagnosis.disease is null, ensuring data integrity. Remove unnecessary type casts now that the helper is properly typed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>