eHealth Infrastructure (v2019.5.3)

StructureDefinition: ehealth-documentreference - Operation examples

DELETE [base]/DocumentReference/50

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "OperationOutcome",
  "text": {
    "status": "generated",
    "div": "\u003cdiv xmlns\u003d\"http://www.w3.org/1999/xhtml\"\u003e\u003ch1\u003eOperation Outcome\u003c/h1\u003e\u003ctable border\u003d\"0\"\u003e\u003ctr\u003e\u003ctd style\u003d\"font-weight: bold;\"\u003eINFORMATION\u003c/td\u003e\u003ctd\u003e[]\u003c/td\u003e\u003ctd\u003e\u003cpre\u003eSuccessfully deleted 1 resource(s) in 33ms\u003c/pre\u003e\u003c/td\u003e\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\u003c/tr\u003e\r\n\t\t\u003c/table\u003e\r\n\t\u003c/div\u003e"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "Successfully deleted 1 resource(s) in 33ms"
    }
  ]
}

GET [base]/DocumentReference?description=d81e69f1-a89a-4ccd-9b20-0d703815379d

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "Bundle",
  "id": "5f91e5c6-c9cb-49b3-a98b-eabfacdadc0d",
  "meta": {
    "lastUpdated": "2019-05-29T09:14:27.646+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "http://local.ehealth.sundhed.dk:31380/hapi-fhir-server/fhir/DocumentReference?_format\u003djson\u0026_pretty\u003dtrue\u0026description\u003dd81e69f1-a89a-4ccd-9b20-0d703815379d"
    }
  ],
  "entry": [
    {
      "fullUrl": "http://local.ehealth.sundhed.dk:31380/hapi-fhir-server/fhir/DocumentReference/284",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "284",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-05-29T09:14:27.563+00:00"
        },
        "status": "current",
        "type": {
          "id": "8a886476-aa61-4f62-a160-aab612e2aad2",
          "text": "type"
        },
        "indexed": "2019-05-29T11:14:27.556+02:00",
        "description": "d81e69f1-a89a-4ccd-9b20-0d703815379d",
        "content": [
          {
            "attachment": {
              "url": "http://some.com/"
            }
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "http://local.ehealth.sundhed.dk:31380/hapi-fhir-server/fhir/DocumentReference/282",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "282",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-05-29T09:14:27.331+00:00"
        },
        "status": "current",
        "type": {
          "id": "c0267b44-3fe4-4a51-905c-378b70d5d753",
          "text": "type"
        },
        "indexed": "2019-05-29T11:14:27.320+02:00",
        "description": "d81e69f1-a89a-4ccd-9b20-0d703815379d",
        "content": [
          {
            "attachment": {
              "url": "http://some.com/"
            }
          }
        ]
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/DocumentReference/285/_history/2

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip

Response

{
  "resourceType": "DocumentReference",
  "id": "285",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-05-29T09:14:27.826+00:00"
  },
  "status": "superseded",
  "type": {
    "id": "a81a573e-6c94-4003-a3e1-cb0b45cc02c5",
    "text": "type"
  },
  "indexed": "2019-05-29T11:14:27.683+02:00",
  "content": [
    {
      "attachment": {
        "url": "http://some.com/"
      }
    }
  ]
}

POST [base]/DocumentReference

Header

Accept-Charset: utf-8
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8

Body:

{
  "resourceType": "DocumentReference",
  "status": "current",
  "type": {
    "id": "d68c44b9-2c14-4485-bd1a-8732f09515fa",
    "text": "type"
  },
  "indexed": "2019-05-29T11:14:26.967+02:00",
  "content": [
    {
      "attachment": {
        "url": "http://some.com/"
      }
    }
  ]
}

Response

{
  "resourceType": "DocumentReference",
  "id": "280",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-05-29T09:14:26.980+00:00"
  },
  "status": "current",
  "type": {
    "id": "d68c44b9-2c14-4485-bd1a-8732f09515fa",
    "text": "type"
  },
  "indexed": "2019-05-29T11:14:26.967+02:00",
  "content": [
    {
      "attachment": {
        "url": "http://some.com/"
      }
    }
  ]
}

PUT [base]/DocumentReference/285

Header

Accept-Charset: utf-8
If-Match: "1"
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.7.0 (FHIR Client; FHIR 3.0.1/DSTU3; apache)
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8

Body:

{
  "resourceType": "DocumentReference",
  "id": "285",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-05-29T09:14:27.692+00:00"
  },
  "status": "superseded",
  "type": {
    "id": "a81a573e-6c94-4003-a3e1-cb0b45cc02c5",
    "text": "type"
  },
  "indexed": "2019-05-29T11:14:27.683+02:00",
  "content": [
    {
      "attachment": {
        "url": "http://some.com/"
      }
    }
  ]
}

Response

{
  "resourceType": "DocumentReference",
  "id": "285",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-05-29T09:14:27.826+00:00"
  },
  "status": "superseded",
  "type": {
    "id": "a81a573e-6c94-4003-a3e1-cb0b45cc02c5",
    "text": "type"
  },
  "indexed": "2019-05-29T11:14:27.683+02:00",
  "content": [
    {
      "attachment": {
        "url": "http://some.com/"
      }
    }
  ]
}