What is a rank? I've been thinking about unifying some notions related to ranking, order theory, ordinal data, and graded posets. While the notion of a grade in order theory is quite general, in some sense the way we talk about ranks is more general. I would like to bring rank-based statistics and order theory together in my theory development and analysis of data.
I would really like to know if there are others (especially but not exclusively in the literature) that have attempted to define ranks in a way that generalizes or interoperates with concepts in order theory.

How about:
A ranking is an order preserving or order reversing (surjective) mapping of a set of numbers to an interval of natural numbers starting from 0 or 1.
A rank is an element from the image of a ranking.

This definition has some limits when there are ties. In that case people sometimes define the rank as an average (not a natural number) or some places are skipped (not a surjective function).
For example we can have
$$\begin{array}{r}
\text{input} & \{1,&2,&3,&4,&4,&5\} \\\hline
\text{output1} & \{1,&2,&3,&4,&4,&5\} \\
\text{output2} & \{1,&2,&3,&5,&5,&6\} \\
\text{output3} & \{1,&2,&3,&4.5,&4.5,&5\} \\
\end{array}$$
Output 1 relates to the rank of a number $x$ defined as 'the number of unique values equal to or below $x$'.
Output 2 relates to the rank of a number $x$ defined as 'the number of numbers equal to or below $x$'.
Output 3 relates to the rank of a number $x$ defined as 'the number of numbers equal to or below $x$ if a value is unique, and when several numbers are the same/tied the average value of the ranks given to these numbers if they would not be tied'.
The definition as a ranking being 'surjective' and mapping to 'natural' numbers does not coincide with cases 2 and 3. But if we would adjust the definition to include cases 2 and 3, then the definition becomes very general and is just any order preserving mapping. The idea of a ranking as a counting process is lost.
A definition that can reconcile examples 1 and 2 is
The rank of the number $x_j$ in a list, is the number of numbers $x_i$ in that list, either counted with or without multiplicity, for which we have $x_i R x_j$, where $R$ is the binary relation $\leq$ or the binary relation $\geq$.
