eHealth Infrastructure (v2020.5)

StructureDefinition: ehealth-observation - Operation examples

GET [base]/Observation/488

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMzYwNmNhYmQtNWZiYS00NjZlLTk0MGYtZWZkMzQyOTlmMDE1IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNvbW11bmljYXRpb24ucmVhZCIsIkNvbW11bmljYXRpb24ucGF0Y2giLCJNZWRpYS5zZWFyY2giLCJRdWVzdGlvbm5haXJlUmVzcG9uc2UucmVhZCIsIiRzZWFyY2gtbWVhc3VyZW1lbnRzIiwiT2JzZXJ2YXRpb24uc2VhcmNoIiwiT2JzZXJ2YXRpb24ucmVhZCIsIiRzdWJtaXQtbWVhc3VyZW1lbnQiLCIkdGVzdC1vbmx5LWNyZWF0ZSIsIkNvbW11bmljYXRpb24uY3JlYXRlIiwiUXVlc3Rpb25uYWlyZVJlc3BvbnNlLnNlYXJjaCIsIkNvbW11bmljYXRpb24uc2VhcmNoIiwiUHJvdmVuYW5jZS5yZWFkIiwiTWVkaWEucmVhZCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "Observation",
  "id": "488",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-06-22T19:59:42.076+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": "005c6d67-bbf6-4406-b924-5a530c119321"
    },
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "fa4e4aee-a059-4a95-83b0-5825787e30b9_NPU03011"
    },
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "53560a62-62f0-42bc-bc0e-f3c3ee2bc524_MCS88015"
    }
  ],
  "basedOn": [
    {
      "reference": "https://careplan.cit-measurement-1074.local/fhir/ProcedureRequest/89180"
    }
  ],
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "urn:oid:1.2.208.176.2.1",
        "code": "NPU03011"
      }
    ],
    "text": "fa46abc0-34ed-4bc7-879c-e6d2e66539fb"
  },
  "subject": {
    "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/90034"
  },
  "context": {
    "reference": "https://careplan.cit-measurement-1074.local/fhir/EpisodeOfCare/76401"
  },
  "effectivePeriod": {
    "start": "2020-06-22T19:59:39+00:00",
    "end": "2020-06-22T19:59:39+00:00"
  },
  "performer": [
    {
      "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/38297"
    }
  ],
  "device": {
    "reference": "https://device.cit-measurement-1074.local/fhir/Device/31057"
  },
  "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-1074.local%2Ffhir%2FEpisodeOfCare%2F40885

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiMTViZGI0N2UtMDhiYy00OWM3LTgyMmYtMGE2NmU1YTZhNmQ5IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnNlYXJjaCJdfSwiY29udGV4dCI6eyJjYXJlX3RlYW1faWQiOiJodHRwczovL29yZ2FuaXphdGlvbi5jaXQtbWVhc3VyZW1lbnQtMTA3NC5sb2NhbC9maGlyL0NhcmVUZWFtLzk1NDIzIiwiZXBpc29kZV9vZl9jYXJlX2lkIjoiaHR0cHM6Ly9jYXJlcGxhbi5jaXQtbWVhc3VyZW1lbnQtMTA3NC5sb2NhbC9maGlyL0VwaXNvZGVPZkNhcmUvNDA4ODUiLCJ0ZWFtX29uX2VvYyI6dHJ1ZX0sInVzZXJfdHlwZSI6IlBSQUNUSVRJT05FUiJ9.
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": "153d7fd1-d150-44d5-839d-b7d3a886a365",
  "meta": {
    "lastUpdated": "2020-06-22T20:00:17.150+00:00"
  },
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "https://measurement.cit-measurement-1074.local/fhir/Observation?_format=json&_pretty=true&context=https%3A%2F%2Fcareplan.cit-measurement-1074.local%2Ffhir%2FEpisodeOfCare%2F40885"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://measurement.cit-measurement-1074.local/fhir/Observation/549",
      "resource": {
        "resourceType": "Observation",
        "id": "549",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-06-22T20:00:16.982+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
          ]
        },
        "basedOn": [
          {
            "reference": "https://careplan.cit-measurement-1074.local/fhir/ProcedureRequest/73361"
          }
        ],
        "status": "final",
        "code": {
          "coding": [
            {
              "system": "urn:oid:1.2.208.176.2.1",
              "code": "NPU03011"
            }
          ]
        },
        "subject": {
          "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/38841"
        },
        "context": {
          "reference": "https://careplan.cit-measurement-1074.local/fhir/EpisodeOfCare/40885"
        },
        "effectivePeriod": {
          "start": "2020-06-22T20:00:16+00:00",
          "end": "2020-06-22T20:00:16+00:00"
        },
        "performer": [
          {
            "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/38841"
          }
        ],
        "device": {
          "reference": "https://device.cit-measurement-1074.local/fhir/Device/47458"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiNGY4ZjkzMDEtM2FhMi00ZmU5LTk1OGMtM2YzYTVkMzJkNDc1IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnJlYWQiXX0sImNvbnRleHQiOnsiY2FyZV90ZWFtX2lkIjoiaHR0cHM6Ly9vcmdhbml6YXRpb24uY2l0LW1lYXN1cmVtZW50LTEwNzQubG9jYWwvZmhpci9DYXJlVGVhbS81Nzc4NSIsImVwaXNvZGVfb2ZfY2FyZV9pZCI6Imh0dHBzOi8vY2FyZXBsYW4uY2l0LW1lYXN1cmVtZW50LTEwNzQubG9jYWwvZmhpci9FcGlzb2RlT2ZDYXJlLzIwNTM5IiwidGVhbV9vbl9lb2MiOnRydWV9LCJ1c2VyX3R5cGUiOiJQUkFDVElUSU9ORVIifQ.
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": "Observation",
  "id": "543",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-06-22T20:00:15.181+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
    ]
  },
  "basedOn": [
    {
      "reference": "https://careplan.cit-measurement-1074.local/fhir/ProcedureRequest/33829"
    }
  ],
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "urn:oid:1.2.208.176.2.1",
        "code": "NPU03011"
      }
    ]
  },
  "subject": {
    "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/45822"
  },
  "context": {
    "reference": "https://careplan.cit-measurement-1074.local/fhir/EpisodeOfCare/20539"
  },
  "effectivePeriod": {
    "start": "2020-06-22T20:00:15+00:00",
    "end": "2020-06-22T20:00:15+00:00"
  },
  "performer": [
    {
      "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/45822"
    }
  ],
  "device": {
    "reference": "https://device.cit-measurement-1074.local/fhir/Device/53326"
  }
}

POST [base]/Observation/$validate

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiZjNmNGFmZjEtZTU5MC00Nzk0LTkyYTgtMTQxZmRjOTRiMjc1IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnJlYWQiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
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": "Observation",
        "meta": {
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
          ]
        },
        "basedOn": [
          {
            "reference": "https://careplan.cit-measurement-1074.local/fhir/ProcedureRequest/60787"
          }
        ],
        "status": "final",
        "code": {
          "coding": [
            {
              "system": "urn:oid:1.2.208.176.2.1",
              "code": "NPU03011"
            }
          ]
        },
        "subject": {
          "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/95136"
        },
        "context": {
          "reference": "https://careplan.cit-measurement-1074.local/fhir/EpisodeOfCare/79289"
        },
        "effectivePeriod": {
          "start": "2020-06-22T20:00:17+00:00",
          "end": "2020-06-22T20:00:17+00:00"
        },
        "performer": [
          {
            "reference": "https://patient.cit-measurement-1074.local/fhir/Patient/95136"
          }
        ],
        "device": {
          "reference": "https://device.cit-measurement-1074.local/fhir/Device/45230"
        }
      }
    }
  ]
}

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>\r\r\r</tr>\r<tr>\r<td style=\"font-weight: bold;\">INFORMATION</td>\r<td>[]</td>\r\r\r\r<td><pre>No issues detected during validation</pre></td>\r\r\r</tr>\r</table>\r</div>"
  },
  "issue": [
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "No issues detected during validation"
    },
    {
      "severity": "information",
      "code": "informational",
      "diagnostics": "No issues detected during validation"
    }
  ]
}