The function has_legal_identity returns True if there is an identity with purpose "legal identity". This condition should be expressed in a language independent way. In ISO 22220, it is referred not as "legal identity" but as "registered name or legal name".
One of the suggested (and workable) solution was to use implementation depended, external mappings.
Another one, but probably not very convenient, was to extend the openehr terminology xml with proper codes in order to support terminology binding in the demographic archetypes.
See discussions on mailinglist: http://lists.chime.ucl.ac.uk/mailman/private/openehr-technical/2010-August/005293.html
Since name types are defined in the identity archetype and may be different for person names and organisation names, I suggest this function is not something that should be defined at the RM level.
Is there any real value to this function?
Most likely it should be removed.