Observation $write-results

post/Observation/$write-results
Page View

This resource comprises one or more results, findings, or measurements to inform a patient’s clinical condition (e.g., vitals, imaging results, lab results, device measurements). Observations can help to identify baselines and patterns or define personal characteristics for a patient (e.g., height, weight, eye color). Observations may be referenced by a DiagnosticReport resource to provide the metadata for a complete diagnostic report.  

You can receive, retrieve, or save observations for a patient. 

$write-results

This operation allows you to create standalone observations or to update existing observations to a patient’s chart. To create or update an entire report, use the DiagnosticReport$write operation instead. 

Request parameters and payload

cURL request example

1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Observation/$write-results' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/fhir+json' \
5
--data '{
6
"resourceType": "Bundle",
7
"id": "RedoxResultHGBObservationExampleTimothy",
8
"type": "message",
9
"timestamp": "2021-12-17T20:33:22.422Z",
10
"entry": [
11
{
12
"resource": {
13
"resourceType": "MessageHeader",
14
"id": "RedoxMessageHeaderExample",
15
"source": {
16
"name": "Good Health Clinics",
17
"endpoint": "05107c08-fe2f-4740-8c1d-c7107d18ebe5"
18
},
19
"eventCoding": {
20
"system": "urn:redox:event-type",
21
"code": "Observation-New"
22
}
23
}
24
},
25
{
26
"resource": {
27
"resourceType": "Patient",
28
"id": "RedoxPatientExampleTimothyMinimal",
29
"identifier": [
30
{
31
"value": "0000000001",
32
"system": "urn:redox:health-one:MR"
33
},
34
{
35
"value": "101-01-0001",
36
"system": "http://hl7.org/fhir/sid/us-ssn"
37
}
38
],
39
"name": [
40
{
41
"given": [
42
"Timothy",
43
"Paul"
44
],
45
"family": "Bixby"
46
}
47
],
48
"gender": "male",
49
"birthDate": "2008-01-06"
50
}
51
},
52
{
53
"resource": {
54
"resourceType": "Observation",
55
"id": "RedoxHGBObservationExample",
56
"category": [
57
{
58
"coding": [
59
{
60
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
61
"code": "laboratory"
62
}
63
]
64
}
65
],
66
"identifier": [
67
{
68
"system": "urn:oid:1.2.840.114350.1.13.12345.1.7.2.798268",
69
"value": "6492428347"
70
}
71
],
72
"status": "final",
73
"subject": {
74
"reference": "Patient/RedoxPatientExampleTimothy"
75
},
76
"code": {
77
"coding": [
78
{
79
"code": "30313-1",
80
"system": "http://loinc.org"
81
}
82
],
83
"text": "HGB"
84
},
85
"specimen": {
86
"reference": "RedoxSpecimen"
87
},
88
"issued": "2022-02-16T17:26:19.778Z",
89
"valueQuantity": {
90
"value": 10.2,
91
"unit": "g/dl"
92
},
93
"note": [
94
{
95
"text": "An observation result note"
96
}
97
],
98
"referenceRange": [
99
{
100
"low": {
101
"value": 13.5
102
},
103
"high": {
104
"value": 17.5
105
}
106
}
107
],
108
"interpretation": [
109
{
110
"coding": [
111
{
112
"code": "L",
113
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
114
"display": "Low"
115
}
116
]
117
}
118
]
119
}
120
}
121
]
122
}'

Request Body Schema

  • resourceType
    required, string

    Identifies the type of the resource

    Value: Bundle
  • type
    required, string

    Identifies this bundle as a message

    Value: message
  • entry
    required, Array of MessageHeader, Patient, Observation or Other

    Results are typically written as a collection of Observation resources grouped into a DiagnosticReport. To create or update an entire report, use the DiagnosticReport/$write operation.

    Use this endpoint only to create standalone Observations or to update existing Observations.

    An array of FHIR resources. At a minimum, an Observation Result should include the following entries:

    • Patient - the patient
    • Observation - the observation result

      An entry in the bundle containing a FHIR resource

    • resource
      required, object

      Additional metadata about the message including the event

      • resourceType
        required, string

        Identifies the type of the resource

        Value: MessageHeader
      • source
        required, object

        Information about the sender of the message. This will typically be populated by Redox.

        • endpoint
          required, string

          Identifies the routing target to send acknowledgements to.

        • name
          string

          Human-readable name for the source system.

      • eventCoding
        required, object

        This describes the message being communicated

        • system
          string

          The identification of the code system that defines the meaning of the symbol in the code.

        • code
          string

          A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

          Value: Observation-New
  • timestamp
    string

    The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.

Response fields and example

Example

1
"Operation Response"