<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>Scalable and accurate deep learning with electronic health records</title>
        <author>Alvin Rajkomar</author>
        <author>Eyal Oren</author>
        <author>Kai Chen</author>
        <author>Andrew M. Dai</author>
        <author>Nissan Hajaj</author>
        <author>Michaela Hardt</author>
        <author>Peter J. Liu</author>
        <author>Xiaobing Liu</author>
        <author>Jake Marcus</author>
        <author>Mimi Sun</author>
        <author>Patrik Sundberg</author>
        <author>Hector Yee</author>
        <author>Kun Zhang</author>
        <author>Yi Zhang</author>
        <author>Gerardo Flores</author>
        <author>Gavin E. Duggan</author>
        <author>Jamie Irvine</author>
        <author>Quoc Le</author>
        <author>Kurt Litsch</author>
        <author>Alexander Mossin</author>
        <author>Justin Tansuwan</author>
        <author>De Wang</author>
        <author>James Wexler</author>
        <author>Jimbo Wilson</author>
        <author>Dana Ludwig</author>
        <author>Samuel L. Volchenboum</author>
        <author>Katherine Chou</author>
        <author>Michael Pearson</author>
        <author>Srinivasan Madabushi</author>
        <author>Nigam H. Shah</author>
        <author>Atul J. Butte</author>
        <author>Michael D. Howell</author>
        <author>Claire Cui</author>
        <author>Greg S. Corrado</author>
        <author>Jeffrey Dean</author>
      </titleStmt>
      <publicationStmt>
        <p>Tag layer of the DHSS Meta-Tagging Project. The article text is reproduced from the
           staged copy named in sourceDesc and is not altered; the tags are held separately in
           standOff so that overlapping and nested spans are preserved.</p>
      </publicationStmt>
      <sourceDesc>
        <bibl>
          <title>Scalable and accurate deep learning with electronic health records</title>
          <date>2018</date>
          <publisher>npj Digital Medicine</publisher>
          <idno type="DOI">10.1038/s41746-018-0029-1</idno>
          
          <idno type="record">rajkomar2018-scalable-accurate-deep-learning-electronic-health-records</idno>
          <note type="staged-file">rajkomar2018-scalable-accurate-deep-learning-electronic-health-records.txt, the project's staged copy</note>
          <note type="text-sha1">db3266d284bb033e13305c38d3be0c46b400b175</note>
          <note type="rights">cc-by</note>
        </bibl>
      </sourceDesc>
    </fileDesc>
    <profileDesc>
      <textClass><keywords><term>health-informatics</term></keywords></textClass>
      <particDesc>
        <person xml:id="paper"><p>the paper's own words</p></person>
        <person xml:id="tagger"><p>the tag layer; a sentence written by the tagger about the
          paper, always anchored to a quotation but not itself a quotation</p></person>
      </particDesc>
    </profileDesc>
    <revisionDesc>
      <change when="2026-10-06"
              who="build_paper_edition.py">174 spans located by searching the stored text for the quote's exact words, allowing any whitespace between them</change>
    </revisionDesc>
  </teiHeader>
  <standOff>
    <spanGrp type="tags">
      <span xml:id="t0" from="#a1" to="#a2" type="object_of_study" ana="#object_of_study" resp="#paper">deep-learning prediction of mortality, readmission, prolonged stay, and discharge diagnoses from complete longitudinal EHR records at two hospitals</span>
      <span xml:id="t1" from="#a9" to="#a10" type="research_question" ana="#research_question" resp="#paper">Can one raw-EHR/FHIR representation and deep-learning pipeline produce accurate, scalable predictions across clinical tasks and hospitals without manual feature harmonization?</span>
      <span xml:id="t2" from="#a13" to="#a14" type="contribution" ana="#contribution" resp="#paper">a generic raw-EHR-to-FHIR pipeline plus multi-hospital evaluation of full-record deep-learning prediction and patient-level attribution</span>
      <span xml:id="t3" from="#a13" to="#a14" type="claim_type" ana="#claim_type" resp="#paper">method</span>
      <span xml:id="t4" from="#a27" to="#a28" type="phenomenon" ana="#phenomenon" resp="#paper">full-record deep-learning models outperform task-specific clinical baselines across mortality, readmission, and length-of-stay prediction while retaining major transfer and prospective-validation limits</span>
      <span xml:id="t5" from="#a41" to="#a42" type="method" ana="#method" resp="#paper">system-or-tool-building<term>system-or-tool-building</term></span>
      <span xml:id="t6" from="#a41" to="#a42" type="mechanisms" ana="#mechanisms[0]" resp="#tagger" cert="0.99">mechanisms<term>RAW-EHR REPRESENTATION maps every patient event to FHIR, orders it in time, tokenizes attributes and notes, and supplies the complete prefix at prediction time</term></span>
      <span xml:id="t7" from="#a9" to="#a10" type="mechanisms" ana="#mechanisms[1]" resp="#tagger" cert="0.99">mechanisms<term>DIRECT FEATURE LEARNING jointly handles unharmonized inputs and learns predictors instead of requiring a custom curated dataset for each task</term></span>
      <span xml:id="t8" from="#a57" to="#a58" type="mechanisms" ana="#mechanisms[2]" resp="#tagger" cert="0.99">mechanisms<term>MULTI-ARCHITECTURE ENSEMBLING combines LSTM, attention-based TANN, and boosted temporal decision-stump predictions</term></span>
      <span xml:id="t9" from="#a51" to="#a52" type="mechanisms" ana="#mechanisms[3]" resp="#tagger" cert="0.99">mechanisms<term>MULTI-TASK TIMING applies the same patient representation to mortality, readmission, length-of-stay, and diagnosis outcomes at clinically relevant time points</term></span>
      <span xml:id="t10" from="#a61" to="#a62" type="mechanisms" ana="#mechanisms[4]" resp="#tagger" cert="0.99">mechanisms<term>PATIENT-LEVEL ATTRIBUTION highlights chart elements that influenced each neural prediction</term></span>
      <span xml:id="t11" from="#a63" to="#a64" type="mechanisms" ana="#mechanisms[5]" resp="#tagger" cert="0.99">mechanisms<term>HIDDEN TEST CONTROL reserves development, validation, and final test splits and uses bootstrap confidence intervals</term></span>
      <span xml:id="t12" from="#a65" to="#a66" type="mechanisms" ana="#mechanisms[6]" resp="#tagger" cert="0.99">mechanisms<term>DISCRIMINATION AND CALIBRATION EVALUATION combines AUROC, empirical-probability curves, alert burden, and multi-label F1 metrics</term></span>
      <span xml:id="t13" from="#a59" to="#a60" type="mechanisms" ana="#mechanisms[7]" resp="#tagger" cert="0.99">mechanisms<term>ON-DATASET BASELINES reimplement published logistic scores on the same hospital data for direct comparison</term></span>
      <span xml:id="t14" from="#a33" to="#a34" type="limitations" ana="#limitations[0]" resp="#tagger" cert="0.99">The study is retrospective, with the usual limitations of retrospective evidence.</span>
      <span xml:id="t15" from="#a33" to="#a34" type="limitations" ana="#limitations[1]" resp="#tagger" cert="0.99">Accurate predictions do not necessarily improve care; prospective trials are needed.</span>
      <span xml:id="t16" from="#a33" to="#a34" type="limitations" ana="#limitations[2]" resp="#tagger" cert="0.99">Data were not harmonized between sites, limiting transfer learning to new hospitals and cohorts.</span>
      <span xml:id="t17" from="#a33" to="#a34" type="limitations" ana="#limitations[3]" resp="#tagger" cert="0.99">Development is computationally intensive and currently requires specialized expertise.</span>
      <span xml:id="t18" from="#a33" to="#a34" type="limitations" ana="#limitations[4]" resp="#tagger" cert="0.99">The study measures total predictive accuracy rather than the incremental benefit of individual data types such as notes.</span>
      <span xml:id="t19" from="#a33" to="#a34" type="limitations" ana="#limitations[5]" resp="#tagger" cert="0.99">Differences between hospitals cannot be attributed to note availability because the cohorts differ.</span>
      <span xml:id="t20" from="#a29" to="#a30" type="limitations" ana="#limitations[6]" resp="#tagger" cert="0.99">Direct comparison with external studies is difficult because designs, cohorts, outcomes, and real-time availability differ.</span>
      <span xml:id="t21" from="#a35" to="#a36" type="limitations" ana="#limitations[7]" resp="#tagger" cert="0.99">Diagnosis prediction has an unknown label count, 14,025 possible codes, and random error from clinically similar code variants.</span>
      <span xml:id="t22" from="#a37" to="#a38" type="limitations" ana="#limitations[8]" resp="#tagger" cert="0.99">The attribution case study is only proof of concept; applicability, cognitive impact, and clinical utility require further research.</span>
      <span xml:id="t23" from="#a67" to="#a68" type="limitations" ana="#limitations[9]" resp="#tagger" cert="0.99">Model and training-conversion code depends on internal distributed platforms that cannot reasonably be shared.</span>
      <span xml:id="t24" from="#a1" to="#a2" type="concepts" ana="#concepts[0]" resp="#paper" cert="0.99">Predictive modeling<term>Predictive modeling</term></span>
      <span xml:id="t25" from="#a1" to="#a2" type="concepts" ana="#concepts[1]" resp="#paper" cert="0.99">electronic health record (EHR) data<term>electronic health record (EHR) data</term></span>
      <span xml:id="t26" from="#a1" to="#a2" type="concepts" ana="#concepts[2]" resp="#paper" cert="0.99">personalized medicine<term>personalized medicine</term></span>
      <span xml:id="t27" from="#a1" to="#a2" type="concepts" ana="#concepts[3]" resp="#paper" cert="0.99">healthcare quality<term>healthcare quality</term></span>
      <span xml:id="t28" from="#a1" to="#a2" type="concepts" ana="#concepts[4]" resp="#paper" cert="0.99">curated predictor variables<term>curated predictor variables</term></span>
      <span xml:id="t29" from="#a1" to="#a2" type="concepts" ana="#concepts[5]" resp="#paper" cert="0.99">normalized EHR data<term>normalized EHR data</term></span>
      <span xml:id="t30" from="#a1" to="#a2" type="concepts" ana="#concepts[6]" resp="#paper" cert="0.99">entire raw EHR records<term>entire raw EHR records</term></span>
      <span xml:id="t31" from="#a1" to="#a2" type="concepts" ana="#concepts[7]" resp="#paper" cert="0.99">Fast Healthcare Interoperability Resources (FHIR) format<term>Fast Healthcare Interoperability Resources (FHIR) format</term></span>
      <span xml:id="t32" from="#a1" to="#a2" type="concepts" ana="#concepts[8]" resp="#paper" cert="0.99">deep learning methods<term>deep learning methods</term></span>
      <span xml:id="t33" from="#a1" to="#a2" type="concepts" ana="#concepts[9]" resp="#paper" cert="0.99">multiple medical events<term>multiple medical events</term></span>
      <span xml:id="t34" from="#a1" to="#a2" type="concepts" ana="#concepts[10]" resp="#paper" cert="0.99">multiple centers<term>multiple centers</term></span>
      <span xml:id="t35" from="#a1" to="#a2" type="concepts" ana="#concepts[11]" resp="#paper" cert="0.99">site-specific data harmonization<term>site-specific data harmonization</term></span>
      <span xml:id="t36" from="#a1" to="#a2" type="concepts" ana="#concepts[12]" resp="#paper" cert="0.99">216,221 adult patients<term>216,221 adult patients</term></span>
      <span xml:id="t37" from="#a1" to="#a2" type="concepts" ana="#concepts[13]" resp="#paper" cert="0.99">area under the receiver operator curve<term>area under the receiver operator curve</term></span>
      <span xml:id="t38" from="#a1" to="#a2" type="concepts" ana="#concepts[14]" resp="#paper" cert="0.99">in-hospital mortality<term>in-hospital mortality</term></span>
      <span xml:id="t39" from="#a1" to="#a2" type="concepts" ana="#concepts[15]" resp="#paper" cert="0.99">30-day unplanned readmission<term>30-day unplanned readmission</term></span>
      <span xml:id="t40" from="#a1" to="#a2" type="concepts" ana="#concepts[16]" resp="#paper" cert="0.99">prolonged length of stay<term>prolonged length of stay</term></span>
      <span xml:id="t41" from="#a1" to="#a2" type="concepts" ana="#concepts[17]" resp="#paper" cert="0.99">final discharge diagnoses<term>final discharge diagnoses</term></span>
      <span xml:id="t42" from="#a1" to="#a2" type="concepts" ana="#concepts[18]" resp="#paper" cert="0.99">traditional, clinically-used predictive models<term>traditional, clinically-used predictive models</term></span>
      <span xml:id="t43" from="#a1" to="#a2" type="concepts" ana="#concepts[19]" resp="#paper" cert="0.99">neural networks<term>neural networks</term></span>
      <span xml:id="t44" from="#a3" to="#a4" type="concepts" ana="#concepts[20]" resp="#paper" cert="0.99">preprocessing, merging, customizing, and cleaning datasets<term>preprocessing, merging, customizing, and cleaning datasets</term></span>
      <span xml:id="t45" from="#a3" to="#a4" type="concepts" ana="#concepts[21]" resp="#paper" cert="0.99">scalability of predictive models<term>scalability of predictive models</term></span>
      <span xml:id="t46" from="#a5" to="#a6" type="concepts" ana="#concepts[22]" resp="#paper" cert="0.99">potential predictor variables<term>potential predictor variables</term></span>
      <span xml:id="t47" from="#a5" to="#a6" type="concepts" ana="#concepts[23]" resp="#paper" cert="0.99">free-text notes<term>free-text notes</term></span>
      <span xml:id="t48" from="#a5" to="#a6" type="concepts" ana="#concepts[24]" resp="#paper" cert="0.99">false-positive predictions<term>false-positive predictions</term></span>
      <span xml:id="t49" from="#a5" to="#a6" type="concepts" ana="#concepts[25]" resp="#paper" cert="0.99">alert fatigue<term>alert fatigue</term></span>
      <span xml:id="t50" from="#a5" to="#a6" type="concepts" ana="#concepts[26]" resp="#paper" cert="0.99">false-negative predictions<term>false-negative predictions</term></span>
      <span xml:id="t51" from="#a5" to="#a6" type="concepts" ana="#concepts[27]" resp="#paper" cert="0.99">poor clinical outcomes<term>poor clinical outcomes</term></span>
      <span xml:id="t52" from="#a7" to="#a8" type="concepts" ana="#concepts[28]" resp="#paper" cert="0.99">deep learning<term>deep learning</term></span>
      <span xml:id="t53" from="#a7" to="#a8" type="concepts" ana="#concepts[29]" resp="#paper" cert="0.99">large volumes of relatively messy data<term>large volumes of relatively messy data</term></span>
      <span xml:id="t54" from="#a7" to="#a8" type="concepts" ana="#concepts[30]" resp="#paper" cert="0.99">key factors and interactions<term>key factors and interactions</term></span>
      <span xml:id="t55" from="#a9" to="#a10" type="concepts" ana="#concepts[31]" resp="#paper" cert="0.99">direct feature learning<term>direct feature learning</term></span>
      <span xml:id="t56" from="#a9" to="#a10" type="concepts" ana="#concepts[32]" resp="#paper" cert="0.99">structured predictors variables<term>structured predictors variables</term></span>
      <span xml:id="t57" from="#a11" to="#a12" type="concepts" ana="#concepts[33]" resp="#paper" cert="0.99">FHIR<term>FHIR</term></span>
      <span xml:id="t58" from="#a11" to="#a12" type="concepts" ana="#concepts[34]" resp="#paper" cert="0.99">flexible data structure<term>flexible data structure</term></span>
      <span xml:id="t59" from="#a11" to="#a12" type="concepts" ana="#concepts[35]" resp="#paper" cert="0.99">data interchange between sites<term>data interchange between sites</term></span>
      <span xml:id="t60" from="#a11" to="#a12" type="concepts" ana="#concepts[36]" resp="#paper" cert="0.99">semantic consistency<term>semantic consistency</term></span>
      <span xml:id="t61" from="#a13" to="#a14" type="concepts" ana="#concepts[37]" resp="#paper" cert="0.99">generic data processing pipeline<term>generic data processing pipeline</term></span>
      <span xml:id="t62" from="#a13" to="#a14" type="concepts" ana="#concepts[38]" resp="#paper" cert="0.99">FHIR outputs<term>FHIR outputs</term></span>
      <span xml:id="t63" from="#a13" to="#a14" type="concepts" ana="#concepts[39]" resp="#paper" cert="0.99">general patient population<term>general patient population</term></span>
      <span xml:id="t64" from="#a13" to="#a14" type="concepts" ana="#concepts[40]" resp="#paper" cert="0.99">ICU<term>ICU</term></span>
      <span xml:id="t65" from="#a15" to="#a16" type="concepts" ana="#concepts[41]" resp="#paper" cert="0.99">token<term>token</term></span>
      <span xml:id="t66" from="#a15" to="#a16" type="concepts" ana="#concepts[42]" resp="#paper" cert="0.99">single data element<term>single data element</term></span>
      <span xml:id="t67" from="#a15" to="#a16" type="concepts" ana="#concepts[43]" resp="#paper" cert="0.99">interquartile range<term>interquartile range</term></span>
      <span xml:id="t68" from="#a17" to="#a18" type="concepts" ana="#concepts[44]" resp="#paper" cert="0.99">inpatient mortality<term>inpatient mortality</term></span>
      <span xml:id="t69" from="#a17" to="#a18" type="concepts" ana="#concepts[45]" resp="#paper" cert="0.99">AUROC<term>AUROC</term></span>
      <span xml:id="t70" from="#a17" to="#a18" type="concepts" ana="#concepts[46]" resp="#paper" cert="0.99">augmented Early Warning Score<term>augmented Early Warning Score</term></span>
      <span xml:id="t71" from="#a17" to="#a18" type="concepts" ana="#concepts[47]" resp="#paper" cert="0.99">aEWS<term>aEWS</term></span>
      <span xml:id="t72" from="#a17" to="#a18" type="concepts" ana="#concepts[48]" resp="#paper" cert="0.99">28-factor logistic regression model<term>28-factor logistic regression model</term></span>
      <span xml:id="t73" from="#a19" to="#a20" type="concepts" ana="#concepts[49]" resp="#paper" cert="0.99">false alerts<term>false alerts</term></span>
      <span xml:id="t74" from="#a19" to="#a20" type="concepts" ana="#concepts[50]" resp="#paper" cert="0.99">work-up-to-detection ratio<term>work-up-to-detection ratio</term></span>
      <span xml:id="t75" from="#a19" to="#a20" type="concepts" ana="#concepts[51]" resp="#paper" cert="0.99">discrimination<term>discrimination</term></span>
      <span xml:id="t76" from="#a21" to="#a22" type="concepts" ana="#concepts[52]" resp="#paper" cert="0.99">unexpected readmissions within 30 days<term>unexpected readmissions within 30 days</term></span>
      <span xml:id="t77" from="#a21" to="#a22" type="concepts" ana="#concepts[53]" resp="#paper" cert="0.99">modified HOSPITAL<term>modified HOSPITAL</term></span>
      <span xml:id="t78" from="#a23" to="#a24" type="concepts" ana="#concepts[54]" resp="#paper" cert="0.99">long length of stay<term>long length of stay</term></span>
      <span xml:id="t79" from="#a23" to="#a24" type="concepts" ana="#concepts[55]" resp="#paper" cert="0.99">traditional predictive model (modified Liu)<term>traditional predictive model (modified Liu)</term></span>
      <span xml:id="t80" from="#a25" to="#a26" type="concepts" ana="#concepts[56]" resp="#paper" cert="0.99">attribution methods<term>attribution methods</term></span>
      <span xml:id="t81" from="#a25" to="#a26" type="concepts" ana="#concepts[57]" resp="#paper" cert="0.99">time-aware neural network models<term>time-aware neural network models</term></span>
      <span xml:id="t82" from="#a25" to="#a26" type="concepts" ana="#concepts[58]" resp="#paper" cert="0.99">discriminatory factors<term>discriminatory factors</term></span>
      <span xml:id="t83" from="#a27" to="#a28" type="concepts" ana="#concepts[59]" resp="#paper" cert="0.99">death<term>death</term></span>
      <span xml:id="t84" from="#a27" to="#a28" type="concepts" ana="#concepts[60]" resp="#paper" cert="0.99">readmissions<term>readmissions</term></span>
      <span xml:id="t85" from="#a27" to="#a28" type="concepts" ana="#concepts[61]" resp="#paper" cert="0.99">length of stay<term>length of stay</term></span>
      <span xml:id="t86" from="#a27" to="#a28" type="concepts" ana="#concepts[62]" resp="#paper" cert="0.99">diagnoses<term>diagnoses</term></span>
      <span xml:id="t87" from="#a29" to="#a30" type="concepts" ana="#concepts[63]" resp="#paper" cert="0.99">HOSPITAL score<term>HOSPITAL score</term></span>
      <span xml:id="t88" from="#a29" to="#a30" type="concepts" ana="#concepts[64]" resp="#paper" cert="0.99">NEWS 51 score<term>NEWS 51 score</term></span>
      <span xml:id="t89" from="#a29" to="#a30" type="concepts" ana="#concepts[65]" resp="#paper" cert="0.99">micro-F1 score<term>micro-F1 score</term></span>
      <span xml:id="t90" from="#a31" to="#a32" type="concepts" ana="#concepts[66]" resp="#paper" cert="0.99">hand-selection of variables<term>hand-selection of variables</term></span>
      <span xml:id="t91" from="#a31" to="#a32" type="concepts" ana="#concepts[67]" resp="#paper" cert="0.99">tens of thousands of predictors<term>tens of thousands of predictors</term></span>
      <span xml:id="t92" from="#a33" to="#a34" type="concepts" ana="#concepts[68]" resp="#paper" cert="0.99">retrospective study<term>retrospective study</term></span>
      <span xml:id="t93" from="#a33" to="#a34" type="concepts" ana="#concepts[69]" resp="#paper" cert="0.99">prospective trials<term>prospective trials</term></span>
      <span xml:id="t94" from="#a33" to="#a34" type="concepts" ana="#concepts[70]" resp="#paper" cert="0.99">transfer<term>transfer</term></span>
      <span xml:id="t95" from="#a33" to="#a34" type="concepts" ana="#concepts[71]" resp="#paper" cert="0.99">model architectures and training methods<term>model architectures and training methods</term></span>
      <span xml:id="t96" from="#a33" to="#a34" type="concepts" ana="#concepts[72]" resp="#paper" cert="0.99">specialized expertize<term>specialized expertize</term></span>
      <span xml:id="t97" from="#a35" to="#a36" type="concepts" ana="#concepts[73]" resp="#paper" cert="0.99">14,025 ICD-9 diagnosis codes<term>14,025 ICD-9 diagnosis codes</term></span>
      <span xml:id="t98" from="#a35" to="#a36" type="concepts" ana="#concepts[74]" resp="#paper" cert="0.99">random error<term>random error</term></span>
      <span xml:id="t99" from="#a35" to="#a36" type="concepts" ana="#concepts[75]" resp="#paper" cert="0.99">decision support<term>decision support</term></span>
      <span xml:id="t100" from="#a37" to="#a38" type="concepts" ana="#concepts[76]" resp="#paper" cert="0.99">free text<term>free text</term></span>
      <span xml:id="t101" from="#a37" to="#a38" type="concepts" ana="#concepts[77]" resp="#paper" cert="0.99">explainability of predictions<term>explainability of predictions</term></span>
      <span xml:id="t102" from="#a37" to="#a38" type="concepts" ana="#concepts[78]" resp="#paper" cert="0.99">opaqueness<term>opaqueness</term></span>
      <span xml:id="t103" from="#a37" to="#a38" type="concepts" ana="#concepts[79]" resp="#paper" cert="0.99">clinical utility<term>clinical utility</term></span>
      <span xml:id="t104" from="#a39" to="#a40" type="concepts" ana="#concepts[80]" resp="#paper" cert="0.99">patient demographics<term>patient demographics</term></span>
      <span xml:id="t105" from="#a39" to="#a40" type="concepts" ana="#concepts[81]" resp="#paper" cert="0.99">laboratory values<term>laboratory values</term></span>
      <span xml:id="t106" from="#a39" to="#a40" type="concepts" ana="#concepts[82]" resp="#paper" cert="0.99">encrypted, access-controlled, and audited sandbox<term>encrypted, access-controlled, and audited sandbox</term></span>
      <span xml:id="t107" from="#a41" to="#a42" type="concepts" ana="#concepts[83]" resp="#paper" cert="0.99">single data structure<term>single data structure</term></span>
      <span xml:id="t108" from="#a41" to="#a42" type="concepts" ana="#concepts[84]" resp="#paper" cert="0.99">temporal order<term>temporal order</term></span>
      <span xml:id="t109" from="#a41" to="#a42" type="concepts" ana="#concepts[85]" resp="#paper" cert="0.99">FHIR resource<term>FHIR resource</term></span>
      <span xml:id="t110" from="#a41" to="#a42" type="concepts" ana="#concepts[86]" resp="#paper" cert="0.99">personalized input<term>personalized input</term></span>
      <span xml:id="t111" from="#a43" to="#a44" type="concepts" ana="#concepts[87]" resp="#paper" cert="0.99">expired<term>expired</term></span>
      <span xml:id="t112" from="#a45" to="#a46" type="concepts" ana="#concepts[88]" resp="#paper" cert="0.99">admission within 30 days after discharge<term>admission within 30 days after discharge</term></span>
      <span xml:id="t113" from="#a47" to="#a48" type="concepts" ana="#concepts[89]" resp="#paper" cert="0.99">time between hospital admission and discharge<term>time between hospital admission and discharge</term></span>
      <span xml:id="t114" from="#a47" to="#a48" type="concepts" ana="#concepts[90]" resp="#paper" cert="0.99">length of stay at least 7 days<term>length of stay at least 7 days</term></span>
      <span xml:id="t115" from="#a49" to="#a50" type="concepts" ana="#concepts[91]" resp="#paper" cert="0.99">primary and secondary ICD-9 billing diagnoses<term>primary and secondary ICD-9 billing diagnoses</term></span>
      <span xml:id="t116" from="#a53" to="#a54" type="concepts" ana="#concepts[92]" resp="#paper" cert="0.99">real-time prediction system<term>real-time prediction system</term></span>
      <span xml:id="t117" from="#a55" to="#a56" type="concepts" ana="#concepts[93]" resp="#paper" cert="0.99">same modeling algorithm<term>same modeling algorithm</term></span>
      <span xml:id="t118" from="#a57" to="#a58" type="concepts" ana="#concepts[94]" resp="#paper" cert="0.99">recurrent neural networks<term>recurrent neural networks</term></span>
      <span xml:id="t119" from="#a57" to="#a58" type="concepts" ana="#concepts[95]" resp="#paper" cert="0.99">attention-based TANN<term>attention-based TANN</term></span>
      <span xml:id="t120" from="#a57" to="#a58" type="concepts" ana="#concepts[96]" resp="#paper" cert="0.99">boosted time-based decision stumps<term>boosted time-based decision stumps</term></span>
      <span xml:id="t121" from="#a57" to="#a58" type="concepts" ana="#concepts[97]" resp="#paper" cert="0.99">ensembling<term>ensembling</term></span>
      <span xml:id="t122" from="#a59" to="#a60" type="concepts" ana="#concepts[98]" resp="#paper" cert="0.99">baseline performance<term>baseline performance</term></span>
      <span xml:id="t123" from="#a61" to="#a62" type="concepts" ana="#concepts[99]" resp="#paper" cert="0.99">attribution mechanisms<term>attribution mechanisms</term></span>
      <span xml:id="t124" from="#a63" to="#a64" type="concepts" ana="#concepts[100]" resp="#paper" cert="0.99">development<term>development</term></span>
      <span xml:id="t125" from="#a63" to="#a64" type="concepts" ana="#concepts[101]" resp="#paper" cert="0.99">validation<term>validation</term></span>
      <span xml:id="t126" from="#a63" to="#a64" type="concepts" ana="#concepts[102]" resp="#paper" cert="0.99">test<term>test</term></span>
      <span xml:id="t127" from="#a63" to="#a64" type="concepts" ana="#concepts[103]" resp="#paper" cert="0.99">overfitting<term>overfitting</term></span>
      <span xml:id="t128" from="#a65" to="#a66" type="concepts" ana="#concepts[104]" resp="#paper" cert="0.99">model calibration<term>model calibration</term></span>
      <span xml:id="t129" from="#a65" to="#a66" type="concepts" ana="#concepts[105]" resp="#paper" cert="0.99">number needed to evaluate<term>number needed to evaluate</term></span>
      <span xml:id="t130" from="#a65" to="#a66" type="concepts" ana="#concepts[106]" resp="#paper" cert="0.99">F1 score<term>F1 score</term></span>
      <span xml:id="t131" from="#a67" to="#a68" type="concepts" ana="#concepts[107]" resp="#paper" cert="0.99">internal distributed computation platforms<term>internal distributed computation platforms</term></span>
      <span xml:id="t132" from="#a35" to="#a36" type="concepts" ana="#concepts[108]" resp="#paper" cert="0.99">clinically similar but numerically distinct<term>clinically similar but numerically distinct</term></span>
      <span xml:id="t133" from="#a65" to="#a66" type="concepts" ana="#concepts[109]" resp="#paper" cert="0.99">positive-predictive-value and sensitivity<term>positive-predictive-value and sensitivity</term></span>
      <span xml:id="t134" from="#a11" to="#a12" type="unhoused_relations" ana="#unhoused_relations[0]" resp="#tagger" cert="0.99">FHIR → flexible data structure<note>The article calls FHIR a flexible data structure for clinical data.</note></span>
      <span xml:id="t135" from="#a15" to="#a16" type="unhoused_relations" ana="#unhoused_relations[1]" resp="#tagger" cert="0.99">token → single data element<note>The article defines a token as a single EHR data element at a specific time.</note></span>
      <span xml:id="t136" from="#a1" to="#a2" type="unhoused_relations" ana="#unhoused_relations[2]" resp="#tagger" cert="0.99">deep learning methods → traditional, clinically-used predictive models<note>The deep-learning models outperformed traditional clinically used predictive models.</note></span>
      <span xml:id="t137" from="#a3" to="#a4" type="unhoused_relations" ana="#unhoused_relations[3]" resp="#tagger" cert="0.99">preprocessing, merging, customizing, and cleaning datasets → scalability of predictive models<note>Traditional preprocessing work profoundly limits predictive-model scalability.</note></span>
      <span xml:id="t138" from="#a5" to="#a6" type="unhoused_relations" ana="#unhoused_relations[4]" resp="#tagger" cert="0.99">false-positive predictions → alert fatigue<note>False-positive predictions can overwhelm providers with alarms and alert fatigue.</note></span>
      <span xml:id="t139" from="#a5" to="#a6" type="unhoused_relations" ana="#unhoused_relations[5]" resp="#tagger" cert="0.99">false-negative predictions → poor clinical outcomes<note>False-negative predictions can miss important events and lead to poor outcomes.</note></span>
      <span xml:id="t140" from="#a7" to="#a8" type="unhoused_relations" ana="#unhoused_relations[6]" resp="#tagger" cert="0.99">neural networks → key factors and interactions<note>Neural networks learn representations of key factors and interactions directly from the data.</note></span>
      <span xml:id="t141" from="#a11" to="#a12" type="unhoused_relations" ana="#unhoused_relations[7]" resp="#tagger" cert="0.99">FHIR → semantic consistency<note>FHIR does not ensure semantic consistency across sites.</note></span>
      <span xml:id="t142" from="#a13" to="#a14" type="unhoused_relations" ana="#unhoused_relations[8]" resp="#tagger" cert="0.99">generic data processing pipeline → multiple centers<note>The generic raw-EHR-to-FHIR pipeline makes deployment to a new hospital relatively easy.</note></span>
      <span xml:id="t143" from="#a19" to="#a20" type="unhoused_relations" ana="#unhoused_relations[9]" resp="#tagger" cert="0.99">deep learning methods → false alerts<note>The deep model roughly halved false-alert investigation burden relative to aEWS.</note></span>
      <span xml:id="t144" from="#a29" to="#a30" type="unhoused_relations" ana="#unhoused_relations[10]" resp="#tagger" cert="0.99">deep learning methods → baseline performance<note>Cross-study performance comparisons are difficult, so published baselines were reimplemented on the study data.</note></span>
      <span xml:id="t145" from="#a31" to="#a32" type="unhoused_relations" ana="#unhoused_relations[11]" resp="#tagger" cert="0.99">hand-selection of variables → deep learning methods<note>The model achieved performance without expert hand-selection and instead identified important predictors.</note></span>
      <span xml:id="t146" from="#a33" to="#a34" type="unhoused_relations" ana="#unhoused_relations[12]" resp="#tagger" cert="0.99">prospective trials → healthcare quality<note>Prospective trials are required before accurate prediction can be claimed to improve care.</note></span>
      <span xml:id="t147" from="#a33" to="#a34" type="unhoused_relations" ana="#unhoused_relations[13]" resp="#tagger" cert="0.99">site-specific data harmonization → transfer<note>Failure to harmonize data between sites limits cross-site transfer learning.</note></span>
      <span xml:id="t148" from="#a33" to="#a34" type="unhoused_relations" ana="#unhoused_relations[14]" resp="#tagger" cert="0.99">specialized expertize → deep learning methods<note>Model development is computationally intensive and currently requires specialized expertise.</note></span>
      <span xml:id="t149" from="#a37" to="#a38" type="unhoused_relations" ana="#unhoused_relations[15]" resp="#tagger" cert="0.99">free text → explainability of predictions<note>Using free text allows patient-level visualization of what information influenced a prediction.</note></span>
      <span xml:id="t150" from="#a37" to="#a38" type="unhoused_relations" ana="#unhoused_relations[16]" resp="#tagger" cert="0.99">attribution mechanisms → opaqueness<note>Attribution may address black-box distrust by highlighting influential patient data.</note></span>
      <span xml:id="t151" from="#a55" to="#a56" type="unhoused_relations" ana="#unhoused_relations[17]" resp="#tagger" cert="0.99">same modeling algorithm → multiple centers<note>The same algorithm was applied to each hospital while the hospitals remained separate datasets.</note></span>
      <span xml:id="t152" from="#a63" to="#a64" type="unhoused_relations" ana="#unhoused_relations[18]" resp="#tagger" cert="0.99">development → test<note>A hidden test split was withheld until final evaluation to prevent overfitting.</note></span>
      <span xml:id="t153" from="#a65" to="#a66" type="unhoused_relations" ana="#unhoused_relations[19]" resp="#tagger" cert="0.99">F1 score → positive-predictive-value and sensitivity<note>F1 is computed as the harmonic mean of positive predictive value and sensitivity.</note></span>
      <span xml:id="t154" from="#a67" to="#a68" type="unhoused_relations" ana="#unhoused_relations[20]" resp="#tagger" cert="0.99">internal distributed computation platforms → deep learning methods<note>Internal platform dependencies prevent reasonable sharing of training conversion and model code.</note></span>
      <span xml:id="t155" from="#a15" to="#a16" type="senses" ana="#senses[0]" resp="#tagger" cert="0.99">`token` means one EHR data element at one time point, and every token is a potential predictor</span>
      <span xml:id="t156" from="#a11" to="#a12" type="senses" ana="#senses[1]" resp="#tagger" cert="0.99">`FHIR` standardizes a hierarchical container and interchange format but does not ensure cross-site semantic consistency</span>
      <span xml:id="t157" from="#a33" to="#a34" type="senses" ana="#senses[2]" resp="#tagger" cert="0.99">`accurate prediction` is not equivalent to improved care; prospective trials are required for that clinical claim</span>
      <span xml:id="t158" from="#a45" to="#a46" type="senses" ana="#senses[3]" resp="#tagger" cert="0.99">`unplanned 30-day readmission` is restricted to a same-institution admission within thirty days of an eligible index discharge</span>
      <span xml:id="t159" from="#a47" to="#a48" type="senses" ana="#senses[4]" resp="#tagger" cert="0.99">`long length of stay` is a stay of at least seven days, with ordinary length of stay measured admission-to-discharge</span>
      <span xml:id="t160" from="#a65" to="#a66" type="senses" ana="#senses[5]" resp="#tagger" cert="0.99">`work-up-to-detection ratio` or `number needed to evaluate` expresses alert investigation burden at a fixed sensitivity</span>
      <span xml:id="t161" from="#a1" to="#a2" type="claim_relations" ana="#claim_relations[0]" resp="#tagger" cert="0.99">supports → a reusable raw-EHR/FHIR deep-learning pipeline for multiple clinical predictions at multiple centers<note>note: The abstract directly states and evaluates the proposed approach.</note></span>
      <span xml:id="t162" from="#a27" to="#a28" type="claim_relations" ana="#claim_relations[1]" resp="#tagger" cert="0.99">supports → deep-learning outperformance over clinical baseline models for mortality, readmission, and long stay<note>note: The discussion summarizes the multi-task performance result.</note></span>
      <span xml:id="t163" from="#a13" to="#a14" type="claim_relations" ana="#claim_relations[2]" resp="#tagger" cert="0.99">extends → EHR prediction from single-center curated features to full records across two general hospitals<note>note: The contribution identifies both processing and multi-hospital evaluation extensions.</note></span>
      <span xml:id="t164" from="#a33" to="#a34" type="claim_relations" ana="#claim_relations[3]" resp="#tagger" cert="0.99">qualifies → accurate predictions as not yet demonstrated to improve care<note>note: The authors explicitly require prospective trials.</note></span>
      <span xml:id="t165" from="#a33" to="#a34" type="claim_relations" ana="#claim_relations[4]" resp="#tagger" cert="0.99">qualifies → cross-site transfer because data are not semantically harmonized between hospitals<note>note: The stated design limits transfer learning.</note></span>
      <span xml:id="t166" from="#a37" to="#a38" type="claim_relations" ana="#claim_relations[5]" resp="#tagger" cert="0.99">supports → patient-level attribution as a proof of concept for prediction explanation<note>note: The case study is explicitly framed as proof of concept with further work required.</note></span>
      <span xml:id="t167" from="#a9" to="#a10" type="concept_edges" ana="#concept_edges[0]" resp="#tagger" cert="0.99">direct feature learning —contrasted-with→ structured predictors variables<note>the relation itself is separately evidenced · strength of the relation: 1 · note: Explicit rather-than workflow contrast. · the relation stated: Direct feature learning is used rather than explicit harmonization into curated structured predictors.</note><term>direct feature learning</term><term>structured predictors variables</term></span>
      <span xml:id="t168" from="#a43" to="#a44" type="concept_edges" ana="#concept_edges[1]" resp="#tagger" cert="0.99">inpatient mortality —operationalised-as→ expired<note>the relation itself is separately evidenced · strength of the relation: 1 · note: Exact operational definition. · the relation stated: Inpatient death is defined as an expired discharge disposition.
Audit 2026-09-28: DOUBTFUL - read against its full span and kept, but endpoint by anaphora: the section is headed &#x27;Inpatient mortality&#x27;; the span writes &#x27;inpatient death&#x27;.</note><term>inpatient mortality</term><term>expired</term></span>
      <span xml:id="t169" from="#a45" to="#a46" type="concept_edges" ana="#concept_edges[2]" resp="#tagger" cert="0.99">30-day unplanned readmission —operationalised-as→ admission within 30 days after discharge<note>the relation itself is separately evidenced · strength of the relation: 1 · note: Exact operational definition. · the relation stated: Unplanned readmission is defined as an admission within thirty days after discharge.
Audit 2026-09-28: DOUBTFUL - read against its full span and kept, but endpoint by anaphora: the section is headed &#x27;30-day unplanned readmission&#x27;.</note><term>30-day unplanned readmission</term><term>admission within 30 days after discharge</term></span>
      <span xml:id="t170" from="#a47" to="#a48" type="concept_edges" ana="#concept_edges[3]" resp="#tagger" cert="0.99">length of stay —operationalised-as→ time between hospital admission and discharge<note>the relation itself is separately evidenced · strength of the relation: 1 · note: Exact operational definition. · the relation stated: Length of stay is defined as time between admission and discharge.</note><term>length of stay</term><term>time between hospital admission and discharge</term></span>
      <span xml:id="t171" from="#a47" to="#a48" type="concept_edges" ana="#concept_edges[4]" resp="#tagger" cert="0.99">long length of stay —operationalised-as→ length of stay at least 7 days<note>the relation itself is separately evidenced · strength of the relation: 1 · note: Explicit threshold operationalization. · the relation stated: Long length of stay is measured as at least seven days.
Audit 2026-09-28: DOUBTFUL - read against its full span and kept, but endpoint by anaphora: the section is headed &#x27;Long length of stay&#x27;.</note><term>long length of stay</term><term>length of stay at least 7 days</term></span>
      <span xml:id="t172" from="#a65" to="#a66" type="concept_edges" ana="#concept_edges[5]" resp="#tagger" cert="0.99">work-up-to-detection ratio —same-as→ number needed to evaluate<note>the relation itself is separately evidenced · strength of the relation: 1 · note: Explicit also-known-as equivalence. · the relation stated: The work-up-to-detection ratio is also known as the number needed to evaluate.</note><term>work-up-to-detection ratio</term><term>number needed to evaluate</term></span>
      <span xml:id="t173" from="#a35" to="#a36" type="concept_edges" ana="#concept_edges[7]" resp="#tagger" cert="0.99">clinically similar but numerically distinct —causes→ random error<note>the relation itself is separately evidenced · strength of the relation: 0.95 · note: Flat stated effect; gradable. · the relation stated: Clinically similar but numerically distinct ICD codes introduce random error.</note><term>clinically similar but numerically distinct</term><term>random error</term></span>
    </spanGrp>
  </standOff>
  <text>
    <body>
        <p><anchor xml:id="a0"/> Scalable and accurate deep learning with electronic health records</p>
        <p>Abstract</p>
        <p><anchor xml:id="a1"/>Predictive modeling with electronic health record (EHR) data is anticipated to drive personalized medicine and improve healthcare quality. Constructing predictive statistical models typically requires extraction of curated predictor variables from normalized EHR data, a labor-intensive process that discards the vast majority of information in each patient’s record. We propose a representation of patients’ entire raw EHR records based on the Fast Healthcare Interoperability Resources (FHIR) format. We demonstrate that deep learning methods using this representation are capable of accurately predicting multiple medical events from multiple centers without site-specific data harmonization. We validated our approach using de-identified EHR data from two US academic medical centers with 216,221 adult patients hospitalized for at least 24 h. In the sequential format we propose, this volume of EHR data unrolled into a total of 46,864,534,945 data points, including clinical notes. Deep learning models achieved high accuracy for tasks such as predicting: in-hospital mortality (area under the receiver operator curve [AUROC] across sites 0.93–0.94), 30-day unplanned readmission (AUROC 0.75–0.76), prolonged length of stay (AUROC 0.85–0.86), and all of a patient’s final discharge diagnoses (frequency-weighted AUROC 0.90). These models outperformed traditional, clinically-used predictive models in all cases. We believe that this approach can be used to create accurate and scalable predictions for a variety of clinical scenarios. In a case study of a particular prediction, we demonstrate that neural networks can be used to identify relevant information from the patient’s chart.<anchor xml:id="a2"/></p>
        <p>Subject terms: Medical research, Machine learning</p>
        <p>Introduction</p>
        <p>The promise of digital medicine stems in part from the hope that, by digitizing health data, we might more easily leverage computer information systems to understand and improve care. In fact, routinely collected patient healthcare data are now approaching the genomic scale in volume and complexity. 1 Unfortunately, most of this information is not yet used in the sorts of predictive statistical models clinicians might use to improve care delivery. It is widely suspected that use of such efforts, if successful, could provide major benefits not only for patient safety and quality but also in reducing healthcare costs. 2 – 6</p>
        <p><anchor xml:id="a3"/>In spite of the richness and potential of available data, scaling the development of predictive models is difficult because, for traditional predictive modeling techniques, each outcome to be predicted requires the creation of a custom dataset with specific variables. 7 It is widely held that 80% of the effort in an analytic model is preprocessing, merging, customizing, and cleaning datasets, 8 , 9 not analyzing them for insights. This profoundly limits the scalability of predictive models.<anchor xml:id="a4"/></p>
        <p><anchor xml:id="a5"/>Another challenge is that the number of potential predictor variables in the electronic health record (EHR) may easily number in the thousands, particularly if free-text notes from doctors, nurses, and other providers are included. Traditional modeling approaches have dealt with this complexity simply by choosing a very limited number of commonly collected variables to consider. 7 This is problematic because the resulting models may produce imprecise predictions: false-positive predictions can overwhelm physicians, nurses, and other providers with false alarms and concomitant alert fatigue, 10 which the Joint Commission identified as a national patient safety priority in 2014. 11 False-negative predictions can miss significant numbers of clinically important events, leading to poor clinical outcomes. 11 , 12 Incorporating the entire EHR, including clinicians’ free-text notes, offers some hope of overcoming these shortcomings but is unwieldy for most predictive modeling techniques.<anchor xml:id="a6"/></p>
        <p><anchor xml:id="a7"/>Recent developments in deep learning and artificial neural networks may allow us to address many of these challenges and unlock the information in the EHR. Deep learning emerged as the preferred machine learning approach in machine perception problems ranging from computer vision to speech recognition, but has more recently proven useful in natural language processing, sequence prediction, and mixed modality data settings. 13 – 17 These systems are known for their ability to handle large volumes of relatively messy data, including errors in labels and large numbers of input variables. A key advantage is that investigators do not generally need to specify which potential predictor variables to consider and in what combinations; instead neural networks are able to learn representations of the key factors and interactions from the data itself.<anchor xml:id="a8"/></p>
        <p><anchor xml:id="a9"/>We hypothesized that these techniques would translate well to healthcare; specifically, deep learning approaches could incorporate the entire EHR, including free-text notes, to produce predictions for a wide range of clinical problems and outcomes that outperform state-of-the-art traditional predictive models. Our central insight was that rather than explicitly harmonizing EHR data, mapping it into a highly curated set of structured predictors variables and then feeding those variables into a statistical model, we could instead learn to simultaneously harmonize inputs and predict medical events through direct feature learning. 18<anchor xml:id="a10"/></p>
        <p>Related work</p>
        <p>The idea of using computer systems to learn from a “highly organized and recorded database” of clinical data has a long history. 19 Despite the rich data now digitized in EHRs, 20 a recent systematic review of the medical literature 7 found that predictive models built with EHR data use a median of only 27 variables, rely on traditional generalized linear models, and are built using data at a single center. In clinical practice, simpler models are most commonly deployed, such as the CURB-65, 21 , 22 which is a 5-factor model, or single-parameter warning scores. 23 , 24</p>
        <p>A major challenge in using more of the data available for each patient has been the lack of standards and semantic interoperability of health data from multiple sites. 25 A unique set of variables is typically selected for each new prediction task, and usually a labor-intensive 8 , 9 process is required to extract and normalize data from different sites. 26</p>
        <p>Significant prior research has focused on the scalability issue through time-consuming standardization of data in traditional relational databases, like the Observational Medical Outcomes Partnership standard defined by the Observational Health Data Sciences and Informatics consortium. 27 Such a standard allows for consistent development of predictive models across sites, but accommodates only a part of the original data.</p>
        <p><anchor xml:id="a11"/>Recently, a flexible data structure called FHIR (Fast Healthcare Interoperability Resources) 28 was developed to represent clinical data in a consistent, hierarchical, and extensible container format, regardless of the health system, which simplifies data interchange between sites. However, the format does not ensure semantic consistency, motivating the need for additional techniques to deal with unharmonized data.<anchor xml:id="a12"/></p>
        <p>The use of deep learning on EHR data burgeoned after adoption of EHRs 20 and development of deep learning methods. 13 In a well-known work, investigators used auto-encoders to predict a specific set of diagnoses. 29 Subsequent work extended this approach by modeling the temporal sequence of events that occurred in a patient’s record, which may enhance accuracy in scenarios that depend on the order of events, with convolutional and recurrent neural networks. 30 – 35 In general, prior work has focused on a subset of features available in the EHR, rather than on all data available in an EHR, which includes clinical free-text notes, as well as large amounts of structured and semi-structured data. Because of the availability of Medical Information Mart for Intensive Care (MIMIC) data, 36 many prior studies also have focused on ICU patients from a single center; 33 , 37 other single-center studies have also focused on ICU patients. 30 Each ICU patient has significantly more data available than each general hospital patient, although non-ICU admissions outnumber ICU admissions by about sixfold in the US. 38 , 39 Recently, investigators have also explored how interpretation mechanisms for deep learning models could be applied to clinical predictions. 33 Given rapid developments in this field, we point readers to a recent, comprehensive review. 40</p>
        <p><anchor xml:id="a13"/>Our contribution is twofold. First, we report a generic data processing pipeline that can take raw EHR data as input, and produce FHIR outputs without manual feature harmonization. This makes it relatively easy to deploy our system to a new hospital. Second, based on data from two academic hospitals with a general patient population (not restricted to ICU), we demonstrate the effectiveness of deep learning models in a wide variety of predictive problems and settings (e.g., multiple prediction timing). Ours is a comprehensive study of deep learning in a variety of prediction problems based on multiple general hospital data. We do note, however, that similar deep learning techniques have been applied to EHR data in prior research as described above.<anchor xml:id="a14"/></p>
        <p>Results</p>
        <p>We included a total of 216,221 hospitalizations involving 114,003 unique patients. The percent of hospitalizations with in-hospital deaths was 2.3% (4930/216,221), unplanned 30-day readmissions was 12.9% (27,918/216,221), and long length of stay was (23.9%). Patients had a range of 1–228 discharge diagnoses. The demographics and utilization characteristics are summarized in Table 1 . The median duration of patients’ records, calculated by the difference of the timestamps of last and first FHIR resource was 3.1 years in Hospital A and 3.6 years in Hospital B.</p>
        <p>Characteristics of hospitalizations in training and test sets</p>
        <p>At the time of admission, an average admission had 137,882 tokens (discrete pieces of data that we define in the methods section), which increased markedly throughout the patient’s stay to 216,744 at discharge (Fig. 1 ). For predictions made at discharge, the information considered across both datasets included 46,864,534,945 tokens of EHR data.</p>
        <p><anchor xml:id="a15"/>This boxplot displays the amount of data (on a log scale) in the EHR, along with its temporal variation across the course of an admission. We define a token as a single data element in the electronic health record, like a medication name, at a specific point in time. Each token is considered as a potential predictor by the deep learning model. The line within the boxplot represents the median, the box represents the interquartile range (IQR), and the whiskers are 1.5 times the IQR. The number of tokens increased steadily from admission to discharge. At discharge, the median number of tokens for Hospital A was 86,477 and for Hospital B was 122,961<anchor xml:id="a16"/></p>
        <p>Mortality</p>
        <p><anchor xml:id="a17"/>For predicting inpatient mortality, the area under the receiver operating characteristic curve (AUROC) at 24 h after admission was 0.95 (95% CI 0.94–0.96) for Hospital A and 0.93 (95% CI 0.92–0.94) for Hospital B. This was significantly more accurate than the traditional predictive model, the augmented Early Warning Score(aEWS) which was a 28-factor logistic regression model (AUROC 0.85 (95% CI 0.81–0.89) for Hospital A and 0.86 (95% CI 0.83–0.88) for Hospital B) (Table 2 ).<anchor xml:id="a18"/></p>
        <p>Prediction accuracy of each task made at different time points</p>
        <p><anchor xml:id="a19"/>If a clinical team had to investigate patients predicted to be at high risk of dying, the rate of false alerts at each point in time was roughly halved by our model: at 24 h, the work-up-to-detection ratio of our model compared to the aEWS was 7.4 vs 14.3 (Hospital A) and 8.0 vs 15.4 (Hospital B). Moreover, the deep learning model achieved higher discrimination at every prediction time-point compared to the baseline models. The deep learning model attained a similar level of accuracy at 24–48 h earlier than the traditional models (Fig. 2 ).<anchor xml:id="a20"/></p>
        <p>The area under the receiver operating characteristic curves are shown for predictions of inpatient mortality made by deep learning and baseline models at 12 h increments before and after hospital admission. For inpatient mortality, the deep learning model achieves higher discrimination at every prediction time compared to the baseline for both the University of California, San Francisco (UCSF) and University of Chicago Medicine (UCM) cohorts. Both models improve in the first 24 h, but the deep learning model achieves a similar level of accuracy approximately 24 h earlier for UCM and even 48 h earlier for UCSF. The error bars represent the bootstrapped 95% confidence interval</p>
        <p>Readmissions</p>
        <p><anchor xml:id="a21"/>For predicting unexpected readmissions within 30 days, the AUROCs at discharge were 0.77 (95% CI 0.75–0.78) for Hospital A and 0.76 (95% CI 0.75–0.77) for Hospital B. These were significantly higher than the traditional predictive model (modified HOSPITAL) at discharge, which were 0.70 (95% CI 0.68–0.72) for Hospital A and 0.68 (95% CI 0.67–0.69) for Hospital B.<anchor xml:id="a22"/></p>
        <p>Long length of stay</p>
        <p><anchor xml:id="a23"/>For predicting long length of stay, the AUROCs at 24 h after admission were 0.86 (95% CI 0.86–0.87) for Hospital A and 0.85 (95% CI 0.84–0.86) for Hospital B. These were significantly higher than those from the traditional predictive model (modified Liu) at 24 h, which were 0.76 (95% CI 0.75–0.77) for Hospital A and 0.74 (95% CI 0.73–0.75) for Hospital B.<anchor xml:id="a24"/></p>
        <p>Calibration curves for the three tasks are shown in Supplement.</p>
        <p>Inferring discharge diagnoses</p>
        <p>The deep learning algorithm predicted patients’ discharge diagnoses at three time points: at admission, after 24 h of hospitalization, and at the time of discharge (but before the discharge diagnoses were coded). For classifying all diagnosis codes, the weighted AUROCs at admission were 0.87 for Hospital A and 0.86 for Hospital B. Accuracy increased somewhat during the hospitalization, to 0.88–0.89 at 24 h and 0.90 for both hospitals at discharge. For classifying ICD-9 code predictions as correct, we required full-length code agreement. For example, 250.4 (“Diabetes with renal manifestations”) would be considered different from 250.42 (“Diabetes with renal manifestations, type II or unspecified type, uncontrolled”). We also calculated the micro-F1 scores at discharge, which were 0.41 (Hospital A) and 0.40 (Hospital B).</p>
        <p>Case study of model interpretation</p>
        <p><anchor xml:id="a25"/>In Fig. 3 , we illustrate an example of attribution methods on a specific prediction of inpatient mortality made at 24 h after admission. For this patient, the deep learning model predicted the risk of death of 19.9% and the aEWS model predicted 9.3%, and the patient ultimately died 10 days after admission. This patient’s record had 175,639 data points (tokens), which were considered by the model. The timeline in Fig. 3 highlights the elements to which the model attends, with a close-up view of the first 24 h of the most recent hospitalization. From all the data, the models picked the elements that are highlighted in Fig. 3 : evidence of malignant pleural effusions and empyema from notes, antibiotics administered, and nursing documentation of a high risk of pressure ulcers (i.e., Braden index 41 ). The model also placed high weights on concepts, such as “pleurx,” the trade name for a small chest tube. The bolded sections are exactly what the model identified as discriminatory factors, not a manual selection. In contrast, the top predictors for the baseline model (not shown in Fig. 3 ) were the values of the albumin, blood-urea-nitrogen, pulse, and white blood cell count. Note that for demonstration purposes, this example was generated from time-aware neural network models (TANNs) trained on separate modalities (e.g., flowsheets and notes), which is a common visualization technique to handle redundant features in the data (e.g., medication orders are also referenced in notes).<anchor xml:id="a26"/></p>
        <p>The patient record shows a woman with metastatic breast cancer with malignant pleural effusions and empyema. The patient timeline at the top of the figure contains circles for every time-step for which at least a single token exists for the patient, and the horizontal lines show the data type. There is a close-up view of the most recent data points immediately preceding a prediction made 24 h after admission. We trained models for each data type and highlighted in red the tokens which the models attended to—the non-highlighted text was not attended to but is shown for context. The models pick up features in the medications, nursing flowsheets, and clinical notes relevant to the prediction</p>
        <p>Discussion</p>
        <p><anchor xml:id="a27"/>A deep learning approach that incorporated the entire EHR, including free-text notes, produced predictions for a wide range of clinical problems and outcomes and outperformed traditional, clinically-used predictive models. Because we were interested in understanding whether deep learning could scale to produce valid predictions across divergent healthcare domains, we used a single data structure to make predictions for an important clinical outcome (death), a standard measure of quality of care (readmissions), a measure of resource utilization (length of stay), and a measure of understanding of a patient’s problems (diagnoses).<anchor xml:id="a28"/></p>
        <p>Second, using the entirety of a patient’s chart for every prediction does more than promote scalability, it exposes more data with which to make an accurate prediction. For predictions made at discharge, our deep learning models considered more than 46 billion pieces of EHR data and achieved more accurate predictions, earlier in the hospital stay, than did traditional models.</p>
        <p><anchor xml:id="a29"/>To the best of our knowledge, our models outperform existing EHR models in the medical literature for predicting mortality (0.92–0.94 vs 0.91), 42 unexpected readmission (0.75–0.76 vs 0.69), 43 and increased length of stay (0.85–0.86 vs 0.77). 44 Direct comparisons to other studies are difficult 45 because of different underlying study designs, 23 , 46 – 57 incomplete definitions of cohorts and outcomes, 58 , 59 restrictions on disease-specific cohorts 58 – 64 , or use of data unavailable in real-time. 63 , 65 , 66 Therefore, we implemented baselines based on the HOSPITAL score, 67 NEWS 51 score, and Liu’s model 44 on our data, and demonstrate strictly better performance. We are not aware of a study that predicts as many ICD codes as this study, but our micro-F1 score exceeds that shown on the smaller MIMIC-III dataset when predicting fewer diagnoses (0.40 vs 0.28). 68 The clinical impact of this improvement is suggested, for example, by the improvement of number needed to evaluate for inpatient mortality: the deep learning model would fire half the number of alerts of a traditional predictive model, resulting in many fewer false positives.<anchor xml:id="a30"/></p>
        <p><anchor xml:id="a31"/>However, the novelty of the approach does not lie simply in incremental model performance improvements. Rather, this predictive performance was achieved without hand-selection of variables deemed important by an expert, similar to other applications of deep learning to EHR data. Instead, our model had access to tens of thousands of predictors for each patient, including free-text notes, and identified which data were important for a particular prediction.<anchor xml:id="a32"/></p>
        <p><anchor xml:id="a33"/>Our study also has important limitations. First, it is a retrospective study, with all of the usual limitations. Second, although it is widely believed that accurate predictions can be used to improve care, 4 this is not a foregone conclusion and prospective trials are needed to demonstrate this. 69 , 70 Third, a necessary implication of personalized predictions is that they leverage many small data points specific to a particular EHR rather than a handful of common variables. Future research is needed to determine how models trained at one site can be best applied to another site, 71 which would be especially useful for sites with limited historical data for training. As a first step, we demonstrated that similar model architectures and training methods yielded comparable models for two geographically distinct health systems. Our current approach does not harmonize data between sites, which limits the model’s ability to “transfer” learn from one site to other sites and cohorts, and further research is needed. Moreover, our methods are computationally intensive and at present require specialized expertize to develop, but running the models on a new patient takes only a few milliseconds. The availability and accessibility of machine learning is also rapidly expanding both in healthcare and in other fields. Another limitation is that the current study focuses on predictive accuracy as a whole rather than incremental benefit of a given data type (e.g., clinical notes). We view understanding the incremental contribution of notes to predictive performance as an important area of future investigation, including identifying tasks and metrics where notes should have significant impact, testing different approaches to modeling the note terms, and understanding whether different portions of a note have different contributions to predictive accuracy. In the current study, we caution that the differences in AUROC across the two hospitals (one with and one without notes) cannot be ascribed to the presence or absence of notes given the difference in cohorts. 45<anchor xml:id="a34"/></p>
        <p><anchor xml:id="a35"/>Perhaps the most challenging prediction in our study is that of predicting a patient’s full suite of discharge diagnoses. The prediction is difficult for several reasons. First, a patient may have between 1 and 228 diagnoses, and the number is not known at the time of prediction. Second, each diagnosis may be selected from approximately 14,025 ICD-9 diagnosis codes, which makes the total number of possible combinations exponentially large. Finally, many ICD-9 codes are clinically similar but numerically distinct (e.g., 011.30 “Tuberculosis of bronchus, unspecified” vs 011.31 “Tuberculosis of bronchus, bacteriological or histological examination not done”). This has the effect of introducing random error into the prediction. The micro-F1 score, which is a metric used when a prediction has more than a single outcome (e.g., multiple diagnoses), for our model is higher than that reported in the literature in an ICU dataset with fewer diagnoses. 68 This is a proof-of-concept that demonstrates that the diagnosis could be inferred from routine EHR data, which could aid with triggering of decision support 68 , 72 or clinical trial recruitment.<anchor xml:id="a36"/></p>
        <p><anchor xml:id="a37"/>The use of free text for prediction allows a new level of explainability of predictions. Clinicians have historically distrusted neural network models because of their opaqueness. We demonstrate how our method can visualize what data the model “looked at” for each individual patient, which can be used by a clinician to determine if a prediction was based on credible facts, and potentially help decide actions. In our case study, the model identified elements of the patient’s history and radiology findings to render its prediction, which are critical data points that a clinician would also use. 73 This approach may address concerns that such “black box” methods are untrustworthy. However, there are other possible techniques for interpreting deep learning models. 33 , 74 We report the case study as a proof-of-concept drawn directly from our model architecture and data and emphasize that further research is needed regarding applicability to all predictions, the cognitive impact, and clinical utility.<anchor xml:id="a38"/></p>
        <p>Methods</p>
        <p>Datasets</p>
        <p><anchor xml:id="a39"/>We included EHR data from the University of California, San Francisco (UCSF) from 2012 to 2016, and the University of Chicago Medicine (UCM) from 2009 to 2016. We refer to each health system as Hospital A and Hospital B. All EHRs were de-identified, except that dates of service were maintained in the UCM dataset. Both datasets contained patient demographics, provider orders, diagnoses, procedures, medications, laboratory values, vital signs, and flowsheet data, which represent all other structured data elements (e.g., nursing flowsheets), from all inpatient and outpatient encounters. The UCM dataset additionally contained de-identified, free-text medical notes. Each dataset was kept in an encrypted, access-controlled, and audited sandbox.<anchor xml:id="a40"/></p>
        <p>Ethics review and institutional review boards approved the study with waiver of informed consent or exemption at each institution.</p>
        <p>Data representation and processing</p>
        <p><anchor xml:id="a41"/>We developed a single data structure that could be used for all predictions, rather than requiring custom, hand-created datasets for every new prediction. This approach represents the entire EHR in temporal order: data are organized by patient and by time. To represent events in a patient’s timeline, we adopted the FHIR standard. 75 FHIR defines the high-level representation of healthcare data in resources, but leaves values in each individual site’s idiosyncratic codings. 28 Each event is derived from a FHIR resource and may contain multiple attributes; for example, a medication-order resource could contain the trade name, generic name, ingredients, and others. Data in each attribute were split into discrete values, which we refer to as tokens. For notes, the text was split into a sequence of tokens, one for each word. Numeric values were normalized, as detailed in the supplement. The entire sequence of time-ordered tokens, from the beginning of a patient’s record until the point of prediction, formed the patient’s personalized input to the model. This process is illustrated in Fig. 4 , and further details of the FHIR representation and processing are provided in Supplementary Materials.<anchor xml:id="a42"/></p>
        <p>Data from each health system were mapped to an appropriate FHIR (Fast Healthcare Interoperability Resources) resource and placed in temporal order. This conversion did not harmonize or standardize the data from each health system other than map them to the appropriate resource. The deep learning model could use all data available prior to the point when the prediction was made. Therefore, each prediction, regardless of the task, used the same data</p>
        <p>Outcomes</p>
        <p>We were interested in understanding whether deep learning could produce valid predictions across wide range of clinical problems and outcomes. We therefore selected outcomes from divergent domains, including an important clinical outcome (death), a standard measure of quality of care (readmissions), a measure of resource utilization (length of stay), and a measure of understanding of a patient’s problems (diagnoses).</p>
        <p>Inpatient mortality</p>
        <p><anchor xml:id="a43"/>We predicted impending inpatient death, defined as a discharge disposition of “expired.” 42 , 46 , 48 , 49<anchor xml:id="a44"/></p>
        <p>30-day unplanned readmission</p>
        <p><anchor xml:id="a45"/>We predicted unplanned 30-day readmission, defined as an admission within 30 days after discharge from an “index” hospitalization. A hospitalization was considered a “readmission” if its admission date was within 30 days after discharge of an eligible index hospitalization. A readmission could only be counted once. There is no standard definition of “unplanned” 76 percentage, so we used a modified form of the Centers for Medicare and Medicaid Services definition, 77 which we detail in the supplement. Billing diagnoses and procedures from the index hospitalization were not used for the prediction because they are typically generated after discharge. We included only readmissions to the same institution.<anchor xml:id="a46"/></p>
        <p>Long length of stay</p>
        <p><anchor xml:id="a47"/>We predicted a length of stay at least 7 days, which was approximately the 75th percentile of hospital stays for most services across the datasets. The length of stay was defined as the time between hospital admission and discharge.<anchor xml:id="a48"/></p>
        <p>Diagnoses</p>
        <p><anchor xml:id="a49"/>We predicted the entire set of primary and secondary ICD-9 billing diagnoses from a universe of 14,025 codes.<anchor xml:id="a50"/></p>
        <p>Prediction timing</p>
        <p><anchor xml:id="a51"/>This was a retrospective study. To predict inpatient mortality, we stepped forward through each patient’s time course, and made predictions every 12 h starting 24 h before admission until 24 h after admission. Since many clinical prediction models, such as APACHE, 78 are rendered 24 h after admission, our primary outcome prediction for inpatient mortality was at that time-point. Unplanned readmission and the set of diagnosis codes were predicted at admission, 24 h after admission, and at discharge. The primary endpoints for those predictions were at discharge, when most readmission prediction scores are computed 79 and when all information necessary to assign billing diagnoses is available. Long length of stay was predicted at admission and 24 h after admission. For every prediction we used all information available in the EHR up to the time at which the prediction was made.<anchor xml:id="a52"/></p>
        <p>Study cohort</p>
        <p>We included all admissions for patients 18 years or older. We only included hospitalizations of 24 h or longer to ensure that predictions at various time points had identical cohorts.</p>
        <p><anchor xml:id="a53"/>To simulate the accuracy of a real-time prediction system, we included patients typically removed in studies of readmission, such as those discharged against medical advice, since these exclusion criteria would not be known when making predictions earlier in the hospitalization.<anchor xml:id="a54"/></p>
        <p>For predicting the ICD-9 diagnoses, we excluded encounters without any ICD-9 diagnosis (2–12% of encounters). These were generally encounters after October, 2015 when hospitals switched to ICD-10. We included such hospitalizations, however, for all other predictions.</p>
        <p>Algorithm development and analysis</p>
        <p><anchor xml:id="a55"/>We used the same modeling algorithm on both hospitals’ datasets, but treated each hospital as a separate dataset and reported results separately.<anchor xml:id="a56"/></p>
        <p><anchor xml:id="a57"/>Patient records vary significantly in length and density of data points (e.g., vital sign measurements in an intensive care unit vs outpatient clinic), so we formulated three deep learning neural network model architectures that take advantage of such data in different ways: one based on recurrent neural networks (long short-term memory (LSTM)), 80 one on an attention-based TANN, and one on a neural network with boosted time-based decision stumps. Details of these architectures are explained in the supplement. We trained each architecture (three different ones) on each task (four tasks) and multiple time points (e.g., before admission, at admission, 24 h after admission and at discharge), but the results of each architecture were combined using ensembling. 81<anchor xml:id="a58"/></p>
        <p>Comparison to previously published algorithms</p>
        <p><anchor xml:id="a59"/>We implemented models based on previously published algorithms to establish baseline performance on each dataset. For mortality, we used a logistic model with variables inspired by NEWS 51 score but added additional variables to make it more accurate, including the most recent systolic blood pressure, heart rate, respiratory rate, temperature, and 24 common lab tests, like the white blood cell count, lactate, and creatinine. We call this the augmented Early Warning Score, or aEWS, score. For readmission, we used a logistic model with variables used by the HOSPITAL 67 score, including the most recent sodium and hemoglobin level, hospital service, occurrence of CPT codes, number of prior hospitalizations, and length of the current hospitalization. We refer to this as the mHOSPITAL score. For long length of stay, we used a logistic model with variables similar to those used by Liu: 44 the age, gender, hierarchical condition categories, admission source, hospital service, and the same 24 common lab tests used in the aEWS score. We refer to this as the mLiu score. Details for these and additional baseline models are in the supplement. We are not aware of any commonly used baseline model for all diagnosis codes so we compare against known literature.<anchor xml:id="a60"/></p>
        <p>Explanation of predictions</p>
        <p><anchor xml:id="a61"/>A common criticism of neural networks is that they offer little insight into the factors that influence the prediction. 82 Therefore, we used attribution mechanisms to highlight, for each patient, the data elements that influenced their predictions. 83<anchor xml:id="a62"/></p>
        <p>The LSTM and TANN models were trained with TensorFlow and the boosting model was implemented with C++ code. Statistical analyses and baseline models were done in Scikit-learn Python. 84</p>
        <p>Technical details of the model architecture, training, variables, baseline models, and attribution methods are provided in the supplement.</p>
        <p>Model evaluation and statistical analysis</p>
        <p><anchor xml:id="a63"/>Patients were randomly split into development (80%), validation (10%), and test (10%) sets. Model accuracy is reported on the test set, and 1000 bootstrapped samples were used to calculate 95% confidence intervals. To prevent overfitting, the test set remained unused (and hidden) until final evaluation.<anchor xml:id="a64"/></p>
        <p><anchor xml:id="a65"/>We assessed model discrimination by calculating AUROC and model calibration using comparisons of predicted and empirical probability curves. 85 We did not use the Hosmer–Lemeshow test as it may be misleadingly significant with large sample sizes. 86 To quantify the potential clinical impact of an alert with 80% sensitivity, we report the work-up to detection ratio, also known as the number needed to evaluate. 87 For prediction of the a patient’s full set of diagnosis codes, which can range from 1 to 228 codes per hospitalization, we evaluated the accuracy for each class using macro-weighted-AUROC 88 and micro-weighted F1 score 89 to compare with the literature. The F1 score is the harmonic mean of positive-predictive-value and sensitivity; we used a single threshold picked on the validation set for all classes. We did not create confidence intervals for this task given the computational complexity of the number of possible diagnoses.<anchor xml:id="a66"/></p>
        <p>Data availability</p>
        <p>The datasets analysed during the current study are not publicly available: due to reasonable privacy and security concerns, the underlying EHR data are not easily redistributable to researchers other than those engaged in the Institutional Review Board-approved research collaborations with the named medical centers.</p>
        <p>Code availability</p>
        <p><anchor xml:id="a67"/>The FHIR format used in this work is available at https://github.com/google/fhir . The transformation of FHIR-formatted data to Tensorflow training examples and the models themselves depend on Google’s internal distributed computation platforms that cannot be reasonably shared. We have therefore emphasized detailed description of how our models were constructed and designed in our Methods section and Supplementary Materials.<anchor xml:id="a68"/></p>
        <p>Electronic supplementary material</p>
        <p>Supplementary Materials</p>
        <p>Acknowledgements</p>
        <p>For data acquisition and validation, we thank the following: Julie Johnson, Sharon Markman, Thomas Sutton, Brian Furner, Timothy Holper, Sharat Israni, Jeff Love, Doris Wong, Michael Halaas, and Juan Banda. For statistical consultation, we thank Farzan Rohani. For modeling infrastructure, we thank Daniel Hurt and Zhifeng Chen. For help with visualizing Figs. 1 and 3 , we thank Kaye Mao and Mahima Pushkarna. Each organization supported its work using internal funding.</p>
        <p>Author contributions</p>
        <p>A.R., E.O., and C.C. contributed with study design, data-cleaning, statistical analysis, interpretation of results, and drafted and revised the paper. K.C., A.M.D., N.H., P.J.L., X.L., M.S., P.S., H.Y., K.Z., and Y.Z. (ordered alphabetically) contributed with data processing, statistical analysis, machine learning, and revised the paper draft. G.E.D., K.L., A.M., J.T., D.W., J.W., and J.W. contributed with data infrastructure and processing and revised the paper draft. G.F., M.H., J.M., and J.I. contributed with data analysis and machine learning, and revised the paper draft. D.L., S.L.V. contributed with data collection, data analysis, and revised the paper draft. N.H.S. and A.J.B. contributed with study design, interpretation of results, and revised the paper draft. M.H. contributed with study design, interpretation of results, and drafted and revised the paper draft. K.C., M.P., and S.M. contributed with acquisition of data, and revised the paper draft. G.C. and J.D. contributed with study design, statistical analysis, machine learning, and revised the paper draft.</p>
        <p>Competing interests</p>
        <p>The authors declare no competing interests.</p>
        <p>Footnotes</p>
        <p>Electronic supplementary material</p>
        <p>Supplementary information accompanies the paper on the npj Digital Medicine website (10.1038/s41746-018-0029-1).</p>
        <p>References</p>
        <p>Associated Data</p>
        <p>Supplementary Materials</p>
        <p>Supplementary Materials</p>
        <p>Data Availability Statement</p>
        <p>The datasets analysed during the current study are not publicly available: due to reasonable privacy and security concerns, the underlying EHR data are not easily redistributable to researchers other than those engaged in the Institutional Review Board-approved research collaborations with the named medical centers.<anchor xml:id="a69"/></p>
    </body>
  </text>
</TEI>
