@@ -73,7 +73,7 @@ Once installed, you'll be ready to use the `acmc` tool along with the associated
...
@@ -73,7 +73,7 @@ Once installed, you'll be ready to use the `acmc` tool along with the associated
4.**Download and Install TRUD Resources**:
4.**Download and Install TRUD Resources**:
Run the following acmc command to download and process the TRUD resources:
Run the following `acmc` command to download and process the TRUD resources:
```bash
```bash
acmc trud install
acmc trud install
...
@@ -83,7 +83,7 @@ Once installed, you'll be ready to use the `acmc` tool along with the associated
...
@@ -83,7 +83,7 @@ Once installed, you'll be ready to use the `acmc` tool along with the associated
1.**Register with [OHDSI Athena](https://athena.ohdsi.org/auth/login)**
1.**Register with [OHDSI Athena](https://athena.ohdsi.org/auth/login)**
2.**Request download of vocabularies from [OHDSI Athena](https://athena.ohdsi.org/vocabulary/list)**
2.**Download vocabularies from [OHDSI Athena](https://athena.ohdsi.org/vocabulary/list)**
* Required vocabularies include:
* Required vocabularies include:
* 1) SNOMED
* 1) SNOMED
...
@@ -127,19 +127,100 @@ Please execute the following process:
...
@@ -127,19 +127,100 @@ Please execute the following process:
Load the unpacked files into the tables.
Load the unpacked files into the tables.
```
```
4.**Un-zip the downloaded OMOP files to a directory**
Download the OMOP file onto your computer and note the path to the file
Create a directory where you want the OMOP CSV tables to be stored, the default from the current working directory is `./build/omop`. Unzip the OMOP files into that directory
4.**Install OMOP vocabularies**
5.**Install OMOP vocabularies**
Run the following `acmc` command to create a local OMOP database from the OMOP zip file with a specific version:
Run the following acmc command to create a local OMOP database from the download:
```bash
```bash
acmc omop install -d <Directory path to extracted OMOP downloads> -v <release version from email>
acmc omop install -f <path to downloaded OMOP zip file> -v <release version from email>
```
```
Here's a well-structured **README.md** example with the series of steps you provided:
---
## **Example**
Follow these steps to initialize and manage a phenotype using `acmc`. In this example, we use a source concept code list for the Concept Set `Abdominal Pain` created from [ClinicalCodes.org](ClinicalCodes.org). The source concept codes are is read2. We genereate versioned phenotypes for read2 and then translate to snomed with a another version.
### **1. Initialize the Phenotype in the Workspace**
Use the followijng acmc command to initialize the phenotype in a local Git repository:
```bash
acmc phen init
```
### **2. Copy Example Medical Code Lists to the Phenotype Code Directory**
Copy medical code lists to the phenotype code directory:
```bash
cp-r ./examples/codes/* ./workspace/phen/codes
```
### **3. Copy the Example Phenotype Configuration Files**
Copy example phenotype configuration files (`.json`) to the phenotype directory:
```bash
cp-r ./examples/config.json ./workspace/phen
```
### **4. Validate the Phenotype Configuration**
Use the followijng acmc command to validate the phenotype configuration to ensure it's correct:
```bash
acmc phen validate
```
### **5. Generate Phenotype in Read2 Format**
Use the followijng acmc command to generate the phenotype in `read2` format:
### Running an example workflow
```bash
acmc phen map -t read2
```
### **6. Publish the Phenotype at an Initial Version**
Use the followijng acmc command to publish the phenotype at an initial version:
```bash
acmc phen publish
```
### **7. Generate Phenotype in SNOMED Format**
Generate the phenotype in `SNOMED` format:
```bash
acmc phen map -t snomed
```
### **8. Get a Copy of the Previous Version in the Repo**
Retrieve a copy of the previous version (`v1.0.3`) from the repository:
```bash
acmc phen copy -v v1.0.3
```
### **9. Compare the Previous Version `v1.0.3` with the Latest Version**
Compare the previous version (`v1.0.3`) with the latest version in the repository:
```bash
python acmc.py phen diff -old ./workspace/v1.0.3/
```
### **10. Publish the Phenotype at the Next Version**
Use the followijng acmc command to publish the phenotype at the next version:
The high level steps to use the tools are outlined below:
**1. Define concept sets:** A domain expert defines a list of [concept sets](#defining-concept-sets) for each observable characteristic of the phenotype using CSV file format (e.g., `PHEN_concept_sets.csv`).
**2. Define concept code lists for concept sets:** A domain expert defines [code lists](#defining-concept-codes) for each concept set within the phenotype using supported coding list formats and stores them in the `/src` directory.
**3. Define mapping from code lists to concept sets:** A domain expert defines a [phenotype mapping](#mapping-codes-to-concept-sets) that maps code lists to concept sets.
**4. Generate versioned phenotype coding lists and translations:** A domain expert or data engineer processes the phenotype mappings [using the command line tool](#usage) to validate against NHS TRUD-registered codes and mapping and to generate versioned concept set code lists with translations between coding standards.
### Supported Medical Coding Standards
The tool supports verification and mapping across diagnostic coding formats below:
-[**Read V2:**](https://digital.nhs.uk/services/terminology-and-classifications/read-codes) NHS clinical terminology standard used in primary care and replaced by SNOMED-CT in 2018; Still supported by some data providers as widely used in primary care, e.g. [SAIL Databank](https://saildatabank.com/)
-[**SNOMED-CT:**](https://icd.who.int/browse10/2019/en) international standard for clinical terminology for Electronic Healthcare Records adopted by the NHS in 2018; Mappings to Read codes are partially provided by [Clinical Research Practice Database (CPRD)](https://www.cprd.com/) and [NHS Technology Reference Update Distribution (TRUD)](https://isd.digital.nhs.uk/trud).
-[**ICD-10:**](https://icd.who.int/browse10/2019/en) International Classification of Diseases (ICD) is a medical classification list from the World Health Organization (WHO) and widely used in hospital settings, e.g. Hospital Episode Statistics (HES).
-[**ATC Codes:**](https://www.who.int/tools/atc-ddd-toolkit/atc-classification) Anatomical Therapeutic Chemical (ATC) Classification is a drug classification list from the World Health Organization (WHO)
## Notes
Processed resources will be saved in the `build/maps/processed/` directory.
*Note: NHS TRUD provides one-way mappings. To reverse mappings, duplicate the `.parquet` file and reverse the filename (e.g., `read2_code_to_snomed_code.parquet` to `snomed_code_to_read2_code.parquet`).*