```python
def order_by_points(nums):
    """
    Write a function which sorts the given list of integers
    in ascending order according to the sum of their digits.
    Note: if there are several items with similar sum of their digits,
    order them based on their index in original list.

    For example:
    >>> order_by_points([1, 11, -1, -11, -12]) == [-1, -11, 1, -12, 11]
    >>> order_by_points([]) == []
    """
    def digit_sum(n):
        return sum(int(d) for d in str(abs(n)))
    
    # Sort by digit sum, then by original index
    indexed = [(digit_sum(n), i, n) for i, n in enumerate(nums)]
    indexed.sort(key=lambda x: (x[0], x[1]))
    return [x[2] for x in indexed]
```