Concept Architecture
Domain Model in Domain-Driven Design
In Domain-Driven Design (DDD), the domain model is the shared system of abstractions for a subject that a team works out with the people who know that subject, and that the software is written to express, with model and code revised together. In the wiki's Domain Layer, a section applying DDD to health economics and not the software layer of that name in Evans's layered architecture, the subject is an activity around a model, such as running a cost-effectiveness analysis, so the domain model describes that work rather than the disease. A health economic model written as code carries many unstated decisions about what a run is, which inputs produced which results and when a result may be reported. A domain model writes those decisions down as named objects with behaviour and rules, so that code, documentation and reviewers share one set of terms.
Where the term comes from and who uses it
The term has its origin in software design and is new to health economics. Two authors set out its meaning, Evans as the abstraction at the centre of a design and Fowler as a pattern for organising complex business logic in objects, and the wiki label matches theirs.
- Eric Evans built his 2003 book on DDD around the domain model, naming its first part "Putting the Domain Model to Work". His free 2015 reference defines a model as a system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain.
- Martin Fowler's 2003 catalogue of enterprise application patterns lists Domain Model as a pattern in which each object stands for a meaningful individual, whether as large as a corporation or as small as a single line on an order form.
None of the health economics guidance or checklists cited here uses the term. The Model Execution and HTA Appraisal examples below are the wiki's own application, drawn up for its Domain Layer and not yet tested with practitioners.
What a domain model holds
Evans, recounting the project on printed circuit boards that opens his book, says the objects in the model had behaviour and enforced rules, and that the model was not just a data schema. He adds that business activities and rules are as central to a domain as the entities involved. A domain model therefore records the things the work deals with together with what can be done to them and the conditions that must hold.
Evans's reference supplies standard building blocks for expressing such a model in code. An entity is an object defined by a thread of identity that runs through time, even when its attributes change. A value object is described only by its attributes, has no identity of its own and is treated as unchangeable. A domain event records something that happened which domain experts care about. An aggregate is a cluster of entities and value objects with one root entity, and the properties and invariants of the aggregate as a whole are enforced by that root or by a designated framework mechanism. These labels let modellers say precisely that two cost inputs with the same amount, currency and price year are interchangeable, while two model runs with identical settings are still two runs.
How a domain model is built and kept alive
Evans calls the work of building the model knowledge crunching. It sifts documents and discussion with domain experts until a set of abstract concepts makes sense of the detail. In the Model Execution context the domain experts are the health economists who build and run models and the reviewers who check them, while clinicians are experts in the disease that the health economic model itself represents. The person writing the software may be a health economist working in R or in a spreadsheet.
The model and the code are meant to stay tied. Evans's model-driven design pattern asks that a portion of the software reflect the domain model so literally that the mapping is obvious, so that a change to the code may be a change to the model. His layered architecture pattern places all code related to the domain model in one layer, isolated from the user interface, the application and the infrastructure. He also argues that sophisticated domain models seldom prove useful unless developed through repeated refactoring with close involvement of domain experts, so a first version is expected to be revised.
Health economic modellers already separate parts of a model's code for similar reasons without using DDD terms. The DARTH coding framework of Alarid-Escudero and colleagues divides a decision analysis into model inputs, decision model implementation, calibration, validation and analysis, and offers naming conventions and unit testing as aids to model transparency. A domain model works at a different level, because it names the concepts and rules of the work that such a code structure would carry out.
A domain model for running a health economic model
A candidate Model Execution context shows how the idea applies. Its job is to turn a specified model and a set of inputs into stored results, and its domain model might contain the elements in the table, each given an illustrative DDD role.
| Element | DDD role | What it records |
|---|---|---|
| Model Specification | Entity | Structure, health states, time horizon and the version that identifies it |
| Parameter Set | Entity | A named, versioned set of input values, such as the base case inputs |
| Parameter Value | Value object | One input with its unit, and for costs the currency and price year |
| Model Run | Entity and aggregate root, its completion a domain event | One execution, with its seed and number of simulations if stochastic, which may start only if its inputs pass validity checks |
| Result Set | Aggregate root | Costs, QALYs and the ICER produced by one run, with links to the specification and inputs |
Two rules give the model its value. The first is that every reported result set names the model version and the parameter set that produced it. The darthpack repository of the DARTH group applies the same idea at release level, telling readers to cite one archived release and use it to reproduce the results reported in the paper. The second is that a run whose inputs fail validity checks does not start. The same repository records that a later release added input validation so that a misspelled parameter name raises an error instead of silently returning results for the base case.
Writing the model down also exposes words with two meanings. In the DARTH framework a probabilistic sensitivity analysis samples sets of input parameter values and runs the model once for each set, so in PSA usage a parameter set is one draw, and the table above would need another name for that draw.
Worked example with a transition matrix invariant
The rule that a run does not start with invalid inputs can be written as an invariant on the transition probability matrix of a cohort state-transition model. Alarid-Escudero and colleagues, in their tutorial on cohort state-transition models in R, state that each row of a correctly specified matrix must sum to one and that every entry must lie between 0 and 1.
where is the probability of moving from health state to health state in one cycle, is the number of health states and indexes the starting state.
Take an illustrative three-state model with the states Well, Sick and Dead. The analyst enters the row for Well as 0.85 for staying Well, 0.10 for moving to Sick and 0.05 for death. The row sum is 0.85 plus 0.10 plus 0.05, which equals 1.00, so the invariant holds and the Model Run may start. A later edit mistypes the death probability as 0.07. The row sum becomes 0.85 plus 0.10 plus 0.07, which equals 1.02, so the invariant fails and the run is refused. No Result Set then exists that could reach a report. Without the rule the cohort would gain 2% of the Well population each cycle, all of it in the Dead state, so life years and the costs of the Well and Sick states would be unchanged while deaths were overcounted and the cohort trace summed to more than one. The domain model states such a rule once against a named object, here the Model Run as the root that enforces it, so every run is checked in the same way.
Where a domain model meets HTA practice
NICE and published model checklists already ask for properties that a well-kept domain model makes easier to show. The NICE manual (PMG36), at section 5.5.15, asks a company submitting a fully executable model to give NICE full access to the programming code and to ensure that the submitted model and the written evidence submission match. The TECH-VER verification checklist of Büyükkaramikli and colleagues asks whether all the results in the report, including the uncertainty analysis results, could be generated from the model. A rule that ties every Result Set to a Model Specification version and a Parameter Set makes both questions easier to check, which supports technical verification and reproducibility of an executable model.
An HTA Appraisal context would need a separate domain model with its own objects, such as an Appraisal, an Evidence Submission, a Clarification Request and a Recommendation. Its rules would differ between agencies, so a model built on NICE process language should be labelled NICE-specific and not presented as general HTA practice.
Boundaries with nearby ideas
A domain model and a health economic model answer different questions. The health economic model represents disease, treatment, costs and outcomes in order to estimate value for money, while the Model Execution domain model represents the work of specifying, running and reporting that model, so the health economic model appears inside it as one object. Checking whether the decision model's structure fits the disease is the task of conceptual model validation, not of the domain model.
A domain model is also distinct from an ontology. Each domain model is written for one bounded context and is expected to change as the software and the team's understanding change. In DDD the bounded context sets the limit within which one domain model applies, and the ubiquitous language is the vocabulary built around that model and used by the whole team. A domain model does not by itself let two systems exchange data, since each context keeps its own meanings and any exchange still needs explicit translation. The word domain here carries Evans's sense of a sphere of knowledge, influence or activity, and is separate from the wiki's own Health Economics domain and its nine subdomains.
Common misreadings
Three misreadings are the most likely in health economic work. Two concern what a domain model contains, and the third concerns when one is worth building.
- Treating the domain model as a diagram or a data dictionary. Evans stresses that his circuit board model was not just a data schema, and his reference warns that a model used only to draw UML diagrams for the technical members of a team does not contribute to the collaboration at the heart of DDD. A table of field names without behaviour and rules records data and leaves the knowledge in people's heads.
- Building an anemic domain model. Fowler describes models whose objects carry the names of domain things but hardly any behaviour, with all logic held in separate service objects. In his view such a model bears the costs of a domain model without its benefits. In a health economic model the equivalent is a set of named input sheets with every calculation and check left in scattered macros.
- Assuming every model needs one. Fowler says plainly that domain models are not always the best tool, and he describes DDD as particularly suited to complex domains with much messy logic. A small decision tree in a spreadsheet may gain little from a formal domain model.
Sources
- Alarid-Escudero F, Krijkamp EM, Pechlivanoglou P, et al. A need for change! A coding framework for improving transparency in decision modeling. PharmacoEconomics. 2019;37(11):1329-1339. https://doi.org/10.1007/s40273-019-00837-x
- Alarid-Escudero F, Krijkamp EM, Enns EA, et al. An introductory tutorial on cohort state-transition models in R using a cost-effectiveness analysis example. Medical Decision Making. 2023;43(1):3-20. https://pmc.ncbi.nlm.nih.gov/articles/PMC9742144/
- Alarid-Escudero F, et al. darthpack, an R package of the DARTH coding framework. GitHub repository README, release v0.2.0; 2026. https://github.com/DARTH-git/darthpack
- Büyükkaramikli NC, Rutten-van Mölken MPMH, Severens JL, Al M. TECH-VER: a verification checklist to reduce errors in models and improve their credibility. PharmacoEconomics. 2019;37(11):1391-1408. https://doi.org/10.1007/s40273-019-00844-y
- Evans E. Domain-Driven Design: Tackling Complexity in the Heart of Software. Boston: Addison-Wesley; 2003. Publisher sample pages (contents, preface and chapter 1). https://www.ciscopress.com/content/images/9780321125217/samplepages/0321125215.pdf
- Evans E. Domain-Driven Design Reference: Definitions and Pattern Summaries. Domain Language, Inc.; 2015. Licensed CC BY 4.0. https://www.domainlanguage.com/wp-content/uploads/2016/05/DDD_Reference_2015-03.pdf
- Fowler M. Domain Model. Catalog of Patterns of Enterprise Application Architecture; 2003. https://martinfowler.com/eaaCatalog/domainModel.html
- Fowler M. AnemicDomainModel. martinfowler.com bliki; 25 November 2003. https://martinfowler.com/bliki/AnemicDomainModel.html
- Fowler M. DomainDrivenDesign. martinfowler.com bliki; 22 April 2020. https://martinfowler.com/bliki/DomainDrivenDesign.html
- National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). Published 31 January 2022, last updated 13 October 2026. Section 5.5.15. https://www.nice.org.uk/process/pmg36
Related Concepts (1)
Library
Publications
5
AnemicDomainModel — Fowler M, 2003 (martinfowler.com bliki)
Source listed in the Sources of the HealthEconomics.wiki Concept Architecture articles on Domain Model and Domain Service, where it is cited as a reference for these concepts.
Web (Open Access)View source →Domain Model — Fowler M, 2003 (Catalog of Patterns of Enterprise Application Architecture)
Source listed in the Sources of the HealthEconomics.wiki Concept Architecture article on Domain Model, where it is cited as a reference for that concept.
Web (Open Access)View source →Domain-Driven Design Reference: Definitions and Pattern Summaries — Evans E, 2015 (Domain Language)
Source listed in the Sources of the HealthEconomics.wiki Concept Architecture articles on Domain-Driven Design, Domain (Domain-Driven Design), Subdomain (Domain-Driven Design), Core Domain, Bounded Context, Ubiquitous Language, Domain Model, Context Map, Strategic Design, Domain Expert, Entity (Domain-Driven Design), Value Object, Aggregate (Domain-Driven Design), Invariant (Domain-Driven Design), Anticorruption Layer, Published Language, Domain Event, Domain Service, Shared Kernel and Open Host Service, where it is cited as a reference for these concepts.
Domain Driven Design — Fowler M, 2020 (martinfowler.com)
Source listed in the Sources of the HealthEconomics.wiki Concept Architecture articles on Domain-Driven Design, Domain (Domain-Driven Design), Strategic Design, Core Domain, Domain Model and Aggregate (Domain-Driven Design), where it is cited as a reference for these concepts.
Web (Open Access)View source →Domain-Driven Design: Tackling Complexity in the Heart of Software — Evans E, 2003 (Addison-Wesley)
Book or book chapter listed in the Sources of the HealthEconomics.wiki Concept Architecture articles on Domain-Driven Design, Domain (Domain-Driven Design), Core Domain, Bounded Context, Context Map, Published Language, Open Host Service, Ubiquitous Language, Domain Model, Strategic Design, Domain Expert, Entity (Domain-Driven Design), Invariant (Domain-Driven Design), Anticorruption Layer, Shared Kernel, Value Object and Domain Service, where it is cited as a reference for these concepts.
BookView source →
Tools & Resources
1
darthpack, an R package of the DARTH coding framework — Alarid-Escudero F, et al, Release v0.2.0 ed., 2026 (GitHub)
Source listed in the Sources of the HealthEconomics.wiki Concept Architecture article on Domain Model, where it is cited as a reference for that concept.
Web (Open Access)View source →
Frequently Asked Questions (6)
What is Domain Model?
A domain model is a system of abstractions, built with domain experts, for the things, rules and actions of a task such as running a health economic model.
Source: Evans 2015
Where does the term Domain Model come from?
Domain Model is a software design term that Eric Evans placed at the centre of his 2003 book on Domain-Driven Design, whose first part is titled Putting the Domain Model to Work. His free 2015 reference defines a model as a system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain. Martin Fowler catalogued Domain Model in 2003 as a pattern for complex business logic. The term is new to health economics, and none of the health economics guidance or checklists cited on the wiki's Domain Model page uses it.
Source: Evans 2015
How does a Domain Model differ from a health economic model?
A health economic model represents disease, treatment, costs and outcomes in order to estimate value for money. A Domain Model in Domain-Driven Design represents an area of work instead, so a domain model for running a health economic model describes objects such as a model specification, a parameter set, a model run and a result set. The health economic model then appears inside that domain model as one object among several. Checking whether the decision model's structure fits the disease remains the task of conceptual model validation.
Source: Evans 2015
What building blocks does a Domain Model use in Domain-Driven Design?
Eric Evans gives a Domain Model a set of standard building blocks for expressing it in code. An entity keeps one identity through time even when its attributes change, such as a single model run, while a value object is described only by its attributes and is treated as unchangeable, such as a cost recorded with its currency and price year. A domain event records something that happened which domain experts care about. An aggregate groups entities and value objects under one root entity, which enforces the invariants that must hold for the group as a whole.
Source: Evans 2015
How can a Domain Model help with NICE submissions of executable health economic models?
The NICE manual (PMG36) asks a company submitting a fully executable model to give NICE full access to the programming code and to make sure the submitted model and the written evidence submission match. A Domain Model for running a model can state a rule that every reported result set names the model version and the parameter set that produced it. That rule makes the matching requirement easier to check for each run, since a reviewer can compare the model version and inputs behind each result with the written evidence submission.
Source: NICE PMG36 (2022, updated 2026)
What did Martin Fowler mean by an anemic Domain Model?
Martin Fowler used the label for a design whose objects carry the names of domain things but hold hardly any behaviour, with all logic placed in separate service objects. In his view such a model bears the costs of a Domain Model without yielding its benefits. In a health economic model the equivalent would be a set of neatly named input sheets with every calculation and check left in scattered macros. Fowler also notes that domain models are not always the best tool, so a small and simple model may not need one.
Source: Fowler 2003
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 16 Nov 2026
Content version: 1.0.1
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/domain-model
- Term code
- HS-HP-DH-116
Stable URI · Machine-readable · Resolvable · CC BY 4.0
