Managing tasks

Introduction

When a user opens EPJ, or functions that show tasks to the user, the sfm-Task resource should be used.

The resource is available to make it possible for EPJ systems to present an updated tasks list to the user. Initially, SFM indicated support for "machine token" (without user identity). This is still not implemented, and a normal token with user identity must be used.

Only the command GET is made available for epj-systems.

Read task list

getTasks

  1. User opens EPJ
  2. EPJ request SFM for open tasks that needs to be solved by the user.
  3. SFM returns tasks dedicated to the user and tasks that can be solved by any user.
  4. EPJ presents the tasks to the user.

Input parameters

GET may include query parameters (names are case-sensitive):

  • type: how task categories are collected. Allowed values match the implementation: None, MD, KJ, NonPatient. Use these spellings (PascalCase). Omitting type is allowed; behaviour is then aligned with not restricting to MD-only task collection (see below).
  • NonPatient: returns only tasks that are not tied to a patient context (today this is the FEST alert task, code 11). Matching for this value is case-insensitive; the other type values are compared case-sensitively.
  • pid: reserved in the API contract as a patient identifier list; see capability statement for the Task resource.
  • patientTicket: when searching tasks for a single patient, use /Task?patientTicket=… (see below).
  • codeNot: optional comma-separated list of numeric sfm-task-types codes to exclude from collection.
  • owner: optional filter on task owner identifier.

The following combinations describe the intended use of type (multidose / KJ context):

type pid Description
None none Returns tasks for the installation without restricting to multidose (MD) patient handling the way MD does. Suitable where neither GP-style MD nor PLO-style KJ focus applies.
MD none Returns tasks including multidose-related collection (task type 8) for the installation. Typical for GP (fastlege) contexts.
KJ list of PIDs Returns tasks for the given patients including Kjernejournal-oriented handling. Typical for PLO (pleie og omsorg).
NonPatient n/a Returns only non-patient tasks (e.g. FEST alert).

Return from SFM will include the following attributes:

  • identifier
  • status
  • intent
  • code (See Types of tasks below)
  • description
  • for (if there is identified a patient that is beneficiary of the task if it is performed).
  • owner (Practitioner identified with HPR AND DNR/FNR, or Organization) (valid from SFM version 4.0). HPR should be the preferred identifier for Practitioner, as FNR/DNR may be removed in the future.

Tasks for each patient that are the same type are aggregated into a single task.

Description includes details about the task. For aggregated tasks, the description includes aggregated information. eg. "4 resepter og 2 tilbakekallinger klar for sending".

Types of tasks

See:

Tasks search by individual patient

Task can be searched for an individual patient using the patient ticket parameter (name is lowercase patientTicket):

/Task?patientTicket=[actual ticket]