STU 3 Ballot

This page is part of the FHIR Specification (v1.6.0: STU 3 Ballot 4). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Operation-observation-stats.json

Raw JSON (canonical form)

Operation Definition

{
  "resourceType": "OperationDefinition",
  "id": "Observation-stats",
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "url": "http://hl7.org/fhir/OperationDefinition/Observation-stats",
  "name": "Observation Statistics",
  "status": "draft",
  "kind": "operation",
  "date": "2016-08-11T17:02:54+10:00",
  "publisher": "HL7 (FHIR Project)",
  "contact": [
    {
      "telecom": [
        {
          "system": "other",
          "value": "http://hl7.org/fhir"
        },
        {
          "system": "email",
          "value": "fhir@lists.hl7.org"
        }
      ]
    }
  ],
  "description": "The Statistics operation performs a set of statistical calculations on a set of clinical measurements such as a blood pressure.  This operation is limited to [Observation](observation.html) resources with valueQuantity elements.\r\rThe set of Observations is defined by a the input parameters `patient`,`code` and `duration` and `params`. The set of statistical calculation depends upon the value of the `params` parameter:\r\r- **average** - for example if code = 55284-4 the mean of 55284-4 over the stated period from an operation\r- **max** - for example if code = 55284-4 the max of 55284-4 over the stated period from an operation\r- **min** - for example if code = 55284-4 the min of 55284-4 over the stated period from an operation\r- **count** - for example if code = 55284-4 the number of occurances of value x of 55284-4 over the stated period from an operation\r\rIf successful, the operation returns an Observation resource with the results of the statistical calculations as component value pairs where the component code = the params code. The Observation also contains the the input parameters `patient`,`code` and `duration` parameters. If unsuccessful, an [OperationOutcome](operationoutcome.html) with an error message will be returned.",
  "code": "stats",
  "system": false,
  "type": [
    "Observation"
  ],
  "instance": true,
  "parameter": [
    {
      "name": "patient",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "The FHIR Patient resource id of the relevant Observations. For example  The patient id  = \"123\"  in Observation.subject.reference = Patient/123.",
      "type": "id"
    },
    {
      "name": "code",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "The test code upon which the statistics are being performed.   For example, the code  = \"45667-2\"  will evaluate all relevant Observations with this code in Observation.code.",
      "type": "string"
    },
    {
      "name": "duration",
      "use": "in",
      "min": 1,
      "max": "1",
      "documentation": "The time period of interest given as hours.  For example, the duration = \"1\" is the last hour",
      "type": "decimal"
    },
    {
      "name": "params",
      "use": "in",
      "min": 1,
      "max": "4",
      "documentation": "average|max|min|count  The statistical operations to be performed on the relevant operations.   These codes are defined [here](todo.html)",
      "type": "code"
    },
    {
      "name": "obs",
      "use": "out",
      "min": 1,
      "max": "2",
      "documentation": "The Observation.component.code is relative to the Observation.code and cannot be interpreted independently.  The code input parameter is returned as the code element. The 'patient' parameter is returned as the patient element.  The `period` input parameter is returned as the appliesPeriod element.  The status is fixed to `final`.",
      "type": "Observation"
    }
  ]
}

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.