Skip to main content

Utilities for health informatics

Project description

HIUTILS

A collection of utilities for health informatics

This is pre-alpha, anything might change, i.e. not ready for production use.

Application areas

Text annotation / NLP

Ontologies

Knowledge graphs

Statistics / summary data

Installation

pip install hiutils

Annotations

Overview

We assume that annotations are in the format:

{
	document_id: {
		entities: {
			entitiy_id: {
				...properties...,
				cui : "concept_id",
				meta_anns: {
					'meta_ann_name': {'value': 'meta_ann_value',
					'confidence': confidence,
					'name': 'meta_ann_name'},
					...other meta...
				}
			}
		}

	}
}

Basic process

The aim is to:

  1. keep only some annotations based on context
  2. convert from document->concepts to patient->concepts
  3. limit to a subset of concepts relevant to our project
  4. group some specific concepts into more general concepts e.g. specific subtypes of a disease -> any occurence of a that disease

To achieve these aims:

  • 1 filter by meta_anns:
filtered = hi.annotations.filter_anns_meta(anns, {'Subject': ['Other']}, inplace=False)
  • 2 aggregate to patient level
agg = hi.annotations.aggregate_docs(filtered, item2doc=pt2doc)
  • 3+4 group relevant concepts and drop other concepts
groups = {'Group 1': set(['286933003', '70582006']), 'My other group': set(['60046008'])}
merged = hi.merge_concepts(agg, groups, keep_empty=False)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hiutils-0.2.2.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

hiutils-0.2.2-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page