diff --git a/CHANGELOG.md b/CHANGELOG.md index 30ecfd7..156bada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/python/src/t2iapi/biceps/__init__.py b/python/src/t2iapi/biceps/__init__.py new file mode 100644 index 0000000..8bde99b --- /dev/null +++ b/python/src/t2iapi/biceps/__init__.py @@ -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 diff --git a/python/src/t2iapi/biceps/__init__.pyi b/python/src/t2iapi/biceps/__init__.pyi new file mode 100644 index 0000000..8bde99b --- /dev/null +++ b/python/src/t2iapi/biceps/__init__.pyi @@ -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 diff --git a/src/t2iapi/biceps/codedvalue.proto b/src/t2iapi/biceps/codedvalue.proto new file mode 100644 index 0000000..ab0fc38 --- /dev/null +++ b/src/t2iapi/biceps/codedvalue.proto @@ -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; +} diff --git a/src/t2iapi/biceps/instanceidentifier.proto b/src/t2iapi/biceps/instanceidentifier.proto new file mode 100644 index 0000000..be251a5 --- /dev/null +++ b/src/t2iapi/biceps/instanceidentifier.proto @@ -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; +} diff --git a/src/t2iapi/biceps/localizedtext.proto b/src/t2iapi/biceps/localizedtext.proto new file mode 100644 index 0000000..2c9781b --- /dev/null +++ b/src/t2iapi/biceps/localizedtext.proto @@ -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; +} diff --git a/src/t2iapi/biceps/localizedtextwidth.proto b/src/t2iapi/biceps/localizedtextwidth.proto new file mode 100644 index 0000000..b1b3002 --- /dev/null +++ b/src/t2iapi/biceps/localizedtextwidth.proto @@ -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; +} diff --git a/src/t2iapi/biceps/metadata.proto b/src/t2iapi/biceps/metadata.proto new file mode 100644 index 0000000..5fc513a --- /dev/null +++ b/src/t2iapi/biceps/metadata.proto @@ -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; +} diff --git a/src/t2iapi/device/device_responses.proto b/src/t2iapi/device/device_responses.proto index 21a757b..1721789 100644 --- a/src/t2iapi/device/device_responses.proto +++ b/src/t2iapi/device/device_responses.proto @@ -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"; @@ -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 } \ No newline at end of file diff --git a/src/t2iapi/device/service.proto b/src/t2iapi/device/service.proto index 0c74993..7ffa506 100644 --- a/src/t2iapi/device/service.proto +++ b/src/t2iapi/device/service.proto @@ -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); }