eHealth Infrastructure
7.0.0 - release Denmark flag

eHealth Infrastructure, published by Den telemedicinske infrastruktur (eHealth Infrastructure). This guide is not an authorized publication; it is the continuous build for version 7.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/fut-infrastructure/implementation-guide/ and changes regularly. See the Directory of published versions

Resource Profile: ehealth-consent - Examples

Examples for the ehealth-consent Profile:

  • Consent/23
  • StructureDefinition: ehealth-consent - Operation examples

    GET [base]/Consent/1857

    Header

    Accept-Charset: utf-8
    Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiQ29uc2VudC5yZWFkIiwiRXBpc29kZU9mQ2FyZS5yZWFkIiwiQ2FyZVBsYW4ucmVhZCIsIiRtaWdyYXRlIiwiQ29tbXVuaWNhdGlvblJlcXVlc3QucmVhZCIsIiR0ZXN0LW9ubHktY3JlYXRlIiwiUHJvdmVuYW5jZS5yZWFkIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
    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": "Consent",
      "id": "1857",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2025-02-04T15:18:47.028+00:00",
        "source": "#18ee7849-2f65-4d",
        "profile": [
          "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
        ]
      },
      "status": "active",
      "scope": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentscope",
            "code": "treatment",
            "display": "Treatment"
          }
        ]
      },
      "category": [
        {
          "coding": [
            {
              "system": "http://ehealth.sundhed.dk/cs/consent-category",
              "code": "TBD"
            }
          ]
        }
      ],
      "patient": {
        "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/2572"
      },
      "performer": [
        {
          "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/63426"
        }
      ],
      "policyRule": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
            "code": "cric"
          }
        ]
      },
      "provision": {
        "period": {
          "start": "1970-01-01T00:00:01+00:00",
          "end": "1970-01-01T00:01:40+00:00"
        },
        "actor": [
          {
            "id": "92f95081-b2c6-4a20-bcd8-0ef5e8442748",
            "role": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                  "code": "authserver"
                }
              ]
            },
            "reference": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/75486"
            }
          }
        ],
        "data": [
          {
            "meaning": "related",
            "reference": {
              "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/1856"
            }
          }
        ]
      }
    }
    

    GET [base]/Consent?patient=https%3A%2F%2Fpatient.cit-careplan-3038.local%2Ffhir%2FPatient%2F2616&data=https%3A%2F%2Fcareplan.cit-careplan-3038.local%2Ffhir%2FEpisodeOfCare%2F3075%2F_history%2F1&category=SSLPCI&status=active

    Header

    Accept-Charset: utf-8
    Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiQ29uc2VudC5yZWFkIiwiQ29uc2VudC5zZWFyY2giLCJDb25zZW50LnVwZGF0ZSIsIkNvbnNlbnQuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
    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": "8e72dcaa-6a42-42c8-83b7-22ce2705443d",
      "meta": {
        "lastUpdated": "2025-02-04T15:32:28.331+00:00"
      },
      "type": "searchset",
      "total": 1,
      "link": [
        {
          "relation": "self",
          "url": "https://careplan.cit-careplan-3038.local/fhir/Consent?_format=json&_pretty=true&category=SSLPCI&data=https%3A%2F%2Fcareplan.cit-careplan-3038.local%2Ffhir%2FEpisodeOfCare%2F3075%2F_history%2F1&patient=https%3A%2F%2Fpatient.cit-careplan-3038.local%2Ffhir%2FPatient%2F2616&status=active"
        }
      ],
      "entry": [
        {
          "fullUrl": "https://careplan.cit-careplan-3038.local/fhir/Consent/3076",
          "resource": {
            "resourceType": "Consent",
            "id": "3076",
            "meta": {
              "versionId": "1",
              "lastUpdated": "2025-02-04T15:32:27.186+00:00",
              "source": "#3de100ab-6572-4a",
              "profile": [
                "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
              ]
            },
            "status": "active",
            "scope": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/consentscope",
                  "code": "treatment",
                  "display": "Treatment"
                }
              ]
            },
            "category": [
              {
                "coding": [
                  {
                    "system": "http://ehealth.sundhed.dk/cs/consent-category",
                    "code": "SSLPCI"
                  }
                ]
              }
            ],
            "patient": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/2616"
            },
            "performer": [
              {
                "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/37693"
              }
            ],
            "policyRule": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
                  "code": "cric"
                }
              ]
            },
            "provision": {
              "period": {
                "start": "1970-01-01T00:00:01+00:00",
                "end": "1970-01-01T00:01:40+00:00"
              },
              "actor": [
                {
                  "id": "34cb1cc2-8f0d-412c-8dad-56b4761058a1",
                  "role": {
                    "coding": [
                      {
                        "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                        "code": "authserver"
                      }
                    ]
                  },
                  "reference": {
                    "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/34160"
                  }
                }
              ],
              "data": [
                {
                  "meaning": "related",
                  "reference": {
                    "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3075"
                  }
                }
              ]
            }
          },
          "search": {
            "mode": "match"
          }
        }
      ]
    }
    

    GET [base]/Consent/3098/_history/2

    Header

    Accept-Charset: utf-8
    Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiQ29uc2VudC5yZWFkIiwiQ29uc2VudC5zZWFyY2giLCJDb25zZW50LnVwZGF0ZSIsIkNvbnNlbnQuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
    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": "Consent",
      "id": "3098",
      "meta": {
        "versionId": "2",
        "lastUpdated": "2025-02-04T15:32:44.026+00:00",
        "source": "#89f7e76d-c1fe-46",
        "profile": [
          "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
        ]
      },
      "status": "draft",
      "scope": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentscope",
            "code": "treatment",
            "display": "Treatment"
          }
        ]
      },
      "category": [
        {
          "coding": [
            {
              "system": "http://ehealth.sundhed.dk/cs/consent-category",
              "code": "TBD"
            }
          ]
        }
      ],
      "patient": {
        "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/51846"
      },
      "performer": [
        {
          "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/63381"
        }
      ],
      "policyRule": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
            "code": "cric"
          }
        ]
      },
      "provision": {
        "period": {
          "start": "1970-01-01T00:00:01+00:00",
          "end": "1970-01-01T00:01:40+00:00"
        },
        "actor": [
          {
            "id": "e3fbadf0-728a-4e1b-a2ae-067eccb60fe2",
            "role": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                  "code": "authserver"
                }
              ]
            },
            "reference": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/56856"
            }
          }
        ],
        "data": [
          {
            "meaning": "related",
            "reference": {
              "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3097"
            }
          }
        ]
      }
    }
    

    POST [base]/Consent

    Header

    Accept-Charset: utf-8
    Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiQ29uc2VudC5yZWFkIiwiQ29uc2VudC5zZWFyY2giLCJDb25zZW50LnVwZGF0ZSIsIkNvbnNlbnQuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
    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": "Consent",
      "meta": {
        "profile": [
          "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
        ]
      },
      "status": "active",
      "scope": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentscope",
            "code": "treatment",
            "display": "Treatment"
          }
        ]
      },
      "category": [
        {
          "coding": [
            {
              "system": "http://ehealth.sundhed.dk/cs/consent-category",
              "code": "TBD"
            }
          ]
        }
      ],
      "patient": {
        "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/97662"
      },
      "performer": [
        {
          "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/38888"
        }
      ],
      "policyRule": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
            "code": "cric"
          }
        ]
      },
      "provision": {
        "period": {
          "start": "1970-01-01T00:00:01+00:00",
          "end": "1970-01-01T00:01:40+00:00"
        },
        "actor": [
          {
            "id": "6dc510e4-ad0f-41aa-a0a8-257b69c3581c",
            "role": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                  "code": "authserver"
                }
              ]
            },
            "reference": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/35257"
            }
          }
        ],
        "data": [
          {
            "meaning": "related",
            "reference": {
              "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3038"
            }
          }
        ]
      }
    }
    

    Response

    {
      "resourceType": "Consent",
      "id": "3039",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2025-02-04T15:32:14.185+00:00",
        "source": "#bc3bba84-85ee-9c87-aa61-4f7a837ff791",
        "profile": [
          "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
        ]
      },
      "status": "active",
      "scope": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentscope",
            "code": "treatment",
            "display": "Treatment"
          }
        ]
      },
      "category": [
        {
          "coding": [
            {
              "system": "http://ehealth.sundhed.dk/cs/consent-category",
              "code": "TBD"
            }
          ]
        }
      ],
      "patient": {
        "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/97662"
      },
      "performer": [
        {
          "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/38888"
        }
      ],
      "policyRule": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
            "code": "cric"
          }
        ]
      },
      "provision": {
        "period": {
          "start": "1970-01-01T00:00:01+00:00",
          "end": "1970-01-01T00:01:40+00:00"
        },
        "actor": [
          {
            "id": "6dc510e4-ad0f-41aa-a0a8-257b69c3581c",
            "role": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                  "code": "authserver"
                }
              ]
            },
            "reference": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/35257"
            }
          }
        ],
        "data": [
          {
            "meaning": "related",
            "reference": {
              "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3038"
            }
          }
        ]
      }
    }
    

    POST [base]/Consent/3107/$validate

    Header

    Accept-Charset: utf-8
    Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiQ29uc2VudC5yZWFkIiwiQ29uc2VudC5zZWFyY2giLCJDb25zZW50LnVwZGF0ZSIsIkNvbnNlbnQuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
    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": "Consent",
            "id": "3107",
            "meta": {
              "versionId": "1",
              "lastUpdated": "2025-02-04T15:32:48.763+00:00",
              "source": "#1a448486-911b-44dd-818d-8c7d70658969",
              "profile": [
                "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
              ]
            },
            "status": "active",
            "scope": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/consentscope",
                  "code": "treatment",
                  "display": "Treatment"
                }
              ]
            },
            "category": [
              {
                "coding": [
                  {
                    "system": "http://ehealth.sundhed.dk/cs/consent-category",
                    "code": "TBD"
                  }
                ]
              }
            ],
            "patient": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/21689"
            },
            "performer": [
              {
                "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/98162"
              }
            ],
            "policyRule": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
                  "code": "cric"
                }
              ]
            },
            "provision": {
              "period": {
                "start": "1970-01-01T00:00:01+00:00",
                "end": "1970-01-01T00:01:40+00:00"
              },
              "actor": [
                {
                  "id": "80d87d34-95f6-4b13-b8a5-b843dd480f83",
                  "role": {
                    "coding": [
                      {
                        "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                        "code": "authserver"
                      }
                    ]
                  },
                  "reference": {
                    "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/3245"
                  }
                }
              ],
              "data": [
                {
                  "meaning": "related",
                  "reference": {
                    "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3106"
                  }
                }
              ]
            }
          }
        }
      ]
    }
    

    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"
        }
      ]
    }
    

    PUT [base]/Consent/3098

    Header

    Accept-Charset: utf-8
    Authorization: Bearer eyJhbGciOiJub25lIn0.eyJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiQ29uc2VudC5yZWFkIiwiQ29uc2VudC5zZWFyY2giLCJDb25zZW50LnVwZGF0ZSIsIkNvbnNlbnQuY3JlYXRlIiwiJHRlc3Qtb25seS1jcmVhdGUiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
    If-Match: "1"
    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": "Consent",
      "id": "3098",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2025-02-04T15:32:41.535+00:00",
        "source": "#9f9dc79e-ce18-428e-a6bb-618004ef5eb1",
        "profile": [
          "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
        ]
      },
      "status": "draft",
      "scope": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentscope",
            "code": "treatment",
            "display": "Treatment"
          }
        ]
      },
      "category": [
        {
          "coding": [
            {
              "system": "http://ehealth.sundhed.dk/cs/consent-category",
              "code": "TBD"
            }
          ]
        }
      ],
      "patient": {
        "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/51846"
      },
      "performer": [
        {
          "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/63381"
        }
      ],
      "policyRule": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
            "code": "cric"
          }
        ]
      },
      "provision": {
        "period": {
          "start": "1970-01-01T00:00:01+00:00",
          "end": "1970-01-01T00:01:40+00:00"
        },
        "actor": [
          {
            "id": "e3fbadf0-728a-4e1b-a2ae-067eccb60fe2",
            "role": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                  "code": "authserver"
                }
              ]
            },
            "reference": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/56856"
            }
          }
        ],
        "data": [
          {
            "meaning": "related",
            "reference": {
              "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3097"
            }
          }
        ]
      }
    }
    

    Response

    {
      "resourceType": "Consent",
      "id": "3098",
      "meta": {
        "versionId": "2",
        "lastUpdated": "2025-02-04T15:32:44.026+00:00",
        "source": "#89f7e76d-c1fe-4620-afbf-fcc66665ec0d",
        "profile": [
          "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-consent"
        ]
      },
      "status": "draft",
      "scope": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentscope",
            "code": "treatment",
            "display": "Treatment"
          }
        ]
      },
      "category": [
        {
          "coding": [
            {
              "system": "http://ehealth.sundhed.dk/cs/consent-category",
              "code": "TBD"
            }
          ]
        }
      ],
      "patient": {
        "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/51846"
      },
      "performer": [
        {
          "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/63381"
        }
      ],
      "policyRule": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentpolicycodes",
            "code": "cric"
          }
        ]
      },
      "provision": {
        "period": {
          "start": "1970-01-01T00:00:01+00:00",
          "end": "1970-01-01T00:01:40+00:00"
        },
        "actor": [
          {
            "id": "e3fbadf0-728a-4e1b-a2ae-067eccb60fe2",
            "role": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/extra-security-role-type",
                  "code": "authserver"
                }
              ]
            },
            "reference": {
              "reference": "https://patient.cit-careplan-3038.local/fhir/Patient/56856"
            }
          }
        ],
        "data": [
          {
            "meaning": "related",
            "reference": {
              "reference": "https://careplan.cit-careplan-3038.local/fhir/EpisodeOfCare/3097"
            }
          }
        ]
      }
    }