PatientRecord.sendingextract == "UKRDC",
PatientRecord.pid != PatientRecordAlias.pid,
PatientRecord.ukrdcid != PatientRecordAlias.ukrdcid,
These require that one half of the comparison is a UKRDC record, but don't care about the type of the other kind (i.e. no check on PatientRecordAlias.sendingextract).
In https://github.com/renalreg/ukrdc-cupid/blob/main/src/ukrdc_cupid/core/audit/domain.py
There are functions such as
def address_matched(session):which contain code like -These require that one half of the comparison is a UKRDC record, but don't care about the type of the other kind (i.e. no check on PatientRecordAlias.sendingextract).
Is this intentional?