package
1.0.0
Repository: https://github.com/ldsec/medco-loader.git
Documentation: pkg.go.dev

# Functions

ConceptDimensionFromString generates a ConceptDimension struct from a parsed line of a .csv file.
ConceptDimensionSensitiveToCSVText writes the tagging information of a concept of the concept_dimension table in a way that can be added to a .csv file - "","","", etc.
ConvertClearLocalTable converts the old xxxx.csv local ontology file.
ConvertConceptDimension converts the old concept_dimension.csv file.
ConvertLocalOntology reads and parses all local ontology tables and generates the corresponding .csv(s) (local, medco and adapter_mappings).
ConvertObservationFact converts the old observation.csv file.
ConvertPatientDimension converts the old patient_dimension.csv file If emtpy is set to true all other data except the patient_num and encrypted_dummy_flag are set to empty.
ConvertSensitiveLocalTable generates the sensitive_tagged file.
ConvertTableAccess converts the old xxxx.csv table_access file.
ConvertVisitDimension converts the old visit_dimension.csv file.
EncryptAndTag encrypts the elements and tags them to allow for the future comparison.
GenerateLoadingDataScript creates a load dataset .sql script (deletes the data in the corresponding tables and reloads the new 'protected' data).
GenerateMedCoOntology generates all files for the medco ontology (these may include multiples tables).
HasSensitiveParents is a function that checks if a node whether in the LocalOntology or ConceptDimension has any siblings which are sensitive.
LoadDataFiles executes the loading script for the new converted data.
LoadI2B2Data it's the main function that performs a full conversion and loading of the I2B2 data.
LocalOntologyFromString generates a LocalOntology struct from a parsed line of a .csv file.
LocalOntologySensitiveConceptToCSVText writes the tagging information of a concept of the local ontology in a way that can be added to a .csv file - "","","", etc.
MedCoOntologyFromLocalConcept generates a MedCoOntology struct from LocalOntology struct.
ObservationFactFromString generates a ObservationFact struct from a parsed line of a .csv file.
ParseConceptDimension reads and parses the concept_dimension.csv.
ParseDummyToPatient reads and parses the dummy_to_patient.csv.
ParseLocalTable reads and parses the xxxx.csv (part of the local ontology) The medco ontology is also generated based on the local ontology.
ParseObservationFact reads and parses the observation_fact_old.csv.
ParsePatientDimension reads and parses the patient_dimension.csv.
ParseTableAccess reads and parses the table_access.csv.
ParseVisitDimension reads and parses the visit_dimension.csv.
PatientDimensionFromString generates a PatientDimension struct from a parsed line of a .csv file.
StripByLevel strips the concept path based on /.
TableAccessFromString generates a TableAccess struct from a parsed line of a .csv file.
UpdateChildrenEncryptIDs updates the parent and internal concept nodes with the IDs of their respective children (name identifies the name of the ontology table).
VisitDimensionFromString generates a VisitDimension struct from a parsed line of a .csv file.

# Constants

Header is a generic XML header suitable for use with the output of Marshal.
I2B2DEMODATA path to i2b2demodata schema.
I2B2METADATA path to i2b2metadata schema.
ONT path to medco_ont schema.

# Variables

AllSensitive is a flag that defines whether all concepts are to be considered sensitive or not (-allSens flag).
DefaultDataPath is the default path for the data folder.
The different paths and handlers for all the files both for input and/or output.
HeaderConceptDimension contains all the headers for the concept_dimension table.
HeaderLocalOntology contains all the headers for the i2b2 table.
HeaderMedCoOntology contains all the headers for the medco table.
HeaderObservationFact contains all the headers for the observation_fact table.
HeaderPatientDimension contains all the headers for the Patient_Dimension table.
HeaderTableAccess contains all the headers for the table_access table.
HeaderVisitDimension contains all the headers for the visit_dimension table.
IDConcepts used to assign IDs (NodeEncryptIDs) to be encrypted to the different concepts.
The different paths and handlers for all the files both for input and/or output.
ListConceptsToIgnore lists concepts that appear in the concept_dimension and not in the ontology (which is kind of strange).
ListSensitiveConcepts list all sensitive concepts (paths) - MedCo and LOCAL (the bool is for nothing).
MapConceptCodeToTag maps the concept code (in the concept dimension) to the tag ID value (for the sensitive terms).
MapConceptPathToTag maps a sensitive concept path to its respective tag and tag_id.
MapDummyObs maps dummies to the observation of the original patients they are related too.
MapNewEncounterNum maps [old_patient_num old_encounter_num] -> [new_patient_num new_encounter_num].
MapNewPatientNum keeps track of the mapping between the old patient_num and the new one.
MapPatientObs maps patients to their observations.
MapPatientVisits maps a patient_num to all its encounter_nums.
MaxVisits keeps track of the maximum number of visits of all the patients.
The different paths and handlers for all the files both for input and/or output.
The different paths and handlers for all the files both for input and/or output.
TableConceptDimension is concept_dimension table.
TableDummyToPatient contains all dummies and the original patient that is associated with them.
TableLocalOntologyClear is the local ontology table (it maps the concept path to a concept) with only the NON_SENSITIVE concepts (it INCLUDES MODIFIER NON-SENSITIVE concepts).
TableObservationFact is observation_fact table.
TablePatientDimension is patient_dimension table.
TablesMedCoOntology distinguishes between the different medco ontology tables.
TableTableAccess is the table that contains all data from the table_access table.
TableVisitDimension is visit_dimension table.
TagIDConceptsUsed used to keep track of the number of TAG_IDs that have been used.
testing environment.
TextSearchIndex counter used to fill up the last column of observation_fact table.

# Structs

AdministrativeColumns are a set of columns that exist in every i2b2 table.
CodeID is a struct that contains both concept code and concept path.
ConceptDimension table contains one row for each concept.
ConceptDimensionPK is the primary key of the Concept_Dimension table.
FileInfo contains the tablename where the .csv should be loaded and the output path.
Files is the object structure behind the files.toml.
LocalOntology is the table that contains all concept codes from the local ontology (i2b2).
MedCoOntology is the table that contains all concept codes from the medco ontology.
MedCoTableInfo stores all the 'data' for a specific medco ontology table.
ObservationFact is the fact table of the CRC-I2B2 start schema.
ObservationFactPK is the primary key of ObservationFact.
OptionalFields table contains the optional fields.
PatientDimension table represents a patient in the database.
PatientDimensionPK is the primary key of the Patient_Dimension table.
TableAccess is the struct that represents each row of the table_access table.
TagAndID is a struct that contains both Tag and TagID for a concept or modifier.
VisitDimension table represents a visit in the database.
VisitDimensionPK is the primary key of the visit_dimension table.