Skip to content

Commit 73e9e31

Browse files
committed
update mb: apply MBORRES correct label & populate cultured BE samples BELNKID
Co-authored-by: Fanny Gautier <157114584+Fanny-Gautier@users.noreply.github.com>
1 parent c698f5e commit 73e9e31

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

R/mb.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' \item{MBTESTCD}{Microbiology Test or Finding Short Name}
2323
#' \item{MBTEST}{Microbiology Test or Finding Name}
2424
#' \item{MBTSTDTL}{Measurement, Test or Examination Detail}
25-
#' \item{MBORRES}{Original Result}
25+
#' \item{MBORRES}{Result or Finding in Original Units}
2626
#' \item{MBORRESU}{Original Units}
2727
#' \item{MBRSLSCL}{Result Scale}
2828
#' \item{MBSTRESC}{Result or Finding in Standard Format}

data-raw/mb.R

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ ms_naat_result <- function(ab, ab_resistance = FALSE) {
233233
# Data Structure: study_microb_data ----
234234
# Nested list defining for a study each of the process steps:
235235
# - Patient studied
236-
# - Specimen collected
237-
# - Specimen aliquots
238-
# - Aliquots cultured
239-
# - Microbiology tests (MB) performed on the cultured aliquot
240-
# - Susceptibility tests (MS) performed on the cultured aliquot
236+
# - Specimen collected
237+
# - Specimen aliquots
238+
# - Aliquots cultured
239+
# - Microbiology tests (MB) performed on the cultured aliquot
240+
# - Susceptibility tests (MS) performed on the cultured aliquot
241241
#
242242
# Each level contains the relevant information to create the SDTM domains:
243243
# - BE: specimen collection and aliquoting events
@@ -725,7 +725,8 @@ for (subj_ix in seq_along(study_microb_data)) {
725725
),
726726
be_collection %>% mutate(
727727
BESEQ = beseq,
728-
BEREFID = culture_id,
728+
BEREFID = aliquot_id,
729+
BELNKID = culture_id,
729730
BETERM = "Culturing",
730731
BECAT = "CULTURE",
731732
BESTDTC = bestdtc_cult,
@@ -831,7 +832,7 @@ mb <- mb %>%
831832
MBTESTCD = "Microbiology Test or Finding Short Name",
832833
MBTEST = "Microbiology Test or Finding Name",
833834
MBTSTDTL = "Measurement, Test or Examination Detail",
834-
MBORRES = "Original Result",
835+
MBORRES = "Result or Finding in Original Units",
835836
MBORRESU = "Original Units",
836837
MBRSLSCL = "Result Scale",
837838
MBSTRESC = "Result or Finding in Standard Format",

data/mb.rda

-7 Bytes
Binary file not shown.

man/mb.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)