forked from openEHR/specifications-ITS-REST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
2056 lines (1276 loc) · 43.7 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: http://www.openehr.org/api
# OpenEHR REST API
The openEHR REST API enables interaction with an openEHR service in a RESTful manner.
In many places parameter `version_time` is used. It is used to select a specific version
of a VERSIONED_OBJECT and can have the following values:
- `LATEST_TRUNK_VERSION`
- a specific timestamp in the ISO8601 format (e.g. 2015-01-20T19:30:22.765+01:00)
- version uid
When the `version_time` parameter is not provided, the lastest trunk version is returned,
which is the same as specifing `version_time=LATEST_TRUNK_VERSION`.
# Group EHR
## EHR [/ehr]
Management of EHR resources.
### Create a new EHR (with auto-generated ehr_id) [POST]
Request body may contain `ehr_status` and `ehr_access` attributes. When provided these
resources will also be created as part of the `create EHR` action,
otherwise default resources will be created automatical by the service.
+ Request
+ Headers
Prefer: return={representation|minimal}
+ Body
{
"commit_audit": {
"description": "Commit audit description",
"committer": {"@class": "PARTY_IDENTIFIED", ... }
},
"ehr_status": { ... },
"ehr_access": { ... }
}
+ Response 201 (application/json)
`201 Created` is returned when a new EHR has been succesfully created.
The EHR resource is returned in the body when the `Prefer` header has the value of `return=representation`.
+ Headers
Location: /ehr/{ehrId}
+ Body
{
"system_id": {...},
"ehr_id": {...},
"ehr_status": "versioned ehr status uid",
"ehr_acess": "versioned ehr access uid",
"directory": {},
"time_created", "..."
}
+ Response 400
'400 Bad Request' is returned when unable to create a new EHR due to bad client Request, e.g. malformed syntax.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised to be performed.
+ Body
### Create EHR with ehr_id [PUT /ehr/{ehr_id}]
Create new `EHR` with the specified EHR identifer.
The request body may contain `ehr_status` and `ehr_access` attributes,
which will be used to create these initial resources associated with the new EHR.
When the `ehr_status` or `ehr_access` attributes are not provided, defaults resources
will be created by the service.
+ Parameters
+ ehr_id (string) - EHR identifier
+ Request
+ Headers
Prefer: return={representation|minimal}
+ Body
{
"commit_audit": {
"description": "Commit audit description",
"committer": {"@class": "PARTY_IDENTIFIED", ... }
},
"ehr_status": {...},
"ehr_access": {...}
}
+ Response 201 (application/json)
`201 Created` is returned when a new EHR has been succesfully created.
The new EHR resource is returned in the body when the request's `Prefer` header value is `return=representation`.
+ Headers
Location: /ehr/{ehrId}
+ Body
{
"system_id": {},
"ehr_id": {},
"ehr_status": "versioned ehr status uid",
"ehr_acess": "versioned ehr access uid",
"directory": {},
"time_created", "..."
}
+ Response 400
'400 Bad Request' is returned whenunable to create a new EHR due to bad client Request, e.g. malformed syntax such as the 'ehr_id' not a valid HIER_OBJECT_ID value.
+ Body
+ Response 409
Unable to create a new EHR due to a conflict with the current state of the resource. Can happen when the supplied ehrId already exists.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised to be performed.
+ Body
+ Response 405
`405 Method Not Allowed` is returned when an `EHR` with specified `ehr_id` already exists.
+ Body
### Get EHR [GET /ehr/{ehr_id}]
Retreive the EHR with the specified `ehr_id`.
+ Parameters
+ ehr_id (string) - EHR identifier
+ Response 200 (application/json)
`200 OK` is returned the EHR resource is successfully retreived.
+ Body
{
"system_id": {},
"ehr_id": {},
"ehr_status": "versioned ehr status uid",
"ehr_acess": "versioned ehr access uid",
"directory": {},
"time_created", "...",
... // to be defined, possibly counts of compositions, contributions, etc.
}
+ Response 400
`400 Bad Request` is returned when the request has invalid content such as an invalid `ehr_id` value.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when an `EHR` with `ehr_id` does not exist.
+ Body
### Delete EHR [DELETE /ehr/{ehr_id}]
_This call is under discussion._
Mark the `EHR` as deleted by updating the associated `EHR_STATUS` and `EHR_ACCESS` as deleted.
The request body contains commit_audit attribute to be used as the commit audit details
for the deleted `EHR_STATUS` and `EHR_ACCESS` resources. Where an implementation requires
additional attestation to authorise the deletion, this can be provided in the attestations
attribute in the request.
Note: Some jursidictions may require the service to physically delete the `EHR` and all its content.
This operation may be used to implement this capability but the commit_audit and attesations must be
retained using an alterate audit trail than the usual contribution aufit details.
+ Parameters
+ ehr_id (string) - EHR identifier
+ Request
{
"commit_audit": {
"description": "Commit audit description",
"committer": { "@class": "PARTY_IDENTIFIED",
... }
},
"attestations": { ... }
}
+ Response 204
`204 No Content` is return when `EHR` is successfully deleted.
+ Body
+ Response 400
`400 Bad Request` is returned when the request has invalid content such as an invalid `ehr_id` value.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when an `EHR` with `ehr_id` does not exist.
+ Body
# Group EHR_STATUS
## EHR_STATUS [/ehr/{ehrId}/ehr_status]
Management of EHR_STATUS resources.
### Get EHR_STATUS [GET /ehr/{ehr_id}/ehr_status?version_time]
Retreive the `EHR_STATUS` associated with the specified `ehr_id`.
When the `version_time` parameter is provided, the `EHR_STATUS` version that existed at the specified version time is returned,
otherwise the latest trunk version is returned.
The `version_time` parameter may be an ISO8601 datetime string or symbolic value such as `LATEST_TRUNK_VERSION`.
+ Parameters
+ ehr_id (string) - EHR identifier
+ version_time (string, optional) - version time specifier
+ Response 200 (application/json)
`200 OK` is return with the EHR_STATUS resource in the body when it is successfully retreived.
+ Headers
Content-Location: /ehr/{ehr_id}/ehr_status/{version_uid}
ETag: {version_uid}
+ Body
{
"uid": "..",
"subject": {},
"is_queryable": true,
"is_modifiable": true,
"other_details": {}
}
+ Response 400
`400 Bad Request` is returned when the request has invalid content such as an invalid `ehr_id` or `version_uid` format.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` returned when `EHR` with `ehr_id` does not exist or has been deleted or
a version of an `EHR_STATUS` resource does not exist at the specified `version_time`.
+ Body
### Get EHR_STATUS by version_uid [GET /ehr/{ehr_id}/ehr_status/{version_uid}]
Retrieve the version of the `EHR_STATUS` associated with the specified `ehr_id` and `version_uid`.
+ Parameters
+ ehr_id (string) - EHR identifier
+ version_uid (string) - version UID
+ Response 200 (application/json)
`200 OK` is return when the `EHR_STATUS` is successfully retreived.
+ Body
{
"uid": "..",
"subject": {},
"is_queryable": true,
"is_modifiable": true,
"other_details": {}
}
+ Response 400
`400 Bad Request` is returned when the request has invalid parameters such as an invalid ehr_id value.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when an `EHR` with `ehr_id` does not exist or
an `EHR_STATUS` with `version_uid` does not exist.
+ Body
### Update EHR_STATUS [PUT /ehr/{ehr_id}/ehr_status]
Update `EHR_STATUS` associated with the specified `ehr_id`.
The existing `version_uid` of `EHR_STATUS` resource must be specified in the `Match-If` header.
The response will contain the updated `EHR_STATUS` resource when the `Prefer` header has a value of `return=representation`
+ Parameters
+ ehr_id (string) - EHR identifier
+ Request (application/json)
+ Header
Match-If: {preceding_version_uid}
Prefer: return={representation|minimal}
+ Body
{
"subject": {},
"is_queryable": true,
"is_modifiable": true,
"other_details": {}
}
+ Response 200
`200 OK` return when `EHR_STATUS` resource is successfully updated.
The updated `EHR_STATUS` resource is returned in the body when `prefer` header value is `return=representation`.
+ Headers
Content-Location: /ehr/{ehr_id}/ehr_status/{version_uid}
ETag: {version_uid}
+ Body
{
"uid": "...",
"subject": {},
"is_queryable": true,
"is_modifiable": true,
"other_details": {}
}
+ Response 204
`204 No Content` is returned when `Prefer` header is NOT set to `return=representation`.
+ Headers
Content-Location: /ehr/{ehrId}/ehr_status/{version_uid}
ETag: {version_uid}
+ Response 400
`400 Bad Request` is returned when the request has invalid content such as an invalid `ehr_id` format.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when EHR with ehr_id does not exist or has been deleted or
a version of an `EHR_STATUS` resource does not exist at the specified `version_time`.
+ Body
+ Response 412
`412 Conflict` is return when `Match-If` header doesn't match the lastest trunk version.
Returns lastest trunk version in the `Content-Location` and `ETag` headers.
+ Headers
Content-Location: /ehr/{ehrId}/ehr_status/{version_uid}
ETag: {version_uid}
+ Body
## VERSIONED_EHR_STATUS [/ehr/{ehr_id}/versioned_ehr_status]
Management of `VERSIONED_EHR_STATUS` resources.
### Get VERSIONED_EHR_STATUS [GET /ehr/{ehr_id}/versioned_ehr_status]
Retreive `VERSIONED_EHR_STATUS` associated with specified `ehr_id` including its `revision_history`.
+ Parameters
+ ehr_id (string) - EHR identifier
+ Response 200 (application/json)
`200 OK` is return when the requested EHR's `VERSIONED_EHR_STATUS` is succesfully retrieved, which is provided in the body.
+ Body
{
"uid": "xxx",
"owner_id": "ehr_id",
"time_created": "ISO8601 timestamp",
"revision_history":
{ "items": [
{ "version_id": "",
"audits" : [ {...} ]
}]
}
}
+ Response 400
`400 Bad Request` is returned when the request is invalid such as an invalid `ehr_id` value.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when an `EHR` with `ehr_id` does not exist.
+ Body
### Get EHR_STATUS version [GET /ehr/{ehr_id}/versioned_ehr_status/version?{version_time}]
Retreive the `VERSION` of an `EHR_STATUS` associated with the specified `ehr_id`.
When the `version_time` parameter is provided, the `VERSION` that existed at the specified version time is returned,
otherwise the latest trunk version is returned.
The `version_time` parameter may be an ISO8601 datetime string or symbolic value such as `LATEST_TRUNK_VERSION`.
+ Parameters
+ ehr_id (string) - EHR identifier
+ version_time (string, optional) - version time specifier
+ Response 200 (application/json)
`200 OK` is return when the requested `VERSION` is successfully retrieved, which is provided in the body.
+ Headers
Content-Location: /ehr/{ehr_id}/versioned_ehr_status/version/{version_uid}
+ Body
{
"contribution": {...},
"signature": "...",
"commit_audit": {...},
"uid": "...",
"data": {
"subject": {...},
"is_modifiable": "...",
"is_queryable": "...",
"other_details": {...}
}
}
+ Response 400
`400 Bad Request` is returned when the request is invalid such as an invalid `ehr_id` or `version_time` value.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when `EHR` with `ehr_id` does not exist, deleted
or when `EHR_STATUS` does not exist at the specified `version_time`.
+ Body
### Get EHR_STATUS version by uid [GET /ehr/{ehr_id}/versioned_ehr_status/version/{version_uid}]
Retreive `VERSION` of an `EHR_STATUS` associated with the specified `ehr_id` and `version_uid`.
+ Parameters
+ ehr_id (string) - EHR identifier
+ version_uid (string) - version uid
+ Response 200 (application/json)
`200 OK` is return when the requested `VERSION` is successfully retrieved.
+ Body
{
"contribution": {...},
"signature": "...",
"commit_audit": {...},
"uid": "...",
"data": {
"subject": {...},
"is_modifiable": "...",
"is_queryable": "...",
"other_details": {...}
}
}
+ Response 400
`400 Bad Request` is returned when the request is invalid such as an invalid `ehr_id` or `version_uid` format.
+ Body
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when an `EHR` with `ehr_id` does not exist or `EHR_STATUS` with `version_uid` does not exist.
+ Body
# Group EHR_ACCESS
## EHR_ACCESS [/ehr/{ehrId}/ehr_access]
### Get EHR_ACCESS by version_uid [GET /ehr/{ehr_id}/ehr_access/{version_uid}]
+ Parameters
+ ehr_id (string) - EHR identifier
+ version_uid (string) - version unique identifier
+ Response 200 (application/json)
`200 OK` is returned when the EHR_ACCESS is successfully retrieved.
+ Body
{
"uid": "...",
"settings": {}
}
+ Response 401
`401 Unauthorized` is returned when request is not authorised.
+ Body
+ Response 404
`404 Not Found` is returned when an `EHR` with `ehr_id` does not exist
or an `EHR_STATUS` with `version_uid` does not exist.
+ Body
### Get EHR_ACCESS [GET /ehr/{ehrId}/ehr_access{?versionTime}]
+ Parameters
+ ehrId (string) - EHR id
+ versionTime (string, optional) - version time specifier
+ Response 200 (application/json)
+ Headers
Content-Location: /ehr/{ehrId}/ehr_access/{versionUid}
ETag: {versionUid}
+ Body
{
"uid": "...",
"settings": {}
}
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with the given id.
+ Body
### Update an EHR_ACCESS [PUT /ehr/{ehrId}/ehr_access]
+ Parameters
+ ehrId (string) - EHR id
+ Request (application/json)
+ Header
Match-If: {precedingVersionUid}
Prefer: return={representation/minimal}
+ Body
{
"settings": {}
}
+ Response 200
Returned when `Prefer` header is set to `return=representation`.
+ Headers
Content-Location: /ehr/{ehrId}/ehr_status/{versionUid}
ETag: {versionUid}
+ Body
{
"uid": "...",
"settings": {}
}
+ Response 204
Returned when `Prefer` header is NOT set to `return=representation`.
+ Headers
Content-Location: /ehr/{ehrId}/ehr_access/{versionUid}
ETag: {versionUid}
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with the given id.
+ Body
+ Response 412
`Match-If` header doesn't match the last version. Returns
last version in the `Content-Location` and `ETag` headers.
+ Headers
Content-Location: /ehr/{ehrId}/ehr_access/{versionUid}
ETag: {versionUid}
+ Body
## VERSIONED_EHR_ACCESS [/ehr/{ehrId}/versioned_ehr_access]
### Get a VERSIONED_EHR_ACCESS [GET /ehr/{ehrId}/versioned_ehr_access]
+ Parameters
+ ehrId (string) - EHR id
+ Response 200 (application/json)
+ Body
{
"uid": "xxx",
"owner_id": "ehrId",
"time_created": "ISO8601 timestamp",
"version_count: 12,
"all_version_ids": [
"versionedUid1",
"versionedUid2",
...
]
}
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with the given id.
+ Body
### Get an EHR_ACCESS version by versionUid [GET /ehr/{ehrId}/versioned_ehr_access/versions/{versionUid}]
+ Parameters
+ ehrId (string) - EHR id
+ versionUid (string) - versionUid
+ Response 200 (application/json)
+ Body
{
"contribution": {},
"signature": "...",
"commit_audit": {},
"uid": "...",
"data": {
"settings": {},
}
}
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with the given id.
+ Body
### Get an EHR_ACCESS version [GET /ehr/{ehrId}/versioned_ehr_access/version{?versionTime}]
+ Parameters
+ ehrId (string) - EHR id
+ versionTime (string, optional) - version time specifier
+ Response 200 (application/json)
+ Body
{
"contribution": {},
"signature": "...",
"commit_audit": {},
"uid": "...",
"data": {
"settings": {},
}
}
+ Response 204
No VERSION at versionTime.
+ Body
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with the given id.
+ Body
### Create a new EHR_ACCESS version [POST /ehr/{ehrId}/versioned_ehr_access/version]
+ Parameters
+ ehrId (string) - EHR id
+ Request
+ Body (application/json)
{
"commit_audit": {},
"data": {
"settings": {},
}
}
+ Headers
Match-If: {precedingVersionUid}
Prefer: return={representation/minimal}
+ Response 201 (application/json)
New EHR_ACCESS version was created. Content body is only returned when
`Prefer` header was set to `return=representation` otherwise only headers are
returned.
+ Headers
Location: /ehr/{ehrId}/versioned_ehr_access/versions/{versionUid}
ETag: {versionUid}
+ Body
{
"uid": "...",
"contribution": {},
"signature": "...",
"commit_audit": {},
"data": {
"subject": {},
"is_modifiable": "...",
"is_queryable": "...",
"other_details": {}
}
}
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with given id.
+ Body
+ Response 412
`Match-If` header doesn't match the last version. Returns
last version in the `Content-Location` and `ETag` headers.
+ Headers
Content-Location: /ehr/{ehrId}/versioned_ehr_access/versions/{versionUid}
ETag: {versionUid}
+ Body
# Group DIRECTORY
## Directory [/ehr/{ehrId}/directory]
### Create a directory [POST /ehr/{ehrId}/directory]
+ Parameters
+ ehrId (string) - EHR id
+ Request
+ Body (application/json)
{
"items": [...],
"folders": [{}]
}
+ Headers
Prefer: return={representation/minimal}
+ Response 201 (application/json)
New directory was created. Content body is only returned when
`Prefer` header has `return=representation` otherwise only headers are
returned.
+ Headers
Location: /ehr/{ehrId}/directory/{versionUid}
ETag: {versionUid}
+ Body
{
"uid": "...",
"items": [...],
"folders": [{}]
}
+ Response 400
Bad request - error creating a directory.
+ Body
+ Response 401
Unauthorized.
+ Body
+ Response 404
No EHR with the given id.
+ Body
### Update a directory [PUT /ehr/{ehrId}/directory]
+ Parameters
+ ehrId (string) - EHR id
+ Request
+ Body (application/json)
{
"items": [...],
"folders": [{}]
}
+ Headers
Match-If: {precedingVersionUid}
Prefer: return={representation/minimal}
+ Response 200 (application/json)
Directory was updated.
Returned when `Prefer` header is set to `return=representation`.
+ Headers
Location: /ehr/{ehrId}/directory/{versionUid}
ETag: {versionUid}
+ Body
{
"uid": "...",
"items": [...],
"folders": [{}]
}
+ Response 204
Directory was updated.
Returned when `Prefer` header is NOT set to `return=representation`.
+ Headers
Location: /ehr/{ehrId}/directory/{versionUid}
ETag: {versionUid}
+ Response 400
Bad request - error when updating a directory.
+ Body
+ Response 401