loinchpo.io package

Submodules

loinchpo.io.AnnotationParser module

loinchpo.io.ClinicalTableParser module

loinchpo.io.QueryFileParser module

loinchpo.io.Utility module

class loinchpo.io.Utility.Utility

Bases: object

A utility class for helping to parse LoincHpoAnnotation

This class contains static methods to validate or map fields relevant to a LoincHpoAnnotation file.

static check_all(loinc_id, outcome)

Checks both loinc_id, loinc_scale, outcome for consistency.

Based on observable negation values we return its boolean mapping.

Parameters:
  • loinc_id – A string loinc id

  • loinc_scale – A LoincScale enumeration

  • outcome – A string for the interpreted outcome for the loinc test

Raises:
static is_loinc_id(loinc_id)

Determines if the argument is a valid loinc id.

Parameters:

loinc_id – A string loinc id.

Returns:

Boolean if we are able to validate that string is similar to a loinc id (####-##)

static is_outcome(outcome)

Determines if the argument is a valid measure value.

Parameters:

outcome – An observed outcome for a loinc test.

Returns:

Boolean value is in allowed values for provided outcome.

static parse_outcome(outcome)

Module contents