eHealth Infrastructure (v2019.5)

StructureDefinition: ehealth-device - Operation examples

GET [base]/Device?manufacturer%3Aexact=944ac418-3116-41d9-966e-008ebd9ad03b

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": "94c223d7-f76e-42d0-a9e1-5787c4643dcf",
  "meta": {
    "lastUpdated": "2019-03-11T13:27:00.608+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "http://localhost:31000/hapi-fhir-server/fhir/Device?_format\u003djson\u0026_pretty\u003dtrue\u0026manufacturer%3Aexact\u003d944ac418-3116-41d9-966e-008ebd9ad03b"
    }
  ],
  "entry": [
    {
      "fullUrl": "http://localhost:31000/hapi-fhir-server/fhir/Device/3989",
      "resource": {
        "resourceType": "Device",
        "id": "3989",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-03-11T13:27:00.445+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
          ]
        },
        "extension": [
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
            "valueBoolean": true
          }
        ],
        "manufacturer": "944ac418-3116-41d9-966e-008ebd9ad03b"
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "http://localhost:31000/hapi-fhir-server/fhir/Device/3987",
      "resource": {
        "resourceType": "Device",
        "id": "3987",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-03-11T13:27:00.073+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
          ]
        },
        "extension": [
          {
            "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
            "valueBoolean": true
          }
        ],
        "manufacturer": "944ac418-3116-41d9-966e-008ebd9ad03b"
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/Device/3992/_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": "Device",
  "id": "3992",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-03-11T13:27:01.198+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
      "valueBoolean": true
    }
  ],
  "status": "active"
}

POST [base]/Device

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": "Device",
  "meta": {
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-suppliers",
      "extension": [
        {
          "url": "supplier",
          "valueReference": {
            "reference": "Patient/3984"
          }
        },
        {
          "url": "role",
          "valueCodeableConcept": {
            "text": "code"
          }
        }
      ]
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
      "valueBoolean": true
    }
  ]
}

Response

{
  "resourceType": "Device",
  "id": "3985",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-03-11T13:26:59.772+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-suppliers",
      "extension": [
        {
          "url": "supplier",
          "valueReference": {
            "reference": "Patient/3984"
          }
        },
        {
          "url": "role",
          "valueCodeableConcept": {
            "text": "code"
          }
        }
      ]
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
      "valueBoolean": true
    }
  ]
}

PUT [base]/Device/3992

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": "Device",
  "id": "3992",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-03-11T13:27:00.985+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
      "valueBoolean": true
    }
  ],
  "status": "active"
}

Response

{
  "resourceType": "Device",
  "id": "3992",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-03-11T13:27:01.198+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
      "valueBoolean": true
    }
  ],
  "status": "active"
}