shaistaDev7 commited on
Commit
4dad18b
·
verified ·
1 Parent(s): 542ec1f

Upload 3 files

Browse files
Files changed (3) hide show
  1. app.py +241 -0
  2. parsed_data.json +140 -0
  3. requirements.txt +6 -0
app.py ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import json
3
+ import logging
4
+ import requests
5
+ import xmltodict
6
+ import time
7
+ import streamlit as st
8
+ import openai
9
+ from openai import OpenAI
10
+ from typing import List, Dict
11
+ from io import StringIO
12
+
13
+ # Configure logging for progress tracking and debugging
14
+ logging.basicConfig(level=logging.INFO)
15
+ logger = logging.getLogger(__name__)
16
+
17
+ # Initialize OpenAI client with the DeepSeek model
18
+ client = OpenAI(
19
+ base_url="https://api.aimlapi.com/v1",
20
+ api_key="daddc2ea37a49f9bf6ff27408540698", # Replace with your AIML API key
21
+ )
22
+
23
+ # Define constants for PubMed API
24
+ BASE_URL = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/"
25
+ SEARCH_URL = f"{BASE_URL}esearch.fcgi"
26
+ FETCH_URL = f"{BASE_URL}efetch.fcgi"
27
+
28
+ class KnowledgeBaseLoader:
29
+ """
30
+ Loads schizophrenia research documents from a JSON file.
31
+ """
32
+ def __init__(self, filepath: str):
33
+ self.filepath = filepath
34
+
35
+ def load_data(self) -> List[Dict]:
36
+ """Loads and returns data from the JSON file."""
37
+ try:
38
+ with open(self.filepath, "r", encoding="utf-8") as f:
39
+ data = json.load(f)
40
+ logger.info(f"Successfully loaded {len(data)} records from '{self.filepath}'.")
41
+ return data
42
+ except Exception as e:
43
+ logger.error(f"Error loading knowledge base: {e}")
44
+ return []
45
+
46
+ class SchizophreniaAgent:
47
+ """
48
+ An agent to answer questions related to schizophrenia using a domain-specific knowledge base.
49
+ """
50
+ def __init__(self, knowledge_base: List[Dict]):
51
+ self.knowledge_base = knowledge_base
52
+
53
+ def process_query(self, query: str) -> str:
54
+ """
55
+ Process the incoming query by searching for matching documents in the knowledge base.
56
+
57
+ Args:
58
+ query: A string containing the user's query.
59
+
60
+ Returns:
61
+ A response string summarizing how many documents matched and some sample content.
62
+ """
63
+ if not self.knowledge_base:
64
+ logger.warning("Knowledge base is empty. Cannot process query.")
65
+ return "No knowledge base available."
66
+
67
+ # Simple matching: count documents where query text is found in abstract
68
+ matching_docs = []
69
+
70
+ for doc in self.knowledge_base:
71
+ # Ensure abstract is a string (if it's a list, join it into a single string)
72
+ abstract = doc.get("abstract", [])
73
+
74
+ # Check if abstract is a list and join items that are strings
75
+ if isinstance(abstract, list):
76
+ abstract = " ".join([str(item) for item in abstract if isinstance(item, str)]).strip()
77
+
78
+ if query.lower() in abstract.lower():
79
+ matching_docs.append(doc)
80
+
81
+ logger.info(f"Query '{query}' matched {len(matching_docs)} documents.")
82
+
83
+ # For a more robust agent, integrate with an LLM or retrieval system here.
84
+ if len(matching_docs) > 0:
85
+ response = (
86
+ f"Found {len(matching_docs)} documents matching your query. "
87
+ f"Examples: " +
88
+ ", ".join(f"'{doc.get('title', 'No Title')}'" for doc in matching_docs[:3]) +
89
+ "."
90
+ )
91
+ else:
92
+ response = "No relevant documents found for your query."
93
+
94
+ # Now ask the AIML model (DeepSeek) to generate more user-friendly information
95
+ aiml_response = self.query_deepseek(query)
96
+ return response + "\n\nAI-Suggested Guidance:\n" + aiml_response
97
+
98
+ def query_deepseek(self, query: str) -> str:
99
+ """Query DeepSeek for additional AI-driven responses."""
100
+ response = client.chat.completions.create(
101
+ model="deepseek/deepseek-r1",
102
+ messages=[
103
+ {"role": "system", "content": "You are an AI assistant who knows everything about schizophrenia."},
104
+ {"role": "user", "content": query}
105
+ ],
106
+ )
107
+ return response.choices[0].message.content
108
+
109
+ def fetch_pubmed_papers(query: str, max_results: int = 10):
110
+ """
111
+ Fetch PubMed papers related to the query (e.g., "schizophrenia").
112
+
113
+ Args:
114
+ query (str): The search term to look for in PubMed.
115
+ max_results (int): The maximum number of results to fetch (default is 10).
116
+
117
+ Returns:
118
+ List of dictionaries containing paper details like title, abstract, etc.
119
+ """
120
+ # Step 1: Search PubMed for articles related to the query
121
+ search_params = {
122
+ 'db': 'pubmed',
123
+ 'term': query,
124
+ 'retmax': max_results,
125
+ 'retmode': 'xml'
126
+ }
127
+ search_response = requests.get(SEARCH_URL, params=search_params)
128
+
129
+ if search_response.status_code != 200:
130
+ print("Error: Unable to fetch search results from PubMed.")
131
+ return []
132
+
133
+ search_data = xmltodict.parse(search_response.text)
134
+
135
+ # Step 2: Extract PubMed IDs (PMIDs) from the search results
136
+ try:
137
+ pmids = search_data['eSearchResult']['IdList']['Id']
138
+ except KeyError:
139
+ print("Error: No PubMed IDs found in search results.")
140
+ return []
141
+
142
+ # Step 3: Fetch the details of the papers using the PMIDs
143
+ papers = []
144
+ for pmid in pmids:
145
+ fetch_params = {
146
+ 'db': 'pubmed',
147
+ 'id': pmid,
148
+ 'retmode': 'xml',
149
+ 'rettype': 'abstract'
150
+ }
151
+ fetch_response = requests.get(FETCH_URL, params=fetch_params)
152
+
153
+ if fetch_response.status_code != 200:
154
+ print(f"Error: Unable to fetch details for PMID {pmid}")
155
+ continue
156
+
157
+ fetch_data = xmltodict.parse(fetch_response.text)
158
+
159
+ # Extract relevant details for each paper
160
+ try:
161
+ paper = fetch_data['PubmedArticleSet']['PubmedArticle']
162
+ title = paper['MedlineCitation']['Article']['ArticleTitle']
163
+ abstract = paper['MedlineCitation']['Article'].get('Abstract', {}).get('AbstractText', 'No abstract available.')
164
+ journal = paper['MedlineCitation']['Article']['Journal']['Title']
165
+ year = paper['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate']['Year']
166
+
167
+ # Store paper details in a dictionary
168
+ papers.append({
169
+ 'pmid': pmid,
170
+ 'title': title,
171
+ 'abstract': abstract,
172
+ 'journal': journal,
173
+ 'year': year
174
+ })
175
+ except KeyError:
176
+ print(f"Error parsing paper details for PMID {pmid}")
177
+ continue
178
+
179
+ # Add a delay between requests to avoid hitting rate limits
180
+ time.sleep(1)
181
+
182
+ return papers
183
+
184
+ # Streamlit User Interface
185
+ def main():
186
+ # Set configuration: path to the parsed knowledge base file
187
+ data_file = os.getenv("SCHIZ_DATA_FILE", "parsed_data.json")
188
+
189
+ # Initialize and load the knowledge base
190
+ loader = KnowledgeBaseLoader(data_file)
191
+ kb_data = loader.load_data()
192
+
193
+ # Initialize the schizophrenia agent with the loaded data
194
+ agent = SchizophreniaAgent(knowledge_base=kb_data)
195
+
196
+ # Streamlit UI setup
197
+ st.set_page_config(page_title="Schizophrenia Assistant", page_icon="🧠", layout="wide")
198
+
199
+ st.title("Schizophrenia Episode Management Assistant")
200
+ st.markdown(
201
+ """
202
+ This tool helps you manage schizophrenia episodes. You can search PubMed for research papers or provide details about a patient's episode, and the assistant will provide recommendations and guidance.
203
+ """
204
+ )
205
+
206
+ # **Part 1: Fetch and Download PubMed Papers**
207
+ st.header("Fetch and Download PubMed Papers")
208
+ query = st.text_input("Enter search query (e.g., schizophrenia):", value="schizophrenia")
209
+ if st.button("Fetch PubMed Papers"):
210
+ with st.spinner("Fetching papers..."):
211
+ papers = fetch_pubmed_papers(query, max_results=10)
212
+ if papers:
213
+ # Save papers to JSON and provide download link
214
+ json_data = json.dumps(papers, ensure_ascii=False, indent=4)
215
+ st.download_button("Download JSON", data=json_data, file_name="pubmed_papers.json", mime="application/json")
216
+ st.success(f"Successfully fetched {len(papers)} papers related to '{query}'")
217
+ else:
218
+ st.error("No papers found. Please try another query.")
219
+
220
+ # **Part 2: Upload and Use JSON File**
221
+ st.header("Upload and Use JSON File for Schizophrenia Assistant")
222
+ uploaded_file = st.file_uploader("Upload PubMed JSON file", type=["json"])
223
+ if uploaded_file is not None:
224
+ file_data = json.load(uploaded_file)
225
+ st.write("File uploaded successfully. You can now query the assistant.")
226
+ agent = SchizophreniaAgent(knowledge_base=file_data)
227
+
228
+ # User Input for Query
229
+ user_input = st.text_area("Enter the patient's condition or episode details:", height=200)
230
+ if st.button("Get Response"):
231
+ if user_input.strip():
232
+ with st.spinner("Processing your request..."):
233
+ answer = agent.process_query(user_input.strip())
234
+ st.subheader("Response")
235
+ st.write(answer)
236
+ else:
237
+ st.error("Please enter a valid query to get a response.")
238
+
239
+ # Run the Streamlit app
240
+ if __name__ == "__main__":
241
+ main()
parsed_data.json ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "pmid": "39953891",
4
+ "title": "Hemispheric asymmetry of the white matter microstructure in schizophrenia patients with persistent auditory verbal hallucinations.",
5
+ "abstract": "The link between hemispheric asymmetry and auditory verbal hallucinations in schizophrenia is underexplored with neuroimaging evidence. This study examined white matter asymmetries in schizophrenia patients. Diffusion tensor imaging data from 52 patients with persistent auditory verbal hallucinations, 33 who never experienced auditory verbal hallucinations, and 40 healthy controls were analyzed. Asymmetry indices for fractional anisotropy, axial diffusivity, radial diffusivity, and mean diffusivity were calculated for the whole-brain white matter skeleton and 22 pairs of regions of interest. The persistent auditory verbal hallucination group showed reduced fractional anisotropy asymmetry index in the whole-brain white matter skeleton compared to healthy control and never experienced auditory verbal hallucination groups, indicating altered asymmetry. Region of interest analysis revealed decreased fractional anisotropy asymmetry index in nine pairs and increased mean diffusivity AI in two pairs in the persistent auditory verbal hallucination group. Greater rightward asymmetry in the superior longitudinal fasciculus correlated with more severe auditory verbal hallucinations in persistent auditory verbal hallucination patients. No significant asymmetry differences were found between never experienced auditory verbal hallucinations and healthy control groups. Ridge regression analysis demonstrated that including the fractional anisotropy asymmetry index of the superior longitudinal fasciculus increased the explained variance in auditory verbal hallucination severity. These findings highlight distinct white matter asymmetry patterns in persistent auditory verbal hallucination patients, suggesting that hemispheric asymmetry plays a key role in the pathology of auditory verbal hallucinations in schizophrenia.",
6
+ "journal": "Cerebral cortex (New York, N.Y. : 1991)",
7
+ "year": "2025"
8
+ },
9
+ {
10
+ "pmid": "39953865",
11
+ "title": "Consumers' and practitioners' perspectives on the antipsychotic induced metabolic syndrome and challenges in metabolic monitoring to patient prescribed second generation antipsychotics in severe mental illness.",
12
+ "abstract": "Second-generation antipsychotics are highly effective in controlling symptoms if taken as prescribed. However, poor medication adherence results in patients continuing to experience psychotic episodes and metabolic disturbances that can cause them to develop abnormal lipid levels, weight gain, and diabetes. Understanding the underlying modulators that impact follow-up appointments and metabolic monitoring is critical. Semi-structured interviews were conducted with patients and their treating psychiatrists across four sites in South India. Narrative data were thematically analyzed, informed by an inductive approach. Patient-reported barriers included medication side effects, lack of awareness about metabolic monitoring, and financial constraints. Psychiatrists reported both patient and resource barriers that impact their provision of care. This study has shed light on key barriers impacting the provision of care and subsequently health outcomes for patients living with severe mental illness to inform strategies that target barriers for both patients and psychiatrists.",
13
+ "journal": "Journal of health psychology",
14
+ "year": "2025"
15
+ },
16
+ {
17
+ "pmid": "39953335",
18
+ "title": "Characteristics of people with bipolar disorder I with and without auditory verbal hallucinations.",
19
+ "abstract": [
20
+ {
21
+ "@Label": "BACKGROUND",
22
+ "@NlmCategory": "BACKGROUND",
23
+ "#text": "Approximately half of people with bipolar disorder type I (BD-I) report the presence of psychotic symptoms at least at some point during their illness. Previous data suggest that more than 20% of people with BD-I report the presence of auditory verbal hallucinations (AVHs), or \"voice-hearing\" in particular. While work in other disorders with psychotic features (e.g., schizophrenia) indicates that the presence vs. absence of AVHs is associated with poorer clinical outcomes, little is known about their effects on clinical and socioeconomic features in BD-I."
24
+ },
25
+ {
26
+ "@Label": "METHODS",
27
+ "@NlmCategory": "METHODS",
28
+ "#text": "We investigated whether people with BD-I (N = 119) with AVHs (n = 36) and without AVHs (n = 83) in their lifetime differ in terms of demographic features and clinical measures. Relations with AVHs and other positive symptoms were explored."
29
+ },
30
+ {
31
+ "@Label": "RESULTS",
32
+ "@NlmCategory": "RESULTS",
33
+ "#text": "People with BD-I and AVHs vs. without AVHs had higher manic and positive symptom scores (i.e., higher scores on the hallucinations, delusions, and bizarre behavior subscales). Further, a greater proportion of those with vs. without AVHs reported lower subjective socioeconomic status and tended to have higher rates of unemployment, thus, speaking to the longer-term consequences of AVH presence."
34
+ },
35
+ {
36
+ "@Label": "CONCLUSION",
37
+ "@NlmCategory": "CONCLUSIONS",
38
+ "#text": "Our findings suggest that people with BD-I with AVHs exhibit more severe psychotic features and manic symptoms compared to those without. This might be associated with more socioeconomic hardship. More in-depth characterization of people with BD-I with/without AVHs is needed to fully understand this subgroup's unique challenges and needs."
39
+ },
40
+ {
41
+ "@Label": "LIMITATIONS",
42
+ "@NlmCategory": "CONCLUSIONS",
43
+ "#text": "The modest sample size of the AVH group and a study population with low racial diversity/representation may limit generalizability."
44
+ }
45
+ ],
46
+ "journal": "International journal of bipolar disorders",
47
+ "year": "2025"
48
+ },
49
+ {
50
+ "pmid": "39952924",
51
+ "title": "Predicting antipsychotic responsiveness using a machine learning classifier trained on plasma levels of inflammatory markers in schizophrenia.",
52
+ "abstract": "We apply machine learning techniques to navigate the multifaceted landscape of schizophrenia. Our method entails the development of predictive models, emphasizing peripheral inflammatory biomarkers, which are classified into treatment response subgroups: antipsychotic-responsive, clozapine-responsive, and clozapine-resistant. The cohort comprises 146 schizophrenia patients (49 antipsychotics-responsive, 68 clozapine-responsive, 29 clozapine-resistant) and 49 healthy controls. Protein levels of immune biomarkers were quantified using the Olink Target 96 Inflammation Panel (Olink®, Uppsala, Sweden). To predict labels, a support vector machine (SVM) classifier is trained on the Olink®data matrix and evaluated via leave-one-out cross-validation. Associated protein biomarkers are identified via recursive feature elimination. We constructed three separate predictive models for binary classification: one to discern healthy controls from individuals with schizophrenia (AUC = 0.74), another to differentiate individuals who were responsive to antipsychotics (AUC = 0.88), and a third to distinguish treatment-resistant individuals (AUC = 0.78). Employing machine learning techniques, we identified features capable of distinguishing between treatment response subgroups. In this study, SVM demonstrates the power of machine learning to uncover subtle signals often overlooked by traditional statistics. Unlike t-tests, it handles multiple features simultaneously, capturing complex data relationships. Chosen for simplicity, robustness, and reliance on strong feature sets, its integration with explainable AI techniques like SHapely Additive exPlanations enhances model interpretability, especially for biomarker screening. This study highlights the potential of integrating machine learning techniques in clinical practice. Not only does it deepen our understanding of schizophrenia's heterogeneity, but it also holds promise for enhancing predictive accuracy, thereby facilitating more targeted and effective interventions in the treatment of this complex mental health disorder.",
53
+ "journal": "Translational psychiatry",
54
+ "year": "2025"
55
+ },
56
+ {
57
+ "pmid": "39952338",
58
+ "title": "Causal relationship between B vitamins and neuropsychiatric disorders: a systematic review and meta-analysis.",
59
+ "abstract": "Recently, there has been an increasing interest in how diet and nutrition influence both physical and mental health. Numerous studies have highlighted the potential role of B vitamins in neuropsychiatric disorders (NPDs), yet the exact causal relationship between these nutrients and NPDs remains unclear. In our Mendelian randomization (MR) meta-analysis, we examined the links between B vitamins (VB6, VB12, and folate) and NPDs, utilizing data from previous MR studies, the UK Biobank, and FinnGen databases. Our MR analysis revealed a complex, multifaceted association: VB6 appears to protect against Alzheimer's disease (AD) but may increase the risk for conditions such as major depressive disorder and post-traumatic stress disorder. VB12 seems protective against autism spectrum disorder (ASD) but may heighten the risk for bipolar disorder (BD). Folate has shown protective effects against AD and intellectual disability (ID). The meta-analysis suggests that B vitamins may protect against certain disorders like AD and Parkinson's disease, but they might also be risk factors for anxiety and other psychiatric conditions. Further subgroup analysis indicates that VB6 protects against epilepsy and schizophrenia but increases the risk of mania; VB12 protects against ID and ASD but raises the risk of schizophrenia and BD; folate protects against schizophrenia, AD, and ID. These findings reveal the intricate influence of B vitamins on mental health, emphasizing that different B vitamins have distinct impacts on various NPDs. This complexity underscores the importance of personalized supplementation in developing future therapeutic approaches for NPDs.",
60
+ "journal": "Neuroscience and biobehavioral reviews",
61
+ "year": "2025"
62
+ },
63
+ {
64
+ "pmid": "39953168",
65
+ "title": "Experienced and anticipated discrimination among people living with schizophrenia in China: a cross-sectional study.",
66
+ "abstract": [
67
+ {
68
+ "@Label": "PURPOSE",
69
+ "@NlmCategory": "OBJECTIVE",
70
+ "#text": "Understanding the experienced and anticipated discrimination of people living with schizophrenia (PLS) in China is the cornerstone of culturally informed intervention. This study aims to describe the pattern of experienced and anticipated discrimination against PLS in China and investigate which social and illness characteristics are associated with discrimination."
71
+ },
72
+ {
73
+ "@Label": "METHODS",
74
+ "@NlmCategory": "METHODS",
75
+ "#text": "PLS dwelling in community were randomly recruited from four cities across China and completed measures of experienced and anticipated discrimination by discrimination and stigma scale (version 12; DISC-12). Multivariable regression was used to analyses the correlates of experienced and anticipated discrimination."
76
+ },
77
+ {
78
+ "@Label": "RESULTS",
79
+ "@NlmCategory": "RESULTS",
80
+ "#text": "A total of 787 participants (54.0% were female) were included in the analysis. 38% of participants reported experienced discrimination and 71.4% reported anticipated discrimination. The most common experienced discrimination for PLS in China were from neighborhood, making/keeping friends, finding/keeping a job, and family. 59.3% of participants had concealed their mental illness. Living in rural areas, household poverty, longer illness duration, severer symptoms and higher level of disability were associated with more experienced discrimination. Younger ages, unemployment, higher level of disability and experienced discrimination were associated with more anticipated discrimination."
81
+ },
82
+ {
83
+ "@Label": "CONCLUSION",
84
+ "@NlmCategory": "CONCLUSIONS",
85
+ "#text": "More than a third of PLS in China have experienced discrimination in their lives. Economically disadvantage PLS and PLS living in rural setting may experience more discrimination in China. New and culturally informed intervention approaches are needed to prevent and reduce discrimination of schizophrenia."
86
+ }
87
+ ],
88
+ "journal": "Social psychiatry and psychiatric epidemiology",
89
+ "year": "2025"
90
+ },
91
+ {
92
+ "pmid": "39952795",
93
+ "title": "'Did I Make the Right Choice': A Qualitative Exploration of Decision Regret Among Family Caregivers After Hospitalising a Patient With Schizophrenia.",
94
+ "abstract": "Committing a family member with schizophrenia to a psychiatric ward is a coping mechanism often employed under challenging circumstances. This decision entails significant emotional repercussions and ethical dilemmas, potentially undermining the psychological well-being of the family and eroding public trust in mental health services and professionals. This study investigates the experiences of regret among family members after deciding to commit a relative to a locked ward, adhering to the COREQ guidelines. Employing a descriptive qualitative methodology, we conducted in-depth interviews with 14 family members in Heilongjiang Province, China, who faced this difficult choice. Data were analysed using reflexive thematic analysis, which identified seven themes within three stages: Decision antecedent (limited comprehension of schizophrenia and treatment, deficiencies in supportive environment), decision process (suboptimal communication, hospitalisation and weighing of alternative options) and decision outcome (emotional burden of a loved one's hospital life, the indelible mark of schizophrenia, impact on family dynamics). The study highlights the need for targeted interventions, including addressing biased social media portrayals, enhancing the accuracy of medical information, ensuring transparency in psychiatric practices and improving support for families during hospitalisation.",
95
+ "journal": "International journal of mental health nursing",
96
+ "year": "2025"
97
+ },
98
+ {
99
+ "pmid": "39952266",
100
+ "title": "Drug development in psychiatry: 50 years of failure and how to resuscitate it.",
101
+ "abstract": "The past 50 years have seen remarkable advances in the science of medicine. The pharmacological treatments of disorders such as hypertension, immune disorders, and cancer are fundamentally different from those used in the 1970s, and are now more often based on disorder-specific pathologies. The same cannot be said for psychiatric medicines: despite remarkable advances in neuroscience, very few innovative treatments have been developed in this field since the 1970s. For depression, schizophrenia, anxiety disorders, and ADHD, pharmacological classes of medicines discovered through serendipity in the 1950s are still used despite hundreds of billions of US dollars being spent on drug discovery attempts based on new neuroscience targets. This Personal View presents my opinion on the reasons innovation in psychiatric treatment has not progressed as well as in other disorders. As a researcher in the field, I offer suggestions as to how this situation must be rectified soon, as by most analyses mental illness is becoming a major health burden globally. Most of my evidence is referenced, but where I have unpublished knowledge gained from consulting with pharmaceutical companies, it is presented as an opinion.",
102
+ "journal": "The lancet. Psychiatry",
103
+ "year": "2025"
104
+ },
105
+ {
106
+ "pmid": "39951622",
107
+ "title": "Telehealth-Based vs In-Person Aerobic Exercise in Individuals With Schizophrenia: Comparative Analysis of Feasibility, Safety, and Efficacy.",
108
+ "abstract": [
109
+ {
110
+ "@Label": "BACKGROUND",
111
+ "#text": "Aerobic exercise (AE) training has been shown to enhance aerobic fitness in people with schizophrenia. Traditionally, such training has been administered in person at gyms or other communal exercise spaces. However, following the advent of the COVID-19 pandemic, many clinics transitioned their services to telehealth-based delivery. Yet, at present, there is scarce information about the feasibility, safety, and efficacy of telehealth-based AE in this population."
112
+ },
113
+ {
114
+ "@Label": "OBJECTIVE",
115
+ "#text": "To examine the feasibility, safety, and efficacy of trainer-led, at-home, telehealth-based AE in individuals with schizophrenia."
116
+ },
117
+ {
118
+ "@Label": "METHODS",
119
+ "#text": "We analyzed data from the AE arm (n=37) of a single-blind, randomized clinical trial examining the impact of a 12-week AE intervention in people with schizophrenia. Following the onset of the COVID-19 pandemic, the AE trial intervention transitioned from in-person to at-home, telehealth-based delivery of AE, with the training frequency and duration remaining identical. We compared the feasibility, safety, and efficacy of the delivery of trainer-led AE training among participants undergoing in-person (pre-COVID-19; n=23) versus at-home telehealth AE (post-COVID-19; n=14)."
120
+ },
121
+ {
122
+ "@Label": "RESULTS",
123
+ "#text": "The telehealth and in-person participants attended a similar number of exercise sessions across the 12-week interventions (26.8, SD 10.2 vs 26.1, SD 9.7, respectively; P=.84) and had similar number of weeks with at least 1 exercise session (10.4, SD 3.4 vs 10.6, SD 3.1, respectively; P=.79). The telehealth-based AE was associated with a significantly lower drop-out rate (telehealth: 0/14, 0%; in-person: 7/23, 30.4%; P=.04). There were no significant group differences in total time spent exercising (telehealth: 1246, SD 686 min; in-person: 1494, SD 580 min; P=.28); however, over the 12-week intervention, the telehealth group had a significantly lower proportion of session-time exercising at or above target intensity (telehealth: 33.3%, SD 21.4%; in-person: 63.5%, SD 16.3%; P<.001). There were no AE-related serious adverse events associated with either AE delivery format. Similarly, there were no significant differences in the percentage of participants experiencing minor or moderate adverse events, such as muscle soreness, joint pain, blisters, or dyspnea (telehealth: 3/14, 21%; in-person: 5/19, 26%; P>.99) or in the percentage of weeks per participant with at least 1 exercise-related adverse event (telehealth: 31%, SD 33%; in-person: 40%, SD 33%; P=.44). There were no significant differences between the telehealth versus in-person groups regarding changes in aerobic fitness as indexed by maximum oxygen consumption (VO2max; P=.27)."
124
+ },
125
+ {
126
+ "@Label": "CONCLUSIONS",
127
+ "#text": "Our findings provide preliminary support for the delivery of telehealth-based AE for individuals with schizophrenia. Our results indicate that in-home telehealth-based AE is feasible and safe in this population, although when available, in-person AE appears preferable given the opportunity for social interactions and the higher intensity of exercises. We discuss the findings' clinical implications, specifically within the context of the COVID-19 pandemic, as well as review potential challenges for the implementation of telehealth-based AE among people with schizophrenia."
128
+ }
129
+ ],
130
+ "journal": "JMIR mental health",
131
+ "year": "2025"
132
+ },
133
+ {
134
+ "pmid": "39951212",
135
+ "title": "Atypical Resting-State EEG Graph Metrics of Network Efficiency Across Development in Autism and Their Association with Social Cognition: Results from the LEAP Study.",
136
+ "abstract": "Autism has been associated with differences in functional brain network organization. However, the exact nature of these differences across development compared to non-autistic individuals and their relationship to autism-related social cognition, remains unclear. This study first aimed to identify EEG resting-state network characteristics in autistic versus non-autistic children, adolescents, and adults. Second, we investigated associations with social cognition measures. Analyzing resting-state EEG data from the EU-AIMS Longitudinal European Autism Project, we compared network metrics (global efficiency, clustering coefficient, and small-worldness) between 344 autistic and non-autistic individuals within and across age groups in four frequency bands (delta, theta, alpha, and beta). If significant, we explored their relationships to measures of empathy (empathy quotient), complex emotion recognition [reading the mind in the eyes task (RMET)], and theory of mind (animated shapes task). Compared to their non-autistic peers, autistic adolescents showed lower alpha global efficiency, while autistic adults showed lower alpha clustering and small-worldness. No network differences were observed among children. In adolescents, higher long-range integration was tentatively associated with higher RMET scores; in those with high autistic traits, higher long-range integration related to fewer parent-reported empathic behaviors. No brain-behavior relationships were observed in adults. Our findings suggest subtle differences in network topology between autistic and non-autistic individuals, with less efficient long-range efficiency during adolescence, and less local and overall network efficiency in adulthood. Furthermore, long-range integration may play a role in complex emotion recognition and empathy difficulties associated with autism in adolescence.",
137
+ "journal": "Journal of autism and developmental disorders",
138
+ "year": "2025"
139
+ }
140
+ ]
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ streamlit==1.16.0
2
+ openai==0.27.0
3
+ requests==2.28.1
4
+ xmltodict==0.12.0
5
+ faiss-cpu==1.7.3
6
+ langchain==0.0.178