---
id: HSCP-T-023
titre: "Usage log of an AI system, per patient and per decision"
titre_court: "Check the per-patient usage log of the AI"
type: note
objet: test
langue: en
statut: brouillon
version: 0.1
verifie_le: 2026-12-02
traduit_de: LISEZ-MOI.md
traduit_de_version: 0.1
traduit_de_empreinte: 19ef8c4db846205b
traduction: modèle de langue, glossaire catalogue/glossaire-en.yaml
source: traduction de LISEZ-MOI.md, version 0.1
sensibilite: interne
licence: Apache-2.0
gestes: [HSCP-G-250, HSCP-G-176]
recette: HSCP-R-036
piece: journal
---

# Usage log of an AI system, per patient and per decision

## What the test checks

The artefact is the exported usage log, one JSON object per event (JSON Lines): `evenement` (`sollicitation`, `decision`, `non_utilisee`), `horodatage`, `cas`, `professionnel`; `systeme`, `version` and `resultat` for a request; `resultat`, `decision` (`suivie`, `modifiee`, `non_suivie`), `motif` and `patient_informe` for a decision.

The test accepts the log if each event carries its fields; if each decision refers to an earlier request for the same case and the same result, records whether the patient was informed and, when the proposal is not followed, carries its reason; and if no request remains without a decision beyond the chosen delay.

It reports, without rejecting, a non-use without a reason.

## Running the test

```sh
python3 verifier.py journal.jsonl --date 2026-12-01T09:00 --delai-heures 24
```

`--date` sets the time of the check (now by default), `--delai-heures` the delay beyond which a request without a decision is rejected (24 by default), `--json` gives the answer in JSON. Exit code: 0 artefact accepted, 1 artefact rejected, 2 incorrect call. Python 3.10 or later, no dependencies.

## Examples

- `exemples/valide/`: a proposal not followed with its reason, a proposal followed, a non-use with a reason. Accepted.
- `exemples/refuse/`: request without a version, refusal without a reason, request left without a decision, decision outside the list without a request, event outside the list. Rejected.

## What the test does not say

- It does not say that the decisions are good or that the reasons are sincere.
- It does not say that all requests were logged: only the way the product is built guarantees that.
- It says nothing about the retention of or access rights to the log.
