* [[http://www.zope.org/Members/reedstrm/ZPyGreSQLDA-rjr][ZPyGreSQL]] extension for Zope * required for OIO (PostgreSQL module) * the unnecessarily long and tedious steps to install: * apt-get install python2.3-dev python2.3-pgsql postgresql-dev * unpack the ZPyGreSQL tarball to /usr/lib/zope2.7 * modify /usr/lib/zope2.7/lib/python/Products/ZPyGreSQL/src/Setup.in to include '-L/usr/include/postgresql/8.0' in the gcc line * modify /usr/lib/zope2.7/lib/python/Products/ZPyGreSQL/src/pgmodule.c as follows * change #include <libpq-fe.h> to #include "/usr/include/postgresql/8.0/libpq-fe.h" * change #include <libpq/libpq-fs.h> to #include "/usr/include/postgresql/8.0/libpq/libpq-fs.h" * run "make -f Makefile.pre.in boot" * run "make"; mv _pgmodule.o .. * *Note:* if make dies, you'll probably have to edit the Makefile and change "DEFS=@DEFS@" to "DEFS="; for some reason @DEFS@ didn't expand into anything during the "make -f Makefile.pre.in boot" process * OIO Installation Notes * Follow these [[http://sourceforge.net/docman/display_doc.php?docid=2467&group_id=9295][instructions]] (long version) * Other documentation you might need can be found [[http://sourceforge.net/docman/index.php?group_id=9295][here]]. * Caveats: * move /var/lib/zope2.7/instance/import/* to /usr/lib/zope2.7/import * make sure the user postgres can login (change entry in /etc/passwd from /bin/false) * for step 5, install as root, not as postgres * for step 6, create a non-root zope login, and give it manager priveledges; login as that user * step 20 notes: in the properties tab, add two new variables, base_URL and form_URL with the values copied from internal_base_url and internal_form_url respectively * database connection steps: * open a shell as the postgres user * run "createuser zope" (say yes or no to the questions, not really important for this section) * go to Control Panel->Products->OIO->BiostatOIO in the zope management section * in the combo box in the upper right hand corner, click on ZPyGreSQLDA database connection * add a new connection with the connection string "publicdb zope" * rename the connection you just made to Local_Text_database_connection (you may have to delete the existing placeholder first) * add another new connection with the connection string "local_text zope" * rename this one to Patient_database_connection (may have to delete placeholder) * after these database connections are correct, the following initialization steps in the instructions should work * after everything is installed, you can access OIO from the "base_URL" url; also, send lots of e-mail spam to the OIO developers to make a better installation guide * Stuff to fix before OIO will work correctly: * In the following files (accessed through the Zope Manager), change all occurrances of "time.toZone()..." and "time.strftime()..." to "DateTime(time).toZone()" or "DateTime(time).strftime()...": * forms/archive_form/archive_b * forms/export_form/OIO_form * schedules/export_form/OIO_form * schedules/export_form/archived_OIO_form * patients/records/show_records * Other notes: * to access postgresql tables that have capital letters, use quotes around the table name! * Broken: * Patients can fill out forms, but for some reason that information doesn't get stored in the database. * OIO isn't updating the tables correctly. When a patient fills out a form, a table to hold the values of the form is created, but none of the actual values are passed along. * I've narrowed the problem to /Control_Panel/Products/OIO/BiostatOIO/forms/fillout_form/save_data, which is the script that saves all of the form data into a postgresql table created by fillout_form_new_c. For some reason the values aren't being passed to this script correctly.