MedTS: A BERT-based generation model to transform medical texts to SQL queries for electronic medical records (Preprint)

2021 ◽  
Author(s):  
Youcheng Pan ◽  
Chenghao Wang ◽  
Baotian Hu ◽  
Yang Xiang ◽  
Xiaolong Wang ◽  
...  

BACKGROUND Electronic medical records (EMRs) are usually stored in relational databases that require structured query language (SQL) queries to retrieve information of interest. Effectively completing such queries is usually a challenging task for medical experts due to the barriers in expertise. However, existing text-to-SQL generation studies have not been fully embraced in the medical domain. OBJECTIVE The objective of this study was to propose a neural generation model, which can jointly consider the characteristics of medical text and the SQL structure, to automatically transform medical texts to SQL queries for EMRs. METHODS In contrast to regarding the SQL query as an ordinary word sequence, the syntax tree, introduced as an intermediate representation, is more in line with the tree-structure nature of SQL and also can effectively reduce the search space during generation. We proposed a medical text-to-SQL model (MedTS), which employed a pre-trained BERT as the encoder and leveraged a grammar-based LSTM as the decoder to predict the tree-structured intermediate representation that can be easily transformed to the final SQL query. Experiments are conducted on the MIMICSQL dataset and five competitor methods are compared. RESULTS Experimental results demonstrated that MedTS achieved the accuracy of 0.770 and 0.888 on the test set in terms of logic form and execution respectively, which significantly outperformed the existing state-of-the-art methods. Further analyses proved that the performance on each component of the generated SQL was relatively balanced and has substantial improvements. CONCLUSIONS The proposed MedTS was effective and robust for improving the performance of medical text-to-SQL generation, indicating strong potentials to be applied in the real medical scenario.

10.2196/32698 ◽  
2021 ◽  
Author(s):  
Youcheng Pan ◽  
Chenghao Wang ◽  
Baotian Hu ◽  
Yang Xiang ◽  
Xiaolong Wang ◽  
...  

2016 ◽  
Vol 125 (3) ◽  
pp. 495-504 ◽  
Author(s):  
Daniel L. Helsten ◽  
Arbi Ben Abdallah ◽  
Michael S. Avidan ◽  
Troy S. Wildes ◽  
Anke Winter ◽  
...  

Abstract Background The impact of surgery on health is only appreciated long after hospital discharge. Furthermore, patients’ perceptions of postoperative health are not routinely ascertained. The authors instituted the Systematic Assessment and Targeted Improvement of Services Following Yearlong Surgical Outcomes Surveys (SATISFY-SOS) registry to evaluate patients’ postoperative health based on patient-reported outcomes (PROs). Methods This article describes the methods of establishing the SATISFY-SOS registry from an unselected surgical population, combining perioperative PROs with information from electronic medical records. Patients enrolled during their preoperative visit were surveyed at enrollment, 30 days, and 1-yr postoperatively. Information on PROs, including quality of life, return to work, pain, functional status, medical complications, and cognition, was obtained from online, mail, or telephone surveys. Results Using structured query language, 44,081 patients were identified in the electronic medical records as having visited the Center for Preoperative Assessment and Planning for preoperative assessment between July 16, 2012, and June 15, 2014, and 20,719 patients (47%) consented to participate in SATISFY-SOS. Baseline characteristics and health status were similar between enrolled and not enrolled patients. The response rate for the 30-day survey was 62% (8% e-mail, 73% mail, and 19% telephone) and for the 1-yr survey was 71% (13% e-mail, 78% mail, and 8% telephone). Conclusions SATISFY-SOS demonstrates the feasibility of establishing a PRO registry reflective of a busy preoperative assessment center population, without disrupting clinical workflow. Our experience suggests that patient engagement, including informed consent and multiple survey modalities, enhances PROs collection from a large cohort of unselected surgical patients. Initiatives like SATISFY-SOS could promote quality improvement, enable efficient perioperative research, and facilitate outcomes that matter to surgical patients.


2021 ◽  
Author(s):  
Varvara Koshman ◽  
Anastasia Funkner ◽  
Sergey Kovalchuk

Electronic Medical Records (EMR) contain a lot of valuable data about patients, which is however unstructured. There is a lack of labeled medical text data in Russian and there are no tools for automatic annotation. We present an unsupervised approach to medical data annotation. Morphological and syntactical analyses of initial sentences produce syntactic trees, from which similar subtrees are then grouped by Word2Vec and labeled using dictionaries and Wikidata categories. This method can be used to automatically label EMRs in Russian and proposed methodology can be applied to other languages, which lack resources for automatic labeling and domain vocabularies.


2014 ◽  
Author(s):  
C. McKenna ◽  
B. Gaines ◽  
C. Hatfield ◽  
S. Helman ◽  
L. Meyer ◽  
...  

Diabetes ◽  
2020 ◽  
Vol 69 (Supplement 1) ◽  
pp. 908-P
Author(s):  
SOSTENES MISTRO ◽  
THALITA V.O. AGUIAR ◽  
VANESSA V. CERQUEIRA ◽  
KELLE O. SILVA ◽  
JOSÉ A. LOUZADO ◽  
...  

Sign in / Sign up

Export Citation Format

Share Document