This page is part of the FUT Infrastructure (v10.0.0: Release) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions
| Official URL: http://ehealth.sundhed.dk/fhir/OperationDefinition/-s-assigned-material-count | Version: 10.0.0 | |||
| Active as of 2026-08-06 | Computable Name: assigned-material-count | |||
This operation counts the number of material assignments (ehealth-material-communication resources) for a given ehealth-documentreference from the Plan service. This is done by performing an internal search using the given ehealth-documentReference, date and status parameters. Regardless of the given parameters, only ehealth-material-communication resources referring to an active ehealth-episodeofcare are counted. The group-by-careteam parameter determines whether a simple '_summary=count' search is performed or if all results should be fetched to extract and count based on participant CareTeam references.
The operation has two mandatory input parameters:
Additionally, there are two optional input parameters:
A mandatory reference to an EHealthDocumentReference (general-material) in the plan service. Only ehealth-material-communication resources with the given reference in Communication.payload.content are counted.
The group-by-careTeam parameter is optional. When not supplied by the user, it is assumed false. When it is set to true, the operation returns a count per CareTeam referenced as a participant in the matching ehealth-material-communication resources.
The date parameter is optional, however, the count is always filtered by a date. If one is not given by the user, the date of execution is used instead. Only ehealth-material-communication resources whose Communication.period contains the used date are counted.
At least one status code must be supplied by the user. Only ehealth-material-communications with one of the supplied status codes in Communication.status will be counted.
When supplied with valid inputs, the operation will return a Bundle resource with a single Parameters resource in its Bundle.entry list. The Parameters resource format depends on whether the group-by-careTeam parameter was true.
If group-by-careTeam was false or not present. The Parameters resource will only contain a single parameter, named total with the value being the count of the ehealth-material-communication resources found to satisfy the given parameters.
Example of output with group-by-careTeam as false or not present:
"resource": {
"resourceType": "Parameters",
"parameter": [{
"name": "total",
"valueInteger": 42
}]
}]
}
If group-by-careTeam was true, the Parameters resource will contain a parameter for each CareTeam that is referenced in Communication.participant.actor in any of the matching ehealth-material-communication resources. The name of each parameter will be the reference value (CareTeam/[id]) of the CareTeam and the value will be the count of matching ehealth-material-communication resources that reference that CareTeam. It is worth noting that if an ehealth-material-communication has two (or more) distinct participant CareTeams, this will add to the count of each of them.
Example of output with group-by-careTeam as true:
"resource": {
"resourceType": "Parameters",
"parameter": [{
"name": "CareTeam/123",
"valueInteger": 5
},
{
"name": "CareTeam/456",
"valueInteger": 7
}]
}]
}
URL: [base]/$assigned-material-count
| Use | Name | Scope | Cardinality | Type | Binding | Documentation |
| IN | ehealth-documentReference | 1..1 | Reference | Mandatory reference for general-material | ||
| IN | group-by-careTeam | 0..1 | boolean | group the count by CareTeams present in the | ||
| IN | date | 0..1 | dateTime | Only count | ||
| IN | status | 1..* | string | Only count |