* Function `ab_from_text()` to retrieve antimicrobial drug names, doses and forms of administration from clinical texts in e.g. health care records, which also corrects for misspelling since it uses `as.ab()` internally
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <ahref="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 22 June 2020.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <ahref="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 09 July 2020.</p>
<spanclass="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<spanclass="co"># NOTE: Using column `date` as input for `col_date`.</span>
<spanclass="co"># NOTE: Using column `patient_id` as input for `col_patient_id`.</span></pre></body></html></div>
<p>So only 28.3% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>So only 28.5% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>For future use, the above two syntaxes can be shortened with the <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient N3, sorted on date:</p>
<p>We made a slight twist to the CLSI algorithm, to take into account the antimicrobial susceptibility profile. Have a look at all isolates of patient Y2, sorted on date:</p>
<tableclass="table">
<thead><trclass="header">
<thalign="center">isolate</th>
@ -507,19 +507,19 @@ Longest: 1</p>
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-03-10</td>
<tdalign="center">N3</td>
<tdalign="center">2010-03-16</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-05-11</td>
<tdalign="center">N3</td>
<tdalign="center">2010-08-04</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -529,19 +529,19 @@ Longest: 1</p>
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-05-17</td>
<tdalign="center">N3</td>
<tdalign="center">2010-10-06</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-05-18</td>
<tdalign="center">N3</td>
<tdalign="center">2010-11-11</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -551,43 +551,43 @@ Longest: 1</p>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-07-30</td>
<tdalign="center">N3</td>
<tdalign="center">2010-11-23</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-09-15</td>
<tdalign="center">N3</td>
<tdalign="center">2011-04-01</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">R</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-10-06</td>
<tdalign="center">N3</td>
<tdalign="center">2011-04-27</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2010-11-30</td>
<tdalign="center">N3</td>
<tdalign="center">2011-05-27</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -595,34 +595,35 @@ Longest: 1</p>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2011-01-27</td>
<tdalign="center">N3</td>
<tdalign="center">2011-07-05</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-01-30</td>
<tdalign="center">N3</td>
<tdalign="center">2011-09-25</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
</tbody>
</table>
<p>Only 1 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><ahref="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
<p>Only 2 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><ahref="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
<p>If a column exists with a name like ‘key(…)ab’ the <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> function will automatically use it and determine the first weighted isolates. Mind the NOTEs in below output:</p>
<spanclass="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<spanclass="co"># NOTE: more than one result was found for item 1: amoxicillin/clavulanic acid, azidocillin</span>
<spanclass="co"># NOTE: Using column `bacteria` as input for `col_mo`.</span>
<spanclass="co"># NOTE: Using column `date` as input for `col_date`.</span>
<spanclass="co"># NOTE: Using column `patient_id` as input for `col_patient_id`.</span>
@ -643,35 +644,35 @@ Longest: 1</p>
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-03-10</td>
<tdalign="center">N3</td>
<tdalign="center">2010-03-16</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-05-11</td>
<tdalign="center">N3</td>
<tdalign="center">2010-08-04</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-05-17</td>
<tdalign="center">N3</td>
<tdalign="center">2010-10-06</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
@ -679,23 +680,23 @@ Longest: 1</p>
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-05-18</td>
<tdalign="center">N3</td>
<tdalign="center">2010-11-11</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-07-30</td>
<tdalign="center">N3</td>
<tdalign="center">2010-11-23</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
@ -703,34 +704,34 @@ Longest: 1</p>
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-09-15</td>
<tdalign="center">N3</td>
<tdalign="center">2011-04-01</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">FALSE</td>
<tdalign="center">R</td>
<tdalign="center">TRUE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-10-06</td>
<tdalign="center">N3</td>
<tdalign="center">2011-04-27</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2010-11-30</td>
<tdalign="center">N3</td>
<tdalign="center">2011-05-27</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -739,11 +740,11 @@ Longest: 1</p>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2011-01-27</td>
<tdalign="center">N3</td>
<tdalign="center">2011-07-05</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">I</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
@ -751,29 +752,44 @@ Longest: 1</p>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2011-01-30</td>
<tdalign="center">N3</td>
<tdalign="center">2011-09-25</td>
<tdalign="center">Y2</td>
<tdalign="center">B_ESCHR_COLI</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
</tbody>
</table>
<p>Instead of 1, now 7 isolates are flagged. In total, 78.7% of all isolates are marked ‘first weighted’ - 50.4% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>Instead of 2, now 10 isolates are flagged. In total, 78.3% of all isolates are marked ‘first weighted’ - 49.8% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>As with <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code>, there’s a shortcut for this new algorithm too:</p>
<p>The functions <code><ahref="../reference/proportion.html">resistance()</a></code> and <code><ahref="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><ahref="../reference/proportion.html">proportion_S()</a></code>, <code><ahref="../reference/proportion.html">proportion_SI()</a></code>, <code><ahref="../reference/proportion.html">proportion_I()</a></code>, <code><ahref="../reference/proportion.html">proportion_IR()</a></code> and <code><ahref="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><ahref="../reference/proportion.html">proportion_R()</a></code>, equal to <code><ahref="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><ahref="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><ahref="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<p>Or can be used in conjuction with <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.