Skip to content

Commit 21c0baf

Browse files
authored
Update index.md
1 parent ca09ab5 commit 21c0baf

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/index.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,46 @@ X-Hub-Signature: sha256=dce85dc8dfde2426079063ad413268ac72dcf845f9f923193285e693
170170
}
171171
```
172172

173+
### App requests context change
174+
175+
Similar to the Hub's notifications to the subscriber, the subscriber can request context changes by POSTing to the `hub.topic` url. The Hub accepts this context change by responding with any successful HTTP status and rejects it by responding with any 4xx or 5xx HTTP status. The subscriber MUST be capable of gracefully handling a rejected context request.
176+
177+
Once a requested context change is accepted, the Hub will broadcast the context notification to all subscribers, including the original requestor.
178+
179+
```
180+
POST https://hub.example.com/7jaa86kgdudewiaq0wtu HTTP/1.1
181+
Host: hub
182+
Authorization: Bearer i8hweunweunweofiwweoijewiwe
183+
Content-Type: application/json
184+
185+
{
186+
"timestamp": "2018-01-08T01:40:05.14",
187+
"id": "wYXStHqxFQyHFELh",
188+
"event": {
189+
"hub.topic": "https://hub.example.com/7jaa86kgdudewiaq0wtu",
190+
"hub.event": "close-patient-chart",
191+
"context": [
192+
{
193+
"key": "patient",
194+
"resource": {
195+
"resourceType": "Patient",
196+
"id": "798E4MyMcpCWHab9",
197+
"identifier": [
198+
{
199+
"system": "urn:oid:1.2.840.114350",
200+
"value": "1345687"
201+
},
202+
{
203+
"system": "urn:oid:1.2.840.114350.1.13.861.1.7.5.737384.27000",
204+
"value": "7539"
205+
}
206+
]
207+
}
208+
}
209+
]
210+
}
211+
}
212+
```
173213

174214
### App unsubscribes from session
175215

0 commit comments

Comments
 (0)