eHealth Infrastructure
3.4.0 - release  flag

This page is part of the FUT Infrastructure (v3.4.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

Resource Profile: ehealth-task - Examples

No examples are currently available for the profile.

StructureDefinition: ehealth-task - Operation examples

GET [base]/Task/376

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiJG1pZ3JhdGUiLCJUYXNrLnJlYWQiLCIkdGVzdC1vbmx5LWNyZWF0ZSIsIkNsaW5pY2FsSW1wcmVzc2lvbi5yZWFkIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Task",
  "id": "376",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2025-02-05T11:49:51.980+00:00",
    "source": "#bc828b94-4c3b-40",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
      "valueReference": {
        "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/96165"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/task-category",
            "code": "TBD"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/restriction-category",
            "code": "None"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
      "valueReference": {
        "reference": "https://organization.cit-task-2140.local/fhir/Practitioner/14163"
      }
    }
  ],
  "groupIdentifier": {
    "assigner": {
      "reference": "https://organization.cit-task-2140.local/fhir/Organization/61747"
    }
  },
  "status": "draft",
  "intent": "proposal",
  "priority": "routine",
  "requester": {
    "reference": "https://organization.cit-task-2140.local/fhir/Organization/61747"
  },
  "owner": {
    "reference": "https://organization.cit-task-2140.local/fhir/Organization/61747"
  },
  "restriction": {
    "recipient": [
      {
        "reference": "https://organization.cit-task-2140.local/fhir/Organization/61747"
      }
    ]
  }
}

GET [base]/Task?focus=https%3A%2F%2Fcareplan.cit-task-2140.local%2Ffhir%2FServiceRequest%2F38866&resolvedTimingStart=2025-02-05T00%3A00%3A00%2B00%3A00&resolvedTimingEnd=2025-02-05T08%3A00%3A00%2B00%3A00

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiNDk2ZGZiY2MtNDI3Ny00MDBlLTlmZWItNzY3ZmE4NzY1MzM3IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIlRhc2suc2VhcmNoIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Bundle",
  "id": "e6cadb3c-9d16-4675-b3db-ba5da298d501",
  "meta": {
    "lastUpdated": "2025-02-05T11:53:50.606+00:00"
  },
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "https://task.cit-task-2140.local/fhir/Task?_format=json&_pretty=true&focus=https%3A%2F%2Fcareplan.cit-task-2140.local%2Ffhir%2FServiceRequest%2F38866&resolvedTimingEnd=2025-02-05T08%3A00%3A00%2B00%3A00&resolvedTimingStart=2025-02-05T00%3A00%3A00%2B00%3A00"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://task.cit-task-2140.local/fhir/Task/411",
      "resource": {
        "resourceType": "Task",
        "id": "411",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2025-02-05T11:53:43.057+00:00",
          "source": "#3f78c08c-76bb-43",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
          ]
        },
        "extension": [
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
            "valueReference": {
              "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/63893"
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://ehealth.sundhed.dk/cs/task-category",
                  "code": "MissingMeasurementResolving",
                  "display": "Need resolving of why scheduled measurement has not been submitted"
                }
              ]
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://ehealth.sundhed.dk/cs/restriction-category",
                  "code": "measurement-monitoring",
                  "display": "Monitoring of measurement(s)"
                }
              ]
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
            "valueReference": {
              "reference": "https://organization.cit-task-2140.local/fhir/CareTeam/63739"
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
            "extension": [
              {
                "url": "serviceRequestVersionId",
                "valueId": "1"
              },
              {
                "url": "start",
                "valueDateTime": "2025-02-05T00:00:00+00:00"
              },
              {
                "url": "end",
                "valueDateTime": "2025-02-05T08:00:00+00:00"
              },
              {
                "url": "type",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
                      "code": "Resolved",
                      "display": "Resolved"
                    }
                  ]
                }
              }
            ]
          }
        ],
        "status": "requested",
        "intent": "plan",
        "priority": "routine",
        "description": "MissingMeasurementTest",
        "focus": {
          "reference": "https://careplan.cit-task-2140.local/fhir/ServiceRequest/38866"
        },
        "for": {
          "reference": "https://patient.cit-task-2140.local/fhir/Patient/38971"
        },
        "authoredOn": "2025-02-05T11:53:42+00:00"
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/Task/279/_history/2

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiVGFzay5zZWFyY2giLCJUYXNrLnJlYWQiLCJUYXNrLmNyZWF0ZSIsIiR0ZXN0LW9ubHktY3JlYXRlIiwiVGFzay5wYXRjaCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Task",
  "id": "279",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2025-02-05T11:47:37.718+00:00",
    "source": "#f2ff9dff-bf22-43",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
      "valueReference": {
        "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/83132"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/task-category",
            "code": "TBD"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/restriction-category",
            "code": "None"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
      "valueReference": {
        "reference": "https://organization.cit-task-2140.local/fhir/Practitioner/36824"
      }
    }
  ],
  "status": "cancelled",
  "intent": "proposal",
  "priority": "routine"
}

PATCH [base]/Task/279

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiVGFzay5zZWFyY2giLCJUYXNrLnJlYWQiLCJUYXNrLmNyZWF0ZSIsIiR0ZXN0LW9ubHktY3JlYXRlIiwiVGFzay5wYXRjaCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
Accept: application/fhir+xml;q=1.0, application/fhir+json;q=1.0, application/xml+fhir;q=0.9, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Accept-Encoding: gzip
Content-Type: application/json-patch+json; charset=UTF-8

Body:

[
  {
    "op": "replace",
    "path": "/status",
    "value": "cancelled"
  }
]

Response

{
  "resourceType": "Task",
  "id": "279",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2025-02-05T11:47:37.718+00:00",
    "source": "#f2ff9dff-bf22-43fc-ad2b-34e3299ffa78",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
      "valueReference": {
        "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/83132"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/task-category",
            "code": "TBD"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/restriction-category",
            "code": "None"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
      "valueReference": {
        "reference": "https://organization.cit-task-2140.local/fhir/Practitioner/36824"
      }
    }
  ],
  "status": "cancelled",
  "intent": "proposal",
  "priority": "routine"
}

POST [base]/Task

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMmZmNDgzOTUtMjcwNS00ODUzLTlhZGYtNTQyOWRkMWYyYjA3IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIlRhc2suY3JlYXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8

Body:

{
  "resourceType": "Task",
  "meta": {
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
      "valueReference": {
        "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/63893"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/task-category",
            "code": "MissingMeasurementResolving",
            "display": "Need resolving of why scheduled measurement has not been submitted"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/restriction-category",
            "code": "measurement-monitoring",
            "display": "Monitoring of measurement(s)"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
      "valueReference": {
        "reference": "https://organization.cit-task-2140.local/fhir/CareTeam/63739"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
      "extension": [
        {
          "url": "serviceRequestVersionId",
          "valueId": "1"
        },
        {
          "url": "start",
          "valueDateTime": "2025-02-05T00:00:00+00:00"
        },
        {
          "url": "end",
          "valueDateTime": "2025-02-05T08:00:00+00:00"
        },
        {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
                "code": "Resolved",
                "display": "Resolved"
              }
            ]
          }
        }
      ]
    }
  ],
  "status": "requested",
  "intent": "plan",
  "priority": "routine",
  "description": "MissingMeasurementTest",
  "focus": {
    "reference": "https://careplan.cit-task-2140.local/fhir/ServiceRequest/38866"
  },
  "for": {
    "reference": "https://patient.cit-task-2140.local/fhir/Patient/38971"
  },
  "authoredOn": "2025-02-05T11:53:42+00:00"
}

Response

{
  "resourceType": "Task",
  "id": "411",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2025-02-05T11:53:43.057+00:00",
    "source": "#3f78c08c-76bb-433d-b5eb-b9d939be07e2",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
      "valueReference": {
        "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/63893"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/task-category",
            "code": "MissingMeasurementResolving",
            "display": "Need resolving of why scheduled measurement has not been submitted"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://ehealth.sundhed.dk/cs/restriction-category",
            "code": "measurement-monitoring",
            "display": "Monitoring of measurement(s)"
          }
        ]
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
      "valueReference": {
        "reference": "https://organization.cit-task-2140.local/fhir/CareTeam/63739"
      }
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-resolved-timing",
      "extension": [
        {
          "url": "serviceRequestVersionId",
          "valueId": "1"
        },
        {
          "url": "start",
          "valueDateTime": "2025-02-05T00:00:00+00:00"
        },
        {
          "url": "end",
          "valueDateTime": "2025-02-05T08:00:00+00:00"
        },
        {
          "url": "type",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/resolved-timing-type",
                "code": "Resolved",
                "display": "Resolved"
              }
            ]
          }
        }
      ]
    }
  ],
  "status": "requested",
  "intent": "plan",
  "priority": "routine",
  "description": "MissingMeasurementTest",
  "focus": {
    "reference": "https://careplan.cit-task-2140.local/fhir/ServiceRequest/38866"
  },
  "for": {
    "reference": "https://patient.cit-task-2140.local/fhir/Patient/38971"
  },
  "authoredOn": "2025-02-05T11:53:42+00:00"
}

POST [base]/Task/$validate

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiVGFzay5zZWFyY2giLCJUYXNrLnJlYWQiLCJUYXNrLmNyZWF0ZSIsIiR0ZXN0LW9ubHktY3JlYXRlIiwiVGFzay5wYXRjaCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8

Body:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "resource",
      "resource": {
        "resourceType": "Task",
        "meta": {
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task"
          ]
        },
        "extension": [
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-episodeOfCare",
            "valueReference": {
              "reference": "https://careplan.cit-task-2140.local/fhir/EpisodeOfCare/2424"
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-category",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://ehealth.sundhed.dk/cs/task-category",
                  "code": "TBD"
                }
              ]
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-restriction-category",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://ehealth.sundhed.dk/cs/restriction-category",
                  "code": "None"
                }
              ]
            }
          },
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-task-responsible",
            "valueReference": {
              "reference": "https://organization.cit-task-2140.local/fhir/Practitioner/97917"
            }
          }
        ],
        "status": "draft",
        "intent": "proposal",
        "priority": "routine"
      }
    }
  ]
}

Response

{
  "resourceType": "OperationOutcome",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td>No issues detected during validation</td></tr><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td>No issues detected during validation</td></tr></table></div>"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "No issues detected during validation"
    },
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "No issues detected during validation"
    }
  ]
}