This function instantiates an OHDSI CDM (referred to throughout as OMOP for brevity) database from raw ICNARC XML. It can be specfied to output either version 5.3.1 or 6.0.0. In doing so, it creates an extremely spartan instance of OMOP. This behaviour is intentional to short cut the creation of an OMOP database, which can be a daunting process. After the OMOP database has been created, you have the option to add more data directly from additional ICNARC XML in the future, or begin to populate the database directly with data from another source, with your patient and their outcomes already populated.
omopify_xml( project_path, nhs_trust, cdm_version = "5.3.1", vocabulary_version = "5", database_name = NULL, database_engine = "postgres", host_name = "localhost", port_no = 5432, username = NULL, from_empty = TRUE, vocabulary = TRUE, indexes = TRUE, constraints = TRUE, sqlite_file = NULL, dummy_data = FALSE )
project_path | the path to your project folder with the following populated folders:
|
---|---|
nhs_trust | a character string with the full name of the trust. |
cdm_version | the version of the CDM you are using, choose from:
|
vocabulary_version | the version of the vocabulary you are using |
database_name | the name of the database you are connecting to |
database_engine | the database engine, choose from:
|
host_name | host ip address |
port_no | port number |
username | username to database (*must* have write privaleges) |
from_empty | logical flag: do you want to create the OMOP database from stratch. If you want to first write out the tables yourself this can be set to FALSE |
vocabulary | logical flag: do you want to write out vocabularies |
indexes | logical flag: do you want to create db with indexes |
constraints | logical flag: do you want to create db with relational constraints |
sqlite_file | a filename if using sqlite |
dummy_data | logical flag: do you want to ignore XML files and use local dummy data instead |
TRUE if completed without errors