The impact of psychosis prevention is limited by how effectively we can detect individuals at risk. This protocol presents a new approach for implementing a psychosis risk detection and alerting service in a real world electronic health record system. The main advantage of this clinically-based individualized risk calculator is that it allows for the automatic detection of individuals at risk for psychosis at large scale using electronic health records across different mental conditions and in real time.
Current methods for detecting people at risk for psychosis are relatively inefficient with only 5-12%of first episode psychosis cases detected. This system allows for improved detection of people at risk as well as improved communication to clinicians. The platform developed can be customized for other risk prediction modeling and detection system in psychiatry and this can support implementation of precision medicine in clinical care with benefit of patients.
We want to disseminate this new method to the wider community and engage with other researchers, clinicians, patients, carers, and stakeholders to advance the implementation of precision medicine in psychiatry. We hope this video will facilitate the accomplishment of this goal. Although the script, which has been used to deploy this system and the method, are described in detail in the study.
Our research team will be happy to assist future researchers who may want to implement a similar approach on their clinical settings. Begin by downloading or cloning the code repository from GitHub. To configure CogStack pipeline for data ingestion, open the cogstack_deploy/cogstack/directory and modify psychosis.
properties and modify the source:dbconfiguration section settings based on the electronic health record database setup including specifying the IP address of the database server, database name, database username, and password. Open a web browser and access the Kibana user interface. For the first time accessing Kibana, click the Management and Index Patterns tab to specify an elastic search index of interest and enter psychosis_base into the index pattern field.
Click Next Step and select ETL_updated_dttm for the time filter field name. Then click Create Index Pattern to add the psychosis_base index pattern for Kibana. Once Kibana is connected to the elastic search index, search and browse the source data interactively through the discover page.
To access the risk calculator, open a new terminal window and open the psychosis directory. Enter the appropriate command into terminal to install all of the required Python packages used in the risk calculator and run the psychosis risk calculator. If the process has completed successfully, logs of the risk calculation will be printed in the terminal and the risk results will be stored in a new elastic search index called psychosis_risk within the CogStack platform.
To check the risk results in the Kibana interface, add a new index pattern psychosis_risk to connect Kibana with the psychosis_risk index and explore the risk results through the discover page. To build visualizations and dashboards to obtain an overview of characteristics for the whole population of at risk patients, click Visualize and click Create New Visualization. Select the visualization type and select psychosis_risk as the index to be visualized.
Once individual visualizations have been built, click Dashboard to create a dashboard that displays a set of related visualizations together. To create alerting for clinicians when patients are at risk of psychosis, click Management and Watcher. To set up a new watcher, click Create Advanced Watch and enter the ID and name.
To send an alerting email to a clinician's address, delete the content of the watch JSON section and copy the content in the watcher. json file with the psychosis directory to the watch JSON section. Before saving the watcher, click Simulate to test the watcher execution.
If the watcher is set successfully, the simulation output will appear. In this representative figure, the number of records ingested into CogStack over time can be observed in chronological order based on the last update date of a record. Upon comparison of the numbers and content of the records in the database in the elastic search index, no missing and discrepant data were detected confirming the reliability of the CogStack pipeline and data ingestion in synchronization.
As these figures illustrate, the characteristics for patients at risk of psychosis including patient ethnicities, genders, ages, and categories of diagnoses can be visualized. Here, the interface for setting a risk alerting service by using the watch component in Kibana as demonstrated can be observed. Once this service has been configured successfully, users will receive an email notification if there are one or more patients whose risk of psychosis in two years is higher than 5%It is important to do cross-validation to ensure that correct information is being extracted from the local electronic health record system.
We can integrate a refined version of this risk calculator and this protocol to further improve the prediction of outcomes. We can further integrate a dynamic version of this risk calculator which would allow for real-time updating of outcomes as patient symptoms change, therefore giving more reliable predictions that better reflect a patient's clinical pathway. This protocol can be reconfigured to allow for monitoring and delivery alerts to other risk prediction models allowing clinicians to make timely decisions to improve patient care, safety, and experience.