Norwegian national patron database

From Koha Wiki
Jump to navigation Jump to search

Bug 11401 added support for the Norwegian national patron database (a.k.a. Norwegian national library card, a.k.a. NL) to Koha. This page provides some information about how to set up Koha to talk to this database.

The patch is currently undergoing QA. The following description is based on the current state of the patch. Things might change before the functionality becomes part of Koha.

Passwords and keys

The following is needed to authenticate with NL:

  • a username/password from the Norwegian national database of libraries (Base Bibliotek), available to all Norwegian libraries
  • a special key in order to decrypt and encrypt PIN-codes/passwords, which is only available to Norwegian library system vendors
  • a Norwegian library system vendor username/password

The library username and password should be stored in the NorwegianPatronDBUsername and NorwegianPatronDBPassword system preferences, respectively.

The key and the library vendor username/password should be stored in koha-conf.xml, like this:

 <yazgfs>
   <config>
   ...
   <nlkey>***</nlkey>
   <nlvendoruser>***</nlvendoruser>
   <nlvendorpass>***</nlvendorpass>
   </config>
 </yazgfs>

Cron-jobs

The following scripts should be run regularly as cronjobs

  • misc/cronjobs/nl-sync-from-koha.pl (every few minutes)
  • misc/cronjobs/nl-sync-to-koha.pl (once every night)

The first script is needed in order to catch any updates that failed in real time (e.g. because NL was unavailable for some period of time). The second script is responsible for updating patron records in Koha when other libraries have changed corresponding records in the central NL database.

Example:

*/15 * * * * koha-shell -c "perl /usr/share/koha/bin/cronjobs/nl-sync-from-koha.pl --run" <site>
5 1 * * * koha-shell -c "perl /usr/share/koha/bin/cronjobs/nl-sync-to-koha.pl --run" <site>

Extended patron attributes

  • Make sure ExtendedPatronAttributes = Enable
  • Create a patron attribute type with:
    • Patron attribute type code = fnr
    • Description = probably something like "Fødseslnummer"
    • Unique identifier = yes
    • Searchable = yes

Links