Something like this should work for you. Finds and replace the patient for the selected room.
department.findOneAndUpdate( { "rooms.patient.patientnr": parseInt(req.params.id) }, { "$set": {"rooms.$.patient": patient}}, {new : true} ....)