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

# Module gmPathLab

source code

GNUmed measurements related business objects.

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

License: GPL

Classes
| cTestOrg Represents one test org/lab.
| cTestPanel Represents a grouping/listing of tests into a panel.
| cMetaTestType Represents one meta test type under which actual test types can be aggregated.
| 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
get_test_panels(order_by=None) | source code
create_test_panel(description=None) | source code
delete_test_panel(pk=None) | source code
create_meta_type(name=None, abbreviation=None, return_existing=False) | 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
get_test_results(pk_patient=None, encounters=None, episodes=None, order_by=None) | source code
get_most_recent_results_for_panel(pk_patient=None, pk_panel=None, order_by=None) | source code
get_result_at_timestamp(timestamp=None, test_type=None, loinc=None, tolerance_interval=None, patient=None) | source code
get_most_recent_results(test_type=None, loinc=None, no_of_results=1, patient=None) | source code
get_oldest_result(test_type=None, loinc=None, patient=None) | 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, show_year=True) | 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, gmCoding

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