|
@@ -15,10 +15,10 @@ import (
|
|
|
pb "auth-server/rpc_idl/dr_protocol_pb"
|
|
|
)
|
|
|
|
|
|
-var ProtocolService *Protocol
|
|
|
+var ProtocolClient *Protocol
|
|
|
|
|
|
func init() {
|
|
|
- ProtocolService = new(Protocol)
|
|
|
+ ProtocolClient = new(Protocol)
|
|
|
}
|
|
|
|
|
|
type Protocol struct {
|
|
@@ -55,54 +55,54 @@ func (s *Protocol) GetSoftwareInfo() *pb.SoftwareInfoReply {
|
|
|
return r
|
|
|
}
|
|
|
|
|
|
-func (s *Protocol) GetPatientType(ctx context.Context, isEnabled *bool) (*pb.PatientTypeReply, error) {
|
|
|
- slog.Info("[rpc]GetPatientType...")
|
|
|
- r, err := s.protocolClient.GetPatientType(ctx, &pb.PatientTypeRequest{
|
|
|
+func (s *Protocol) GetPatientTypeList(ctx context.Context, isEnabled *bool) (*pb.PatientTypeReply, error) {
|
|
|
+ slog.Info("[rpc]GetPatientTypeList...")
|
|
|
+ r, err := s.protocolClient.GetPatientTypeList(ctx, &pb.PatientTypeRequest{
|
|
|
IsEnabled: isEnabled,
|
|
|
})
|
|
|
if err != nil {
|
|
|
slog.Error("[rpc]GetPatientType failed", "err", err)
|
|
|
}
|
|
|
- slog.Info("[rpc]GetPatientType result:", "rows", len(r.PatientTypeList))
|
|
|
+ slog.Info("[rpc]GetPatientTypeList result:", "rows", len(r.PatientTypeList))
|
|
|
return r, err
|
|
|
}
|
|
|
|
|
|
-func (s *Protocol) GetBodyPart(ctx context.Context, patientType *string, modality *string, isEnabled *bool) (*pb.BodyPartReply, error) {
|
|
|
- slog.Info("[rpc]GetBodyPart...")
|
|
|
- r, err := s.protocolClient.GetBodyPart(ctx, &pb.BodyPartRequest{
|
|
|
+func (s *Protocol) GetBodyPartList(ctx context.Context, patientType *string, modality *string, isEnabled *bool) (*pb.BodyPartReply, error) {
|
|
|
+ slog.Info("[rpc]GetBodyPartList...")
|
|
|
+ r, err := s.protocolClient.GetBodyPartList(ctx, &pb.BodyPartRequest{
|
|
|
PatientType: patientType,
|
|
|
Modality: modality,
|
|
|
IsEnabled: isEnabled,
|
|
|
})
|
|
|
if err != nil {
|
|
|
- slog.Error("[rpc]GetBodyPart failed", "err", err)
|
|
|
+ slog.Error("[rpc]GetBodyPartList failed", "err", err)
|
|
|
}
|
|
|
return r, err
|
|
|
}
|
|
|
|
|
|
-func (s *Protocol) GetProcedure(ctx context.Context, patientType *string, bodyPart *string, isEnabled *bool) (*pb.ProcedureReply, error) {
|
|
|
- slog.Info("[rpc]GetProcedure...")
|
|
|
- r, err := s.protocolClient.GetProcedure(ctx, &pb.ProcedureRequest{
|
|
|
+func (s *Protocol) GetProcedureList(ctx context.Context, patientType *string, bodyPart *string, isEnabled *bool) (*pb.ProcedureReply, error) {
|
|
|
+ slog.Info("[rpc]GetProcedureList...")
|
|
|
+ r, err := s.protocolClient.GetProcedureList(ctx, &pb.ProcedureRequest{
|
|
|
PatientType: patientType,
|
|
|
BodyPartId: bodyPart,
|
|
|
IsEnabled: isEnabled,
|
|
|
})
|
|
|
if err != nil {
|
|
|
- slog.Error("[rpc]GetProcedure failed", "err", err)
|
|
|
+ slog.Error("[rpc]GetProcedureList failed", "err", err)
|
|
|
}
|
|
|
return r, err
|
|
|
}
|
|
|
|
|
|
-func (s *Protocol) GetView(ctx context.Context, patientType *string, bodyPart *string, procedureID *string, isEnabled *bool) (*pb.ViewReply, error) {
|
|
|
- slog.Info("[rpc]GetView...")
|
|
|
- r, err := s.protocolClient.GetView(ctx, &pb.ViewRequest{
|
|
|
+func (s *Protocol) GetViewList(ctx context.Context, patientType *string, bodyPart *string, procedureID *string, isEnabled *bool) (*pb.ViewReply, error) {
|
|
|
+ slog.Info("[rpc]GetViewList...")
|
|
|
+ r, err := s.protocolClient.GetViewList(ctx, &pb.ViewRequest{
|
|
|
PatientType: patientType,
|
|
|
BodyPartId: bodyPart,
|
|
|
ProcedureId: procedureID,
|
|
|
IsEnabled: isEnabled,
|
|
|
})
|
|
|
if err != nil {
|
|
|
- slog.Error("[rpc]GetView failed", "err", err)
|
|
|
+ slog.Error("[rpc]GetViewList failed", "err", err)
|
|
|
}
|
|
|
return r, err
|
|
|
}
|