tkDerm version 1.3.2 or later can encrypt patient's data by using a PostgreSQL contribution module "pgcrypto". If you build PostgreSQL from the source, you should build the pgcrypto module from the source tree as explained below.
Here is how this might be done:
$ cd postgresql-8.x.x/contrib/pgcrypto $ make on Macintosh $ sudo make install on Linux $ su # make install
By the above steps, these files will be copied.
/usr/local/pgsql/share/contrib/pgcrypto.sql /usr/local/pgsql/share/contrib/uninstall_pgcrypto.sql /usr/local/pgsql/lib/pgcrypto.so