Coverage API documentation¶
methods¶
create_or_update_coverage¶
arguments¶
coverage_payload¶
type: CoveragePayload
A payload describing the coverage to be created or updated, including its name, version and guarantees.
commit¶
type: Optional[bool]
Whether or not the SQLAlchemy session should be committed at the end.
get_latest_coverage_payload¶
Returns the latest version of the coverage payload for a given coverage short name
arguments¶
coverage_short_name¶
type: str
The short name of the coverage to be fetched
return value¶
type: CoveragePayload
A payload describing the latest version of the coverage
get_care_type_mappings¶
Returns various handy mappings, mainly used so that a caller wanting to do expensive fetching
can precache the mappings and use them later for get_care_types_from_selector for instance.
return value¶
type:
The list of: - internal care types by their short code - care type groups by their short code - internal care types by their care type group id
get_care_types_from_selector¶
Returns a list of care types from a given CoverageCareTypeSelector
NOTE
This method expects that you feed it various mappings that you can obtain with
get_care_type_mappings()above. This allows to precompute the mappings once in the caller if needed, instead of fetching all mappings in this function.
arguments¶
care_type_selector¶
type: CoverageCareTypeSelector
The selector to use
internal_care_type_by_short_code¶
type: dict[str, InternalCareType]
The mapping of InternalCareType by their short code
care_type_group_by_short_code¶
type: dict[str, CareTypeGroup]
The mapping of CareTypeGroup by their short code
care_type_group_to_internal_care_types¶
type: dict[int, list[InternalCareType]]
The mapping of InternalCareTypes by their CareTypeGroup's id
return value¶
type: set[InternalCareType]
The list of internal care types this selector computes to
types¶
CoveragePayload¶
fields¶
name¶
type: str
The name of the insurance product, e.g: "my_tailored_product_1984".
version¶
type: int
The version number of the coverage. Should be greater than or equal to 1.
If updating a coverage, the value of this field should be equal to the latest existing version for this product incremented by 1.
If creating a new coverage, the value of this field should be equal to 1.
Submitting a version that already exists for a given coverage will result in an error.
guarantees¶
type: list[CoverageGuarantee]
The guarantees that will be included in the coverage. Guarantees contain information about how much we reimburse a given care type and under which conditions.
CoverageGuarantee¶
fields¶
name¶
type: str
The name of the guarantee, e.g ACCOMMODATION_FEES.
care_type_mappings¶
type: list[CoverageCareTypeMapping]
A list of mapping, each describing a set of care types and under which conditions they should be mapped to the guarantee.
coverage_rule¶
type: CoverageRuleParameterSet ⧉
Defines how much we reimburse for the guarantee and what the limits are.
CoverageCareTypeMapping¶
fields¶
selector¶
type: CoverageCareTypeSelector
Describes a set of care types to include in the guarantee.
filter¶
type: CoverageCareTypeFilter
Describes the conditions under which the set of care types described in the selector
field should be mapped to the guarantee
CoverageCareTypeSelector¶
fields¶
include_care_type_groups¶
type: set[str]
A set of care type group short codes to include in the guarantee.
exclude_care_type_groups¶
type: set[str]
A set of care type group short codes to exclude from the guarantee.
include_care_types¶
type: set[str]
A set of individual care type short codes to include in the guarantee.
exclude_care_types¶
type: set[str]
A set of individual care type short codes to exclude from the guarantee.
CoverageCareTypeFilter¶
fields¶
min_age¶
type: Optional[int]
The minimum age the member must be on care date for the care type to be included.
max_age¶
type: Optional[int]
The maximum age the member must be on care date for the care type to be included.
is_optam_or_secteur_1¶
type: Optional[bool]
Whether we want to include the care type only for OPTAM/Secteur 1 care acts (when True) or for non-OPTAM/non-Secteur 1 care acts (when False).
is_for_at_least_one_visible_tooth¶
type: Optional[bool]
Whether we want to include the care type only when there is at least one visible tooth in the care act (when True) or not (all teeth are not visible) (when False).
is_etablissement_conventionne¶
type: Optional[bool]
Whether we want to include the care type only when the hospital is conventionné.
NOTE
The list of établissements non conventionés can be found in
ETABLISSEMENTS_NON_CONVENTIONNES(incomponents.fr.internal.claim_management.constants.misc)
practitioner¶
type: Optional[Practitioner]
Whether we only want to include the care type for care acts performed by the provided practitioner type. Should be set to a valid Practitioner value.
glasses_lens_complexities¶
type: Optional[list[GlassesLensComplexity ⧉]]
Whether we only want to include the care type for glasses care acts with the given glasses lens complexities.
reimbursed_by_secu¶
type: Optional[bool]
Whether we only want to include the care type only if the care act is reimbursed by secu (when True) or not reimbursed by secu (when False)
allowed_treatment_modes¶
type: Optional[list[str]]
List of TreatmentMode (MT, Modes de Traitement) the guarantee is valid for.
NOTE: Treatment mode is a two-digit string (ex: "02") — "None" means it's valid for any value.
allowed_natures_de_soins¶
type: Optional[list[NatureDeSoins]]
List of NatureDeSoins (~DMT, Discipline Médico-Tarifaire) the guarantee is valid for.
NOTE: Nature de soins is an enum — "None" means it's valid for any value.