> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drugs.locusmedical.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# B21. Calculs d'une ligne

> Quantité maximale par 24 h, par prise, intervalle minimal, quantité à délivrer, présentation, montant, et le texte de la posologie en français (R-LAP 43 à 45, 50, 57 à 59, 109).



## OpenAPI

````yaml /openapi.json post /v1/posologie/calcul
openapi: 3.1.0
info:
  title: Locus Drugs, API LAP v1
  description: >-
    API de la base médicamenteuse Locus Drugs : surface A (référentiel, agrément
    HAS, charte de qualité des BdM v3) et surface B (contrôles de prescription,
    dispositif médical).


    Spécifiée en salle blanche, à partir des seuls documents publics de la HAS
    (référentiel LAP ambulatoire v2021.02, charte v3, dossier d'agrément,
    structuration de la posologie) et du décret n° 2019-856. Aucune
    documentation d'éditeur de base tiers n'a été consultée.


    Chaque route déclare les critères qu'elle couvre dans `x-criteres`. Chaque
    réponse porte l'édition de la base dans `X-Locus-Drugs-Edition` ;
    `?edition=` rejoue une édition passée.
  contact:
    name: Locus
    url: https://locusmedical.fr/
  version: 1.0.0
servers:
  - url: https://drugs.locusmedical.fr
    description: Locus Drugs
security:
  - editeur: []
    abonne: []
paths:
  /v1/posologie/calcul:
    post:
      tags:
        - B. Contrôles (dispositif médical)
      summary: B21. Calculs d'une ligne
      description: >-
        Quantité maximale par 24 h, par prise, intervalle minimal, quantité à
        délivrer, présentation, montant, et le texte de la posologie en français
        (R-LAP 43 à 45, 50, 57 à 59, 109).
      operationId: calcul_v1_posologie_calcul_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculRequete'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculReponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CalculRequete:
      properties:
        produit:
          $ref: '#/components/schemas/RefProduit'
        posologie:
          $ref: '#/components/schemas/PosologieStructuree'
        duree_jours:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Duree Jours
        renouvellements:
          type: integer
          maximum: 11
          minimum: 0
          title: Renouvellements
          default: 0
        patient:
          anyOf:
            - $ref: '#/components/schemas/Patient'
            - type: 'null'
        cip13:
          anyOf:
            - type: string
              pattern: ^\d{13}$
              description: Code CIP13, 13 chiffres.
            - type: 'null'
          title: Cip13
          description: Présentation choisie pour le montant ; sinon la mieux adaptée.
      additionalProperties: false
      type: object
      required:
        - produit
        - posologie
      title: CalculRequete
    CalculReponse:
      properties:
        edition:
          $ref: '#/components/schemas/Edition'
        quantite_max_par_24h:
          anyOf:
            - $ref: '#/components/schemas/Quantite'
            - type: 'null'
        quantite_max_par_prise:
          anyOf:
            - $ref: '#/components/schemas/Quantite'
            - type: 'null'
        intervalle_min_prises_h:
          anyOf:
            - type: number
            - type: 'null'
          title: Intervalle Min Prises H
        quantite_par_24h_prescrite:
          anyOf:
            - $ref: '#/components/schemas/Quantite'
            - type: 'null'
          description: En unité logistique.
        dose_par_24h_prescrite:
          anyOf:
            - $ref: '#/components/schemas/Quantite'
            - type: 'null'
          description: En masse de base active, si convertible.
        duree_jours:
          anyOf:
            - type: number
            - type: 'null'
          title: Duree Jours
        quantite_totale:
          anyOf:
            - $ref: '#/components/schemas/Quantite'
            - type: 'null'
          description: Unités à délivrer sur la durée, renouvellements compris.
        presentation:
          anyOf:
            - $ref: '#/components/schemas/EconomiePresentation'
            - type: 'null'
        nombre_boites:
          anyOf:
            - type: integer
            - type: 'null'
          title: Nombre Boites
        montant_ttc:
          anyOf:
            - type: number
            - type: 'null'
          title: Montant Ttc
        montant_rembourse:
          anyOf:
            - type: number
            - type: 'null'
          title: Montant Rembourse
        texte_posologie:
          type: string
          title: Texte Posologie
          description: La posologie en français (R-LAP 43 à 45, 50).
        texte_posologie_lettres:
          anyOf:
            - type: string
            - type: 'null'
          title: Texte Posologie Lettres
          description: En toutes lettres (ordonnance sécurisée).
        avertissements:
          items:
            type: string
          type: array
          title: Avertissements
          default: []
      additionalProperties: false
      type: object
      required:
        - edition
        - texte_posologie
      title: CalculReponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RefProduit:
      properties:
        cis:
          anyOf:
            - type: string
              pattern: ^\d{8}$
              description: Code CIS (ANSM), 8 chiffres.
            - type: 'null'
          title: Cis
        dc:
          anyOf:
            - type: string
              pattern: ^dc:[a-z0-9][a-z0-9\-_.]*$
            - type: 'null'
          title: Dc
      additionalProperties: false
      type: object
      title: RefProduit
      description: >-
        Une référence de produit : CIS ou médicament virtuel (exactement l'un
        des deux).
    PosologieStructuree:
      properties:
        sequences:
          items:
            $ref: '#/components/schemas/Sequence'
          type: array
          minItems: 1
          title: Sequences
        alternance:
          type: boolean
          title: Alternance
          description: >-
            Vrai : les séquences se répètent en boucle (jour 1, jour 2, jour 1…)
            au lieu de se succéder (R-LAP 56).
          default: false
        voie:
          anyOf:
            - type: string
            - type: 'null'
          title: Voie
        duree_totale_jours:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Duree Totale Jours
          description: Durée totale du traitement ; dérivée des séquences si absente.
        commentaire:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Commentaire
          description: Imprimé sur l'ordonnance (R-LAP 48).
      additionalProperties: false
      type: object
      required:
        - sequences
      title: PosologieStructuree
      description: >-
        Le format POSO : séquences successives (paliers) ou alternées (jours
        pairs/impairs), chacune faite de prises.
    Patient:
      properties:
        date_naissance:
          type: string
          format: date
          title: Date Naissance
        date_naissance_estimee:
          type: boolean
          title: Date Naissance Estimee
          default: false
        sexe:
          type: string
          enum:
            - F
            - M
            - I
          title: Sexe
        poids:
          anyOf:
            - $ref: '#/components/schemas/Poids'
            - type: 'null'
        taille:
          anyOf:
            - $ref: '#/components/schemas/Taille'
            - type: 'null'
        dfg:
          anyOf:
            - $ref: '#/components/schemas/Dfg'
            - type: 'null'
        grossesse:
          $ref: '#/components/schemas/Grossesse'
          default:
            etat: inconnu
        allaitement:
          $ref: '#/components/schemas/Allaitement'
          default:
            etat: inconnu
        allergies:
          items:
            $ref: '#/components/schemas/AllergiePatient'
          type: array
          title: Allergies
          default: []
        terrain:
          items:
            $ref: '#/components/schemas/TerrainPatient'
          type: array
          title: Terrain
          default: []
        ald:
          items:
            $ref: '#/components/schemas/AldPatient'
          type: array
          title: Ald
          default: []
      additionalProperties: false
      type: object
      required:
        - date_naissance
        - sexe
      title: Patient
    Edition:
      properties:
        id:
          type: string
          title: Id
          description: Identifiant d'édition, « 2026.10.2 » ; monotone.
        date:
          type: string
          format: date
          title: Date
        hors_cycle:
          type: boolean
          title: Hors Cycle
          description: Publication hors cycle pour une information urgente (CH 9).
          default: false
        motif:
          anyOf:
            - type: string
            - type: 'null'
          title: Motif
      additionalProperties: false
      type: object
      required:
        - id
        - date
      title: Edition
      description: 'Une édition de la base : identifiant et date (CH 11, R-LAP 111).'
    Quantite:
      properties:
        valeur:
          type: number
          title: Valeur
        unite:
          type: string
          maxLength: 40
          minLength: 1
          title: Unite
          description: 'Unité UCUM (CH 18) : mg, g, ug, mL, {comprime}, {gelule}, [iU]…'
      additionalProperties: false
      type: object
      required:
        - valeur
        - unite
      title: Quantite
    EconomiePresentation:
      properties:
        cip13:
          type: string
          pattern: ^\d{13}$
          title: Cip13
          description: Code CIP13, 13 chiffres.
        libelle:
          type: string
          title: Libelle
        unites:
          anyOf:
            - type: integer
            - type: 'null'
          title: Unites
          description: Nombre d'UCD dans la présentation.
        ucd:
          anyOf:
            - type: string
            - type: 'null'
          title: Ucd
        pfht:
          anyOf:
            - type: number
            - type: 'null'
          title: Pfht
        ppttc:
          anyOf:
            - type: number
            - type: 'null'
          title: Ppttc
        honoraire_dispensation:
          anyOf:
            - type: number
            - type: 'null'
          title: Honoraire Dispensation
        base_remboursement:
          anyOf:
            - type: number
            - type: 'null'
          title: Base Remboursement
        remboursement:
          items:
            $ref: '#/components/schemas/Remboursement'
          type: array
          title: Remboursement
          default: []
        indications_remboursables:
          items:
            type: string
          type: array
          title: Indications Remboursables
          default: []
        eligible_ald:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Eligible Ald
        agrement_collectivites:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Agrement Collectivites
        prix_retrocession:
          anyOf:
            - type: number
            - type: 'null'
          title: Prix Retrocession
        statut:
          type: string
          enum:
            - commercialise
            - arret
            - suspendu
            - non_commercialise
            - inconnu
          title: Statut
          default: inconnu
        commercialisation:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Commercialisation
        arret:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Arret
        sources:
          items:
            $ref: '#/components/schemas/Source'
          type: array
          title: Sources
          default: []
      additionalProperties: false
      type: object
      required:
        - cip13
        - libelle
      title: EconomiePresentation
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Sequence:
      properties:
        duree:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Duree
          description: Durée du palier ; nulle pour la séquence finale sans terme.
        unite_duree:
          type: string
          enum:
            - min
            - h
            - j
            - sem
            - mois
          title: Unite Duree
          default: j
        prises:
          items:
            $ref: '#/components/schemas/Prise'
          type: array
          minItems: 1
          title: Prises
        si_besoin:
          type: boolean
          title: Si Besoin
          default: false
        max_par_24h:
          anyOf:
            - $ref: '#/components/schemas/Quantite'
            - type: 'null'
          description: 'Si besoin : la quantité maximale par 24 h (POSO).'
        condition:
          anyOf:
            - type: string
            - type: 'null'
          title: Condition
          description: « si douleur », « si température > 38,5 °C ».
      additionalProperties: false
      type: object
      required:
        - prises
      title: Sequence
      description: >-
        Un palier (R-LAP 55) ou un jour d'alternance (R-LAP 56) : des prises
        pendant une durée.
    Poids:
      properties:
        date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date
        kg:
          type: number
          exclusiveMinimum: 0
          title: Kg
      additionalProperties: false
      type: object
      required:
        - kg
      title: Poids
    Taille:
      properties:
        date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date
        cm:
          type: number
          exclusiveMinimum: 0
          title: Cm
      additionalProperties: false
      type: object
      required:
        - cm
      title: Taille
    Dfg:
      properties:
        date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date
        valeur:
          type: number
          minimum: 0
          title: Valeur
        unite:
          type: string
          enum:
            - mL/min/1.73m2
            - mL/min
          title: Unite
          default: mL/min/1.73m2
        formule:
          type: string
          enum:
            - CKD-EPI
            - MDRD
            - Cockcroft-Gault
            - Schwartz
            - non_precisee
          title: Formule
          default: non_precisee
      additionalProperties: false
      type: object
      required:
        - valeur
      title: Dfg
    Grossesse:
      properties:
        etat:
          type: string
          enum:
            - inconnu
            - non
            - oui
          title: Etat
          default: inconnu
        ddr:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Ddr
          description: Date des dernières règles.
        terme_sa:
          anyOf:
            - type: number
            - type: 'null'
          title: Terme Sa
          description: Terme en semaines d'aménorrhée, si connu.
        date_accouchement_prevue:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Accouchement Prevue
      additionalProperties: false
      type: object
      title: Grossesse
    Allaitement:
      properties:
        etat:
          type: string
          enum:
            - inconnu
            - non
            - oui
          title: Etat
          default: inconnu
        debut:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Debut
      additionalProperties: false
      type: object
      title: Allaitement
    AllergiePatient:
      properties:
        type:
          type: string
          enum:
            - substance
            - classe
            - excipient
          title: Type
        code:
          type: string
          title: Code
          description: >-
            Code SMS ou URI de substance, classe (`atc:<code>` ou classe
            d'allergie croisée), code d'excipient.
        libelle:
          anyOf:
            - type: string
            - type: 'null'
          title: Libelle
        nature:
          type: string
          enum:
            - allergie
            - hypersensibilite
            - intolerance
            - contre_indication
          title: Nature
          default: allergie
      additionalProperties: false
      type: object
      required:
        - type
        - code
      title: AllergiePatient
    TerrainPatient:
      properties:
        systeme:
          type: string
          enum:
            - CIM-10
            - SNOMED
            - ICPC-2
          title: Systeme
          default: CIM-10
        code:
          type: string
          title: Code
        libelle:
          anyOf:
            - type: string
            - type: 'null'
          title: Libelle
      additionalProperties: false
      type: object
      required:
        - code
      title: TerrainPatient
    AldPatient:
      properties:
        cim10:
          type: string
          title: Cim10
        debut:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Debut
        fin:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Fin
      additionalProperties: false
      type: object
      required:
        - cim10
      title: AldPatient
    Remboursement:
      properties:
        taux:
          anyOf:
            - type: integer
            - type: 'null'
          title: Taux
          description: Taux en pourcentage (15, 30, 65, 100) ; nul si non remboursable.
        indication:
          anyOf:
            - type: string
            - type: 'null'
          title: Indication
          description: Identifiant d'indication si le taux dépend de l'indication.
        base:
          anyOf:
            - type: number
            - type: 'null'
          title: Base
          description: Base de remboursement en euros, pour une présentation.
      additionalProperties: false
      type: object
      title: Remboursement
    Source:
      properties:
        institution:
          type: string
          title: Institution
          description: ANSM, HAS, EMA, Assurance maladie, Légifrance, CRAT…
        document:
          type: string
          title: Document
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        date_publication:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Publication
        date_prise_en_compte:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Prise En Compte
          description: >-
            Date à partir de laquelle la base garantit avoir intégré ce
            document.
        institutionnelle:
          type: boolean
          title: Institutionnelle
          description: >-
            Faux pour une source qui n'est pas une institution de référence :
            elle doit alors être distinguée à l'affichage (R-LAP 1, CH 16).
          default: true
        section:
          anyOf:
            - type: string
            - type: 'null'
          title: Section
          description: Section du document (« RCP 4.2 », « tableau 2, ligne 3 »).
        citation:
          anyOf:
            - type: string
              maxLength: 400
            - type: 'null'
          title: Citation
          description: >-
            L'extrait verbatim du document qui justifie la valeur : la preuve
            que l'auditeur veut voir.
      additionalProperties: false
      type: object
      required:
        - institution
        - document
      title: Source
      description: D'où vient une donnée, et depuis quand la base la garantit (CH 16).
    Prise:
      properties:
        quantite:
          type: number
          exclusiveMinimum: 0
          title: Quantite
        unite:
          type: string
          maxLength: 40
          minLength: 1
          title: Unite
          description: 'Unité UCUM (CH 18) : mg, g, ug, mL, {comprime}, {gelule}, [iU]…'
        moments:
          items:
            type: string
            enum:
              - matin
              - midi
              - apres_midi
              - soir
              - coucher
              - nuit
              - avant_repas
              - pendant_repas
              - apres_repas
              - a_jeun
          type: array
          title: Moments
          description: >-
            Quantités différentes selon le moment (R-LAP 51) : une prise par
            moment.
          default: []
        frequence:
          anyOf:
            - $ref: '#/components/schemas/Frequence'
            - type: 'null'
          description: Sinon une fréquence explicite.
        intervalle_min_h:
          anyOf:
            - type: number
            - type: 'null'
          title: Intervalle Min H
          description: >-
            Espacement minimal entre deux prises, en heures (R-LAP 52 : de 5 min
            à 12 mois).
        heure:
          anyOf:
            - type: string
              pattern: ^\d{2}:\d{2}$
            - type: 'null'
          title: Heure
      additionalProperties: false
      type: object
      required:
        - quantite
        - unite
      title: Prise
      description: >-
        Une prise : quantité, unité, et son moment ou sa fréquence (R-LAP 50 à
        52).
    Frequence:
      properties:
        nombre:
          type: integer
          minimum: 1
          title: Nombre
        nombre_max:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Nombre Max
          description: >-
            « 1 à 2 fois par jour » : nombre=1, nombre_max=2. Les contrôles
            raisonnent sur le plus haut.
        periode:
          type: number
          exclusiveMinimum: 0
          title: Periode
          default: 1
        unite_periode:
          type: string
          enum:
            - min
            - h
            - j
            - sem
            - mois
          title: Unite Periode
          default: j
      additionalProperties: false
      type: object
      required:
        - nombre
      title: Frequence
      description: >-
        « 3 fois par jour » : nombre=3, periode=1, unite_periode=j. « tous les 3
        jours » : nombre=1, periode=3, unite_periode=j.
  securitySchemes:
    editeur:
      type: apiKey
      in: header
      name: X-Locus-Editeur
      description: Clé d'éditeur de LGC, remise par Locus à la signature du contrat.
    abonne:
      type: apiKey
      in: header
      name: X-Locus-Abonne
      description: >-
        Identifiant de l'abonné (le médecin) chez l'éditeur, par exemple
        rpps:10001234567.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.