-s-assigned-material-count
type: OperationDefinition
node role: treeRoot
resource.id:
  value: -s-assigned-material-count
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: OperationDefinition -s-assigned-material-count URL: [base]/$assigned-material-count Parameters Use Name Scope Cardinality Type Binding Documentation IN ehealth-documentReference 1..1 Reference Mandatory reference for general-material ehealth-documentReference from the Plan service. IN group-by-careTeam 0..1 boolean group the count by CareTeams present in the Communication.participant.actor references IN date 0..1 dateTime Only count ehealth-material-communications where the Communication.period contains the date IN status 1..* string Only count ehealth-material-communications with one of the given statuses
operation definition.url:
  value: http://ehealth.sundhed.dk/fhir/OperationDefinition/-s-assigned-material-count
operation definition.version:
  value: 10.0.0
operation definition.name:
  value: assigned-material-count
operation definition.title:
  value: Retrieve count of assignments for material
operation definition.status:
  value: active
operation definition.kind:
  value: operation
operation definition.date:
  value: 2026-08-06T13:29:38+00:00
operation definition.publisher:
  value: Den telemedicinske infrastruktur (eHealth Infrastructure)
operation definition.contact:
  index: 0
  contact detail.name:
    value: Den telemedicinske infrastruktur (eHealth Infrastructure)
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: http://ehealth.sundhed.dk
operation definition.description:
  value: 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. ## Input The operation has two mandatory input parameters: - An EHealthDocumentReference reference - One or more status codes Additionally, there are two optional input parameters: - A boolean indicating whether to group the result by participant CareTeam references - A date parameter ### EHealthDocumentReference reference 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. ### Group-by-careTeam boolean 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. ### Date 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. ### Status code list 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. ## Output When supplied with valid inputs, the operation will re…
operation definition.jurisdiction:
  index: 0
  codeable concept.coding:
    index: 0
    coding.system:
      value: urn:iso:std:iso:3166
    coding.code:
      value: DK
    coding.display:
      value: Denmark
operation definition.affects state:
  value: false
operation definition.code:
  value: assigned-material-count
operation definition.system:
  value: true
operation definition.type:
  value: false
operation definition.instance:
  value: false
operation definition.parameter:
  index: 0
  operation definition.parameter.name:
    value: ehealth-documentReference
  operation definition.parameter.use:
    value: in
  operation definition.parameter.min:
    value: 1
  operation definition.parameter.max:
    value: 1
  operation definition.parameter.documentation:
    value: Mandatory reference for general-material ``ehealth-documentReference`` from the Plan service.
  operation definition.parameter.type:
    value: Reference
operation definition.parameter:
  index: 1
  operation definition.parameter.name:
    value: group-by-careTeam
  operation definition.parameter.use:
    value: in
  operation definition.parameter.min:
    value: 0
  operation definition.parameter.max:
    value: 1
  operation definition.parameter.documentation:
    value: group the count by CareTeams present in the ``Communication.participant.actor`` references
  operation definition.parameter.type:
    value: boolean
operation definition.parameter:
  index: 2
  operation definition.parameter.name:
    value: date
  operation definition.parameter.use:
    value: in
  operation definition.parameter.min:
    value: 0
  operation definition.parameter.max:
    value: 1
  operation definition.parameter.documentation:
    value: Only count ``ehealth-material-communications`` where the ``Communication.period`` contains the date
  operation definition.parameter.type:
    value: dateTime
operation definition.parameter:
  index: 3
  operation definition.parameter.name:
    value: status
  operation definition.parameter.use:
    value: in
  operation definition.parameter.min:
    value: 1
  operation definition.parameter.max:
    value: *
  operation definition.parameter.documentation:
    value: Only count ``ehealth-material-communications`` with one of the given statuses
  operation definition.parameter.type:
    value: string