Skip to content

DenisKoether/json-diagnosis-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

JSON Data Processing Script

This repository contains a Python script designed to process JSON files for specific data extraction and transformation tasks. It groups data related to medical diagnosis classifications and outputs the result in a structured JSON format.

Features

  • Reads and processes JSON data from the current directory.
  • Extracts information based on specified keys such as tumor_classification and Diagnose ICD-10.
  • Groups data into main categories and subcategories.
  • Generates an organized JSON output file named output.json.

Requirements

  • Python 3.x

Usage

  1. Place a JSON file in the script's directory.
  2. Run the script:
    python script_name.py
  3. The processed data will be saved in a file named output.json in the same directory.

Output Structure

The output JSON file contains:

  • Main categories with keys and descriptions.
  • Subcategories nested under each main category.

Example structure:

{
  "subgroup": [
    {
      "key": "main_key.%",
      "name": "main_key.%",
      "description": "description",
      "subgroup": [
        { "key": "sub_key", "name": "sub_name", "description": "sub_description" },
        { "visibility": "false", "key": "main_key", "name": "main_key", "description": "" }
      ]
    }
  ]
}

Error Handling

  • If no JSON file is found in the directory, the script will raise an error.
  • If relevant data is not found, a message will be printed indicating the absence of Diagnose ICD-10 data.

Notes

  • Ensure that the input JSON file contains a structure compatible with the script’s requirements.
  • Modify the script as needed to fit different data formats or extraction needs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages