def convert(value, row):
    """Step 1c: If cchg=250 and cchgsvr=1, recode cchg=230
    Step 1d: If cchg=250 and cchgsvr=2, recode cchg=230
    Step 1e: If cchg=135 and cchgsvr=1, recode cchg=120
    Step 1f: If cchg=135 and cchgsvr=2, recode cchg=120 and cncic=1313"""
    
    severity = row['cchgsvr']
    
    if severity == 1:
        if value == 250:
            return 230
        elif value == 135:
            return 120
    
    elif severity == 2:
        if value == 250:
            return 240
        elif value == 135:
            row['cncic'] = 1313
            return 130
    
    return value