Package: cwmed
Crosswalk MedicalIntroductionCrosswalk medical faciliates the conversion of clinical terminology between two different coding systems. This enables seemless data exchange, integration and interoperability between different healthcare information systems, overcoming barries imposed by disparate coding systems.Documentation and UsageCrosswalk medical is a Python package to assist the semantic interoperability when federating clinical databases. The objective of the package is to guide the crosswalk from one standard source vocabulary to a target vocabulary by defining concepts and utilizing semantic relationships avaliable via downloadable source and target dictionaries onAthenathat capture associations between two different concepts.SeeDownloading Source and Target Vocabulariessection for downloading source and target vocabularies.SeeInstallationsection for package installation.Seedemo.ipynbnotebook file for example use cases.InstallationThe distribution is hosted on PyPI at:https://pypi.python.org/pypi/. The package can be directly installed from PyPI using pip:pipinstallcwmedDownloading Source and Target VocabulariesRegister onAthena, log in, and select the desired source and target vocabularies for download.A link will be sent to your registered email to enable the download of a ZIP file that will include these dependencies:CONCEPT.csv: This dictionary contains the relation between concept_code and concept_id.CONCEPT_RELATIONSHIP.csv: This dictionary contains the relationships between the different `concept_id(s). We will use the "Maps to" type of relation to translate codes between dictionaries.
These files are dictionaries that need to be stored in the same folder as the python notebook.Few examaples of downloadable vocabularies avaliable on Athena:LOINC	-	Logical Observation Identifiers Names and Codes (Regenstrief Institute)SNOMED	-	Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)NDC	-	National Drug Code (FDA and manufacturers)RxNorm Extension	-	RxNorm Extension (OHDSI)RxNorm	-	RxNorm (NLM)ICD10CM	-	International Classification of Diseases, Tenth Revision, Clinical Modification (NCHS)ICD9CM	-	International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)ICD9Proc	-	International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 3 (NCHS)CPT4	-	Current Procedural Terminology version 4 (AMA)OMOP Extension	-	OMOP Extension (OHDSI)Crosswalk Medical RecipeDefinitions:concept_code: code from the source vocabulary that represents one concept.
Example: For the concept  (0.5 ML Fondaparinux sodium 5 MG/ML Prefilled Syringe [Arixtra] the concept_code for NDC is: 00007323001concept_id: code fromOMOPthat corresponds to a concept_code.
Example: For concept (0.5 ML Fondaparinux sodium 5 MG/ML Prefilled Syringe [Arixtra] the concept_id corresponding to concept_code 00007323001 is 44838028.Every concept_code has a relatedconcept_id. Theconcept_codedoes not converge to aconcept_id: For the same concept(amoxicillin 250mg Oral Capsule), there will be different OMOP codes(concept_id) one for each vocabulary. Thoseconcept_id(s) are related in the dictionary concept_relationship.DRUGVOCABconcept_codeconcept_idamoxicillin 250 MG Oral CapsuleRX NORM30818219073183amoxicillin 250 MG Oral CapsuleNDC4442038643858035231Everyconcept_codehas a differentconcept_ideven though they represent the same concept in the real world. In the above table, the same drug has two differentconcept_codes for each vocabulary and also a differentconcept_id.Use CaseUse Case: Translate [amoxicillin 250 MG Oral Capsule] from RxNorm code to NDC code.Step 1:
Translate the source code to the OMOP code.
CONCEPT_CODE(SOURCE CODE)--  CONCEPT  --> CONCEPT_ID(OMOP CODE)VOCABconcept_code (RX NORM)concept_idRX NORM30818219073183Step 2:
Use the concept_relationship dictionary to relate theconcept_idobtained from step 1 and map it to the target vocabularyconcept_id.CONCEPT_ID_1(OMOP CODE FROM SOURCE VOCAB) --> CONCEPT_RELATIONSHIP --> CONCEPT_ID_2(OMOP CODE FROM TARGET VOCAB)source concept_id is concept_id_1 and target concept_id is concept_id_2concept_id_1concept_id_21907318344420386Step 3:
Use the new concept_id_2  to obtain theconcept_codeof the target vocabulary.CONCEPT_ID_2(OMOP CODE FROM TARGET VOCAB) -->CONCEPT--> CONCEPT_CODE(TARGET CODE)VOCABconcept_idconcept_code (NDC)NDC4442038643858035231