Skip to main content

A Django app to communicate with Swedish Labportalen. Suitable with eRemiss <= 3.1.0

Project description

django-labportalen is a Django app to communicate with swedish Labportalen service. Suitable till eRemiss version 3.1.0.

Features

  • Configure several analyses for different health checks.

  • Create remiss for a patient against a health check type.

  • Fetch analyses reports from SFTP server.

Quick start

  1. Install django-labportalen like this:

    pip install django-labportalen
  2. Add “labportalen” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'labportalen',
    ]
  3. Include the labportalen URLconf in your project urls.py like this:

    path('labportalen/', include('labportalen.urls')),
  4. Run python manage.py migrate to create the labportalen models.

  5. Configure LABPORTALEN_SETTINGS with required values in your project’s settings.py:

    LABPORTALEN_SETTINGS = {
    'base_dir': BASE_DIR,                        ## -> project's base directory: (required for all services)
    'sftp_host': env('SFTP_HOSTNAME'),           ## -> SFTP server where XML reports will be uploaded: (required to use SFTP service)
    'sftp_username': env('SFTP_USERNAME'),       ## -> SFTP server where XML reports will be uploaded: (required to use SFTP service)
    'sftp_password': env('SFTP_PASSWORD'),       ## -> SFTP server where XML reports will be uploaded: (required to use SFTP service)
    'sftp_file_prefix': env('SFTP_FILE_PREFIX'), ## -> SFTP server where XML reports will be uploaded: (required to use SFTP service)
    'production_env_name': 'PRODUCTION',         ## -> production server name: (required for all services)
    'current_env_name': 'DEV',                   ## -> current server name where this code base is going to be executed: (required for all services)
    'soap_service_wsdl_url': env('SERVICE_URL'), ## -> WSDL url where remiss creation request will be posted: (required to use remiss creation service)
    'customer_code': env('CUSTOMER_CODE'),       ## -> customer code provided by labportalen: (required to use remiss creation service)
    'requnitcode': env('REQUNITCODE'),           ## -> requnitcode provided by labportalen: (required to use remiss creation service)
    'company_name': env('COMPANY_NAME'),         ## -> company name provided by labportalen: (required to use remiss creation service)
    'contact_person': env('CONTACT_PERSON'),     ## -> contact person name provided by labportalen: (required to use remiss creation service)
    'user_guid': os.environ.get('USER_GUID',''), ## -> user guid provided by labportalen: (optional)
    'department_id': env('DEPARTMENTID'),        ## -> department id provided by labportalen: (required to use remiss creation service)
    'reservenumber_prefix': env('RESERVENUMBER_PREFIX'),               ## -> reservenumber prefix provided by labportalen: (optional)
    'case_model': 'case.Case',                                         ## -> case model against which remisses will be created: (required)
    'rid_mapping_models': ['case.CaseRid', 'patient_tests.BloodTest'], ## -> if you want to map rids against cases to trace which rid belongs to which case.
    }                                                                  ##    should be many to one relation: (optional)
    ## It is recommended to take the credentials from a .env file.
  6. Start the development server and visit http://127.0.0.1:8000/labportalen/api/ to see available labportalen end-points.

Contributing

If you face any issues with project, please create and submit an issue, detailing the problem and providing examples to reproduce the problem.

If you wish to contribute to the project via enhancements, please submit an issue outlining how your suggested changes improves the project and the scope of the change.

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

django-labportalen-0.0.30.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_labportalen-0.0.30-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file django-labportalen-0.0.30.tar.gz.

File metadata

  • Download URL: django-labportalen-0.0.30.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for django-labportalen-0.0.30.tar.gz
Algorithm Hash digest
SHA256 d2f6b446a2606d1dc9d2742a5fa6d34ee807ad38a331341a3f74d1e779a5adb1
MD5 39dd7d2c9bcf40a16bdf7f88222795df
BLAKE2b-256 0255183ae8bb63e9e2c9375d5cf96263733cd33b7c2a0b8b566b719718e738d2

See more details on using hashes here.

File details

Details for the file django_labportalen-0.0.30-py3-none-any.whl.

File metadata

  • Download URL: django_labportalen-0.0.30-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for django_labportalen-0.0.30-py3-none-any.whl
Algorithm Hash digest
SHA256 bff54f33f995555e9e03b908e2ea8e2369f4a3665589d1a2b3fbe9ad5ee1a200
MD5 97b7f345c9897ffc56b0429bcf058bbc
BLAKE2b-256 5e7f9858582d97dc32e59609771e6aea8a3e1e9f8080a2306e0c79e556135107

See more details on using hashes here.

Supported by

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