Mercurial > hg > orthanc-databases
comparison Resources/Orthanc/Sdk-1.12.0/orthanc/OrthancDatabasePlugin.proto @ 405:1938ba8fba35
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 15 Apr 2023 13:49:53 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
394:2fd272ea8f00 | 405:1938ba8fba35 |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium | |
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
7 * | |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU General Public License as | |
10 * published by the Free Software Foundation, either version 3 of the | |
11 * License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 /** | |
24 * This Protocol Buffers prototype describes the exchanges between the | |
25 * Orthanc core and its database plugins. The various calls correspond | |
26 * to the "IDatabaseWrapper" interface in the source code of Orthanc. | |
27 * | |
28 * WARNING: *NEVER* modify or remove existing entries. It is only | |
29 * allowed to *add* new stuff. | |
30 **/ | |
31 | |
32 syntax = "proto3"; | |
33 | |
34 /** | |
35 * Turn off protobuf reflection to avoid clashes between the Orthanc | |
36 * core and the database plugin, otherwise both will try to register | |
37 * the same messages in the process-wide descriptor pool, which would | |
38 * result in protobuf error "File already exists in database". | |
39 **/ | |
40 option optimize_for = LITE_RUNTIME; | |
41 | |
42 package Orthanc.DatabasePluginMessages; | |
43 | |
44 | |
45 /** | |
46 * Data structures that are common with the Orthanc core. | |
47 **/ | |
48 | |
49 message FileInfo { | |
50 string uuid = 1; | |
51 int32 content_type = 2; // opaque "FileContentType" in Orthanc | |
52 uint64 uncompressed_size = 3; | |
53 string uncompressed_hash = 4; | |
54 int32 compression_type = 5; // opaque "CompressionType" in Orthanc | |
55 uint64 compressed_size = 6; | |
56 string compressed_hash = 7; | |
57 } | |
58 | |
59 enum ResourceType { | |
60 RESOURCE_PATIENT = 0; | |
61 RESOURCE_STUDY = 1; | |
62 RESOURCE_SERIES = 2; | |
63 RESOURCE_INSTANCE = 3; | |
64 } | |
65 | |
66 enum ConstraintType { | |
67 CONSTRAINT_EQUAL = 0; | |
68 CONSTRAINT_SMALLER_OR_EQUAL = 1; | |
69 CONSTRAINT_GREATER_OR_EQUAL = 2; | |
70 CONSTRAINT_WILDCARD = 3; | |
71 CONSTRAINT_LIST = 4; | |
72 } | |
73 | |
74 enum LabelsConstraintType { | |
75 LABELS_CONSTRAINT_ALL = 0; | |
76 LABELS_CONSTRAINT_ANY = 1; | |
77 LABELS_CONSTRAINT_NONE = 2; | |
78 } | |
79 | |
80 message ServerIndexChange { | |
81 int64 seq = 1; | |
82 int32 change_type = 2; // opaque "ChangeType" in Orthanc | |
83 ResourceType resource_type = 3; | |
84 string public_id = 4; | |
85 string date = 5; | |
86 } | |
87 | |
88 message ExportedResource { | |
89 int64 seq = 1; | |
90 ResourceType resource_type = 2; | |
91 string public_id = 3; | |
92 string modality = 4; | |
93 string date = 5; | |
94 string patient_id = 6; | |
95 string study_instance_uid = 7; | |
96 string series_instance_uid = 8; | |
97 string sop_instance_uid = 9; | |
98 } | |
99 | |
100 message DatabaseConstraint { | |
101 ResourceType level = 1; | |
102 uint32 tag_group = 2; | |
103 uint32 tag_element = 3; | |
104 bool is_identifier_tag = 4; | |
105 bool is_case_sensitive = 5; | |
106 bool is_mandatory = 6; | |
107 ConstraintType type = 7; | |
108 repeated string values = 8; | |
109 } | |
110 | |
111 | |
112 /** | |
113 * Database-level operations. | |
114 **/ | |
115 | |
116 enum DatabaseOperation { | |
117 OPERATION_GET_SYSTEM_INFORMATION = 0; | |
118 OPERATION_OPEN = 1; | |
119 OPERATION_CLOSE = 2; | |
120 OPERATION_FLUSH_TO_DISK = 3; | |
121 OPERATION_START_TRANSACTION = 4; | |
122 OPERATION_UPGRADE = 5; | |
123 OPERATION_FINALIZE_TRANSACTION = 6; | |
124 } | |
125 | |
126 enum TransactionType { | |
127 TRANSACTION_READ_ONLY = 0; | |
128 TRANSACTION_READ_WRITE = 1; | |
129 } | |
130 | |
131 message GetSystemInformation { | |
132 message Request { | |
133 } | |
134 message Response { | |
135 uint32 database_version = 1; | |
136 bool supports_flush_to_disk = 2; | |
137 bool supports_revisions = 3; | |
138 bool supports_labels = 4; | |
139 } | |
140 } | |
141 | |
142 message Open { | |
143 message Request { | |
144 message IdentifierTag { | |
145 ResourceType level = 1; | |
146 uint32 group = 2; | |
147 uint32 element = 3; | |
148 string name = 4; | |
149 } | |
150 repeated IdentifierTag identifier_tags = 1; | |
151 } | |
152 message Response { | |
153 } | |
154 } | |
155 | |
156 message Close { | |
157 message Request { | |
158 } | |
159 message Response { | |
160 } | |
161 } | |
162 | |
163 message FlushToDisk { | |
164 message Request { | |
165 } | |
166 message Response { | |
167 } | |
168 } | |
169 | |
170 message StartTransaction { | |
171 message Request { | |
172 TransactionType type = 1; | |
173 } | |
174 message Response { | |
175 sfixed64 transaction = 1; | |
176 } | |
177 } | |
178 | |
179 message Upgrade { | |
180 /** | |
181 * It is guaranteed that a read-write transaction is created by the | |
182 * Orthanc core before executing this operation. | |
183 **/ | |
184 message Request { | |
185 uint32 target_version = 1; | |
186 sfixed64 storage_area = 2; | |
187 sfixed64 transaction = 3; | |
188 } | |
189 message Response { | |
190 } | |
191 } | |
192 | |
193 message FinalizeTransaction { | |
194 message Request { | |
195 sfixed64 transaction = 1; | |
196 } | |
197 message Response { | |
198 } | |
199 } | |
200 | |
201 message DatabaseRequest { | |
202 sfixed64 database = 1; | |
203 DatabaseOperation operation = 2; | |
204 | |
205 GetSystemInformation.Request get_system_information = 100; | |
206 Open.Request open = 101; | |
207 Close.Request close = 102; | |
208 FlushToDisk.Request flush_to_disk = 103; | |
209 StartTransaction.Request start_transaction = 104; | |
210 Upgrade.Request upgrade = 105; | |
211 FinalizeTransaction.Request finalize_transaction = 106; | |
212 } | |
213 | |
214 message DatabaseResponse { | |
215 GetSystemInformation.Response get_system_information = 100; | |
216 Open.Response open = 101; | |
217 Close.Response close = 102; | |
218 FlushToDisk.Response flush_to_disk = 103; | |
219 StartTransaction.Response start_transaction = 104; | |
220 Upgrade.Response upgrade = 105; | |
221 FinalizeTransaction.Response finalize_transaction = 106; | |
222 } | |
223 | |
224 | |
225 /** | |
226 * Transaction-level operations. | |
227 **/ | |
228 | |
229 enum TransactionOperation { | |
230 OPERATION_ROLLBACK = 0; | |
231 OPERATION_COMMIT = 1; | |
232 OPERATION_ADD_ATTACHMENT = 2; | |
233 OPERATION_CLEAR_CHANGES = 3; | |
234 OPERATION_CLEAR_EXPORTED_RESOURCES = 4; | |
235 OPERATION_DELETE_ATTACHMENT = 5; | |
236 OPERATION_DELETE_METADATA = 6; | |
237 OPERATION_DELETE_RESOURCE = 7; | |
238 OPERATION_GET_ALL_METADATA = 8; | |
239 OPERATION_GET_ALL_PUBLIC_IDS = 9; | |
240 OPERATION_GET_ALL_PUBLIC_IDS_WITH_LIMITS = 10; | |
241 OPERATION_GET_CHANGES = 11; | |
242 OPERATION_GET_CHILDREN_INTERNAL_ID = 12; | |
243 OPERATION_GET_CHILDREN_PUBLIC_ID = 13; | |
244 OPERATION_GET_EXPORTED_RESOURCES = 14; | |
245 OPERATION_GET_LAST_CHANGE = 15; | |
246 OPERATION_GET_LAST_EXPORTED_RESOURCE = 16; | |
247 OPERATION_GET_MAIN_DICOM_TAGS = 17; | |
248 OPERATION_GET_PUBLIC_ID = 18; | |
249 OPERATION_GET_RESOURCES_COUNT = 19; | |
250 OPERATION_GET_RESOURCE_TYPE = 20; | |
251 OPERATION_GET_TOTAL_COMPRESSED_SIZE = 21; | |
252 OPERATION_GET_TOTAL_UNCOMPRESSED_SIZE = 22; | |
253 OPERATION_IS_PROTECTED_PATIENT = 23; | |
254 OPERATION_LIST_AVAILABLE_ATTACHMENTS = 24; | |
255 OPERATION_LOG_CHANGE = 25; | |
256 OPERATION_LOG_EXPORTED_RESOURCE = 26; | |
257 OPERATION_LOOKUP_ATTACHMENT = 27; | |
258 OPERATION_LOOKUP_GLOBAL_PROPERTY = 28; | |
259 OPERATION_LOOKUP_METADATA = 29; | |
260 OPERATION_LOOKUP_PARENT = 30; | |
261 OPERATION_LOOKUP_RESOURCE = 31; | |
262 OPERATION_SELECT_PATIENT_TO_RECYCLE = 32; | |
263 OPERATION_SELECT_PATIENT_TO_RECYCLE_WITH_AVOID = 33; | |
264 OPERATION_SET_GLOBAL_PROPERTY = 34; | |
265 OPERATION_CLEAR_MAIN_DICOM_TAGS = 35; | |
266 OPERATION_SET_METADATA = 36; | |
267 OPERATION_SET_PROTECTED_PATIENT = 37; | |
268 OPERATION_IS_DISK_SIZE_ABOVE = 38; | |
269 OPERATION_LOOKUP_RESOURCES = 39; | |
270 OPERATION_CREATE_INSTANCE = 40; | |
271 OPERATION_SET_RESOURCES_CONTENT = 41; | |
272 OPERATION_GET_CHILDREN_METADATA = 42; | |
273 OPERATION_GET_LAST_CHANGE_INDEX = 43; | |
274 OPERATION_LOOKUP_RESOURCE_AND_PARENT = 44; | |
275 OPERATION_ADD_LABEL = 45; // New in Orthanc 1.12.0 | |
276 OPERATION_REMOVE_LABEL = 46; // New in Orthanc 1.12.0 | |
277 OPERATION_LIST_LABELS = 47; // New in Orthanc 1.12.0 | |
278 } | |
279 | |
280 message Rollback { | |
281 message Request { | |
282 } | |
283 message Response { | |
284 } | |
285 } | |
286 | |
287 message Commit { | |
288 message Request { | |
289 int64 file_size_delta = 1; | |
290 } | |
291 message Response { | |
292 } | |
293 } | |
294 | |
295 message AddAttachment { | |
296 message Request { | |
297 int64 id = 1; | |
298 FileInfo attachment = 2; | |
299 int64 revision = 3; | |
300 } | |
301 message Response { | |
302 } | |
303 } | |
304 | |
305 message ClearChanges { | |
306 message Request { | |
307 } | |
308 message Response { | |
309 } | |
310 } | |
311 | |
312 message ClearExportedResources { | |
313 message Request { | |
314 } | |
315 message Response { | |
316 } | |
317 } | |
318 | |
319 message DeleteAttachment { | |
320 message Request { | |
321 int64 id = 1; | |
322 int32 type = 2; | |
323 } | |
324 message Response { | |
325 FileInfo deleted_attachment = 1; | |
326 } | |
327 } | |
328 | |
329 message DeleteMetadata { | |
330 message Request { | |
331 int64 id = 1; | |
332 int32 type = 2; | |
333 } | |
334 message Response { | |
335 } | |
336 } | |
337 | |
338 message DeleteResource { | |
339 message Request { | |
340 int64 id = 1; | |
341 } | |
342 message Response { | |
343 message Resource { | |
344 ResourceType level = 1; | |
345 string public_id = 2; | |
346 } | |
347 repeated FileInfo deleted_attachments = 1; | |
348 repeated Resource deleted_resources = 2; | |
349 bool is_remaining_ancestor = 3; | |
350 Resource remaining_ancestor = 4; | |
351 } | |
352 } | |
353 | |
354 message GetAllMetadata { | |
355 message Request { | |
356 int64 id = 1; | |
357 } | |
358 message Response { | |
359 message Metadata { | |
360 int32 type = 1; | |
361 string value = 2; | |
362 } | |
363 repeated Metadata metadata = 1; | |
364 } | |
365 } | |
366 | |
367 message GetAllPublicIds { | |
368 message Request { | |
369 ResourceType resource_type = 1; | |
370 } | |
371 message Response { | |
372 repeated string ids = 1; | |
373 } | |
374 } | |
375 | |
376 message GetAllPublicIdsWithLimits { | |
377 message Request { | |
378 ResourceType resource_type = 1; | |
379 int64 since = 2; | |
380 uint32 limit = 3; | |
381 } | |
382 message Response { | |
383 repeated string ids = 1; | |
384 } | |
385 } | |
386 | |
387 message GetChanges { | |
388 message Request { | |
389 int64 since = 1; | |
390 uint32 limit = 2; | |
391 } | |
392 message Response { | |
393 repeated ServerIndexChange changes = 1; | |
394 bool done = 2; | |
395 } | |
396 } | |
397 | |
398 message GetChildrenInternalId { | |
399 message Request { | |
400 int64 id = 1; | |
401 } | |
402 message Response { | |
403 repeated int64 ids = 1; | |
404 } | |
405 } | |
406 | |
407 message GetChildrenPublicId { | |
408 message Request { | |
409 int64 id = 1; | |
410 } | |
411 message Response { | |
412 repeated string ids = 1; | |
413 } | |
414 } | |
415 | |
416 message GetExportedResources { | |
417 message Request { | |
418 int64 since = 1; | |
419 uint32 limit = 2; | |
420 } | |
421 message Response { | |
422 repeated ExportedResource resources = 1; | |
423 bool done = 2; | |
424 } | |
425 } | |
426 | |
427 message GetLastChange { | |
428 message Request { | |
429 } | |
430 message Response { | |
431 bool found = 1; | |
432 ServerIndexChange change = 2; | |
433 } | |
434 } | |
435 | |
436 message GetLastExportedResource { | |
437 message Request { | |
438 } | |
439 message Response { | |
440 bool found = 1; | |
441 ExportedResource resource = 2; | |
442 } | |
443 } | |
444 | |
445 message GetMainDicomTags { | |
446 message Request { | |
447 int64 id = 1; | |
448 } | |
449 message Response { | |
450 message Tag { | |
451 uint32 group = 1; | |
452 uint32 element = 2; | |
453 string value = 3; | |
454 } | |
455 repeated Tag tags = 1; | |
456 } | |
457 } | |
458 | |
459 message GetPublicId { | |
460 message Request { | |
461 int64 id = 1; | |
462 } | |
463 message Response { | |
464 string id = 1; | |
465 } | |
466 } | |
467 | |
468 message GetResourcesCount { | |
469 message Request { | |
470 ResourceType type = 1; | |
471 } | |
472 message Response { | |
473 uint64 count = 1; | |
474 } | |
475 } | |
476 | |
477 message GetResourceType { | |
478 message Request { | |
479 int64 id = 1; | |
480 } | |
481 message Response { | |
482 ResourceType type = 1; | |
483 } | |
484 } | |
485 | |
486 message GetTotalCompressedSize { | |
487 message Request { | |
488 } | |
489 message Response { | |
490 uint64 size = 1; | |
491 } | |
492 } | |
493 | |
494 message GetTotalUncompressedSize { | |
495 message Request { | |
496 } | |
497 message Response { | |
498 uint64 size = 1; | |
499 } | |
500 } | |
501 | |
502 message IsProtectedPatient { | |
503 message Request { | |
504 int64 patient_id = 1; | |
505 } | |
506 message Response { | |
507 bool protected_patient = 1; | |
508 } | |
509 } | |
510 | |
511 message ListAvailableAttachments { | |
512 message Request { | |
513 int64 id = 1; | |
514 } | |
515 message Response { | |
516 repeated int32 attachments = 1; | |
517 } | |
518 } | |
519 | |
520 message LogChange { | |
521 message Request { | |
522 int32 change_type = 1; | |
523 ResourceType resource_type = 2; | |
524 int64 resource_id = 3; | |
525 string date = 4; | |
526 } | |
527 message Response { | |
528 } | |
529 } | |
530 | |
531 message LogExportedResource { | |
532 message Request { | |
533 ResourceType resource_type = 1; | |
534 string public_id = 2; | |
535 string modality = 3; | |
536 string date = 4; | |
537 string patient_id = 5; | |
538 string study_instance_uid = 6; | |
539 string series_instance_uid = 7; | |
540 string sop_instance_uid = 8; | |
541 } | |
542 message Response { | |
543 } | |
544 } | |
545 | |
546 message LookupAttachment { | |
547 message Request { | |
548 int64 id = 1; | |
549 int32 content_type = 2; | |
550 } | |
551 message Response { | |
552 bool found = 1; | |
553 FileInfo attachment = 2; | |
554 int64 revision = 3; | |
555 } | |
556 } | |
557 | |
558 message LookupGlobalProperty { | |
559 message Request { | |
560 string server_id = 1; | |
561 int32 property = 2; | |
562 } | |
563 message Response { | |
564 bool found = 1; | |
565 string value = 2; | |
566 } | |
567 } | |
568 | |
569 message LookupMetadata { | |
570 message Request { | |
571 int64 id = 1; | |
572 int32 metadata_type = 2; | |
573 } | |
574 message Response { | |
575 bool found = 1; | |
576 string value = 2; | |
577 int64 revision = 3; | |
578 } | |
579 } | |
580 | |
581 message LookupParent { | |
582 message Request { | |
583 int64 id = 1; | |
584 } | |
585 message Response { | |
586 bool found = 1; | |
587 int64 parent = 2; | |
588 } | |
589 } | |
590 | |
591 message LookupResource { | |
592 message Request { | |
593 string public_id = 1; | |
594 } | |
595 message Response { | |
596 bool found = 1; | |
597 int64 internal_id = 2; | |
598 ResourceType type = 3; | |
599 } | |
600 } | |
601 | |
602 message SelectPatientToRecycle { | |
603 message Request { | |
604 } | |
605 message Response { | |
606 bool found = 1; | |
607 int64 patient_id = 2; | |
608 } | |
609 } | |
610 | |
611 message SelectPatientToRecycleWithAvoid { | |
612 message Request { | |
613 int64 patient_id_to_avoid = 1; | |
614 } | |
615 message Response { | |
616 bool found = 1; | |
617 int64 patient_id = 2; | |
618 } | |
619 } | |
620 | |
621 message SetGlobalProperty { | |
622 message Request { | |
623 string server_id = 1; | |
624 int32 property = 2; | |
625 string value = 3; | |
626 } | |
627 message Response { | |
628 } | |
629 } | |
630 | |
631 message ClearMainDicomTags { | |
632 message Request { | |
633 int64 id = 1; | |
634 } | |
635 message Response { | |
636 } | |
637 } | |
638 | |
639 message SetMetadata { | |
640 message Request { | |
641 int64 id = 1; | |
642 int32 metadata_type = 2; | |
643 string value = 3; | |
644 int64 revision = 4; | |
645 } | |
646 message Response { | |
647 } | |
648 } | |
649 | |
650 message SetProtectedPatient { | |
651 message Request { | |
652 int64 patient_id = 1; | |
653 bool protected_patient = 2; | |
654 } | |
655 message Response { | |
656 } | |
657 } | |
658 | |
659 message IsDiskSizeAbove { | |
660 message Request { | |
661 uint64 threshold = 1; | |
662 } | |
663 message Response { | |
664 bool result = 1; | |
665 } | |
666 } | |
667 | |
668 message LookupResources { | |
669 message Request { | |
670 repeated DatabaseConstraint lookup = 1; | |
671 ResourceType query_level = 2; | |
672 uint32 limit = 3; | |
673 bool retrieve_instances_ids = 4; | |
674 repeated string labels = 5; // New in Orthanc 1.12.0 | |
675 LabelsConstraintType labels_constraint = 6; // New in Orthanc 1.12.0 | |
676 } | |
677 message Response { | |
678 repeated string resources_ids = 1; | |
679 repeated string instances_ids = 2; // Only filled if "retrieve_instances" is true | |
680 } | |
681 } | |
682 | |
683 message CreateInstance { | |
684 message Request { | |
685 string patient = 1; | |
686 string study = 2; | |
687 string series = 3; | |
688 string instance = 4; | |
689 } | |
690 message Response { | |
691 bool is_new_instance = 1; | |
692 int64 instance_id = 2; | |
693 | |
694 // The fields below are only set if "is_new_instance" is true | |
695 bool is_new_patient = 3; | |
696 bool is_new_study = 4; | |
697 bool is_new_series = 5; | |
698 int64 patient_id = 6; | |
699 int64 study_id = 7; | |
700 int64 series_id = 8; | |
701 } | |
702 } | |
703 | |
704 message SetResourcesContent { | |
705 message Request { | |
706 message Tag { | |
707 int64 resource_id = 1; | |
708 bool is_identifier = 2; | |
709 uint32 group = 3; | |
710 uint32 element = 4; | |
711 string value = 5; | |
712 } | |
713 | |
714 message Metadata { | |
715 int64 resource_id = 1; | |
716 int32 metadata = 2; | |
717 string value = 3; | |
718 } | |
719 | |
720 repeated Tag tags = 1; | |
721 repeated Metadata metadata = 2; | |
722 } | |
723 message Response { | |
724 } | |
725 } | |
726 | |
727 message GetChildrenMetadata { | |
728 message Request { | |
729 int64 id = 1; | |
730 int32 metadata = 2; | |
731 } | |
732 message Response { | |
733 repeated string values = 1; | |
734 } | |
735 } | |
736 | |
737 message GetLastChangeIndex { | |
738 message Request { | |
739 } | |
740 message Response { | |
741 int64 result = 1; | |
742 } | |
743 } | |
744 | |
745 message LookupResourceAndParent { | |
746 message Request { | |
747 string public_id = 1; | |
748 } | |
749 message Response { | |
750 bool found = 1; | |
751 int64 id = 2; | |
752 ResourceType type = 3; | |
753 string parent_public_id = 4; // Only for study, series, or instance | |
754 } | |
755 } | |
756 | |
757 message AddLabel { | |
758 message Request { | |
759 int64 id = 1; | |
760 string label = 2; | |
761 } | |
762 message Response { | |
763 } | |
764 } | |
765 | |
766 message RemoveLabel { | |
767 message Request { | |
768 int64 id = 1; | |
769 string label = 2; | |
770 } | |
771 message Response { | |
772 } | |
773 } | |
774 | |
775 message ListLabels { | |
776 message Request { | |
777 bool single_resource = 1; | |
778 int64 id = 2; // Only if "single_resource" is "true" | |
779 } | |
780 message Response { | |
781 repeated string labels = 1; | |
782 } | |
783 } | |
784 | |
785 message TransactionRequest { | |
786 sfixed64 transaction = 1; | |
787 TransactionOperation operation = 2; | |
788 | |
789 Rollback.Request rollback = 100; | |
790 Commit.Request commit = 101; | |
791 AddAttachment.Request add_attachment = 102; | |
792 ClearChanges.Request clear_changes = 103; | |
793 ClearExportedResources.Request clear_exported_resources = 104; | |
794 DeleteAttachment.Request delete_attachment = 105; | |
795 DeleteMetadata.Request delete_metadata = 106; | |
796 DeleteResource.Request delete_resource = 107; | |
797 GetAllMetadata.Request get_all_metadata = 108; | |
798 GetAllPublicIds.Request get_all_public_ids = 109; | |
799 GetAllPublicIdsWithLimits.Request get_all_public_ids_with_limits = 110; | |
800 GetChanges.Request get_changes = 111; | |
801 GetChildrenInternalId.Request get_children_internal_id = 112; | |
802 GetChildrenPublicId.Request get_children_public_id = 113; | |
803 GetExportedResources.Request get_exported_resources = 114; | |
804 GetLastChange.Request get_last_change = 115; | |
805 GetLastExportedResource.Request get_last_exported_resource = 116; | |
806 GetMainDicomTags.Request get_main_dicom_tags = 117; | |
807 GetPublicId.Request get_public_id = 118; | |
808 GetResourcesCount.Request get_resources_count = 119; | |
809 GetResourceType.Request get_resource_type = 120; | |
810 GetTotalCompressedSize.Request get_total_compressed_size = 121; | |
811 GetTotalUncompressedSize.Request get_total_uncompressed_size = 122; | |
812 IsProtectedPatient.Request is_protected_patient = 123; | |
813 ListAvailableAttachments.Request list_available_attachments = 124; | |
814 LogChange.Request log_change = 125; | |
815 LogExportedResource.Request log_exported_resource = 126; | |
816 LookupAttachment.Request lookup_attachment = 127; | |
817 LookupGlobalProperty.Request lookup_global_property = 128; | |
818 LookupMetadata.Request lookup_metadata = 129; | |
819 LookupParent.Request lookup_parent = 130; | |
820 LookupResource.Request lookup_resource = 131; | |
821 SelectPatientToRecycle.Request select_patient_to_recycle = 132; | |
822 SelectPatientToRecycleWithAvoid.Request select_patient_to_recycle_with_avoid = 133; | |
823 SetGlobalProperty.Request set_global_property = 134; | |
824 ClearMainDicomTags.Request clear_main_dicom_tags = 135; | |
825 SetMetadata.Request set_metadata = 136; | |
826 SetProtectedPatient.Request set_protected_patient = 137; | |
827 IsDiskSizeAbove.Request is_disk_size_above = 138; | |
828 LookupResources.Request lookup_resources = 139; | |
829 CreateInstance.Request create_instance = 140; | |
830 SetResourcesContent.Request set_resources_content = 141; | |
831 GetChildrenMetadata.Request get_children_metadata = 142; | |
832 GetLastChangeIndex.Request get_last_change_index = 143; | |
833 LookupResourceAndParent.Request lookup_resource_and_parent = 144; | |
834 AddLabel.Request add_label = 145; | |
835 RemoveLabel.Request remove_label = 146; | |
836 ListLabels.Request list_labels = 147; | |
837 } | |
838 | |
839 message TransactionResponse { | |
840 Rollback.Response rollback = 100; | |
841 Commit.Response commit = 101; | |
842 AddAttachment.Response add_attachment = 102; | |
843 ClearChanges.Response clear_changes = 103; | |
844 ClearExportedResources.Response clear_exported_resources = 104; | |
845 DeleteAttachment.Response delete_attachment = 105; | |
846 DeleteMetadata.Response delete_metadata = 106; | |
847 DeleteResource.Response delete_resource = 107; | |
848 GetAllMetadata.Response get_all_metadata = 108; | |
849 GetAllPublicIds.Response get_all_public_ids = 109; | |
850 GetAllPublicIdsWithLimits.Response get_all_public_ids_with_limits = 110; | |
851 GetChanges.Response get_changes = 111; | |
852 GetChildrenInternalId.Response get_children_internal_id = 112; | |
853 GetChildrenPublicId.Response get_children_public_id = 113; | |
854 GetExportedResources.Response get_exported_resources = 114; | |
855 GetLastChange.Response get_last_change = 115; | |
856 GetLastExportedResource.Response get_last_exported_resource = 116; | |
857 GetMainDicomTags.Response get_main_dicom_tags = 117; | |
858 GetPublicId.Response get_public_id = 118; | |
859 GetResourcesCount.Response get_resources_count = 119; | |
860 GetResourceType.Response get_resource_type = 120; | |
861 GetTotalCompressedSize.Response get_total_compressed_size = 121; | |
862 GetTotalUncompressedSize.Response get_total_uncompressed_size = 122; | |
863 IsProtectedPatient.Response is_protected_patient = 123; | |
864 ListAvailableAttachments.Response list_available_attachments = 124; | |
865 LogChange.Response log_change = 125; | |
866 LogExportedResource.Response log_exported_resource = 126; | |
867 LookupAttachment.Response lookup_attachment = 127; | |
868 LookupGlobalProperty.Response lookup_global_property = 128; | |
869 LookupMetadata.Response lookup_metadata = 129; | |
870 LookupParent.Response lookup_parent = 130; | |
871 LookupResource.Response lookup_resource = 131; | |
872 SelectPatientToRecycle.Response select_patient_to_recycle = 132; | |
873 SelectPatientToRecycleWithAvoid.Response select_patient_to_recycle_with_avoid = 133; | |
874 SetGlobalProperty.Response set_global_property = 134; | |
875 ClearMainDicomTags.Response clear_main_dicom_tags = 135; | |
876 SetMetadata.Response set_metadata = 136; | |
877 SetProtectedPatient.Response set_protected_patient = 137; | |
878 IsDiskSizeAbove.Response is_disk_size_above = 138; | |
879 LookupResources.Response lookup_resources = 139; | |
880 CreateInstance.Response create_instance = 140; | |
881 SetResourcesContent.Response set_resources_content = 141; | |
882 GetChildrenMetadata.Response get_children_metadata = 142; | |
883 GetLastChangeIndex.Response get_last_change_index = 143; | |
884 LookupResourceAndParent.Response lookup_resource_and_parent = 144; | |
885 AddLabel.Response add_label = 145; | |
886 RemoveLabel.Response remove_label = 146; | |
887 ListLabels.Response list_labels = 147; | |
888 } | |
889 | |
890 enum RequestType { | |
891 REQUEST_DATABASE = 0; | |
892 REQUEST_TRANSACTION = 1; | |
893 } | |
894 | |
895 message Request { | |
896 RequestType type = 1; | |
897 DatabaseRequest database_request = 2; | |
898 TransactionRequest transaction_request = 3; | |
899 } | |
900 | |
901 message Response { | |
902 DatabaseResponse database_response = 2; | |
903 TransactionResponse transaction_response = 3; | |
904 } |