Can Doctors and Lawyers Safely Integrate AI? The Confidentiality Mandate
A patient's file or a client's case is covered by professional secrecy before any data law applies. See what that means for an AI tool, and how to set one up so the secret stays kept.
- Know why professional secrecy goes further than Law 18-07.
- Strip a document before any AI tool reads it.
- Set your account so your requests are not used for training.
A model can summarise a hundred pages of case law in a minute, or draft a letter to a colleague. For a doctor or a lawyer, that is hours saved every week.
But you work under a duty most users do not have. This article shows how to use AI without breaking it.
Know your duty of secrecy
Law 18-07 protects personal data for everyone. Your profession adds a second, older duty.
Professional secrecy is the duty to keep what a patient or a client confides to you. Its role is to let people tell you the truth without fear that it travels.
The Penal Code punishes a breach of that secret. A careless paste into a chat tool can be exactly that: you handed a confidence to a third party.
Many consumer chat apps may also use your conversations to improve their models unless you switch it off. Your client's case would then sit in data you no longer control.
Strip the document before you paste
The safest data is the data you never send. Before a tool reads anything, remove what identifies the person.
If I remove the patient's name, can I paste the rest?
Often, not yet. A rare diagnosis, a small town and a date can point to one person as surely as a name. Remove every detail the answer does not need.
Never paste a full medical file or a full case file. Paste only the passage the answer needs, with names, dates, places and numbers removed.
If you build a tool for a practice rather than use one, where that data is allowed to be hosted explains how Law 18-07 meets an AI app.
Set your account for confidential work
On OpenDunes, the privacy settings decide what happens to your requests. Three switches matter for your work.
Training on your data stays off, so requests go only to providers that do not train on them. Zero data retention limits routing to providers that do not keep request data. Redact replaces the personal data a message still contains before it is sent.
Let's see right away what a long document costs.
You send a 15,000-token judgment, stripped of names, and ask for a 1,000-token summary. Claude Sonnet 5 costs 624 DA per million tokens sent and 3,120 DA per million returned, on its model page read on 5 October 2026. The summary costs about 12.5 DA.
The cost follows the length: a document twice as long costs roughly twice as much to send.
Paste a client's file into a consumer chat app that may train on your conversations.
Strip the passage first, turn training off and Redact on, then send only what the answer needs.
A model's answer is a draft. You still check every article and every dose it cites.
Context: you want a summary of a judgment that names both parties, gives their dates of birth and their addresses.
Task: list what you remove before pasting, then the three settings you check in your privacy settings.
Show the answerHide the answer
Remove the parties' names, their dates of birth, their addresses and the case number, keeping the facts the summary needs. Then check that training on your data is off, that zero data retention is on, and that personal data is set to Redact.
- Professional secrecy is older and stricter than Law 18-07, and the Penal Code punishes its breach.
- Strip a document of names, dates, places and numbers before any tool reads it.
- Turn training off, zero data retention on and Redact on in your privacy settings.
- A model's answer is a draft: you check every citation yourself.
Frequently Asked Questions
Can a lawyer use AI to draft a court document?
Yes, as a first draft. The lawyer reviews every argument and checks every article cited, because a model can invent a reference that looks real.
Does OpenDunes keep my chat history?
Your chat history is kept in your account so you can return to it, and only your account can read it. Delete a conversation you no longer need.
Can I send a scanned document?
Some models read images and PDF files; each model page says which. Strip the document first, exactly as you would a text.
You now know how to keep the secret while using AI. In the next article, we look at how far a model can be trusted on Algerian law, and how to make its answers checkable. See you there!
Pay for AI in dinars
- Deposit your dinars with Edahabia or CIB
- An OpenAI-compatible API key
- One balance for the chat and the API