shao 3 dagen geleden
bovenliggende
commit
89c377dcb2

+ 32 - 1
dr_protocol_idl.proto

@@ -150,4 +150,35 @@ message View {
 
 message ViewReply {
   repeated View view_list = 1;
-}
+}
+
+service Apr {
+  rpc GetApr (AprRequest) returns (AprReply) {}
+}
+
+message AprRequest {
+  optional string view_id = 1;
+  optional string apr_id = 2;
+}
+
+message AprSub {
+  int32 work_station_id = 1;
+  string patient_size = 2;
+  google.protobuf.Struct config_object = 3;
+}
+
+message AprReply {
+  string apr_id = 1;
+  string apr_name = 2;
+  string apr_description = 3;
+  string patient_type = 4;
+  string body_part_id = 5;
+  string view_position = 6;
+  string category = 7;
+  string modality = 8;
+  repeated AprSub sub = 9;
+  int32  sort = 10;
+  bool   is_enabled = 11;
+  string product = 12;
+  bool   is_pre_install = 13;
+}

+ 316 - 26
dr_protocol_pb/dr_protocol_idl.pb.go

@@ -1266,6 +1266,258 @@ func (x *ViewReply) GetViewList() []*View {
 	return nil
 }
 
+type AprRequest struct {
+	state         protoimpl.MessageState `protogen:"open.v1"`
+	ViewId        *string                `protobuf:"bytes,1,opt,name=view_id,json=viewId,proto3,oneof" json:"view_id,omitempty"`
+	AprId         *string                `protobuf:"bytes,2,opt,name=apr_id,json=aprId,proto3,oneof" json:"apr_id,omitempty"`
+	unknownFields protoimpl.UnknownFields
+	sizeCache     protoimpl.SizeCache
+}
+
+func (x *AprRequest) Reset() {
+	*x = AprRequest{}
+	mi := &file_dr_protocol_idl_proto_msgTypes[15]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *AprRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AprRequest) ProtoMessage() {}
+
+func (x *AprRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_dr_protocol_idl_proto_msgTypes[15]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AprRequest.ProtoReflect.Descriptor instead.
+func (*AprRequest) Descriptor() ([]byte, []int) {
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *AprRequest) GetViewId() string {
+	if x != nil && x.ViewId != nil {
+		return *x.ViewId
+	}
+	return ""
+}
+
+func (x *AprRequest) GetAprId() string {
+	if x != nil && x.AprId != nil {
+		return *x.AprId
+	}
+	return ""
+}
+
+type AprSub struct {
+	state         protoimpl.MessageState `protogen:"open.v1"`
+	WorkStationId int32                  `protobuf:"varint,1,opt,name=work_station_id,json=workStationId,proto3" json:"work_station_id,omitempty"`
+	PatientSize   string                 `protobuf:"bytes,2,opt,name=patient_size,json=patientSize,proto3" json:"patient_size,omitempty"`
+	ConfigObject  *structpb.Struct       `protobuf:"bytes,3,opt,name=config_object,json=configObject,proto3" json:"config_object,omitempty"`
+	unknownFields protoimpl.UnknownFields
+	sizeCache     protoimpl.SizeCache
+}
+
+func (x *AprSub) Reset() {
+	*x = AprSub{}
+	mi := &file_dr_protocol_idl_proto_msgTypes[16]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *AprSub) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AprSub) ProtoMessage() {}
+
+func (x *AprSub) ProtoReflect() protoreflect.Message {
+	mi := &file_dr_protocol_idl_proto_msgTypes[16]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AprSub.ProtoReflect.Descriptor instead.
+func (*AprSub) Descriptor() ([]byte, []int) {
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *AprSub) GetWorkStationId() int32 {
+	if x != nil {
+		return x.WorkStationId
+	}
+	return 0
+}
+
+func (x *AprSub) GetPatientSize() string {
+	if x != nil {
+		return x.PatientSize
+	}
+	return ""
+}
+
+func (x *AprSub) GetConfigObject() *structpb.Struct {
+	if x != nil {
+		return x.ConfigObject
+	}
+	return nil
+}
+
+type AprReply struct {
+	state          protoimpl.MessageState `protogen:"open.v1"`
+	AprId          string                 `protobuf:"bytes,1,opt,name=apr_id,json=aprId,proto3" json:"apr_id,omitempty"`
+	AprName        string                 `protobuf:"bytes,2,opt,name=apr_name,json=aprName,proto3" json:"apr_name,omitempty"`
+	AprDescription string                 `protobuf:"bytes,3,opt,name=apr_description,json=aprDescription,proto3" json:"apr_description,omitempty"`
+	PatientType    string                 `protobuf:"bytes,4,opt,name=patient_type,json=patientType,proto3" json:"patient_type,omitempty"`
+	BodyPartId     string                 `protobuf:"bytes,5,opt,name=body_part_id,json=bodyPartId,proto3" json:"body_part_id,omitempty"`
+	ViewPosition   string                 `protobuf:"bytes,6,opt,name=view_position,json=viewPosition,proto3" json:"view_position,omitempty"`
+	Category       string                 `protobuf:"bytes,7,opt,name=category,proto3" json:"category,omitempty"`
+	Modality       string                 `protobuf:"bytes,8,opt,name=modality,proto3" json:"modality,omitempty"`
+	Sub            []*AprSub              `protobuf:"bytes,9,rep,name=sub,proto3" json:"sub,omitempty"`
+	Sort           int32                  `protobuf:"varint,10,opt,name=sort,proto3" json:"sort,omitempty"`
+	IsEnabled      bool                   `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"`
+	Product        string                 `protobuf:"bytes,12,opt,name=product,proto3" json:"product,omitempty"`
+	IsPreInstall   bool                   `protobuf:"varint,13,opt,name=is_pre_install,json=isPreInstall,proto3" json:"is_pre_install,omitempty"`
+	unknownFields  protoimpl.UnknownFields
+	sizeCache      protoimpl.SizeCache
+}
+
+func (x *AprReply) Reset() {
+	*x = AprReply{}
+	mi := &file_dr_protocol_idl_proto_msgTypes[17]
+	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+	ms.StoreMessageInfo(mi)
+}
+
+func (x *AprReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AprReply) ProtoMessage() {}
+
+func (x *AprReply) ProtoReflect() protoreflect.Message {
+	mi := &file_dr_protocol_idl_proto_msgTypes[17]
+	if x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AprReply.ProtoReflect.Descriptor instead.
+func (*AprReply) Descriptor() ([]byte, []int) {
+	return file_dr_protocol_idl_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *AprReply) GetAprId() string {
+	if x != nil {
+		return x.AprId
+	}
+	return ""
+}
+
+func (x *AprReply) GetAprName() string {
+	if x != nil {
+		return x.AprName
+	}
+	return ""
+}
+
+func (x *AprReply) GetAprDescription() string {
+	if x != nil {
+		return x.AprDescription
+	}
+	return ""
+}
+
+func (x *AprReply) GetPatientType() string {
+	if x != nil {
+		return x.PatientType
+	}
+	return ""
+}
+
+func (x *AprReply) GetBodyPartId() string {
+	if x != nil {
+		return x.BodyPartId
+	}
+	return ""
+}
+
+func (x *AprReply) GetViewPosition() string {
+	if x != nil {
+		return x.ViewPosition
+	}
+	return ""
+}
+
+func (x *AprReply) GetCategory() string {
+	if x != nil {
+		return x.Category
+	}
+	return ""
+}
+
+func (x *AprReply) GetModality() string {
+	if x != nil {
+		return x.Modality
+	}
+	return ""
+}
+
+func (x *AprReply) GetSub() []*AprSub {
+	if x != nil {
+		return x.Sub
+	}
+	return nil
+}
+
+func (x *AprReply) GetSort() int32 {
+	if x != nil {
+		return x.Sort
+	}
+	return 0
+}
+
+func (x *AprReply) GetIsEnabled() bool {
+	if x != nil {
+		return x.IsEnabled
+	}
+	return false
+}
+
+func (x *AprReply) GetProduct() string {
+	if x != nil {
+		return x.Product
+	}
+	return ""
+}
+
+func (x *AprReply) GetIsPreInstall() bool {
+	if x != nil {
+		return x.IsPreInstall
+	}
+	return false
+}
+
 var File_dr_protocol_idl_proto protoreflect.FileDescriptor
 
 const file_dr_protocol_idl_proto_rawDesc = "" +
@@ -1411,7 +1663,35 @@ const file_dr_protocol_idl_proto_rawDesc = "" +
 	"\aproduct\x18\x15 \x01(\tR\aproduct\x12$\n" +
 	"\x0eis_pre_install\x18\x16 \x01(\bR\fisPreInstall\";\n" +
 	"\tViewReply\x12.\n" +
-	"\tview_list\x18\x01 \x03(\v2\x11.dr.protocol.ViewR\bviewList2T\n" +
+	"\tview_list\x18\x01 \x03(\v2\x11.dr.protocol.ViewR\bviewList\"]\n" +
+	"\n" +
+	"AprRequest\x12\x1c\n" +
+	"\aview_id\x18\x01 \x01(\tH\x00R\x06viewId\x88\x01\x01\x12\x1a\n" +
+	"\x06apr_id\x18\x02 \x01(\tH\x01R\x05aprId\x88\x01\x01B\n" +
+	"\n" +
+	"\b_view_idB\t\n" +
+	"\a_apr_id\"\x91\x01\n" +
+	"\x06AprSub\x12&\n" +
+	"\x0fwork_station_id\x18\x01 \x01(\x05R\rworkStationId\x12!\n" +
+	"\fpatient_size\x18\x02 \x01(\tR\vpatientSize\x12<\n" +
+	"\rconfig_object\x18\x03 \x01(\v2\x17.google.protobuf.StructR\fconfigObject\"\xa1\x03\n" +
+	"\bAprReply\x12\x15\n" +
+	"\x06apr_id\x18\x01 \x01(\tR\x05aprId\x12\x19\n" +
+	"\bapr_name\x18\x02 \x01(\tR\aaprName\x12'\n" +
+	"\x0fapr_description\x18\x03 \x01(\tR\x0eaprDescription\x12!\n" +
+	"\fpatient_type\x18\x04 \x01(\tR\vpatientType\x12 \n" +
+	"\fbody_part_id\x18\x05 \x01(\tR\n" +
+	"bodyPartId\x12#\n" +
+	"\rview_position\x18\x06 \x01(\tR\fviewPosition\x12\x1a\n" +
+	"\bcategory\x18\a \x01(\tR\bcategory\x12\x1a\n" +
+	"\bmodality\x18\b \x01(\tR\bmodality\x12%\n" +
+	"\x03sub\x18\t \x03(\v2\x13.dr.protocol.AprSubR\x03sub\x12\x12\n" +
+	"\x04sort\x18\n" +
+	" \x01(\x05R\x04sort\x12\x1d\n" +
+	"\n" +
+	"is_enabled\x18\v \x01(\bR\tisEnabled\x12\x18\n" +
+	"\aproduct\x18\f \x01(\tR\aproduct\x12$\n" +
+	"\x0eis_pre_install\x18\r \x01(\bR\fisPreInstall2T\n" +
 	"\x05Basic\x12K\n" +
 	"\fSoftwareInfo\x12\x19.dr.protocol.EmptyRequest\x1a\x1e.dr.protocol.SoftwareInfoReply\"\x002\xc0\x03\n" +
 	"\bProtocol\x12V\n" +
@@ -1420,7 +1700,9 @@ const file_dr_protocol_idl_proto_rawDesc = "" +
 	"\x10GetProcedureList\x12\x1d.dr.protocol.ProcedureRequest\x1a\x1b.dr.protocol.ProcedureReply\"\x00\x12@\n" +
 	"\fGetProcedure\x12\x16.dr.protocol.IDRequest\x1a\x16.dr.protocol.Procedure\"\x00\x12A\n" +
 	"\vGetViewList\x12\x18.dr.protocol.ViewRequest\x1a\x16.dr.protocol.ViewReply\"\x00\x126\n" +
-	"\aGetView\x12\x16.dr.protocol.IDRequest\x1a\x11.dr.protocol.View\"\x00B\x11Z\x0fdr_protocol_pb/b\x06proto3"
+	"\aGetView\x12\x16.dr.protocol.IDRequest\x1a\x11.dr.protocol.View\"\x002A\n" +
+	"\x03Apr\x12:\n" +
+	"\x06GetApr\x12\x17.dr.protocol.AprRequest\x1a\x15.dr.protocol.AprReply\"\x00B\x11Z\x0fdr_protocol_pb/b\x06proto3"
 
 var (
 	file_dr_protocol_idl_proto_rawDescOnce sync.Once
@@ -1434,7 +1716,7 @@ func file_dr_protocol_idl_proto_rawDescGZIP() []byte {
 	return file_dr_protocol_idl_proto_rawDescData
 }
 
-var file_dr_protocol_idl_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_dr_protocol_idl_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
 var file_dr_protocol_idl_proto_goTypes = []any{
 	(*EmptyRequest)(nil),       // 0: dr.protocol.EmptyRequest
 	(*IDRequest)(nil),          // 1: dr.protocol.IDRequest
@@ -1451,33 +1733,40 @@ var file_dr_protocol_idl_proto_goTypes = []any{
 	(*ViewRequest)(nil),        // 12: dr.protocol.ViewRequest
 	(*View)(nil),               // 13: dr.protocol.View
 	(*ViewReply)(nil),          // 14: dr.protocol.ViewReply
-	(*structpb.Struct)(nil),    // 15: google.protobuf.Struct
+	(*AprRequest)(nil),         // 15: dr.protocol.AprRequest
+	(*AprSub)(nil),             // 16: dr.protocol.AprSub
+	(*AprReply)(nil),           // 17: dr.protocol.AprReply
+	(*structpb.Struct)(nil),    // 18: google.protobuf.Struct
 }
 var file_dr_protocol_idl_proto_depIdxs = []int32{
 	4,  // 0: dr.protocol.PatientTypeReply.patient_type_list:type_name -> dr.protocol.PatientType
 	7,  // 1: dr.protocol.BodyPartReply.body_part_list:type_name -> dr.protocol.BodyPart
 	10, // 2: dr.protocol.ProcedureReply.procedure_list:type_name -> dr.protocol.Procedure
-	15, // 3: dr.protocol.View.config_object:type_name -> google.protobuf.Struct
+	18, // 3: dr.protocol.View.config_object:type_name -> google.protobuf.Struct
 	13, // 4: dr.protocol.ViewReply.view_list:type_name -> dr.protocol.View
-	0,  // 5: dr.protocol.Basic.SoftwareInfo:input_type -> dr.protocol.EmptyRequest
-	3,  // 6: dr.protocol.Protocol.GetPatientTypeList:input_type -> dr.protocol.PatientTypeRequest
-	6,  // 7: dr.protocol.Protocol.GetBodyPartList:input_type -> dr.protocol.BodyPartRequest
-	9,  // 8: dr.protocol.Protocol.GetProcedureList:input_type -> dr.protocol.ProcedureRequest
-	1,  // 9: dr.protocol.Protocol.GetProcedure:input_type -> dr.protocol.IDRequest
-	12, // 10: dr.protocol.Protocol.GetViewList:input_type -> dr.protocol.ViewRequest
-	1,  // 11: dr.protocol.Protocol.GetView:input_type -> dr.protocol.IDRequest
-	2,  // 12: dr.protocol.Basic.SoftwareInfo:output_type -> dr.protocol.SoftwareInfoReply
-	5,  // 13: dr.protocol.Protocol.GetPatientTypeList:output_type -> dr.protocol.PatientTypeReply
-	8,  // 14: dr.protocol.Protocol.GetBodyPartList:output_type -> dr.protocol.BodyPartReply
-	11, // 15: dr.protocol.Protocol.GetProcedureList:output_type -> dr.protocol.ProcedureReply
-	10, // 16: dr.protocol.Protocol.GetProcedure:output_type -> dr.protocol.Procedure
-	14, // 17: dr.protocol.Protocol.GetViewList:output_type -> dr.protocol.ViewReply
-	13, // 18: dr.protocol.Protocol.GetView:output_type -> dr.protocol.View
-	12, // [12:19] is the sub-list for method output_type
-	5,  // [5:12] is the sub-list for method input_type
-	5,  // [5:5] is the sub-list for extension type_name
-	5,  // [5:5] is the sub-list for extension extendee
-	0,  // [0:5] is the sub-list for field type_name
+	18, // 5: dr.protocol.AprSub.config_object:type_name -> google.protobuf.Struct
+	16, // 6: dr.protocol.AprReply.sub:type_name -> dr.protocol.AprSub
+	0,  // 7: dr.protocol.Basic.SoftwareInfo:input_type -> dr.protocol.EmptyRequest
+	3,  // 8: dr.protocol.Protocol.GetPatientTypeList:input_type -> dr.protocol.PatientTypeRequest
+	6,  // 9: dr.protocol.Protocol.GetBodyPartList:input_type -> dr.protocol.BodyPartRequest
+	9,  // 10: dr.protocol.Protocol.GetProcedureList:input_type -> dr.protocol.ProcedureRequest
+	1,  // 11: dr.protocol.Protocol.GetProcedure:input_type -> dr.protocol.IDRequest
+	12, // 12: dr.protocol.Protocol.GetViewList:input_type -> dr.protocol.ViewRequest
+	1,  // 13: dr.protocol.Protocol.GetView:input_type -> dr.protocol.IDRequest
+	15, // 14: dr.protocol.Apr.GetApr:input_type -> dr.protocol.AprRequest
+	2,  // 15: dr.protocol.Basic.SoftwareInfo:output_type -> dr.protocol.SoftwareInfoReply
+	5,  // 16: dr.protocol.Protocol.GetPatientTypeList:output_type -> dr.protocol.PatientTypeReply
+	8,  // 17: dr.protocol.Protocol.GetBodyPartList:output_type -> dr.protocol.BodyPartReply
+	11, // 18: dr.protocol.Protocol.GetProcedureList:output_type -> dr.protocol.ProcedureReply
+	10, // 19: dr.protocol.Protocol.GetProcedure:output_type -> dr.protocol.Procedure
+	14, // 20: dr.protocol.Protocol.GetViewList:output_type -> dr.protocol.ViewReply
+	13, // 21: dr.protocol.Protocol.GetView:output_type -> dr.protocol.View
+	17, // 22: dr.protocol.Apr.GetApr:output_type -> dr.protocol.AprReply
+	15, // [15:23] is the sub-list for method output_type
+	7,  // [7:15] is the sub-list for method input_type
+	7,  // [7:7] is the sub-list for extension type_name
+	7,  // [7:7] is the sub-list for extension extendee
+	0,  // [0:7] is the sub-list for field type_name
 }
 
 func init() { file_dr_protocol_idl_proto_init() }
@@ -1490,15 +1779,16 @@ func file_dr_protocol_idl_proto_init() {
 	file_dr_protocol_idl_proto_msgTypes[6].OneofWrappers = []any{}
 	file_dr_protocol_idl_proto_msgTypes[9].OneofWrappers = []any{}
 	file_dr_protocol_idl_proto_msgTypes[12].OneofWrappers = []any{}
+	file_dr_protocol_idl_proto_msgTypes[15].OneofWrappers = []any{}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: unsafe.Slice(unsafe.StringData(file_dr_protocol_idl_proto_rawDesc), len(file_dr_protocol_idl_proto_rawDesc)),
 			NumEnums:      0,
-			NumMessages:   15,
+			NumMessages:   18,
 			NumExtensions: 0,
-			NumServices:   2,
+			NumServices:   3,
 		},
 		GoTypes:           file_dr_protocol_idl_proto_goTypes,
 		DependencyIndexes: file_dr_protocol_idl_proto_depIdxs,

+ 102 - 0
dr_protocol_pb/dr_protocol_idl_grpc.pb.go

@@ -411,3 +411,105 @@ var Protocol_ServiceDesc = grpc.ServiceDesc{
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "dr_protocol_idl.proto",
 }
+
+const (
+	Apr_GetApr_FullMethodName = "/dr.protocol.Apr/GetApr"
+)
+
+// AprClient is the client API for Apr service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type AprClient interface {
+	GetApr(ctx context.Context, in *AprRequest, opts ...grpc.CallOption) (*AprReply, error)
+}
+
+type aprClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewAprClient(cc grpc.ClientConnInterface) AprClient {
+	return &aprClient{cc}
+}
+
+func (c *aprClient) GetApr(ctx context.Context, in *AprRequest, opts ...grpc.CallOption) (*AprReply, error) {
+	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+	out := new(AprReply)
+	err := c.cc.Invoke(ctx, Apr_GetApr_FullMethodName, in, out, cOpts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// AprServer is the server API for Apr service.
+// All implementations must embed UnimplementedAprServer
+// for forward compatibility.
+type AprServer interface {
+	GetApr(context.Context, *AprRequest) (*AprReply, error)
+	mustEmbedUnimplementedAprServer()
+}
+
+// UnimplementedAprServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedAprServer struct{}
+
+func (UnimplementedAprServer) GetApr(context.Context, *AprRequest) (*AprReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetApr not implemented")
+}
+func (UnimplementedAprServer) mustEmbedUnimplementedAprServer() {}
+func (UnimplementedAprServer) testEmbeddedByValue()             {}
+
+// UnsafeAprServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to AprServer will
+// result in compilation errors.
+type UnsafeAprServer interface {
+	mustEmbedUnimplementedAprServer()
+}
+
+func RegisterAprServer(s grpc.ServiceRegistrar, srv AprServer) {
+	// If the following call pancis, it indicates UnimplementedAprServer was
+	// embedded by pointer and is nil.  This will cause panics if an
+	// unimplemented method is ever invoked, so we test this at initialization
+	// time to prevent it from happening at runtime later due to I/O.
+	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+		t.testEmbeddedByValue()
+	}
+	s.RegisterService(&Apr_ServiceDesc, srv)
+}
+
+func _Apr_GetApr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AprRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(AprServer).GetApr(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: Apr_GetApr_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(AprServer).GetApr(ctx, req.(*AprRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// Apr_ServiceDesc is the grpc.ServiceDesc for Apr service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Apr_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "dr.protocol.Apr",
+	HandlerType: (*AprServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "GetApr",
+			Handler:    _Apr_GetApr_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "dr_protocol_idl.proto",
+}

+ 6 - 3
dr_study_idl.proto

@@ -5,6 +5,7 @@ option go_package = "dr_study_pb/";
 package dr.study;
 
 import "google/protobuf/timestamp.proto";
+import "google/protobuf/struct.proto";
 
 message EmptyRequest {}
 
@@ -69,9 +70,11 @@ message Image {
   string image_status = 8;
   string image_file_path = 9;
   string acquisition_mode = 10;
-  int32  sort = 11;
-  string product = 12;
-  bool   is_pre_install = 13;
+  google.protobuf.Struct acquisition_context = 11;
+  google.protobuf.Struct img_proc_context = 12;
+  int32  sort = 13;
+  string product = 14;
+  bool   is_pre_install = 15;
 }
 
 message Series {

+ 63 - 41
dr_study_pb/dr_study_idl.pb.go

@@ -9,6 +9,7 @@ package dr_study_pb
 import (
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	structpb "google.golang.org/protobuf/types/known/structpb"
 	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
 	reflect "reflect"
 	sync "sync"
@@ -435,22 +436,24 @@ func (x *StudyRequest) GetViews() []*ViewRequest {
 }
 
 type Image struct {
-	state             protoimpl.MessageState `protogen:"open.v1"`
-	SopInstanceId     string                 `protobuf:"bytes,1,opt,name=sop_instance_id,json=sopInstanceId,proto3" json:"sop_instance_id,omitempty"`
-	SeriesInstanceUid string                 `protobuf:"bytes,2,opt,name=series_instance_uid,json=seriesInstanceUid,proto3" json:"series_instance_uid,omitempty"`
-	StudyInstanceUid  string                 `protobuf:"bytes,3,opt,name=study_instance_uid,json=studyInstanceUid,proto3" json:"study_instance_uid,omitempty"`
-	SecondarySopUid   string                 `protobuf:"bytes,4,opt,name=secondary_sop_uid,json=secondarySopUid,proto3" json:"secondary_sop_uid,omitempty"`
-	StudyId           string                 `protobuf:"bytes,5,opt,name=study_id,json=studyId,proto3" json:"study_id,omitempty"`
-	ViewId            string                 `protobuf:"bytes,6,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"`
-	ViewDescription   string                 `protobuf:"bytes,7,opt,name=view_description,json=viewDescription,proto3" json:"view_description,omitempty"`
-	ImageStatus       string                 `protobuf:"bytes,8,opt,name=image_status,json=imageStatus,proto3" json:"image_status,omitempty"`
-	ImageFilePath     string                 `protobuf:"bytes,9,opt,name=image_file_path,json=imageFilePath,proto3" json:"image_file_path,omitempty"`
-	AcquisitionMode   string                 `protobuf:"bytes,10,opt,name=acquisition_mode,json=acquisitionMode,proto3" json:"acquisition_mode,omitempty"`
-	Sort              int32                  `protobuf:"varint,11,opt,name=sort,proto3" json:"sort,omitempty"`
-	Product           string                 `protobuf:"bytes,12,opt,name=product,proto3" json:"product,omitempty"`
-	IsPreInstall      bool                   `protobuf:"varint,13,opt,name=is_pre_install,json=isPreInstall,proto3" json:"is_pre_install,omitempty"`
-	unknownFields     protoimpl.UnknownFields
-	sizeCache         protoimpl.SizeCache
+	state              protoimpl.MessageState `protogen:"open.v1"`
+	SopInstanceId      string                 `protobuf:"bytes,1,opt,name=sop_instance_id,json=sopInstanceId,proto3" json:"sop_instance_id,omitempty"`
+	SeriesInstanceUid  string                 `protobuf:"bytes,2,opt,name=series_instance_uid,json=seriesInstanceUid,proto3" json:"series_instance_uid,omitempty"`
+	StudyInstanceUid   string                 `protobuf:"bytes,3,opt,name=study_instance_uid,json=studyInstanceUid,proto3" json:"study_instance_uid,omitempty"`
+	SecondarySopUid    string                 `protobuf:"bytes,4,opt,name=secondary_sop_uid,json=secondarySopUid,proto3" json:"secondary_sop_uid,omitempty"`
+	StudyId            string                 `protobuf:"bytes,5,opt,name=study_id,json=studyId,proto3" json:"study_id,omitempty"`
+	ViewId             string                 `protobuf:"bytes,6,opt,name=view_id,json=viewId,proto3" json:"view_id,omitempty"`
+	ViewDescription    string                 `protobuf:"bytes,7,opt,name=view_description,json=viewDescription,proto3" json:"view_description,omitempty"`
+	ImageStatus        string                 `protobuf:"bytes,8,opt,name=image_status,json=imageStatus,proto3" json:"image_status,omitempty"`
+	ImageFilePath      string                 `protobuf:"bytes,9,opt,name=image_file_path,json=imageFilePath,proto3" json:"image_file_path,omitempty"`
+	AcquisitionMode    string                 `protobuf:"bytes,10,opt,name=acquisition_mode,json=acquisitionMode,proto3" json:"acquisition_mode,omitempty"`
+	AcquisitionContext *structpb.Struct       `protobuf:"bytes,11,opt,name=acquisition_context,json=acquisitionContext,proto3" json:"acquisition_context,omitempty"`
+	ImgProcContext     *structpb.Struct       `protobuf:"bytes,12,opt,name=img_proc_context,json=imgProcContext,proto3" json:"img_proc_context,omitempty"`
+	Sort               int32                  `protobuf:"varint,13,opt,name=sort,proto3" json:"sort,omitempty"`
+	Product            string                 `protobuf:"bytes,14,opt,name=product,proto3" json:"product,omitempty"`
+	IsPreInstall       bool                   `protobuf:"varint,15,opt,name=is_pre_install,json=isPreInstall,proto3" json:"is_pre_install,omitempty"`
+	unknownFields      protoimpl.UnknownFields
+	sizeCache          protoimpl.SizeCache
 }
 
 func (x *Image) Reset() {
@@ -553,6 +556,20 @@ func (x *Image) GetAcquisitionMode() string {
 	return ""
 }
 
+func (x *Image) GetAcquisitionContext() *structpb.Struct {
+	if x != nil {
+		return x.AcquisitionContext
+	}
+	return nil
+}
+
+func (x *Image) GetImgProcContext() *structpb.Struct {
+	if x != nil {
+		return x.ImgProcContext
+	}
+	return nil
+}
+
 func (x *Image) GetSort() int32 {
 	if x != nil {
 		return x.Sort
@@ -1106,7 +1123,7 @@ var File_dr_study_idl_proto protoreflect.FileDescriptor
 
 const file_dr_study_idl_proto_rawDesc = "" +
 	"\n" +
-	"\x12dr_study_idl.proto\x12\bdr.study\x1a\x1fgoogle/protobuf/timestamp.proto\"\x0e\n" +
+	"\x12dr_study_idl.proto\x12\bdr.study\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x0e\n" +
 	"\fEmptyRequest\"]\n" +
 	"\tIDRequest\x12\x13\n" +
 	"\x02id\x18\x01 \x01(\rH\x00R\x02id\x88\x01\x01\x12$\n" +
@@ -1151,7 +1168,7 @@ const file_dr_study_idl_proto_rawDesc = "" +
 	"chipNumber\x12\x18\n" +
 	"\avariety\x18\x13 \x01(\tR\avariety\x12\x18\n" +
 	"\acomment\x18\x14 \x01(\tR\acomment\x12+\n" +
-	"\x05views\x18\x15 \x03(\v2\x15.dr.study.ViewRequestR\x05views\"\xe2\x03\n" +
+	"\x05views\x18\x15 \x03(\v2\x15.dr.study.ViewRequestR\x05views\"\xef\x04\n" +
 	"\x05Image\x12&\n" +
 	"\x0fsop_instance_id\x18\x01 \x01(\tR\rsopInstanceId\x12.\n" +
 	"\x13series_instance_uid\x18\x02 \x01(\tR\x11seriesInstanceUid\x12,\n" +
@@ -1163,10 +1180,12 @@ const file_dr_study_idl_proto_rawDesc = "" +
 	"\fimage_status\x18\b \x01(\tR\vimageStatus\x12&\n" +
 	"\x0fimage_file_path\x18\t \x01(\tR\rimageFilePath\x12)\n" +
 	"\x10acquisition_mode\x18\n" +
-	" \x01(\tR\x0facquisitionMode\x12\x12\n" +
-	"\x04sort\x18\v \x01(\x05R\x04sort\x12\x18\n" +
-	"\aproduct\x18\f \x01(\tR\aproduct\x12$\n" +
-	"\x0eis_pre_install\x18\r \x01(\bR\fisPreInstall\"\x93\x04\n" +
+	" \x01(\tR\x0facquisitionMode\x12H\n" +
+	"\x13acquisition_context\x18\v \x01(\v2\x17.google.protobuf.StructR\x12acquisitionContext\x12A\n" +
+	"\x10img_proc_context\x18\f \x01(\v2\x17.google.protobuf.StructR\x0eimgProcContext\x12\x12\n" +
+	"\x04sort\x18\r \x01(\x05R\x04sort\x12\x18\n" +
+	"\aproduct\x18\x0e \x01(\tR\aproduct\x12$\n" +
+	"\x0eis_pre_install\x18\x0f \x01(\bR\fisPreInstall\"\x93\x04\n" +
 	"\x06Series\x12.\n" +
 	"\x13series_instance_uid\x18\x01 \x01(\tR\x11seriesInstanceUid\x12,\n" +
 	"\x12study_instance_uid\x18\x02 \x01(\tR\x10studyInstanceUid\x12\x19\n" +
@@ -1271,29 +1290,32 @@ var file_dr_study_idl_proto_goTypes = []any{
 	(*Series)(nil),                // 6: dr.study.Series
 	(*StudyReply)(nil),            // 7: dr.study.StudyReply
 	(*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
+	(*structpb.Struct)(nil),       // 9: google.protobuf.Struct
 }
 var file_dr_study_idl_proto_depIdxs = []int32{
 	8,  // 0: dr.study.StudyRequest.patient_dob:type_name -> google.protobuf.Timestamp
 	3,  // 1: dr.study.StudyRequest.views:type_name -> dr.study.ViewRequest
-	8,  // 2: dr.study.Series.performed_datetime:type_name -> google.protobuf.Timestamp
-	5,  // 3: dr.study.Series.images:type_name -> dr.study.Image
-	8,  // 4: dr.study.StudyReply.patient_dob:type_name -> google.protobuf.Timestamp
-	8,  // 5: dr.study.StudyReply.admitting_time:type_name -> google.protobuf.Timestamp
-	8,  // 6: dr.study.StudyReply.study_start_datetime:type_name -> google.protobuf.Timestamp
-	8,  // 7: dr.study.StudyReply.study_end_datetime:type_name -> google.protobuf.Timestamp
-	8,  // 8: dr.study.StudyReply.scheduled_procedure_step_start_date:type_name -> google.protobuf.Timestamp
-	6,  // 9: dr.study.StudyReply.series:type_name -> dr.study.Series
-	0,  // 10: dr.study.Basic.SoftwareInfo:input_type -> dr.study.EmptyRequest
-	4,  // 11: dr.study.Study.CreateStudy:input_type -> dr.study.StudyRequest
-	1,  // 12: dr.study.Study.GetStudy:input_type -> dr.study.IDRequest
-	2,  // 13: dr.study.Basic.SoftwareInfo:output_type -> dr.study.SoftwareInfoReply
-	7,  // 14: dr.study.Study.CreateStudy:output_type -> dr.study.StudyReply
-	7,  // 15: dr.study.Study.GetStudy:output_type -> dr.study.StudyReply
-	13, // [13:16] is the sub-list for method output_type
-	10, // [10:13] is the sub-list for method input_type
-	10, // [10:10] is the sub-list for extension type_name
-	10, // [10:10] is the sub-list for extension extendee
-	0,  // [0:10] is the sub-list for field type_name
+	9,  // 2: dr.study.Image.acquisition_context:type_name -> google.protobuf.Struct
+	9,  // 3: dr.study.Image.img_proc_context:type_name -> google.protobuf.Struct
+	8,  // 4: dr.study.Series.performed_datetime:type_name -> google.protobuf.Timestamp
+	5,  // 5: dr.study.Series.images:type_name -> dr.study.Image
+	8,  // 6: dr.study.StudyReply.patient_dob:type_name -> google.protobuf.Timestamp
+	8,  // 7: dr.study.StudyReply.admitting_time:type_name -> google.protobuf.Timestamp
+	8,  // 8: dr.study.StudyReply.study_start_datetime:type_name -> google.protobuf.Timestamp
+	8,  // 9: dr.study.StudyReply.study_end_datetime:type_name -> google.protobuf.Timestamp
+	8,  // 10: dr.study.StudyReply.scheduled_procedure_step_start_date:type_name -> google.protobuf.Timestamp
+	6,  // 11: dr.study.StudyReply.series:type_name -> dr.study.Series
+	0,  // 12: dr.study.Basic.SoftwareInfo:input_type -> dr.study.EmptyRequest
+	4,  // 13: dr.study.Study.CreateStudy:input_type -> dr.study.StudyRequest
+	1,  // 14: dr.study.Study.GetStudy:input_type -> dr.study.IDRequest
+	2,  // 15: dr.study.Basic.SoftwareInfo:output_type -> dr.study.SoftwareInfoReply
+	7,  // 16: dr.study.Study.CreateStudy:output_type -> dr.study.StudyReply
+	7,  // 17: dr.study.Study.GetStudy:output_type -> dr.study.StudyReply
+	15, // [15:18] is the sub-list for method output_type
+	12, // [12:15] is the sub-list for method input_type
+	12, // [12:12] is the sub-list for extension type_name
+	12, // [12:12] is the sub-list for extension extendee
+	0,  // [0:12] is the sub-list for field type_name
 }
 
 func init() { file_dr_study_idl_proto_init() }