eHealth Infrastructure (v2020.7)

StructureDefinition: ehealth-observation - Operation examples

GET [base]/Observation/492

Header

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

Response

{
  "resourceType": "Observation",
  "id": "492",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-10-22T13:12:57.248+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
    ]
  },
  "extension": [
    {
      "url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-quality",
      "extension": [
        {
          "url": "qualityType",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/quality-types",
                "code": "DMQ",
                "display": "Device Measuring Quality"
              }
            ]
          }
        },
        {
          "url": "qualityCode",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://ehealth.sundhed.dk/cs/device-measuring-quality",
                "code": "TBD"
              }
            ]
          }
        }
      ]
    }
  ],
  "identifier": [
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "8a7b67ab-e0a1-4464-b35d-a024fcd28d61"
    },
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "7000b4da-bc5c-4f0c-bfdf-8b4c2df393c0_NPU03011"
    },
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "4ff1a55b-81aa-42df-9a23-5f8243bd883c_MCS88015"
    }
  ],
  "basedOn": [
    {
      "reference": "https://careplan.cit-measurement-1137.local/fhir/ProcedureRequest/46190"
    }
  ],
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "urn:oid:1.2.208.176.2.1",
        "code": "NPU03011"
      }
    ],
    "text": "6e1a0ec7-365f-412b-adca-edd512b6b527"
  },
  "subject": {
    "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/15535"
  },
  "context": {
    "reference": "https://careplan.cit-measurement-1137.local/fhir/EpisodeOfCare/76377"
  },
  "effectivePeriod": {
    "start": "2020-10-22T13:12:53+00:00",
    "end": "2020-10-22T13:12:53+00:00"
  },
  "performer": [
    {
      "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/57483"
    }
  ],
  "device": {
    "reference": "https://device.cit-measurement-1137.local/fhir/Device/94803"
  },
  "component": [
    {
      "code": {
        "coding": [
          {
            "system": "urn:oid:1.2.208.176.2.1",
            "code": "NPU03011"
          }
        ]
      }
    },
    {
      "code": {
        "coding": [
          {
            "system": "urn:oid:1.2.208.184.100.8",
            "code": "MCS88015"
          }
        ]
      }
    }
  ]
}

GET [base]/Observation?context=https%3A%2F%2Fcareplan.cit-measurement-1137.local%2Ffhir%2FEpisodeOfCare%2F99863

Header

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

Response

{
  "resourceType": "Bundle",
  "id": "ec0b823a-bb74-4c65-8dcc-af7b749005d8",
  "meta": {
    "lastUpdated": "2020-10-22T13:13:36.843+00:00"
  },
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "https://measurement.cit-measurement-1137.local/fhir/Observation?_format=json&_pretty=true&context=https%3A%2F%2Fcareplan.cit-measurement-1137.local%2Ffhir%2FEpisodeOfCare%2F99863"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://measurement.cit-measurement-1137.local/fhir/Observation/553",
      "resource": {
        "resourceType": "Observation",
        "id": "553",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-10-22T13:13:36.757+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
          ]
        },
        "basedOn": [
          {
            "reference": "https://careplan.cit-measurement-1137.local/fhir/ProcedureRequest/6888"
          }
        ],
        "status": "final",
        "code": {
          "coding": [
            {
              "system": "urn:oid:1.2.208.176.2.1",
              "code": "NPU03011"
            }
          ]
        },
        "subject": {
          "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/29816"
        },
        "context": {
          "reference": "https://careplan.cit-measurement-1137.local/fhir/EpisodeOfCare/99863"
        },
        "effectivePeriod": {
          "start": "2020-10-22T13:13:36+00:00",
          "end": "2020-10-22T13:13:36+00:00"
        },
        "performer": [
          {
            "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/29816"
          }
        ],
        "device": {
          "reference": "https://device.cit-measurement-1137.local/fhir/Device/59704"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

GET [base]/Observation/547/_history/1

Header

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

Response

{
  "resourceType": "Observation",
  "id": "547",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-10-22T13:13:35.102+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
    ]
  },
  "basedOn": [
    {
      "reference": "https://careplan.cit-measurement-1137.local/fhir/ProcedureRequest/62422"
    }
  ],
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "urn:oid:1.2.208.176.2.1",
        "code": "NPU03011"
      }
    ]
  },
  "subject": {
    "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/63597"
  },
  "context": {
    "reference": "https://careplan.cit-measurement-1137.local/fhir/EpisodeOfCare/55357"
  },
  "effectivePeriod": {
    "start": "2020-10-22T13:13:35+00:00",
    "end": "2020-10-22T13:13:35+00:00"
  },
  "performer": [
    {
      "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/63597"
    }
  ],
  "device": {
    "reference": "https://device.cit-measurement-1137.local/fhir/Device/68323"
  }
}

POST [base]/Observation/$validate

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiY2NlY2NkNDAtMWQyYS00YmIxLWEwMTQtMDFlMmY4ODQyZDM0IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnJlYWQiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/5.0.2 (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": "Observation",
        "meta": {
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
          ]
        },
        "basedOn": [
          {
            "reference": "https://careplan.cit-measurement-1137.local/fhir/ProcedureRequest/57562"
          }
        ],
        "status": "final",
        "code": {
          "coding": [
            {
              "system": "urn:oid:1.2.208.176.2.1",
              "code": "NPU03011"
            }
          ]
        },
        "subject": {
          "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/84043"
        },
        "context": {
          "reference": "https://careplan.cit-measurement-1137.local/fhir/EpisodeOfCare/40307"
        },
        "effectivePeriod": {
          "start": "2020-10-22T13:13:37+00:00",
          "end": "2020-10-22T13:13:37+00:00"
        },
        "performer": [
          {
            "reference": "https://patient.cit-measurement-1137.local/fhir/Patient/84043"
          }
        ],
        "device": {
          "reference": "https://device.cit-measurement-1137.local/fhir/Device/94592"
        }
      }
    }
  ]
}

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