Tools to convert OpenClinica Extracts to CSV, R and SAS

13

Comments

  • lindsay.stevenslindsay.stevens Posts: 400 ✭✭✭
    via Email
  • kristiakkristiak Posts: 1,243 ✭✭✭
    via Email
    Thanks Lindsay, this feels much less intimidating. I'll go head tomorrow,

    Best
    Krister
  • kristiakkristiak Posts: 1,243 ✭✭✭
    Sorry but the first URL does not work https://github.com/lindsay-stevens-kirby/openclinica it comes back with a 404 error
  • kristiakkristiak Posts: 1,243 ✭✭✭
    I found a link that did work.
    I downloaded PGSGL 9.3 but when I tried to import a database backup from OC with PG 8.4 it gave errors 644, and error 1. If I Understood your instructions correctly it would be possible to run it without connections to a OC DB and run a standalone PG 9.3 instance and load data from a backup file! Have I misunderstood that,
    Best

    Krister
  • lindsay.stevenslindsay.stevens Posts: 400 ✭✭✭
    via Email
    What tool are you using to import the database?

    What is the actual error text? I don't know what error 1 and error 644
    means.

    It might be that your backup includes a statement to "create extension
    plpgsql". This would need to be excluded since plpgsql is already loaded by
    default in pg 9.0+.
  • kristiakkristiak Posts: 1,243 ✭✭✭
    I used PGADMIN the same tool I use to restore a database from a backup in the regular OC. The message is: "Errors ignored on restore: 1" "Process returned exit code = 1"
    What I really only want to do is to use the piece where I restore a PG database from one of my OC instances and load this into P 9.3 and the connect MS ACCESS via ODBC link with this database, I do not need any certificates as it is just running on my local PC where I have MS OFFICE 10 running as well. I then hope to be able to access my data organized by e-CRF is tables and columns to allow me to query them in a simple fashion.
    So really I'm looking for the minimum! or???

    Best

    Krister
  • kristiakkristiak Posts: 1,243 ✭✭✭
    What I really do not understand is how to run the various scripts that you have listed.
  • lindsay.stevenslindsay.stevens Posts: 400 ✭✭✭
    via Email
    Look in your backup file and see if there is a "CREATE EXTENSION"
    statement. Remove it, then try to restore. If that doesn't work please PM
    me your log file.

    In the Basic setup steps, there are 4 preparation tasks to do. The last one
    is putting your environment details in the "setup_sqldatamart.bat" file,
    and running it (double click). Probably if you use the Postgres superuser
    for everything, you could skip the first 3 steps and just go straight to
    the bat file.

    If you see instructions referring to certificates, SSPI, etc., then you are
    in the Advanced setup, which is probably not what you're after.
  • kristiakkristiak Posts: 1,243 ✭✭✭
    No there is no "CREATE EXTENSION" in the backup file. Where do I find the log files. I have looked in the entire PQ 9.3 directory, cannot find any log files!
  • kristiakkristiak Posts: 1,243 ✭✭✭
    via Email
    Hi Lindsay,

    I used a simple BAT command the same I use for nightly backups and the tried to restore it to PQSQL via PGADMIN. Maybe I should use a PGADMIN to create the export file as well.

    echo off
    set datename=%DATE:~0,3%
    set day=%DATE:~7,2%
    set yyyy=%DATE:~0,4%
    set mm=%DATE:~4,3%
    set day=%DATE:~8,2%
    set filedate=%yyyy%-%mm%-%day%-%datename%
    set BACKUP_FILE=C:\users\Administrator\dropbox\BACKUP\EFFECTS_BACKUP_FILE_%filedate%.backup
    echo backup file name is %EFFECTS_BACKUP_FILE%
    SET PGPASSWORD=XXX
    echo on
    start C:\pgsqlbackup\bin\pg_dump -i -h localhost -p 5432 -U postgres -F c -b -v -f %BACKUP_FILE% openclinica


    Regards

    Krister
Sign In or Register to comment.