Special-category data, consent, and traceability
Health data is special-category personal data under Article 6 of Turkish Law No. 6698, and processing it generally requires explicit consent. In a clinical decision-support flow that does not end at "mask the prompt" — you have to verify that consent exists on the request itself.
- A request without verified consent stops at the gateway
- Clinical prompts are excluded from canary; the version is pinned
- Patient identifiers are masked and cache writes are switched off
Art. 6special-category data, enforced at the policy level
What is hard in this sector
What blocks LLM adoption in healthcare is not model quality but traceability. When a clinician asks which instruction produced a recommendation, the answer has to be on record; and where patient data is involved, the legal basis for processing has to be visible on the request itself.
What is hard in this sector
- Special-category data is too heavy an obligation to manage with an
ifin application code. - Consent usually lives in another system and is not checked when the LLM call is made.
- Clinical prompt versions are not tracked; the same question gets a different instruction at different times.
- Patient identifiers arrive inside the template variables and are noticed only after substitution.
- The cache risks returning one patient's answer to a different request.
The first three rules you'd write
These are not illustrative examples; they are the rules we discuss in the first session in this sector. Each is authored as YAML in the console, measured in shadow mode, then enforced.
- 1
special-category-consent-gate- When
- request.headers.dataClass = health_special AND no request.headers.consentRef
- Then
- refuse the request · 403 · explanatory message to the user · audit tag
Why it is shaped this wayNot starting to process special-category data without a consent reference is easier than deleting it afterwards. The gate sits in the gateway, so it does not matter which team wrote the application. - 2
patient-id-redact-and-pin- When
- signals.pii.detected AND request.prompt.id starts with the prefix clinical/
- Then
- pin to the local region · mask the detected types · switch the cache fully off · fallback disabled
Why it is shaped this wayBecause prompt hydration runs before policy, redaction sees the right string even though the patient identifier arrived inside the variables. The cache must not even belookup_only: the answer to a similar prompt may belong to another patient. - 3
clinical-prompt-version-pin- When
- request.prompt.id starts with the prefix clinical/
- Then
- pin the prompt version explicitly · disable canary · retain the conversation log
Why it is shaped this wayA canary means answering the same clinical question with two different instructions. You might accept that in a product flow; in clinical decision support it is not defensible. An explicit version pin overrides the canary.
What you show in an audit
- Consent evidence
- That every processed request carried a consent reference, and that those without one were refused
- Instruction traceability
- The identity and exact version of the clinical prompt that produced the answer
- Version consistency
- That no canary ran in this flow; that every request used the same version
- Cache evidence
- That requests containing patient data were never written to the cache
- Residency
- Which region processed the request
- Eval gate
- That the version in production passed a signed eval report
Questions from this sector
The gateway does not judge the validity of consent on its own; it checks whether the request carries a consent reference and stops it if not. The record behind the reference stays in your consent management system. Policy makes it mandatory and writes the evidence into the audit trail.
You can narrow the catalog with policy — a constraint permitting only models hosted in your own region, for example. Registering your own vLLM cluster as a catalog provider is also a standard setup step, available from the Team plan onwards.
A prompt version needs a signed eval report to reach production. If a metric the gate asks for is missing from the report, the result counts as a failure — an absent measurement is not a pass. And the judge model cannot be the candidate model. Together those three rules make the phrase "it was tested" auditable.
On enterprise plans retention is set contractually. You can also choose not to retain conversation logs at all: the decision trace remains, the content does not — an audit can still answer which rule, which model and which prompt version, without the text being stored.
The regulatory references on this page exist to explain which product behaviour they drive; they are not legal advice. The scope of your own compliance obligations is something to establish with your legal team.
Let's start with your own rule set
The first session covers your traffic and your regulatory boundaries; you leave with a divergence report measured in shadow mode and three rules ready to write.