As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
ORD - CREW REPORTED YELLOW GEAR DOOR OPEN LIGHT STAYED ON AFTER TAKEOFF. CYCLED GEAR AND LIGHT REMAINED ON. EMERGENCY DECLARED FLIGHT LANDED ORD WITHOUT INCIDENT. AFTER GEAR EXTENSION FOR LANDING LIGHT WAS STILL ILLUMINATED. AIRCRAFT REMOVED FROM SERVICE. REPLACED RIGHT GEAR DOOR SENSOR. SYSTEM GROUND CHECK NORMAL OPERATION.