|pypi| |actions| |codecov| |downloads|
edc-lab
-------
Add to settings:
.. code-block:: python
INSTALLED_APPS = [
...
'edc_lab.apps.AppConfig',
...
]
Configuration
-------------
Create aliquot types:
.. code-block:: python
# aliquot types
wb = AliquotType(name='whole_blood', alpha_code='WB', numeric_code='02')
bc = AliquotType(name='buffy_coat', alpha_code='BC', numeric_code='16')
pl = AliquotType(name='plasma', alpha_code='PL', numeric_code='32')
Add possible derivatives to an aliquot type:
.. code-block:: python
# in this case, plasma and buffy coat are possible derivatives
wb.add_derivatives(pl, bc)
Set up a processing profile:
.. code-block:: python
viral_load = ProcessingProfile(
name='viral_load', aliquot_type=wb)
process_bc = Process(aliquot_type=bc, aliquot_count=4)
process_pl = Process(aliquot_type=pl, aliquot_count=2)
viral_load.add_processes(process_bc, process_pl)
Create a``panel`` that uses the processing profile:
.. code-block:: python
panel = RequisitionPanel(
name='Viral Load',
processing_profile=viral_load)
Add the panel (and others) to a lab profile:
.. code-block:: python
lab_profile = LabProfile(
name='lab_profile',
requisition_model='edc_lab.subjectrequisition')
lab_profile.add_panel(panel)
Register the ``lab_profile`` with the site global:
.. code-block:: python
site_labs.register(lab_profile)
Usage
-----
Create a requisition model instance:
.. code-block:: python
requisition = SubjectRequisition.objects.create(
subject_visit=self.subject_visit,
panel_name=self.panel.name,
is_drawn=YES)
Pass the requisition to ``Specimen``
.. code-block:: python
specimen = Specimen(requisition=requisition)
Process:
.. code-block:: python
specimen.process()
Aliquots have been created according to the configured processing profile:
.. code-block:: python
>>> specimen.primary_aliquot.identifier
'99900GV63F00000201'
>>> for aliquot in specimen.aliquots.order_by('count'):
print(aliquot.aliquot_identifier)
'99900GV63F00000201'
'99900GV63F02013202'
'99900GV63F02013203'
'99900GV63F02011604'
'99900GV63F02011605'
'99900GV63F02011606'
'99900GV63F02011607'
.. |pypi| image:: https://img.shields.io/pypi/v/edc-lab.svg
:target: https://pypi.python.org/pypi/edc-lab
.. |actions| image:: https://github.com/clinicedc/edc-lab/actions/workflows/build.yml/badge.svg
:target: https://github.com/clinicedc/edc-lab/actions/workflows/build.yml
.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-lab/branch/develop/graph/badge.svg
:target: https://codecov.io/gh/clinicedc/edc-lab
.. |downloads| image:: https://pepy.tech/badge/edc-lab
:target: https://pepy.tech/project/edc-lab
Raw data
{
"_id": null,
"home_page": "https://github.com/clinicedc/edc-lab",
"name": "edc-lab",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "django, edc, lab classes, clinicedc, clinical trials",
"author": "Erik van Widenfelt",
"author_email": "ew2789@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fe/a8/987f879c74de9793c1dae3981d92fc32cb16b15dac6e2df81e7edca7ccea/edc_lab-0.3.61.tar.gz",
"platform": null,
"description": "|pypi| |actions| |codecov| |downloads|\n\nedc-lab\n-------\n\nAdd to settings:\n\n.. code-block:: python\n\n INSTALLED_APPS = [\n ...\n 'edc_lab.apps.AppConfig',\n ...\n ]\n\nConfiguration\n-------------\n\nCreate aliquot types:\n\n.. code-block:: python\n\n # aliquot types\n wb = AliquotType(name='whole_blood', alpha_code='WB', numeric_code='02')\n bc = AliquotType(name='buffy_coat', alpha_code='BC', numeric_code='16')\n pl = AliquotType(name='plasma', alpha_code='PL', numeric_code='32')\n\nAdd possible derivatives to an aliquot type:\n\n.. code-block:: python\n\n # in this case, plasma and buffy coat are possible derivatives\n wb.add_derivatives(pl, bc)\n\nSet up a processing profile:\n\n.. code-block:: python\n\n viral_load = ProcessingProfile(\n name='viral_load', aliquot_type=wb)\n process_bc = Process(aliquot_type=bc, aliquot_count=4)\n process_pl = Process(aliquot_type=pl, aliquot_count=2)\n viral_load.add_processes(process_bc, process_pl)\n\nCreate a``panel`` that uses the processing profile:\n\n.. code-block:: python\n\n panel = RequisitionPanel(\n name='Viral Load',\n processing_profile=viral_load)\n\nAdd the panel (and others) to a lab profile:\n\n.. code-block:: python\n\n lab_profile = LabProfile(\n name='lab_profile',\n requisition_model='edc_lab.subjectrequisition')\n lab_profile.add_panel(panel)\n\nRegister the ``lab_profile`` with the site global:\n\n.. code-block:: python\n\n site_labs.register(lab_profile)\n\nUsage\n-----\n\nCreate a requisition model instance:\n\n.. code-block:: python\n\n requisition = SubjectRequisition.objects.create(\n subject_visit=self.subject_visit,\n panel_name=self.panel.name,\n is_drawn=YES)\n\nPass the requisition to ``Specimen``\n\n.. code-block:: python\n\n specimen = Specimen(requisition=requisition)\n\nProcess:\n\n.. code-block:: python\n\n specimen.process()\n\nAliquots have been created according to the configured processing profile:\n\n.. code-block:: python\n\n >>> specimen.primary_aliquot.identifier\n '99900GV63F00000201'\n\n >>> for aliquot in specimen.aliquots.order_by('count'):\n print(aliquot.aliquot_identifier)\n '99900GV63F00000201'\n '99900GV63F02013202'\n '99900GV63F02013203'\n '99900GV63F02011604'\n '99900GV63F02011605'\n '99900GV63F02011606'\n '99900GV63F02011607'\n\n\n.. |pypi| image:: https://img.shields.io/pypi/v/edc-lab.svg\n :target: https://pypi.python.org/pypi/edc-lab\n\n.. |actions| image:: https://github.com/clinicedc/edc-lab/actions/workflows/build.yml/badge.svg\n :target: https://github.com/clinicedc/edc-lab/actions/workflows/build.yml\n\n.. |codecov| image:: https://codecov.io/gh/clinicedc/edc-lab/branch/develop/graph/badge.svg\n :target: https://codecov.io/gh/clinicedc/edc-lab\n\n.. |downloads| image:: https://pepy.tech/badge/edc-lab\n :target: https://pepy.tech/project/edc-lab\n",
"bugtrack_url": null,
"license": "GPL license, see LICENSE",
"summary": "LIMS/lab classes for clinicedc/edc projects",
"version": "0.3.61",
"project_urls": {
"Homepage": "https://github.com/clinicedc/edc-lab"
},
"split_keywords": [
"django",
" edc",
" lab classes",
" clinicedc",
" clinical trials"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "13ff6ef8dd84e5704029c6b8e51d8a23ffce43f00646e74ed81d8fbc36d2424e",
"md5": "b9b56fc1300a358e39989581d2d4b783",
"sha256": "8b27e69eb205e77bcb4084beedf3e1c8eb09c1acdc023b19bab83b9058a28be2"
},
"downloads": -1,
"filename": "edc_lab-0.3.61-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b9b56fc1300a358e39989581d2d4b783",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 133134,
"upload_time": "2024-09-10T02:07:28",
"upload_time_iso_8601": "2024-09-10T02:07:28.651062Z",
"url": "https://files.pythonhosted.org/packages/13/ff/6ef8dd84e5704029c6b8e51d8a23ffce43f00646e74ed81d8fbc36d2424e/edc_lab-0.3.61-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fea8987f879c74de9793c1dae3981d92fc32cb16b15dac6e2df81e7edca7ccea",
"md5": "e8601d47c47b075fb1172a3f98193a74",
"sha256": "3c84dfe21ab3e68dce548a1c20c5a30ec071de17ad7a25c8920d94f5560fc883"
},
"downloads": -1,
"filename": "edc_lab-0.3.61.tar.gz",
"has_sig": false,
"md5_digest": "e8601d47c47b075fb1172a3f98193a74",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 82381,
"upload_time": "2024-09-10T02:07:30",
"upload_time_iso_8601": "2024-09-10T02:07:30.649167Z",
"url": "https://files.pythonhosted.org/packages/fe/a8/987f879c74de9793c1dae3981d92fc32cb16b15dac6e2df81e7edca7ccea/edc_lab-0.3.61.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-10 02:07:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "clinicedc",
"github_project": "edc-lab",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "edc-lab"
}