Skip to main content

03 - Healthcare Data On-Prem: Architecture or Legal Opinion?

An architecture shows where healthcare data sits and who touches it; whether that is enough for a BAA and the GDPR is for the lawyer. Rules read, program run.

What do you think about this article?

03 - Healthcare Data On-Prem: Architecture or Legal Opinion?
Data Sovereigntyfedericocalo.dev

At a Glance

An architecture shows where healthcare data sits and who touches it; whether that is enough for a BAA and the GDPR is for the lawyer. Rules read, program run.

Where the data goes and who sees it: the question that comes before the model

A workload that touches healthcare data (searching clinical records, summarising reports, prioritising a triage queue) raises an architecture question before any choice of model: where the data lives, who can reach it, which suppliers touch a copy of it. An architecture can answer with facts that can be checked. It cannot say whether those facts are enough for a legal obligation, because the answer depends on the legal role of each party, on the jurisdiction and on the contract. This article keeps the boundary between the two things, with the rules open in front of us: Articles 9, 28 and 32 and Chapter V of the GDPR, the definition of "business associate" in the US HIPAA regulation from which the BAA comes, and the European Health Data Space. It is not legal advice: where a question belongs to your lawyer, I say so.

This is the third in the series on data sovereignty. If you need the cost picture, start from the TCO framework; the next one applies the same method to the documents of a law firm. The examples are constructed cases: none describes a real organisation.

What an architecture can show, and what it cannot

The distinction matters because whoever writes a technical document is tempted to turn a fact into a guarantee. Facts are, for example, the location where the service runs and the fact that no data leaves the organisation's network. Legal determinations are, instead, the judgement that this location is enough for a transfer or that a given contract is adequate. The table puts the pairs side by side.

Fact that the architecture can showDetermination that stays with the lawyer
Where indexing, search and generation runWhether that location is enough, and whether a copy outside the Union is a transfer (Chapter V)
Who has access to the machine and with which credentialsWhether the supplier acts as a processor and whether the contract has the content of Article 28(3)
Which network calls leave the perimeterWhether each flow is a transfer and by which instrument it is covered
What ends up in the logsWhether a log with identifiers is health data and for how long it may be kept
Whether the data is encrypted and who holds the keysWhether the measures are "appropriate to the risk" under Article 32

The whole left-hand column is checked with code, configuration and an examination of network traffic; the whole right-hand column requires knowing the contracts, the roles and the law that applies to the case. No row of the left column, even a perfect one, implies a row of the right column. A useful fact is that every supplier removed from the flow also removes some of the questions in the right column, but to know how many and which ones you need the supplier map in the section on the program.

The BAA question: what the text says

The Business Associate Agreement is a concept of US law: it comes from the HIPAA privacy rule, whose text is in title 45 of the Code of Federal Regulations. I read the current version on eCFR, up to date as of 10 November 2026. Section 160.103 defines a "business associate", in short, as a person who, on behalf of a covered entity, "creates, receives, maintains, or transmits" protected health information for a regulated function, and includes the subcontractor that does so on behalf of the business associate. The verb "maintains" is the one that matters to whoever uses a custody service: holding a copy can be enough, even without reading it.

Section 164.502(e) says that the covered entity may disclose that information to a business associate only if it obtains "satisfactory assurance" that the business associate will appropriately safeguard it, and that these assurances must be documented through a written contract or other written agreement or arrangement meeting the requirements of section 164.504(e). The BAA is that document. Take a medical practice, a covered entity, that entrusts its backups to a supplier: the supplier holds copies of protected information, so the question "do we need a BAA?" arises. Whether the answer changes when the data is encrypted with a key that the supplier does not have, the definition does not say, and the HHS page dedicated to the cloud could not be reached when I tried to read it (response 403): I therefore report no position of theirs, and the point stays with your lawyer.

In Europe the BAA does not exist under that name. The analogous function, the regulation of the relationship with whoever processes data on behalf of someone else, is performed by the contract or other legal act of Article 28(3) of the GDPR. The two texts are not superimposable, and I have not compared them clause by clause: for an organisation that operates under both regimes the question belongs to its lawyer.

The European framework: Articles 9, 28, 32 and Chapter V

Article 9(1) prohibits processing, among the special categories, data concerning health, and paragraph 2 lists the conditions in which the prohibition does not apply, beginning with explicit consent: no technical requirement replaces the choice of the condition. Article 28 regulates whoever processes on behalf of the controller: the controller uses only processors providing sufficient guarantees (paragraph 1); the processor does not engage another processor without prior specific or general written authorisation (paragraph 2); the relationship is governed by a contract with a minimum content (paragraph 3), which includes the obligation to process the data only on documented instructions and, at the end of the services, to delete or return it at the choice of the controller. Article 32 asks for measures appropriate to the risk, and cites among the examples encryption, the ability to restore the availability of the data after an incident and a process for regularly testing the measures.

Chapter V concerns data that leaves the Union. Article 44 sets the general principle, Article 45 allows a transfer to a country with an adequacy decision of the Commission, Article 46 allows it with appropriate safeguards, for example standard clauses. The judgments of the Court of Justice have changed the framework more than once: on 16 July 2020, in Case C-311/18 (Schrems II), the Court declared invalid the Privacy Shield decision and ruled that, with standard data protection clauses, the assessment of the level of protection must also take into consideration the legal system of the country of destination.

Implementing Decision (EU) 2023/1795 on the EU-US Data Privacy Framework establishes, in Article 1, adequacy only for organisations included in the list maintained by the US Department of Commerce. The General Court dismissed the action against that decision on 3 September 2025 (T-553/23), and the appeal C-703/25 P was lodged on 31 October 2025; at the date of my consultation, 13 November 2026, I did not find a judgment on the appeal, and I invite you to check the current status. The full chronology is in the article on reading geopolitical events.

Another rule weighs on the location: Section 2713 of title 18 of the United States Code provides that a provider of electronic communication service or remote computing service must comply with the obligations to preserve, backup or disclose data within its "possession, custody, or control" regardless of whether the data is located within or outside of the United States. The text does not say which providers are subject to US law: that is the question to ask, case by case. The GDPR, in Article 48, allows the recognition of a judgment or decision of a third country requiring a transfer only if based on an international agreement in force, such as a mutual legal assistance treaty.

The European Health Data Space

Regulation (EU) 2025/327 on the European Health Data Space is in force and applies from 26 March 2027, with later dates for the priority categories of data: 26 March 2029 for some, 26 March 2031 for others (Article 105). Article 89 takes up, for non-personal electronic health data, the scheme already present in the Data Act and in the Data Governance Act: authorities and users take all reasonable measures to prevent transfers or third-country governmental access that would be in conflict with Union law. If your workload will have to talk to that infrastructure, the choice of suppliers has one more layer; I have not read the detailed provisions on EHR systems, so I do not describe them here.

From the supplier map to the list of questions

The useful thing that an architecture can produce is not a verdict, but the list of questions the lawyer will have to resolve, ordered by flow. The program below starts from the supplier map of a constructed outpatient clinic, and for each flow applies a few rules, each tied to an article I have read. It is a declared simplification: domande does not know whether HIPAA applies to your case (that is why the question begins with "only if"), does not read contracts and does not assess risk. The fields of Flusso are those of the table above: sede and gruppo_extra_ue for Chapter V and access by foreign authorities, ruolo for Article 28, chiave_al_cliente for Article 32.

"""From the supplier map to the list of questions to bring to the lawyer. It does not assess compliance."""
from dataclasses import dataclass


@dataclass(frozen=True)
class Flusso:
    nome: str
    personali: bool           # personal data pass through
    sanitari: bool            # data concerning health pass through
    ruolo: str                # "controller", "processor", "sub-processor"
    sede: str                 # "EU" or "non-EU"
    gruppo_extra_ue: bool     # the supplier is controlled by a group based outside the EU
    chiave_al_cliente: bool   # the data are encrypted with a key that stays with the customer


def domande(f: Flusso) -> list[str]:
    q = []
    if f.sanitari and f.ruolo == "controller":
        q.append("GDPR art. 9: which condition in paragraph 2 makes the processing lawful?")
    if f.personali and f.ruolo in ("processor", "sub-processor"):
        q.append("GDPR art. 28(3): is there a contract with the required content?")
        if f.sanitari:
            q.append("Only if HIPAA applies: is there the written agreement of 45 CFR 164.502(e)(2)?")
    if f.ruolo == "sub-processor":
        q.append("GDPR art. 28(2): has the controller authorised this sub-processor in writing?")
    if f.personali and f.sede == "non-EU":
        q.append("GDPR Chapter V: which instrument (art. 45 or art. 46) covers the transfer?")
    if f.personali and f.sede == "EU" and f.gruppo_extra_ue:
        q.append("Can the supplier receive orders from non-EU authorities? (GDPR art. 48; 18 U.S.C. 2713 if subject to US law)")
    if f.sanitari and not f.chiave_al_cliente:
        q.append("GDPR art. 32(1)(a): who holds the encryption keys?")
    return q


FLUSSI = (
    Flusso("Clinical application on the practice's server", True, True, "controller", "EU", False, True),
    Flusso("Server hosting", True, True, "processor", "EU", False, False),
    Flusso("Remote backup", True, True, "sub-processor", "EU", True, True),
    Flusso("Email with reports attached", True, True, "processor", "non-EU", True, False),
    Flusso("Public website statistics", False, False, "processor", "non-EU", True, False),
)

totale = 0
for f in FLUSSI:
    q = domande(f)
    totale += len(q)
    print(f"{f.nome}: {len(q)} " + ("question" if len(q) == 1 else "questions"))
    for i, testo in enumerate(q, 1):
        print(f"  {i}. {testo}")
print(f"\nflows: {len(FLUSSI)}, open questions: {totale}")

# Output:
# Clinical application on the practice's server: 1 question
#   1. GDPR art. 9: which condition in paragraph 2 makes the processing lawful?
# Server hosting: 3 questions
#   1. GDPR art. 28(3): is there a contract with the required content?
#   2. Only if HIPAA applies: is there the written agreement of 45 CFR 164.502(e)(2)?
#   3. GDPR art. 32(1)(a): who holds the encryption keys?
# Remote backup: 4 questions
#   1. GDPR art. 28(3): is there a contract with the required content?
#   2. Only if HIPAA applies: is there the written agreement of 45 CFR 164.502(e)(2)?
#   3. GDPR art. 28(2): has the controller authorised this sub-processor in writing?
#   4. Can the supplier receive orders from non-EU authorities? (GDPR art. 48; 18 U.S.C. 2713 if subject to US law)
# Email with reports attached: 4 questions
#   1. GDPR art. 28(3): is there a contract with the required content?
#   2. Only if HIPAA applies: is there the written agreement of 45 CFR 164.502(e)(2)?
#   3. GDPR Chapter V: which instrument (art. 45 or art. 46) covers the transfer?
#   4. GDPR art. 32(1)(a): who holds the encryption keys?
# Public website statistics: 0 questions
#
# flows: 5, open questions: 12

The output gives 12 questions over 5 flows. The application that runs on the practice's server has just one, because it is the controller and has no supplier above it: the question concerns the condition of Article 9(2). The remote backup has four, even though the data is encrypted with a key of the customer, because it is a sub-processor (the authorisation of Article 28(2) is needed) and its group is based outside the Union. The website statistics flow generates no question, and that is the weak point of the model: no personal data is declared in the flow, but an IP address is personal data, and a real examination would call that field into question. The number 12 is not a score: it says how much decision is left to the lawyer, not how compliant the system is.

The trade-off: what you gain and what you bring in-house

Keeping inference inside the perimeter reduces the number of suppliers and therefore of questions: in the program, removing the remote backup or the email with the reports removes four questions each. But it does not reduce the obligations, it moves them: Article 32 asks for the ability to restore the data and to test the measures, and with a server of your own that test is yours to do. If the entity falls within the NIS2 Directive, Article 21(2), points (c) and (d), names backup management and supply chain security. For restoring and for recording accesses I refer to the articles on disaster recovery and on the audit log; when a managed service is the better choice is in this article.

Frequently asked questions

Does an architecture with no third-party suppliers exempt me from the BAA?

It depends on whether there really are suppliers that create, receive, maintain or transmit the information on your behalf, and that is a legal judgement. The architecture can reduce the number of those suppliers, not cancel the question about the remaining ones, starting with hosting and backup.

Does the GDPR have an equivalent of the BAA?

The analogous function is performed by the contract or other legal act of Article 28(3), between the controller and the processor. The minimum contents are listed in the article; the comparison with a specific BAA is work for the lawyer.

Is a server in the Union enough for healthcare data?

It is not enough to answer everything. It avoids the question of a transfer to a third country for that server, but what remains are the condition of Article 9, the contract of Article 28 with each supplier, the measures of Article 32 and the question about suppliers whose group is based outside the Union.

Is the EU-US adequacy decision still valid?

It appears adopted with Implementing Decision (EU) 2023/1795, and the General Court dismissed the action on 3 September 2025. An appeal was lodged against the judgment (C-703/25 P); I did not find an outcome at the date of consultation, so check the current status before relying on that decision.

What you can do now

You can tell what an architecture demonstrates from what the lawyer decides, and you can write the supplier map so that it produces a list of questions instead of a statement of compliance. You know what the definition of "business associate" says, why the verb "maintains" includes custody, and what Articles 9, 28 and 32 and Chapter V do in the GDPR. And you know what changes with the European Health Data Space from 2027. The next step in the series concerns legal documents inside a proprietary platform, where the question is portability.

Sources

The program was run with Python 3.14.4 (python3 -I), twice, with identical output; the supplier map is constructed and the rules are a declared simplification. Not read: the HHS guidance on HIPAA and cloud (page not reachable) and the detailed provisions of the European Health Data Space beyond Articles 89 and 105. Not verified: the outcome of the appeal C-703/25 P.

Commenti

Caricamento commenti...

Sign in to comment

New articles and tools on Telegram too

The Telegram channel flags the site's new articles and tools.

Did you like this article?

Explore other content on the blog or discover my projects