Unit 10 / 11

Data Privacy, KVKK, Ethics and Model Validation

Gains:

  • Ability to anonymize patient laboratory data within the scope of KVKK/privacy and apply safe tools and data processing rules
  • Understand why validation, performance metrics and bias control are mandatory in the clinical use of artificial intelligence models.
  • Ability to assume ultimate responsibility by weaving the four ethical principles and chain of responsibility into every use of artificial intelligence

A laboratory is one of the most data-intensive points of the healthcare system. Every patient, every test, every result is a piece of data, and most of these pieces are within the scope of sensitive personal data — that is, health data. Artificial intelligence can generate great value by working on this data, but when used carelessly, the same artificial intelligence can lead to serious privacy violations, legal liability and damage to patient trust. Moreover, it is not just about confidentiality: it is a professional and ethical obligation to prove that an artificial intelligence model put into clinical use is truly reliable — that is, validation — and to make sure that that model is not unfair to certain patient groups (bias).

In this unit, you will learn how to protect patient laboratory data within the scope of KVKK/confidentiality; validation, performance metrics, and bias control of clinical AI models; and how to weave ethical principles into each use. Basic principle: Data does not enter any vehicle without being anonymized; no model participates in clinical decisions until it has been validated on your own data; and the ultimate responsibility always lies with the expert.

Privacy: what data, how to protect it

Patient laboratory data (results, diagnosis, protocol number, identity) is protected under KVKK (Personal Data Protection Law) in Türkiye, GDPR in Europe, and requires additional protection as health data is of "special nature". Three basic rules when using artificial intelligence:

  1. Anonymize. Remove name, TR ID, protocol/file number, date of birth, contact and institution information. "68-year-old female patient" is sufficient; Not "Ayşe Yılmaz, 12.03.1957". Note that combinations such as rare disease + small location may indirectly reveal identity.
  2. Minimum data policy. Share the minimum data required for the task. A reference range question does not require the entire patient file.
  3. Safe vehicle selection. Choose corporate tools that have a data processing agreement and do not use your data in model training. Uploading a raw patient file to a public tool is the most common and most severe violation.

Data type

risk

correct behavior

Name, TR ID, protocol number

direct identification

Extract, anonymize

Date of birth, address

indirect identification

Download to age range, remove address

Result values

health data

Share anonymously, minimally

Image (smear, pathology)

Health data + ID clue

Keep it in the validated clinical system; loading into open vehicle

Attention: "I encrypted it, so I can also send the name" is wrong. Encryption makes the transport secure, but does not justify sending identity data to an AI tool. Identity data is extracted.

Model validation: why "published" isn't enough

Just because an AI model (e.g. an image classifier or an interpretation engine) works well in one place, doesn't mean it will work well in your lab. The model may have been trained on another population, another device, another staining protocol; Its performance may differ in your samples. This is called distribution shift. Therefore, every model to be put into clinical use should be validated on your own data, its performance should be measured and monitored regularly.

Key performance metrics used in validation:

  • Sensitivity: The rate at which the model accurately captures those who are truly sick/positive. Low sensitivity = missed true positives (false negatives) = risk of missing critical findings.
  • Specificity: The correct rate of elimination of truly healthy/negative ones. Low specificity = many false alarms.
  • False negative/false positive rates: In the laboratory, a false negative (missing a critical finding) is generally more dangerous than a false positive; This balance is adjusted according to the intended use of the model.

Once the model is validated, it is not forgotten; Over time, device, reagent, population may change and performance may shift. Therefore, continuous monitoring and periodic reassessment are required.

Bias: who is the model unfair to?

A model learns about imbalances in training data. If an image model is trained mostly on examples of a particular patient group, it may make more errors in the underrepresented group. In a laboratory context, this means the model performs less well for a particular age, gender, or clinical group — and this is an equity/ethics issue. When validating, it is necessary to check performance not only in general but also in subgroups. Ignoring bias means silently providing worse service to some patients.

Ethical four principles and chain of responsibility

The four basic principles of health ethics also apply to laboratory AI:

  • Beneficence: Artificial intelligence should be used for the benefit of the patient; acceleration should not compromise safety.
  • Non-maleficence: Unverified output, spurious critical value, missed finding can lead to harm; It is an ethical obligation to prevent them.
  • Autonomy: The patient's rights over his data are protected; Confidentiality and consent are respected.
  • Justice: The model should provide equal quality service to all patient groups; bias must be checked.

And above all, there is a chain of responsibility: artificial intelligence may produce an output, but the expert is responsible for the outcome of that output. “The AI ​​said so” is not an excuse; Signature, decision and responsibility belong to the human being.

Weak prompt / Strong prompt

Weak prompt:

Interpret all the results and diagnosis of Ayşe Yılmaz (TC 123..., protocol 2024-88) and write a report.

This request directly contains identity data (KVKK violation), violates the minimum data principle and requests a diagnosis. It is a serious violation of privacy and borders.

Powerful prompt:

Your role: DRAFT preparation assistant to the laboratory specialist. The data below is anonymous; does not contain identification information. Work only with the clinical/analytical information required. Making a diagnosis; Use “possible” language; Refer to physician. Patient: 68-year-old woman, known thyroid disease. Anonymous results (with reference): TSH 6.2 mIU/L (ref 0.4-4.0), free T4 within normal range. Task: write a simple briefing outline to the patient; generate an identity clue.

The strong prompt is anonymous, works with minimal data, keeps the diagnosis to the expert, and specifies the limit.

three mini cases

Case 1 — Preventing privacy breach. To interpret a patient report, a technician first extracts the name, ID, and protocol number from the text with the "Anonymization Control" template; It leaves only age, gender and outcome values. Then it runs in a secure, corporate tool. Data does not go outside the institution with an identity. The violation was prevented before work began.

Case 2 — Unvalidated model trap. A laboratory begins using a urine sediment model developed at another center directly in its own instrument; It does not validate. After a while, it is noticed that the model frequently misses certain crystals in its staining protocols (distribution shift). False negatives have accumulated. Lesson: the model does not factor into clinical decision making until it has been validated on your own data and sensitivity/specificity has been measured.

Case 3 — Catching bias. In a performance audit, although the overall sensitivity of a model appears high, it is found to be significantly lower in a subgroup of elderly patients; The model makes more errors in this group. The laboratory adds additional expert review to this group of model outputs and contacts the manufacturer. Lesson: performance is checked not only overall but also in subgroups; The principle of justice requires this.

Copiable prompt templates

ANONYMIZATION CONTROL TEMPLATEExtract name, TR ID, protocol/file number, date of birth, address, telephone and institution information from the text below; replace with "[removed]". Warn if there is an indirect ID clue (rare diagnosis + small location). Leave only the necessary clinical/analytical information. Text: [text].

MODEL VALIDATION PLAN TEMPLATEPrepare a draft validation plan for an artificial intelligence model that I will put into clinical use: with what own data will I test it, how to measure sensitivity/specificity, how to evaluate the balance of false negatives/positives, how to control subgroup (age/gender) performance, how often to re-evaluate. I will decide; You produce a checklist.

BIAS CHECK TEMPLATEI evaluate the performance of a model. List in which subgroups (age, gender, clinical group, sample type) I should look for performance separately and what steps I should take if I find significantly poor performance in one group. Add fairness/equality caveats.

ETHICAL SELF-AUDIT TEMPLATEThe AI ​​use I am about to make is audited according to four ethical principles: beneficence, non-maleficence, autonomy (privacy/consent), fairness. Ask a risk question for each policy. Also, “who is responsible for this output?” Ask me to answer your question. Usage: [definition].

Common mistakes

  • Giving identification data to the vehicle. Name, TR ID number and protocol number are not shared without anonymisation; encryption does not justify this.
  • Forgetting indirect identity. Combinations such as rare diagnosis + small location can reveal identity.
  • Using the model without validating it. A model running elsewhere may give different performance on your data.
  • Just look at the performance in general. Bias remains hidden if subgroup analysis is not performed.
  • Putting the responsibility on the model. “AI said” is no excuse; The decision and signature belong to the expert.
Tip: Before every use of AI, ask two questions together: “Is this data de-identified?” and “Do I know how this model performs at my yield?” The answer to the first protects privacy, the answer to the second protects security.

In summary

Laboratory data is special quality health data; Anonymization, minimum data policy and safe tool selection are mandatory when using artificial intelligence. Models to be put into clinical use must be validated on your own data; sensitivity, specificity and false negative/positive balance should be measured; Performance should also be checked in subgroups to check for bias. Four ethical principles—beneficence, nonmaleficence, autonomy, justice—are woven into every use, and above them all stands the chain of responsibility: although the output comes from the model, the decision and responsibility lies with the expert.

Application task

Anonymize a sample patient text with the "Anonymization Control" template and list what information you removed. Create a validation checklist for an AI model you are using (or considering using) with the “Model Validation Plan” template; Include sensitivity/specificity and subgroup analysis. Finally, evaluate a use against the four principles with the “Ethical Self-Audit” template.

checklist

  • [ ] I anonymized the data; I removed direct and indirect identity clues.
  • [ ] I applied the minimum data policy; I only shared what was necessary.
  • [ ] I used a secure, corporate and data processing contracted tool.
  • [ ] I validated the model on my own data; I measured sensitivity/specificity.
  • [ ] I checked performance in subgroups and checked for bias.
  • [ ] I observed the four ethical principles and confirmed that the responsibility lies with the expert.