Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
dd96ad3
add MS domain example (ms.R)
Gero1999 Dec 20, 2025
596cdc0
add ms.rda
Gero1999 Dec 20, 2025
4aca7dd
ms: order columns and add labels
Gero1999 Dec 20, 2025
093edc4
fix: env issues ms.R
Gero1999 Dec 20, 2025
a0fb2ff
ms: limit samples, treatments and change units
Gero1999 Dec 20, 2025
e719e91
mb: define MB domain based on MS domain info (ms)
Gero1999 Dec 21, 2025
ec70bf8
mb: define labels
Gero1999 Dec 21, 2025
317b96d
ms & mb: refine REFID and GRPID, rm from ms NHOID (organism)
Gero1999 Dec 21, 2025
03f890d
mb: remake domain defining organisms and samples
Gero1999 Dec 21, 2025
23a228c
ms: derive MS domain from MB domain (mb.R)
Gero1999 Dec 21, 2025
66ab626
ms: derive MS domain from MB domain (mb.R)
Gero1999 Dec 21, 2025
0c428d8
create a common source of truth for BE, MB and MS domains
Gero1999 Dec 24, 2025
6fd98da
use nested list and looping to create be, mb, and ms
Gero1999 Dec 25, 2025
2addb33
refactor: standardize funs, loop & list
Gero1999 Dec 25, 2025
21e2c23
fix: typo MSORRES
Gero1999 Dec 25, 2025
fcd4ce7
arrange metadata final preparation in 3 files: mb.R, ms.R, be.R
Gero1999 Dec 26, 2025
915fd20
run files and add metadata to /data (mb, be, ms)
Gero1999 Dec 26, 2025
b9093d4
specs.json: add as "microbiology" therapeutic area for MB, MS and BE
Gero1999 Dec 26, 2025
3923c90
codeowners: add datasets mb, ms, be in "others"
Gero1999 Dec 26, 2025
38d1e73
style_file: ms.R, mb.R
Gero1999 Dec 26, 2025
b1ca4ab
run create_sdtms_data.R: generates be, mb, ms docs
Gero1999 Dec 26, 2025
e8c1c8e
run create_sdtms_data.R: unexpected udpated files (dm_neuro, nv_neuro)
Gero1999 Dec 26, 2025
2872fb1
news: inform of new microbiology datasets
Gero1999 Dec 26, 2025
4b21746
rm: unneded R file
Gero1999 Dec 26, 2025
42c4229
Merge branch 'main' into 217-add-mb-ms-be
Gero1999 Dec 26, 2025
55a8e35
spelling: correct mispelling (Measuremet -> Measurement)
Gero1999 Dec 26, 2025
e0d65d9
spelling: update WORDLIST
Gero1999 Dec 26, 2025
de745d6
fix: potential issue with styler
Gero1999 Dec 26, 2025
1f3eaad
styler: fix check using last pkg version
Gero1999 Dec 26, 2025
f293d42
Merge branch 'main' into 217-add-mb-ms-be
Fanny-Gautier Jan 5, 2026
574abeb
Apply suggestions from code review
Gero1999 Jan 6, 2026
763c93f
apply suggestions to mb.R & update ms data/documentation
Gero1999 Jan 6, 2026
04d34ad
change comments style based on admiraldev style guide
Gero1999 Jan 6, 2026
785d5ac
use STUDYID & USUBJIDs from pharmaversesdtm::dm
Gero1999 Jan 6, 2026
2e34909
fix: mispelling Micoba(c)terium, add to WORDLIST & space with styler
Gero1999 Jan 6, 2026
c698f5e
Merge branch 'main' into 217-add-mb-ms-be
Fanny-Gautier Jan 19, 2026
73e9e31
update mb: apply MBORRES correct label & populate cultured BE samples…
Gero1999 Jan 20, 2026
062c3b1
Add Microbiology Datasets section to pkgdown
Gero1999 Jan 21, 2026
c5bb3f0
mv "Microbiology Datasets" after "Metabolism Datasets" in _pkgdown.yml
Gero1999 Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ data-raw/nv_neuro.R @jwang-lilly
data-raw/suppnv_neuro.R @jwang-lilly
data-raw/ag_neuro.R @jwang-lilly
data-raw/lb_neuro.R @jackychen651

# microbiology
data-raw/be.R @Gero1999
data-raw/mb.R @Gero1999
data-raw/ms.R @Gero1999
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

- Added the Lumipulse G pTau217, β-Amyloid 1-42 Plasma and their Ratio in `lb_neuro`. (#211)

- Added Microbiology (`mb`), Susceptibility (`ms`) and Biospecimen Events (`be`) SDTM linked datasets. (#217)

## Documentation

- The reference page has been updated to categorize datasets by therapeutic areas. (#204)
Expand Down
31 changes: 31 additions & 0 deletions R/be.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is automatically generated by data-raw/create_sdtms_data.R.
# For updating it please edit inst/extdata/sdtms-specs.json and rerun create_sdtms_data.R.
# Manual edits are not recommended, as changes may be overwritten.
#' Biospecimen Events
#'
#' A synthetic SDTM BE domain representing specimen collection, aliquoting, and culturing events, with linkage to MB and MS domains
#'
#' @name be
#' @title Biospecimen Events
#' @keywords dataset microbiology
#' @description A synthetic SDTM BE domain representing specimen collection, aliquoting, and culturing events, with linkage to MB and MS domains
#' @docType data
#' @format A data frame with 13 columns:
#' \describe{
#' \item{STUDYID}{Study Identifier}
#' \item{DOMAIN}{Domain Abbreviation}
#' \item{USUBJID}{Unique Subject Identifier}
#' \item{BESEQ}{Sequence Number}
#' \item{BEREFID}{Reference ID}
#' \item{BELNKID}{Link Identifier}
#' \item{BETERM}{Reported Term for the Biospecimen Event}
#' \item{BECAT}{Category for Biospecimen Event}
#' \item{BELOC}{Anatomical Location of Event}
#' \item{VISITNUM}{Visit Number}
#' \item{BEDTC}{Date/Time of Specimen Collection}
#' \item{BESTDTC}{Start Date/Time of Biospecimen Event}
#' \item{BEENDTC}{End Date/Time of Biospecimen Event}
#' }
#'
#' @source [Access the source of the Biospecimen Events dataset.](https://github.com/pharmaverse/pharmaversesdtm/blob/main/data/be.rda)
"be"
49 changes: 49 additions & 0 deletions R/mb.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This file is automatically generated by data-raw/create_sdtms_data.R.
# For updating it please edit inst/extdata/sdtms-specs.json and rerun create_sdtms_data.R.
# Manual edits are not recommended, as changes may be overwritten.
#' Microbiology Specimen
#'
#' A synthetic SDTM MB domain representing microbiology findings and linkage to MS domain (ms)
#'
#' @name mb
#' @title Microbiology Specimen
#' @keywords dataset microbiology
#' @description A synthetic SDTM MB domain representing microbiology findings and linkage to MS domain (ms)
#' @docType data
#' @format A data frame with 21 columns:
#' \describe{
#' \item{STUDYID}{Study Identifier}
#' \item{DOMAIN}{Domain Abbreviation}
#' \item{USUBJID}{Unique Subject Identifier}
#' \item{MBSEQ}{Sequence Number}
#' \item{MBGRPID}{Group ID}
#' \item{MBREFID}{Reference ID}
#' \item{MBLNKGRP}{Link Group ID}
#' \item{MBTESTCD}{Microbiology Test or Finding Short Name}
#' \item{MBTEST}{Microbiology Test or Finding Name}
#' \item{MBTSTDTL}{Measurement, Test or Examination Detail}
#' \item{MBORRES}{Result or Finding in Original Units}
#' \item{MBORRESU}{Original Units}
#' \item{MBRSLSCL}{Result Scale}
#' \item{MBSTRESC}{Result or Finding in Standard Format}
#' \item{MBSTRESN}{Numeric Result/Finding in Standard Units}
#' \item{MBSTRESU}{Standard Units}
#' \item{MBSPEC}{Specimen Material Type}
#' \item{MBLOC}{Specimen Collection Location}
#' \item{MBMETHOD}{Method of Test or Examination}
#' \item{VISITNUM}{Visit Number}
#' \item{MBDTC}{Date/Time of Collection}
#' }
#'
#' @source [Access the source of the Microbiology Specimen dataset.](https://github.com/pharmaverse/pharmaversesdtm/blob/main/data/mb.rda)
#' @details Contains a set of 6 unique Test Short Names and Test Names: \tabular{ll}{
#' \strong{MBTESTCD} \tab \strong{MBTEST} \cr
#' GMNCOC \tab Gram Negative Cocci \cr
#' GNROD \tab Gram Negative Rods \cr
#' GPRCOC \tab Gram Positive Cocci \cr
#' MCCOLCNT \tab Colony Count \cr
#' MCORGIDN \tab Microbial Organism Identification \cr
#' MTBCMPLX \tab Mycobacterium tuberculosis complex
#' }

"mb"
48 changes: 48 additions & 0 deletions R/ms.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This file is automatically generated by data-raw/create_sdtms_data.R.
# For updating it please edit inst/extdata/sdtms-specs.json and rerun create_sdtms_data.R.
# Manual edits are not recommended, as changes may be overwritten.
#' Microbiology Susceptibility
#'
#' A synthetic SDTM MS domain with susceptibility results and linkage to MB domain (mb)
#'
#' @name ms
#' @title Microbiology Susceptibility
#' @keywords dataset microbiology
#' @description A synthetic SDTM MS domain with susceptibility results and linkage to MB domain (mb)
#' @docType data
#' @format A data frame with 23 columns:
#' \describe{
#' \item{STUDYID}{Study Identifier}
#' \item{DOMAIN}{Domain Abbreviation}
#' \item{USUBJID}{Unique Subject Identifier}
#' \item{MSSEQ}{Sequence Number}
#' \item{MSREFID}{Reference ID}
#' \item{NHOID}{Non-host Organism ID}
#' \item{MSGRPID}{Group ID}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move MSGRPID before MSREFID

#' \item{MSLNKID}{Link ID}
#' \item{MSTESTCD}{Short Name of Assessment}
#' \item{MSTEST}{Name of Assessment}
#' \item{MSAGENT}{Agent Name}
#' \item{MSCONC}{Agent Concentration}
#' \item{MSCONCU}{Agent Concentration Units}
#' \item{MSORRES}{Result or Finding in Original Units}
#' \item{MSORRESU}{Original Units}
#' \item{MSSTRESC}{Result or Finding in Standard Format}
#' \item{MSSTRESN}{Numeric Result/Finding in Standard Units}
#' \item{MSSTRESU}{Standard Units}
#' \item{MSSPEC}{Specimen Material Type}
#' \item{MSLOC}{Location Used for the Measurement}
#' \item{MSMETHOD}{Method of Test or Examination}
#' \item{VISITNUM}{Visit Number}
#' \item{MSDTC}{Date/Time of Collection}
#' }
#'
#' @source [Access the source of the Microbiology Susceptibility dataset.](https://github.com/pharmaverse/pharmaversesdtm/blob/main/data/ms.rda)
#' @details Contains a set of 3 unique Test Short Names and Test Names: \tabular{ll}{
#' \strong{MSTESTCD} \tab \strong{MSTEST} \cr
#' DIAZOINH \tab Diameter of the Zone of Inhibition\cr
#' MIC \tab Minimum Inhibitory Concentration \cr
#' MICROSUS \tab Microbial Susceptibility
#' }

"ms"
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ reference:
contents:
- has_keyword("metabolic")

- title: "Microbiology Datasets"
contents:
- has_keyword("microbiology")

- title: "Neurology Datasets"
contents:
- has_keyword("neurology")
Expand Down
47 changes: 47 additions & 0 deletions data-raw/be.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This file only processes and saves the BE domain from that shared data source.
# Dataset: BE
# A synthetic SDTM BE domain representing specimen collection, aliquoting
# and culturing events with linkage to Microbiology Specimen (mb) and Microbiology Susceptibility (ms) domains

# NOTE: To add or modify records in the BE domain, you must edit the data structure in 'mb.R'.
# All synthetic microbiology data (patients, specimens, results) are defined in 'mb.R'.

# Source microbiology synthetic data
source("data-raw/mb.R")

be <- be %>%
# Order columns
select(
STUDYID,
DOMAIN,
USUBJID,
BESEQ,
BEREFID,
BELNKID,
BETERM,
BECAT,
BELOC,
VISITNUM,
BEDTC,
BESTDTC,
BEENDTC
) %>%
# Label columns (as per CDISC SDTM v3.4)
set_variable_labels(
STUDYID = "Study Identifier",
DOMAIN = "Domain Abbreviation",
USUBJID = "Unique Subject Identifier",
BESEQ = "Sequence Number",
BEREFID = "Reference ID",
BELNKID = "Link Identifier",
BETERM = "Reported Term for the Biospecimen Event",
BECAT = "Category for Biospecimen Event",
BELOC = "Anatomical Location of Event",
VISITNUM = "Visit Number",
BEDTC = "Date/Time of Specimen Collection",
BESTDTC = "Start Date/Time of Biospecimen Event",
BEENDTC = "End Date/Time of Biospecimen Event"
)

# Save dataset
usethis::use_data(be, overwrite = TRUE, internal = FALSE)
Loading
Loading