Resource Description Framework

Resource Description Framework (RDF) is a W3C data standard holding statements as subject, predicate and object triples, so health datasets can merge.

Status
Published, version 1.0.1
Last reviewed
2 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Resource Description Framework for Health Economic Data

RDF is a data standard from the World Wide Web Consortium (W3C) in which each piece of information is one statement linking a thing to another thing, or to a value, through a named relationship. The things and relationships carry web identifiers, so a drug, a diagnosis code or a trial arm can be named once and recognised wherever that identifier appears. For health economists the attraction is that evidence held in separate places, such as electronic health records, trial reports, coding systems and published cost lists, can be pooled into one structure without first agreeing a shared table design. RDF also sits underneath the other semantic web standards, including the OWL ontology language and the SKOS vocabulary for concept schemes.

Triples, identifiers and values

The basic unit of RDF is the triple, a statement made of a subject, a predicate and an object. The RDF 1.1 Concepts specification allows the subject to be an IRI or a blank node, requires the predicate to be an IRI, and allows the object to be an IRI, a literal or a blank node. A set of triples is an RDF graph, which can be drawn as nodes joined by directed, labelled arcs.

An IRI is the web identifier that generalises the familiar URL. The specification states that IRIs have global scope, so two appearances of the same IRI denote the same resource, and that by social convention the owner of an IRI says what it refers to. A coding system can therefore publish one IRI per code, as LOINC does with an IRI stem defined in its User Guide, which FHIR RDF joins to each code.

Literals carry values such as strings, numbers and dates. Each has a lexical form and a datatype IRI fixing how the text maps to a value, and a string may carry a language tag. The specification notes that the integers written "1" and "01" denote the same value but are different RDF terms, a detail that matters when counts or costs from two sources are compared term by term.

Blank nodes stand for something that exists without naming it, and their labels are local to one file or store, so the specification allows them to be replaced with newly minted global IRIs where stronger identification is needed, for example before records are shared.

Graphs, datasets and merging sources

Because an RDF graph is a set of triples, the Concepts specification notes that graphs can be combined easily, supporting the use of data from several sources. Merging takes the union of the triples, with blank nodes from different sources kept apart, and statements that share an IRI join up, while sources that use different IRIs for the same thing do not.

When sources must stay apart, an RDF dataset holds one default graph with no name and any number of named graphs, each paired with an IRI or a blank node. An analyst can keep each source of model inputs in its own named graph and record each graph's publisher and licence in the default graph, as the Primer's own example does. The Primer warns that RDF has no standard way to tell readers that graph names stand for sources, so that convention has to be documented with the data.

The Concepts specification also describes RDF graphs as static snapshots and states that an IRI once minted should never change its intended referent. A unit cost or a tariff therefore needs its price year recorded as data, since nothing in RDF dates a statement.

Writing RDF in Turtle and other formats

RDF is defined as an abstract data model, and several concrete syntaxes write it down. The Primer lists Turtle and TriG, JSON-LD, RDFa for embedding in HTML, the line-based N-Triples and N-Quads, and RDF/XML, the original syntax. Different ways of writing the same graph give exactly the same triples.

The Turtle specification describes a compact and natural text form for writing a whole graph. It lets a short prefix stand for the start of a group of IRIs, and the single letter a in the predicate position stands for the RDF type property. In the illustrative lines below, the prefix ex stands for an analyst's own namespace and xsd for the XML Schema datatypes.

Turtle line (illustrative)What the triple says
ex:OPFA a ex:ResourceItem .Outpatient first attendance is a resource item
ex:OPFA ex:unitCost "150.00"^^xsd:decimal .Its unit cost is the decimal value 150.00
ex:OPFA ex:priceYear "2025"^^xsd:gYear .The cost is priced in the year 2025

Vocabularies, RDF Schema and the step to ontologies

RDF makes no assumption about what an IRI stands for, and the Primer notes that it is normally used with vocabularies that give the IRIs meaning. RDF Schema is the W3C vocabulary for this purpose. It declares classes and properties, their hierarchies, the class a resource belongs to and the domain and range of a property. The RDF Schema specification defines the subclass property as transitive and makes every instance of a subclass an instance of the class, so a reasoner that applies it finds every product filed under a drug class, including products filed under its subclasses.

Domain and range work as rules for inference, not as checks. The Primer gives the case of a "knows" property whose domain is Person, from which a reasoner may conclude that anyone who knows somebody is a person. In a costing dataset, a "has unit cost" property with the domain Resource Item would lead a reasoner to classify a wrongly costed patient record as a resource item, with no error reported. The RDF Schema specification states that it does not say whether or how an application should act on such information, and validating RDF graphs against a set of conditions is the task of a separate W3C standard, the Shapes Constraint Language (SHACL).

Richer languages are built on this base. The OWL 2 overview states that any OWL 2 ontology can also be viewed as an RDF graph and that RDF/XML is the one exchange syntax all OWL 2 tools must support, while the SKOS Reference states that SKOS data are expressed as RDF triples. HealthEconomics.wiki's own ontology family is an example, since HEO is a SKOS concept scheme published in OWL and RHEO and its siblings are OWL ontologies, so their terms and links can be loaded into an RDF store and queried with SPARQL, the W3C query language for RDF.

RDF in health records and evidence synthesis

One documented health use is the RDF form of HL7 FHIR, a standard designed for providers exchanging electronic health records. The FHIR R5 specification states that FHIR resources can be represented as an RDF graph serialised in Turtle, and that systems focused on operational exchange would not usually choose RDF. It also describes FHIR as recording who did what, rather than stating medical facts, and says FHIR RDF should not be read directly as statements of fact. For a cost study built on real-world data, a coded diagnosis converted to RDF is therefore a record that a diagnosis was made, not proof that the condition is present.

Another is Cochrane's early linked data work. Mavergames and colleagues described a demonstrator built on a small set of Cochrane Reviews of asthma drugs, whose review XML was converted to RDF by Java scripts that minted URIs where needed, with interventions and comparisons annotated by hand. A transitive drug class hierarchy meant a query for long-acting beta-2 agonists also found annotations naming salmeterol. The authors called the work a proof of concept. Structures of this kind can help searches and data extraction for a systematic review, though a graph returns only the studies someone has entered and annotated.

Worked example joining resource use to unit costs

All identifiers and numbers here are hypothetical and illustrative. An analyst costing outpatient care in a small cohort holds two RDF sources. The statement that patient 1 used 3 outpatient first attendances relates three things, a patient, an item and a count, and the Concepts specification notes that relations among more than two entities can only be expressed indirectly in RDF. Each use record therefore gets its own node, here use1 and use2 in the analyst's ex namespace, in graph A from the study extract.

SubjectPredicateObject
ex:use1ex:patientex:patient1
ex:use1ex:itemex:OutpatientFirst
ex:use1ex:quantity"3"^^xsd:integer
ex:use2ex:patientex:patient2
ex:use2ex:itemex:OutpatientFirst
ex:use2ex:quantity"5"^^xsd:integer
cost:OPFAcost:unitCost"150.00"^^xsd:decimal
cost:OPFAcost:priceYear"2025"^^xsd:gYear

The last two rows form graph B, a unit cost list published by another team under its own namespace.

Step 1. Merging the graphs gives the union of their 8 triples. The use records point to the study's IRI for the attendance and the price hangs on the cost list's IRI, so nothing in the merged graph links a use record to a price and a query for costed resource use returns no rows.

Step 2. The analyst adds one triple stating that the two IRIs denote the same resource, using the OWL sameAs property, which the Primer describes for the case where publishers use different identifiers for the same thing. A system that applies the OWL meaning of sameAs, or a query written to follow the link, now reaches the unit cost from each use record.

Step 3. The total cost is

C=u∑i=1nqiC = u \sum_{i=1}^{n} q_i

where CC is the total outpatient cost in GBP, uu is the unit cost per attendance in GBP, qiq_i is the number of attendances recorded for patient ii and nn is the number of patients. With a unit cost of GBP 150 and two patients,

C=150×(3+5)=150×8=1200C = 150 \times (3 + 5) = 150 \times 8 = 1200

where 3 and 5 are the attendances of patients 1 and 2, so the cohort's outpatient cost is GBP 1,200 at 2025 prices.

Step 4. Had graph B written the price as "150 GBP" with the decimal datatype, the literal would be ill-typed. The Concepts specification requires implementations to accept ill-typed literals and build graphs from them, with warnings optional, so the error could load silently and surface only when the cost failed to compute.

Step 5. The graph settled which records share a resource and attached a dated price. It cannot say whether a 2025 price suits the price year and perspective of the economic evaluation, and the sameAs triple is itself a claim, since a wrong link would merge two different items and misstate the cost.

Choices that change what an RDF dataset returns

A dataset that mints private IRIs for codes that already have published ones has to be mapped before any merge, as the worked example shows. A trial result linking an intervention, a comparator, an outcome and an effect size needs its own node, and keeping each source in its own named graph decides whether a model input can be traced to where it came from.

The level of reasoning matters too. The Concepts specification states that RDF recognises only basic cases of entailment, that RDF Schema and OWL 2 add more powerful entailment regimes, and that implementations may make all, some or no entailed information available to users. Two tools can therefore return different answers from the same graph, so an analysis relying on a class hierarchy should report which reasoning was applied.

Limits and common misreadings

A triple is a claim, and RDF does not check it. The Primer describes a triple as true exactly when the relation actually holds between subject and object, which leaves accuracy to the source and to data quality checks, not to the format.

The FHIR specification notes that RDF was designed to be monotonic, so new data cannot invalidate previous conclusions, and Hogan and colleagues explain that OWL adopts the open world assumption, under which anything the graph does not entail is not assumed to be false. A graph with no trial comparing two drugs shows only that no such trial has been entered, and cannot replace a literature search.

RDF is often confused with its neighbours. It is the data model, while SPARQL queries it, RDF Schema and OWL give its terms meaning, SKOS organises concept schemes in it and SHACL validates it. A knowledge graph may be built in RDF or as a property graph, which Hogan and colleagues describe as attaching property-value pairs and a label to both nodes and edges, and Linked Data, in the Primer's account, is the use of RDF to publish and interlink data on the web so that people or programs can follow each IRI to further data. Shared identifiers alone do not deliver digital interoperability, because two systems also need to agree on what the vocabularies mean.

RDF 1.1 from 2014 is the latest W3C Recommendation. The RDF 1.2 Concepts document, a Candidate Recommendation Snapshot dated 7 April 2026, adds triple terms, which let one triple appear as the object of another, so a statement such as a model input value could be described directly, for example by who asserted it.

Sources

Frequently Asked Questions (6)

  • What is the Resource Description Framework?

    Resource Description Framework (RDF) is a W3C data standard holding statements as subject, predicate and object triples, so health datasets can merge.

    Source: W3C 2014

  • How does the Resource Description Framework (RDF) combine data from two separate health data sources?

    An RDF graph is a set of triples, so the RDF 1.1 Concepts specification notes that graphs can be combined easily to use data from several sources. A merge takes the union of the triples, with blank nodes from different sources kept apart. Because IRIs have global scope, statements that use the same IRI for a drug or a diagnosis code join up without any shared table design. Sources that mint different IRIs for the same item stay disconnected, so a query linking resource use to published unit costs can return no rows until the identifiers are mapped.

    Source: Cyganiak et al. 2014

  • Why do domain and range rules in Resource Description Framework (RDF) Schema not catch errors in a costing dataset?

    In RDF Schema, domain and range work as rules for inference, not as checks. A domain declaration lets a reasoner conclude that any resource carrying the property belongs to the declared class. If a unit cost property with the domain Resource Item is attached to a patient record by mistake, a reasoner classifies that patient record as a resource item and reports no error. The RDF Schema specification does not say whether or how an application should act on such information, and validating RDF graphs against a set of conditions is left to SHACL, a separate W3C standard.

    Source: Brickley & Guha 2014

  • Why can a wrongly typed unit cost load without an error in the Resource Description Framework (RDF)?

    Each RDF literal pairs a lexical form with a datatype IRI that fixes how the text maps to a value. A price written as "150 GBP" with the decimal datatype is ill-typed, yet the RDF 1.1 Concepts specification requires implementations to accept ill-typed literals and build graphs from them, with warnings optional. The error can therefore load silently and appear only when a cost fails to compute. The same specification notes that the integers written "1" and "01" denote the same value but are different RDF terms, which matters when counts or costs from two sources are compared term by term.

    Source: Cyganiak et al. 2014

  • What does a coded diagnosis in the FHIR form of the Resource Description Framework (RDF) show in a cost study?

    HL7 FHIR is a standard designed for providers exchanging electronic health records, and its resources can be represented as an RDF graph written in Turtle. The FHIR specification describes FHIR as recording who did what, rather than stating medical facts, and says FHIR RDF should not be read directly as statements of fact. A diagnosis code converted to RDF is therefore a record that a clinician made the diagnosis, not proof that the patient has the condition. A cost study built on real-world data in this form has to treat coded events as records of care.

    Source: HL7 International, FHIR Standard

  • Why can two tools give different answers from the same Resource Description Framework (RDF) graph?

    The RDF 1.1 Concepts specification states that RDF itself recognises only basic cases of entailment, while RDF Schema and OWL 2 add more powerful entailment regimes. It also allows implementations to make all, some or no entailed information available to users. A query relying on a drug class hierarchy can therefore find products filed under subclasses in one tool and miss them in another tool that applies no reasoning. An analysis that depends on inferred triples should report which reasoning was applied, so that another analyst can reproduce its results.

    Source: Cyganiak et al. 2014

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 2 Nov 2026

Content version: 1.0.1

Canonical Identity

Term code
HS-HP-DH-048

Stable URI · Machine-readable · Resolvable · CC BY 4.0