Appointment $write

post/Appointment/$write
Page View

This resource contains entries with a patient, provider, or location schedule. Each appointment entry contains details with the status, participants, date/time, and more. 

You can retrieve, receive, or save appointment information.

$write

This operation allows you to save new or updated appointment details to a patient’s, provider’s, or location’s schedule.

Request parameters and payload

cURL request example

1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Appointment/$write' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/fhir+json' \
5
--data '{
6
"resourceType": "Bundle",
7
"id": "RedoxAppointmentExampleTimothy",
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": "Appointment-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": "Appointment",
55
"id": "RedoxAppointmentExample",
56
"participant": [
57
{
58
"status": "accepted",
59
"actor": {
60
"reference": "Patient/RedoxPatientExampleTimothy"
61
}
62
},
63
{
64
"status": "accepted",
65
"actor": {
66
"reference": "Location/RedoxLocationExample"
67
}
68
}
69
],
70
"identifier": [
71
{
72
"system": "urn:oid:1.2.840.114350.1.13.123.1.7.3.698084.8",
73
"value": "321654654"
74
}
75
],
76
"appointmentType": {
77
"coding": [
78
{
79
"code": "EMERGENCY",
80
"system": "http://terminology.hl7.org/CodeSystem/v2-0276",
81
"display": "Emergency appointment"
82
}
83
]
84
},
85
"status": "proposed",
86
"_status": {
87
"extension": [
88
{
89
"url": "http://hl7.org/fhir/StructureDefinition/originalText",
90
"valueString": "Intent"
91
}
92
]
93
},
94
"start": "2012-08-20T05:00:00.000Z",
95
"end": "2012-08-20T05:15:00.000Z",
96
"minutesDuration": 15,
97
"reasonCode": [
98
{
99
"coding": [
100
{
101
"code": "99241",
102
"system": "http://www.ama-assn.org/go/cpt",
103
"display": "Office consultation - 15 minutes"
104
}
105
]
106
}
107
]
108
}
109
},
110
{
111
"resource": {
112
"resourceType": "Location",
113
"id": "RedoxLocationExample",
114
"name": "RHS Vista Oaks Clinic",
115
"type": [
116
{
117
"coding": [
118
{
119
"code": "OF",
120
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
121
"display": "Outpatient Facility"
122
}
123
]
124
}
125
],
126
"physicalType": {
127
"coding": [
128
{
129
"code": "bu",
130
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
131
"display": "Building"
132
}
133
]
134
}
135
}
136
}
137
]
138
}'

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, Appointment, Patient, Location or Other

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

    • Patient - the patient
    • Location - the location
    • Appointment - the appointment

      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: Appointment-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"