Skip to content

Commit

Permalink
Add new manipulation get available meta data (#84)
Browse files Browse the repository at this point in the history
The purpose of the pull request is to have a manipulation that returns
the device meta data that must be available.

# Checklist

The following aspects have been respected by the author of this pull
request, confirmed by both pull request assignee **and** reviewer:

* Changelog update (necessity checked and entry added or not added
respectively)
  * [x] Pull Request Assignee
  * [x] Reviewer
* README update (necessity checked and entry added or not added
respectively)
  * [x] Pull Request Assignee
  * [x] Reviewer
  • Loading branch information
pstaeck authored Jul 10, 2024
1 parent 02babf7 commit 863c4ff
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- manipulation GetAvailableDeviceMetaData for device
- manipulation AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts
- manipulation ProvideInformationAboutLastCalibration for devices
- manipulation ProvideInformationAboutNextCalibration for devices
Expand Down
4 changes: 4 additions & 0 deletions python/src/t2iapi/biceps/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This Source Code Form is subject to the terms of the MIT License.
#
# Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
# SPDX-License-Identifier: MIT
4 changes: 4 additions & 0 deletions python/src/t2iapi/biceps/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This Source Code Form is subject to the terms of the MIT License.
#
# Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
# SPDX-License-Identifier: MIT
37 changes: 37 additions & 0 deletions src/t2iapi/biceps/codedvalue.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
This Source Code Form is subject to the terms of the MIT License.
Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
SPDX-License-Identifier: MIT
*/

syntax = "proto3";

package t2iapi.biceps;

option java_package = "com.draeger.medical.t2iapi.biceps";
option java_outer_classname = "CodedValueProto";

import "t2iapi/biceps/localizedtext.proto";
import "google/protobuf/wrappers.proto";

/*
Represents pm:CodedValue (defined in IEEE Std 11073-10207-2017).
*/
message CodedValueMsg {
repeated LocalizedTextMsg coding_system_name = 1;
repeated LocalizedTextMsg concept_description = 2;
/*
Represents pm:Translation (defined in IEEE Std 11073-10207-2017).
*/
message TranslationMsg {
string code_attr = 3;
google.protobuf.StringValue coding_system_attr = 4;
google.protobuf.StringValue coding_system_version_attr = 5;
}
repeated TranslationMsg translation = 6;
string code_attr = 7;
google.protobuf.StringValue coding_system_attr = 8;
google.protobuf.StringValue coding_system_version_attr = 9;
google.protobuf.StringValue symbolic_code_name_attr = 10;
}
27 changes: 27 additions & 0 deletions src/t2iapi/biceps/instanceidentifier.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
This Source Code Form is subject to the terms of the MIT License.
Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
SPDX-License-Identifier: MIT
*/

syntax = "proto3";

package t2iapi.biceps;

option java_package = "com.draeger.medical.t2iapi.biceps";
option java_outer_classname = "InstanceIdentifierProto";

import "google/protobuf/wrappers.proto";
import "t2iapi/biceps/codedvalue.proto";
import "t2iapi/biceps/localizedtext.proto";

/*
Represents pm:InstanceIdentifier (defined in IEEE Std 11073-10207-2017).
*/
message InstanceIdentifierMsg {
CodedValueMsg type = 1;
repeated LocalizedTextMsg identifier_name = 2;
google.protobuf.StringValue root_attr = 3;
google.protobuf.StringValue extension_attr = 4;
}
27 changes: 27 additions & 0 deletions src/t2iapi/biceps/localizedtext.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
This Source Code Form is subject to the terms of the MIT License.
Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
SPDX-License-Identifier: MIT
*/

syntax = "proto3";

package t2iapi.biceps;

option java_package = "com.draeger.medical.t2iapi.biceps";
option java_outer_classname = "LocalizedTextProto";

import "google/protobuf/wrappers.proto";
import "t2iapi/biceps/localizedtextwidth.proto";

/*
Represents pm:LocalizedText (defined in IEEE Std 11073-10207-2017).
*/
message LocalizedTextMsg {
google.protobuf.StringValue localized_text_content = 1;
google.protobuf.StringValue ref_attr = 2;
google.protobuf.StringValue lang_attr = 3;
google.protobuf.UInt64Value version_attr = 4;
LocalizedTextWidthMsg text_width_attr = 5;
}
32 changes: 32 additions & 0 deletions src/t2iapi/biceps/localizedtextwidth.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
This Source Code Form is subject to the terms of the MIT License.
Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
SPDX-License-Identifier: MIT
*/

syntax = "proto3";

package t2iapi.biceps;

option java_package = "com.draeger.medical.t2iapi.biceps";
option java_outer_classname = "LocalizedTextWidthProto";

/*
Represents pm:LocalizedTextWidth (defined in IEEE Std 11073-10207-2017).
*/
message LocalizedTextWidthMsg {
/*
Indicates the width of a localized text based on the number of fullwidth characters
(defined in IEEE Std 11073-10207-2017).
*/
enum EnumType {
ENUM_TYPE_XS = 0; // A line has 4 or less fullwidth characters.
ENUM_TYPE_S = 1; // A line has 8 or less fullwidth characters.
ENUM_TYPE_M = 2; // A line has 12 or less fullwidth characters.
ENUM_TYPE_L = 3; // A line has 16 or less fullwidth characters.
ENUM_TYPE_XL = 4; // A line has 20 or less fullwidth characters.
ENUM_TYPE_XXL = 5; // A line has 21 or more fullwidth characters.
}
EnumType enum_type = 1;
}
40 changes: 40 additions & 0 deletions src/t2iapi/biceps/metadata.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
This Source Code Form is subject to the terms of the MIT License.
Copyright (c) 2024 Draegerwerk AG & Co. KGaA.
SPDX-License-Identifier: MIT
*/

syntax = "proto3";

package t2iapi.biceps;

option java_package = "com.draeger.medical.t2iapi.biceps";
option java_outer_classname = "MetadataProto";

import "t2iapi/biceps/localizedtext.proto";
import "t2iapi/biceps/instanceidentifier.proto";
import "google/protobuf/wrappers.proto";

/*
Contains the metadata of the device. Represents pm:MetaData (defined in IEEE Std 11073-10207-2017).
*/
message MetaDataMsg {
/*
Represents pm:Udi (defined in IEEE Std 11073-10207-2017).
*/
message UdiMsg {
string device_identifier = 1;
string human_readable_form = 2;
t2iapi.biceps.InstanceIdentifierMsg issuer = 3;
t2iapi.biceps.InstanceIdentifierMsg jurisdiction = 4;
}
repeated UdiMsg udi = 5;
google.protobuf.StringValue lot_number = 6;
repeated t2iapi.biceps.LocalizedTextMsg manufacturer = 7;
google.protobuf.StringValue manufacture_date = 8;
google.protobuf.StringValue expiration_date = 9;
repeated t2iapi.biceps.LocalizedTextMsg model_name = 10;
google.protobuf.StringValue model_number = 11;
repeated string serial_number = 12;
}
9 changes: 9 additions & 0 deletions src/t2iapi/device/device_responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ syntax = "proto3";
package t2iapi.device;

import "t2iapi/basic_responses.proto";
import "t2iapi/biceps/metadata.proto";

option java_package = "com.draeger.medical.t2iapi.device";
option java_outer_classname = "DeviceResponses";
Expand All @@ -28,4 +29,12 @@ Response containing the handle of the newly created mds descriptor.
message InsertMdsDescriptorResponse {
BasicResponse status = 1;
string handle = 2; // handle of the mds descriptor, that was created
}

/*
Response containing the available device metadata.
*/
message AvailableDeviceMetaDataResponse {
BasicResponse status = 1;
t2iapi.biceps.MetaDataMsg meta_data = 2; // available device metadata
}
8 changes: 8 additions & 0 deletions src/t2iapi/device/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,12 @@ service DeviceService {
*/
rpc ProvideInformationAboutNextCalibration (t2iapi.device.ProvideInformationAboutNextCalibrationRequest)
returns (BasicResponse);

/*
Get the available device metadata of the pm:MdsDescriptor for the given handle. For each item of the metadata
that is not available for this MDS leave the corresponding element empty. In this context, "available" does not
mean a copy of the data from the pm:MdsDescriptor/pm:MetaData. It means a provision of the data which, in the
user's opinion, must be present for this device.
*/
rpc GetAvailableDeviceMetaData(BasicHandleRequest) returns (AvailableDeviceMetaDataResponse);
}

0 comments on commit 863c4ff

Please sign in to comment.