eHealth Infrastructure (v2020.6)

StructureDefinition: ehealth-observation - Operation examples

GET [base]/Observation/490

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiNzdiYmZlOGEtYjFhMy00MzczLWFiMTYtZjIyOGQ2ODhhZWIyIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIkNvbW11bmljYXRpb24ucmVhZCIsIkNvbW11bmljYXRpb24ucGF0Y2giLCJNZWRpYS5zZWFyY2giLCJRdWVzdGlvbm5haXJlUmVzcG9uc2UucmVhZCIsIiRzZWFyY2gtbWVhc3VyZW1lbnRzIiwiT2JzZXJ2YXRpb24uc2VhcmNoIiwiT2JzZXJ2YXRpb24ucmVhZCIsIiR0ZXN0LW9ubHktY3JlYXRlIiwiJHN1Ym1pdC1tZWFzdXJlbWVudCIsIkNvbW11bmljYXRpb24uY3JlYXRlIiwiUXVlc3Rpb25uYWlyZVJlc3BvbnNlLnNlYXJjaCIsIkNvbW11bmljYXRpb24uc2VhcmNoIiwiUHJvdmVuYW5jZS5yZWFkIiwiTWVkaWEucmVhZCJdfSwidXNlcl90eXBlIjoiU1lTVEVNIn0.
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": "490",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-07-10T10:19:22.780+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": "b302b0aa-26c8-40a1-a689-870198a3eb14"
    },
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "80ba7999-fd18-4f89-9133-ca173189e299_NPU03011"
    },
    {
      "system": "http://ehealth.sundhed.dk/id/ehealth-identifier",
      "value": "a2c2f5ab-125d-4280-a052-c65ffc589f81_MCS88015"
    }
  ],
  "basedOn": [
    {
      "reference": "https://careplan.cit-measurement-1098.local/fhir/ProcedureRequest/31469"
    }
  ],
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "urn:oid:1.2.208.176.2.1",
        "code": "NPU03011"
      }
    ],
    "text": "4676b84d-8420-4a25-90b8-36e2f4603a73"
  },
  "subject": {
    "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/56351"
  },
  "context": {
    "reference": "https://careplan.cit-measurement-1098.local/fhir/EpisodeOfCare/83389"
  },
  "effectivePeriod": {
    "start": "2020-07-10T10:19:20+00:00",
    "end": "2020-07-10T10:19:20+00:00"
  },
  "performer": [
    {
      "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/47994"
    }
  ],
  "device": {
    "reference": "https://device.cit-measurement-1098.local/fhir/Device/34077"
  },
  "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-1098.local%2Ffhir%2FEpisodeOfCare%2F55520

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiN2Y5MjAzYzYtYmVhNy00ODkyLTg1ZTctZmZiYzg0MTNhMmQ4IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnNlYXJjaCJdfSwiY29udGV4dCI6eyJjYXJlX3RlYW1faWQiOiJodHRwczovL29yZ2FuaXphdGlvbi5jaXQtbWVhc3VyZW1lbnQtMTA5OC5sb2NhbC9maGlyL0NhcmVUZWFtLzY0MjkxIiwiZXBpc29kZV9vZl9jYXJlX2lkIjoiaHR0cHM6Ly9jYXJlcGxhbi5jaXQtbWVhc3VyZW1lbnQtMTA5OC5sb2NhbC9maGlyL0VwaXNvZGVPZkNhcmUvNTU1MjAiLCJ0ZWFtX29uX2VvYyI6dHJ1ZX0sInVzZXJfdHlwZSI6IlBSQUNUSVRJT05FUiJ9.
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": "3ccbb5d0-e989-48ec-b444-3dcafee21092",
  "meta": {
    "lastUpdated": "2020-07-10T10:19:57.057+00:00"
  },
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "https://measurement.cit-measurement-1098.local/fhir/Observation?_format=json&_pretty=true&context=https%3A%2F%2Fcareplan.cit-measurement-1098.local%2Ffhir%2FEpisodeOfCare%2F55520"
    }
  ],
  "entry": [
    {
      "fullUrl": "https://measurement.cit-measurement-1098.local/fhir/Observation/551",
      "resource": {
        "resourceType": "Observation",
        "id": "551",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-07-10T10:19:56.949+00:00",
          "profile": [
            "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
          ]
        },
        "basedOn": [
          {
            "reference": "https://careplan.cit-measurement-1098.local/fhir/ProcedureRequest/30740"
          }
        ],
        "status": "final",
        "code": {
          "coding": [
            {
              "system": "urn:oid:1.2.208.176.2.1",
              "code": "NPU03011"
            }
          ]
        },
        "subject": {
          "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/64005"
        },
        "context": {
          "reference": "https://careplan.cit-measurement-1098.local/fhir/EpisodeOfCare/55520"
        },
        "effectivePeriod": {
          "start": "2020-07-10T10:19:56+00:00",
          "end": "2020-07-10T10:19:56+00:00"
        },
        "performer": [
          {
            "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/64005"
          }
        ],
        "device": {
          "reference": "https://device.cit-measurement-1098.local/fhir/Device/38202"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiNzZjNDNlNDMtMWI3OS00NTEyLWE2NDMtMzEyYTc5MjAyN2I5IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnJlYWQiXX0sImNvbnRleHQiOnsiY2FyZV90ZWFtX2lkIjoiaHR0cHM6Ly9vcmdhbml6YXRpb24uY2l0LW1lYXN1cmVtZW50LTEwOTgubG9jYWwvZmhpci9DYXJlVGVhbS8yNTUxMCIsImVwaXNvZGVfb2ZfY2FyZV9pZCI6Imh0dHBzOi8vY2FyZXBsYW4uY2l0LW1lYXN1cmVtZW50LTEwOTgubG9jYWwvZmhpci9FcGlzb2RlT2ZDYXJlLzcxMzI4IiwidGVhbV9vbl9lb2MiOnRydWV9LCJ1c2VyX3R5cGUiOiJQUkFDVElUSU9ORVIifQ.
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": "545",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-07-10T10:19:55.323+00:00",
    "profile": [
      "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-observation"
    ]
  },
  "basedOn": [
    {
      "reference": "https://careplan.cit-measurement-1098.local/fhir/ProcedureRequest/38314"
    }
  ],
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "urn:oid:1.2.208.176.2.1",
        "code": "NPU03011"
      }
    ]
  },
  "subject": {
    "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/21604"
  },
  "context": {
    "reference": "https://careplan.cit-measurement-1098.local/fhir/EpisodeOfCare/71328"
  },
  "effectivePeriod": {
    "start": "2020-07-10T10:19:55+00:00",
    "end": "2020-07-10T10:19:55+00:00"
  },
  "performer": [
    {
      "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/21604"
    }
  ],
  "device": {
    "reference": "https://device.cit-measurement-1098.local/fhir/Device/13097"
  }
}

POST [base]/Observation/$validate

Header

Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiN2ZiZTA5YjQtZWRiYS00MWFiLWFkZGQtMjg0NzlkMmIzYWE1IiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIk9ic2VydmF0aW9uLnJlYWQiXX0sInVzZXJfdHlwZSI6IlNZU1RFTSJ9.
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-1098.local/fhir/ProcedureRequest/24502"
          }
        ],
        "status": "final",
        "code": {
          "coding": [
            {
              "system": "urn:oid:1.2.208.176.2.1",
              "code": "NPU03011"
            }
          ]
        },
        "subject": {
          "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/65798"
        },
        "context": {
          "reference": "https://careplan.cit-measurement-1098.local/fhir/EpisodeOfCare/74460"
        },
        "effectivePeriod": {
          "start": "2020-07-10T10:19:57+00:00",
          "end": "2020-07-10T10:19:57+00:00"
        },
        "performer": [
          {
            "reference": "https://patient.cit-measurement-1098.local/fhir/Patient/65798"
          }
        ],
        "device": {
          "reference": "https://device.cit-measurement-1098.local/fhir/Device/53026"
        }
      }
    }
  ]
}

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