eHealth Infrastructure (v2019.6)

StructureDefinition: ehealth-device - Operation examples

GET [base]/Device?manufacturer%3Aexact=8a58caca-c16c-4f83-9ff9-31dfbad5a5a1&model%3Aexact=0d6a2bce-ca80-432d-b192-3032b8575e92

Header

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

Response

{
  "resourceType": "Bundle",
  "id": "fe6b3e24-5825-4d56-86ff-9cd83c1092e9",
  "meta": {
    "lastUpdated": "2019-11-04T20:06:51.537+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "http://device.local.ehealth.sundhed.dk/fhir/Device?_format=json&_pretty=true&manufacturer%3Aexact=8a58caca-c16c-4f83-9ff9-31dfbad5a5a1&model%3Aexact=0d6a2bce-ca80-432d-b192-3032b8575e92"
    }
  ],
  "entry": [
    {
      "fullUrl": "http://device.local.ehealth.sundhed.dk/fhir/Device/22",
      "resource": {
        "resourceType": "Device",
        "id": "22",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-11-04T20:06:51.140+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",
        "manufacturer": "8a58caca-c16c-4f83-9ff9-31dfbad5a5a1",
        "model": "0d6a2bce-ca80-432d-b192-3032b8575e92"
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "http://device.local.ehealth.sundhed.dk/fhir/Device/20",
      "resource": {
        "resourceType": "Device",
        "id": "20",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2019-11-04T20:06:50.727+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",
        "manufacturer": "8a58caca-c16c-4f83-9ff9-31dfbad5a5a1",
        "model": "0d6a2bce-ca80-432d-b192-3032b8575e92"
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/Device/83/_history/1

Header

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

Response

{
  "resourceType": "Device",
  "id": "83",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-11-04T20:07:11.028+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
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiNzdhYjc0MTItZjc1OC00YzM1LTkwNGQtYmQxNmRhZjNlMzA0IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkRldmljZS5yZWFkIiwiRGV2aWNlLndyaXRlIl19LCJ1c2VyX3R5cGUiOiJTWVNURU0ifQ.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/3.8.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-privatelyOwned",
      "valueBoolean": true
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-suppliers",
      "extension": [
        {
          "url": "supplier",
          "valueReference": {
            "reference": "http://organization.local.ehealth.sundhed.dk/fhir/Organization/12111"
          }
        },
        {
          "url": "role",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/device-supplier-roles",
                "code": "TBD"
              }
            ]
          }
        }
      ]
    }
  ],
  "status": "active",
  "type": {
    "coding": [
      {
        "system": "http://ehealth.sundhed.dk/cs/device-types",
        "code": "59181002",
        "display": "Oxygen analyser"
      }
    ]
  }
}

Response

{
  "resourceType": "Device",
  "id": "10",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-11-04T20:06:47.622+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-privatelyOwned",
      "valueBoolean": true
    },
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-device-suppliers",
      "extension": [
        {
          "url": "supplier",
          "valueReference": {
            "reference": "http://organization.local.ehealth.sundhed.dk/fhir/Organization/12111"
          }
        },
        {
          "url": "role",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/device-supplier-roles",
                "code": "TBD"
              }
            ]
          }
        }
      ]
    }
  ],
  "status": "active",
  "type": {
    "coding": [
      {
        "system": "http://ehealth.sundhed.dk/cs/device-types",
        "code": "59181002",
        "display": "Oxygen analyser"
      }
    ]
  }
}

POST [base]/Device/$validate

Header

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

Body:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "resource",
      "resource": {
        "resourceType": "Device",
        "meta": {
          "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": "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"
    }
  ]
}

PUT [base]/Device/60

Header

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

Body:

{
  "resourceType": "Device",
  "id": "60",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-11-04T20:07:04.455+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": "inactive"
}

Response

{
  "resourceType": "Device",
  "id": "60",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-11-04T20:07:05.060+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": "inactive"
}