<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//TaxonX//DTD Taxonomic Treatment Publishing DTD v0 20100105//EN" "../../nlm/tax-treatment-NS0.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tp="http://www.plazi.org/taxpub" article-type="research-article" dtd-version="3.0" xml:lang="en">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">109</journal-id>
      <journal-id journal-id-type="index">urn:lsid:arphahub.com:pub:3dc5f44e-8666-58db-bc76-a455210e8891</journal-id>
      <journal-title-group>
        <journal-title xml:lang="en">JUCS - Journal of Universal Computer Science</journal-title>
        <abbrev-journal-title xml:lang="en">jucs</abbrev-journal-title>
      </journal-title-group>
      <issn pub-type="ppub">0948-695X</issn>
      <issn pub-type="epub">0948-6968</issn>
      <publisher>
        <publisher-name>Journal of Universal Computer Science</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.3897/jucs.89923</article-id>
      <article-id pub-id-type="publisher-id">89923</article-id>
      <article-categories>
        <subj-group subj-group-type="heading">
          <subject>Research Article</subject>
        </subj-group>
        <subj-group subj-group-type="scientific_subject">
          <subject>I.2.6 - Learning</subject>
          <subject>I.2.7 - Natural Language Processing</subject>
          <subject>I.5.1 - Models</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Automatic assignment of diagnosis codes to free-form text medical note</article-title>
      </title-group>
      <contrib-group content-type="authors">
        <contrib contrib-type="author" corresp="no">
          <name name-style="western">
            <surname>Strydom</surname>
            <given-names>Stefan</given-names>
          </name>
          <uri content-type="orcid">https://orcid.org/0000-0003-4888-4397</uri>
          <xref ref-type="aff" rid="A1">1</xref>
        </contrib>
        <contrib contrib-type="author" corresp="yes">
          <name name-style="western">
            <surname>Dreyer</surname>
            <given-names>Andrei Michael</given-names>
          </name>
          <email xlink:type="simple">andrei.dreyer1997@gmail.com</email>
          <uri content-type="orcid">https://orcid.org/0000-0001-5597-5153</uri>
          <xref ref-type="aff" rid="A1">1</xref>
        </contrib>
        <contrib contrib-type="author" corresp="no">
          <name name-style="western">
            <surname>van der Merwe</surname>
            <given-names>Brink</given-names>
          </name>
          <xref ref-type="aff" rid="A1">1</xref>
        </contrib>
      </contrib-group>
      <aff id="A1">
        <label>1</label>
        <addr-line content-type="verbatim">Stellenbosch University, Stellenbosch, South Africa</addr-line>
        <institution>Stellenbosch University</institution>
        <addr-line content-type="city">Stellenbosch</addr-line>
        <country>South Africa</country>
      </aff>
      <author-notes>
        <fn fn-type="corresp">
          <p>Corresponding author: Andrei Michael Dreyer (<email xlink:type="simple">andrei.dreyer1997@gmail.com</email>).</p>
        </fn>
        <fn fn-type="edited-by">
          <p>Academic editor: </p>
        </fn>
      </author-notes>
      <pub-date pub-type="collection">
        <year>2023</year>
      </pub-date>
      <pub-date pub-type="epub">
        <day>28</day>
        <month>04</month>
        <year>2023</year>
      </pub-date>
      <volume>29</volume>
      <issue>4</issue>
      <fpage>349</fpage>
      <lpage>373</lpage>
      <uri content-type="arpha" xlink:href="http://openbiodiv.net/6480CCBD-E15F-52AE-B1EE-C4D0CA966949">6480CCBD-E15F-52AE-B1EE-C4D0CA966949</uri>
      <history>
        <date date-type="received">
          <day>04</day>
          <month>07</month>
          <year>2022</year>
        </date>
        <date date-type="accepted">
          <day>10</day>
          <month>01</month>
          <year>2023</year>
        </date>
      </history>
      <permissions>
        <copyright-statement>Stefan Strydom, Andrei Michael Dreyer, Brink van der Merwe</copyright-statement>
        <license license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by-nd/4.0/" xlink:type="simple">
          <license-p>This is an open access article distributed under the terms of the Creative Commons Attribution License (CC BY-ND 4.0). This license allows reusers to copy and distribute the material in any medium or format in unadapted form only, and only so long as attribution is given to the creator. The license allows for commercial use.</license-p>
        </license>
      </permissions>
      <abstract>
        <label>Abstract</label>
        <p>International Classification of Disease (ICD) coding plays a significant role in classify-ing morbidity and mortality rates. Currently, ICD codes are assigned to a patient’s medical record by hand by medical practitioners or specialist clinical coders. This practice is prone to errors, and training skilled clinical coders requires time and human resources. Automatic prediction of ICD codes can help alleviate this burden. In this paper, we propose a transformer-based architecture with label-wise attention for predicting ICD codes on a medical dataset. The transformer model is first pre-trained from scratch on a medical dataset. Once this is done, the pre-trained model is used to generate representations of the tokens in the clinical documents, which are fed into the label-wise attention layer. Finally, the outputs from the label-wise attention layer are fed into a feed-forward neural network to predict appropriate ICD codes for the input document. We evaluate our model using hospital discharge summaries and their corresponding ICD-9 codes from the MIMIC-III dataset. Our experimental results show that our transformer model outperforms all previous models in terms of micro-F1 for the full label set from the MIMIC-III dataset. This is also the first successful application of a pre-trained transformer architecture to the auto-coding problem on the full MIMIC-III dataset.</p>
      </abstract>
    </article-meta>
  </front>
</article>
