ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

ActivityDefinition — Reusable action template

The blueprint of a clinical activity. Once defined, it can be instantiated as a MedicationRequest, ServiceRequest, Task or CommunicationRequest without duplicating the logic.

Purpose of the resource

ActivityDefinition is a declarative template of a reusable clinical action. It captures intent (prescribe a medication, schedule an exam, send a notification) without itself being the executed instance. Another resource (PlanDefinition, CarePlan, Task, MedicationRequest…) references the ActivityDefinition through instantiatesCanonical, and the $apply operation materialises the action against a concrete subject.

This indirection gives CDS (Clinical Decision Support) systems a dictionary of actions validated by clinical committees, separate from the instances created in the patient chart.

Key fields

FieldTypeCardinalityRole
urluri0..1Stable canonical URL for the ActivityDefinition.
versionstring0..1Semantic version of the definition.
namestring0..1Technical name (camelCase).
titlestring0..1Human-readable title.
statuscode1..1draft | active | retired | unknown.
experimentalboolean0..1Test vs production definition.
subject[x]CodeableConcept | Reference | canonical0..1Target subject (Patient, Group, EvidenceVariable…).
kindcode0..1Resource type to instantiate (MedicationRequest, ServiceRequest, Task…).
profilecanonical0..1Profile the generated instance must conform to.
codeCodeableConcept0..1Detailed action code (SNOMED CT, LOINC, RxNorm…).
intentcode0..1proposal | plan | order | option.
prioritycode0..1routine | urgent | asap | stat.
timing[x]Timing | Age | Range…0..1When to execute.
locationCodeableReference(Location)0..1Where to execute.
participantBackboneElement[]0..*Required actors (clinician, patient, device).
productReference | productCodeableConceptReference | CodeableConcept0..1Product (Medication, Substance, Device).
dosageDosage[]0..*Posology when the action is an administration.
dynamicValueBackboneElement[]0..*FHIRPath/CQL expressions that dynamically set fields during $apply.
librarycanonical[]0..*Referenced logic libraries (CQL).

JSON example

Minimal example of an ActivityDefinition modelling the administration of a questionnaire:

json activitydefinition-example.json
{
  "resourceType": "ActivityDefinition",
  "id": "administer-zika-virus-exposure-assessment",
  "url": "http://example.org/ActivityDefinition/administer-zika-virus-exposure-assessment",
  "version": "5.0.0",
  "name": "AdministerZikaVirusExposureAssessment",
  "title": "Administer Zika Virus Exposure Assessment",
  "status": "draft",
  "experimental": true,
  "date": "2026-05-15",
  "publisher": "HL7 International (FHIR Project)",
  "description": "Administer the Zika Virus Exposure Assessment questionnaire to a patient suspected of Zika exposure.",
  "kind": "ServiceRequest",
  "code": {
    "coding": [{
      "system": "http://snomed.info/sct",
      "code": "171207006",
      "display": "Depression assessment"
    }]
  },
  "intent": "order",
  "priority": "routine",
  "timingTiming": {
    "repeat": {
      "frequency": 1,
      "period": 1,
      "periodUnit": "d"
    }
  }
}

$apply operation

The $apply operation is the primary operation on ActivityDefinition:

  • POST /ActivityDefinition/{id}/$apply with a Parameters body carrying subject, encounter, context.
  • The server returns a concrete resource (MedicationRequest, ServiceRequest, Task…) ready to be saved to the chart.
  • dynamicValue CQL/FHIRPath expressions are evaluated against the subject and injected into the instance.

Common pitfalls

  • Missing kind$apply does not know which resource type to materialise. Always specify.
  • Confusion with PlanDefinition — ActivityDefinition describes ONE action; PlanDefinition orchestrates SEVERAL.
  • Incompatible profile — a profile that contradicts kind will produce an invalid instance.
  • Confusion between code and productCodeableConceptcode = action; product = thing administered.
  • PlanDefinition — orchestration of actions, including ActivityDefinitions.
  • Library — carries CQL expressions referenced via library.
  • Measure — quality measure sharing the same Clinical Reasoning base.
  • Task — often instantiated from an ActivityDefinition.
  • FHIR R5 hub.