Health-Informatics-UoN / Carrot-Mapper

Carrot: Convenient And Reusable Rapid Omop Transformer.
https://carrot4omop.ac.uk
MIT License
12 stars 3 forks source link

Automatic one to many mapping #619

Open PhilAppleby opened 5 months ago

PhilAppleby commented 5 months ago

Ability to map concept_id, value_as_concept_id, value_as_number to a single record

spco commented 5 months ago

Worked examples or links to such are required - we generally agreed we need to handle this in the move away from such a narrow Cohort Discovery focus. But developers will need a better understanding of the desired logic. May also require changes to the JSON format, and/or CaRROT-CDM to handle the outputs.

erummas commented 5 months ago

@spco Re: Automated 1:n Mapping-> I have added examples. We may have to discuss this further in detail and POA one to many Mapping concepts .docx

PhilAppleby commented 1 month ago

Additional json rules file lines in in the "value_as_concept_id" section:

             "FH: Cardiovascular disease 16974": {
                    "observation_concept_id": {
                          "source_table": "gs_cases_icd10.csv",
                          "source_field": "processed_code",
                          "term_mapping": {
                                "Z82.4": 4167217
                          }
                    },          
                    "observation_datetime": {
                          "source_table": "gs_cases_icd10.csv",
                          "source_field": "case_date"
                    },    
                    "value_as_concept_id": {
                          "source_table": "gs_cases_icd10.csv",
                          "source_field": "processed_code",
                          "term_mapping": {
                                "Z82.4": 134057
                          }
                    },
                    "observation_source_concept_id": {
                          "source_table": "gs_cases_icd10.csv",
                          "source_field": "processed_code",
                          "term_mapping": {
                                "Z82.4": 4167217
                          }
                    },    
                    "observation_source_value": {
                          "source_table": "gs_cases_icd10.csv",
                          "source_field": "processed_code"
                    },    
                    "person_id": {
                          "source_table": "gs_cases_icd10.csv",
                          "source_field": "id"
                    }     
              },