Package Gnumed :: Package business :: Module gmPathLab |
[frames] | no frames]

# Module gmPathLab

source code

GNUmed measurements related business objects.

Version: $Revision: 1.81 $

Author: K.Hilbert <Karsten.Hilbert@gmx.net>

License: GPL

Classes
| cTestOrg Represents one test org/lab.
| cMetaTestType Represents one meta test type under which actual test types can be aggregated.
| cUnifiedTestType Represents one unified test type.
| cMeasurementType Represents one test result type.
| cTestResult Represents one test result.
| cLabResult Represents one lab result.
| cLabRequest Represents one lab request.

Functions
create_test_org(name=None, comment=None, pk_org_unit=None) | source code
delete_test_org(test_org=None) | source code
get_test_orgs(order_by=`u'``unit``'`) | source code
delete_meta_type(meta_type=None) | source code
get_meta_test_types() | source code
get_measurement_types(order_by=None) | source code
find_measurement_type(lab=None, abbrev=None, name=None) | source code
delete_measurement_type(measurement_type=None) | source code
create_measurement_type(lab=None, abbrev=None, unit=None, name=None) Create or get test type. | source code
delete_test_result(result=None) | source code
create_test_result(encounter=None, episode=None, type=None, intended_reviewer=None, val_num=None, val_alpha=None, unit=None) | source code
format_test_results(results=None, output_format=`u'``latex``'`) | source code
export_results_for_gnuplot(results=None, filename=None) | source code
create_lab_request(lab=None, req_id=None, pat_id=None, encounter_id=None, episode_id=None) Create or get lab request. | source code
create_lab_result(patient_id=None, when_field=None, when=None, test_type=None, val_num=None, val_alpha=None, unit=None, encounter_id=None, request=None) | source code
get_unreviewed_results(limit=50) | source code
get_pending_requests(limit=250) | source code
get_next_request_ID(lab=None, incrementor_func=None) Get logically next request ID for given lab. | source code
calculate_bmi(mass=None, height=None, age=None) Calculate BMI. | source code

Variables
| __package__ = ``'``Gnumed.business``'``

Imports: types, sys, logging, codecs, decimal, gmDateTime, gmExceptions, gmBusinessDBObject, gmPG2, gmTools, gmDispatcher, gmHooks, gmOrganization

Function Details

### create_lab_request(lab=None, req_id=None, pat_id=None, encounter_id=None, episode_id=None) | source code
    Create or get lab request.

    returns tuple (status, value):
            (True, lab request instance)
            (False, error message)
            (None, housekeeping_todo primary key)

### get_next_request_ID(lab=None, incrementor_func=None) | source code
    Get logically next request ID for given lab.

    - incrementor_func:
      - if not supplied the next ID is guessed
      - if supplied it is applied to the most recently used ID

### calculate_bmi(mass=None, height=None, age=None) | source code
    Calculate BMI.

    mass: kg
    height: cm
    age: not yet used

    returns:
            (True/False, data)
            True: data = (bmi, lower_normal, upper_normal)
            False: data = error message