public class PostgresVisitStore extends PostgresExtension<I2b2Visit>
Some optional columns are used: active_status_cd, start_date, end_date, inout_cd, location_cd, sourcesystem_cd
TODO use encounter_mapping table to map actual (source) patient_ide to internal patient_num for facts.
The variable argument list for createInstance(Object...) requires the following arguments:
StringvisitId, I2b2Patientpatient, ExternalSourceTypesource.
config, db| Constructor and Description |
|---|
PostgresVisitStore(DataSource ds,
Map<String,String> configuration)
Create a visit store using a
DataSource. |
PostgresVisitStore(Map<String,String> configuration)
Create a visit store using configuration settings.
|
| Modifier and Type | Method and Description |
|---|---|
I2b2Visit |
createInstance(Object... args) |
I2b2Visit |
createInstance(Observation fact) |
void |
deleteWhereSourceId(String sourceId) |
I2b2Visit |
findVisit(String id)
Find a visit.
|
void |
flush()
Write updates to disk.
|
Class<?>[] |
getInstanceTypes() |
void |
loadMaxInstanceNums() |
protected void |
prepareStatements() |
int |
size() |
close, copyProperties, getConnection, getFetchSize, inaccurateSqlTimestamp, openDatabase, openDatabaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancepublic PostgresVisitStore(Map<String,String> configuration) throws ClassNotFoundException, SQLException
project.
JDBC connection configuration is specified with the key
prefixes jdbc.* and data.jdbc.*configuration - key value pairsClassNotFoundException - database driver not foundSQLException - SQL exceptionspublic PostgresVisitStore(DataSource ds, Map<String,String> configuration) throws SQLException
DataSource.
The project id must be specified with the key project.ds - data source for the connectionconfiguration - configuration settingsSQLException - SQL errorprotected void prepareStatements()
throws SQLException
prepareStatements in class PostgresExtension<I2b2Visit>SQLExceptionpublic int size()
public void loadMaxInstanceNums()
throws SQLException
SQLExceptionpublic I2b2Visit createInstance(Observation fact)
public Class<?>[] getInstanceTypes()
public I2b2Visit findVisit(String id)
id - visit id/aliasnull if not found.public void deleteWhereSourceId(String sourceId) throws SQLException
deleteWhereSourceId in class PostgresExtension<I2b2Visit>SQLExceptionpublic I2b2Visit createInstance(Object... args) throws UnsupportedOperationException
UnsupportedOperationExceptionpublic void flush()
PostgresExtensionPostgresExtension.close().flush in class PostgresExtension<I2b2Visit>Copyright © 2013–2016 R.W.Majeed. All rights reserved.