Create Blank Concept Sets Load File
Source:R/manifest_conceptSets.R
createBlankConceptSetsLoadFile.RdCreates a blank conceptSetsLoad.csv template file in the specified folder with proper column structure. Users can fill this file manually in Excel, Google Sheets, or any text editor, then place it in the inputs/conceptSets folder.
Usage
createBlankConceptSetsLoadFile(
conceptSetsFolderPath = here::here("inputs/conceptSets")
)Arguments
- conceptSetsFolderPath
Character. Path where the blank file will be created. Defaults to "inputs/conceptSets". Creates the folder if it doesn't exist.
Details
Column Guide:
atlasId(numeric): The ATLAS concept set ID. Get this from ATLAS > Concept Setslabel(character): Display name for your concept set (e.g., "Hypertension diagnoses")category(character): Broad grouping category (e.g., "Cardiovascular", "Medications")subCategory(character): Optional sub-grouping within categorysourceCode(TRUE/FALSE): Whether this represents source codes (rarely TRUE for concept sets)domain(character): OMOP domain - must be one of:drug_exposure- medication concept setscondition_occurrence- diagnosis concept setsmeasurement- lab/measurement concept setsprocedure- procedure concept setsobservation- observation concept setsvisit_occurrence- visit type concept sets
file_name(character): Path to JSON file (e.g., "json/hypertension.json"). Note this is a placeholder will be replaced when you import from ATLAS.
Tips for Filling Out:
Each row represents one concept set
Use forward slashes (/) in file paths
Ensure file_name matches the JSON files you'll import from ATLAS
domain field is critical for vocabulary suggestions in extractSourceCodes()
Save as UTF-8 CSV when exporting from Excel to avoid encoding issues
Workflow:
Call this function to create blank template
Open conceptSetsLoad.csv in your preferred spreadsheet application
Fill in your concept set metadata
Save the file
Use
importAtlasConceptSets()to import the actual JSON definitions from ATLASUse
loadConceptSetManifest()to load into your study