Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the script configurable with respect to the user, i.e. remove hard-coded KBR statements #1

Open
SvenLieber opened this issue Dec 20, 2022 · 0 comments

Comments

@SvenLieber
Copy link
Contributor

Currently KBR is hard coded but the issuer of the script should be configurable.

It should be configurable which fields of the XML request should be added to the CSV report (and with which column name).

result['KBRID'] = request.find('identityInformation/requestorIdentifierOfIdentity/identifier').text
result['surname'] = request.find('identityInformation/identity/personOrFiction/personalName/surname').text
result['forename'] = request.find('identityInformation/identity/personOrFiction/personalName/forename').text

Additionally, ISNI XML responses have the response possibleMatch and if the match is with an identifier from us, we distinguish a possibleMatchDuplicateKBR response. This should also be configurable for non KBR data.

otherKBRRecord = True if isniNotAssigned.find('possibleMatch/source').text.startswith('KBR') else False
if otherKBRRecord:
result['isniStatus'] = 'possibleMatchDuplicateKBRID'
result['PPN'] = isniNotAssigned.find('possibleMatch/PPN').text
else:
result['isniStatus'] = 'possibleMatch'
result['PPN'] = isniNotAssigned.find('possibleMatch/PPN').text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant