Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

healthcare : Manage healthcare providers

The lino_xl.lib.healthcare plugin adds functionality for managing health care situations of your clients.

You specify for each of your clients which tariff and plan they have regarding health care. Optionally you can have a history of these per client.

You may use this to issue cost-sharing invoices to your clients’ health care providers.

This document uses demo configuration for the context in Belgium.

Side note: Code snippets (lines starting with >>>) in this document get tested as part of our development workflow. The following initialization snippet tells you which demo project is being used in this document.

>>> import lino
>>> lino.startup('lino_book.projects.tera1.settings.doctests')
>>> from lino.api.doctest import *

Usage

As the application developer you choose one of the following usages:

  • users want to record only the current situation of a client. In that case you have your application’s client model inherit from HealthcareSubject.

  • users want to record a history of situations per client. In that case you add SituationsByClient to the detail layout of your client model and make sure to set Plugin.client_model.

Healthcare plans

A healthcare plan is a method that can be chosen by natural persons for their health insurance. Depending on national laws the provider can be either a public institution or a private company.

There is usually a finite number of healthcare plans, usually each plan has a reference.

>>> rt.show(healthcare.Plans)
=============== =============================================== ========
 Reference       Provider                                        Remark
--------------- ----------------------------------------------- --------
 Christian HIS   Alliance nationale des mutualités chrétiennes
 Neutral HIS     Union nationale des mutualités neutres
 Socialist HIS   Union nationale des mutualités socialistes
 Liberal HIS     Union nationale des Mutualités Libérales
 Libre HIS       Union nationale des mutualités libres
=============== =============================================== ========
class lino_xl.lib.healthcare.Plan
ref

An identifying name understood by every user of the site.

provider

The provider who will potentially be invoiced for shared costs.

A pointer to lino_xl.lib.contacts.Company

Tariffs

The healthcare tariff of a physical person expresses their status regarding health care conditions. It is assigned by law, not by a given provider.

>>> rt.show(healthcare.Tariffs)
======= ======== ========
 value   name     text
------- -------- --------
 10      normal   Normal
 20      bim      BIM
 30      omnio    OMNIO
======= ======== ========
class lino_xl.lib.healthcare.Tariffs

The choicelist with healthcare tariffs available in this application.

Rules

class lino_xl.lib.healthcare.Rule
healthcare_tariff
healthcare_plan
client_fee

The product for which this rule applies.

This is the client’s share of the costs invoiced to the client.

provider_fee

The provider’s share of the costs which you will invoice to the provider.

Note that this part is not yet used on the field. The client_fee might be useless, we must maybe rather inject a checkbox field “healthcare_shared” to Product.

The HealthcareSubject model mixin

class lino_xl.lib.healthcare.HealthcareSubject

Model mixin which adds database fields about a given healthcare subject.

healthcare_plan

The health care provider.

healthcare_tariff

The health care tariff.

Situations history

class lino_xl.lib.healthcare.Situation
client
healthcare_tariff
healthcare_plan
start_date
end_date
class lino_xl.lib.healthcare.SituationsByClient

Plugin config