eHealth Infrastructure (v2021.2)

StructureDefinition: ehealth-provenance - Operation examples

GET [base]/Provenance/578

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMGQxNWI5NzktNTViMi00MTIwLTljMzItZGY1ZjEzY2MyZGYzIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIlByb3ZlbmFuY2UucmVhZCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/5.3.0 (FHIR Client; FHIR 3.0.2/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Provenance",
  "id": "578",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2021-04-20T07:23:15.165+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
    ]
  },
  "target": [
    {
      "reference": "https://patient.cit-measurement-1229.local/fhir/Patient/25559"
    }
  ],
  "recorded": "2021-04-20T07:23:15.115+00:00",
  "policy": [
    "healthcare-act"
  ],
  "agent": [
    {
      "whoReference": {
        "reference": "https://patient.cit-measurement-1229.local/fhir/Patient/95797"
      }
    }
  ]
}

GET [base]/Provenance?target=https%3A%2F%2Fcareplan.cit-careplan-1716.local%2Ffhir%2FEpisodeOfCare%2F1290%2F_history%2F1

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiaHR0cHM6Ly9vcmdhbml6YXRpb24uY2l0LWNhcmVwbGFuLTE3MTYubG9jYWwvZmhpci9QcmFjdGl0aW9uZXIvNzE0MzciLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiJHRlc3Qtb25seS1jcmVhdGUiLCJQcm92ZW5hbmNlLnJlYWQiLCJQcm92ZW5hbmNlLnNlYXJjaCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/5.3.0 (FHIR Client; FHIR 3.0.2/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Bundle",
  "id": "95a81d66-e00e-449f-8502-5af8e4ea02f6",
  "meta": {
    "lastUpdated": "2021-05-04T09:55:36.312+00:00"
  },
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "https://careplan.cit-careplan-1716.local/fhir/Provenance?_format=json&_pretty=true&target=https%3A%2F%2Fcareplan.cit-careplan-1716.local%2Ffhir%2FEpisodeOfCare%2F1290%2F_history%2F1"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://careplan.cit-careplan-1716.local/fhir/Provenance/1291",
      "resource": {
        "resourceType": "Provenance",
        "id": "1291",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2021-05-04T09:55:36.233+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
          ]
        },
        "target": [
          {
            "reference": "https://careplan.cit-careplan-1716.local/fhir/EpisodeOfCare/1290"
          }
        ],
        "recorded": "2021-05-04T09:55:36.199+00:00",
        "policy": [
          "healthcare-act"
        ],
        "agent": [
          {
            "whoReference": {
              "reference": "https://patient.cit-careplan-1716.local/fhir/Patient/64089"
            }
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/Provenance/872/_history/1

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiZDQ3MDdmMWQtNjE2Ny00OGZjLTk4ZjUtNTAwYmEyMTVkNDdjIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIlByb3ZlbmFuY2UucmVhZCJdfSwiY29udGV4dCI6eyJlcGlzb2RlX29mX2NhcmVfaWQiOiJodHRwczovL2NhcmVwbGFuLmNpdC1jYXJlcGxhbi0xNzE2LmxvY2FsL2ZoaXIvRXBpc29kZU9mQ2FyZS84NzEiLCJ0ZWFtX29uX2VvYyI6ZmFsc2V9LCJ1c2VyX3R5cGUiOiJQUkFDVElUSU9ORVIifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/5.3.0 (FHIR Client; FHIR 3.0.2/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Provenance",
  "id": "872",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2021-05-04T09:53:05.496+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
    ]
  },
  "target": [
    {
      "reference": "https://careplan.cit-careplan-1716.local/fhir/EpisodeOfCare/871"
    }
  ],
  "recorded": "2021-05-04T09:53:05.460+00:00",
  "policy": [
    "healthcare-act"
  ],
  "agent": [
    {
      "whoReference": {
        "reference": "https://patient.cit-careplan-1716.local/fhir/Patient/40394"
      }
    }
  ]
}

POST [base]/Provenance/$validate

Header

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

Body:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "resource",
      "resource": {
        "resourceType": "Provenance",
        "meta": {
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
          ]
        },
        "target": [
          {
            "reference": "https://patient.cit-careplan-1716.local/fhir/Patient/45847"
          }
        ],
        "recorded": "2021-05-04T09:55:37.032+00:00",
        "policy": [
          "healthcare-act"
        ],
        "agent": [
          {
            "whoReference": {
              "reference": "https://patient.cit-careplan-1716.local/fhir/Patient/32744"
            }
          }
        ]
      }
    }
  ]
}

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><pre>No issues detected during validation</pre></td></tr><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>No issues detected during validation</pre></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"
    }
  ]
}