If I am following your requirement, I think it can be solved by introducing an additional attribute into your data model, and hinging your survivorship rule off of it.
First, you need to rationalize your status codes into some value that can be sorted. For example: D = 2, A = 1
- Add a new attribute to your data model, say 'Status Rank'.
- Update your data set with Status Rank as a one-time activity. For on-going loads, add this logic to the integration layer, or consider double mapping it and using RDM to transcode to the rationalized number, for example.
- Update your survivorship rules to be something like...
If you don't want code I to contribute to survivorship unless it is part of the fallback, don't rationalize and load in values for that code... so that statusRank can have no survived value if A or D are not present. This is intended... so the fallback rule kicks in, which then selects LUD for status.
The only caveat to this is that if you have ZERO or MORE THAN ONE surviving statusRank value, the fallback will kick in. Unfortunately we do not exclusively support a ZERO fallback strategy yet, although I have raised an Idea for it here.
Please review the idea and don't forget to vote !
Let me know if this helps you at all !