From 0f18538589d3b6a75f8a73f23f34a3df8b617e23 Mon Sep 17 00:00:00 2001 From: pstaeck <36667270+pstaeck@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:37:27 +0100 Subject: [PATCH] Add new manipulations to indicate and end membership in an ensemble (#96) The purpose of the pull request is to add two manipulations. A first one to indicate membership in each possible SDC PARTICIPANT ENSEMBLE of a provided ensemble context descriptor and a second one end them separately by providing a related state handle. # 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 --- CHANGELOG.md | 7 ++- src/t2iapi/context/context_requests.proto | 10 ++++ src/t2iapi/context/context_responses.proto | 20 +++++++ src/t2iapi/context/service.proto | 65 ++++++++++++++++++++++ src/t2iapi/context/types.proto | 2 +- 5 files changed, 101 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9de0d..715f94d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - manipulation DisplayMetricWithDifferentUnit for metrics - manipulation GetMetricDeterminationMode for metrics -- manipulation PhysicallyDisconnectRemovableSubsystemAfterPhysicalConnectorProvided +- manipulation PhysicallyDisconnectRemovableSubsystemAfterPhysicalConnectorProvided for combined settings - manipulation SetActiveModeOfOperation for metrics -- manipulation PhysicallyDisconnectRemovableSubsystemAfterSettingActivationStateOnOrStndBy +- manipulation PhysicallyDisconnectRemovableSubsystemAfterSettingActivationStateOnOrStndBy for combined settings - manipulation RequestIndicationOfNextCalibrationTimeRequired for devices - manipulation IndicateTimeOfNextCalibrationToUser for devices - manipulation GetComponentHwVersion for devices @@ -26,6 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - manipulation GetMdsUiSupportedLanguages for devices - manipulation InsertContainmentTreeEntryForSequenceId for devices - manipulation to shut down and restart for devices +- manipulation GetEnsembleIds for contexts +- manipulation IndicateMembershipInEnsembleByEnsembleId for contexts +- manipulation EndMembershipInEnsembleByEnsembleId for contexts ## [4.1.0] - 2024-02-22 diff --git a/src/t2iapi/context/context_requests.proto b/src/t2iapi/context/context_requests.proto index e5f1ced..94d568c 100644 --- a/src/t2iapi/context/context_requests.proto +++ b/src/t2iapi/context/context_requests.proto @@ -80,3 +80,13 @@ Request to associate a specific patient type. message AssociatePatientRequest { PatientType patient_type = 1; // Patient type to be associated } + +/* +Request to indicate or end membership in an SDC PARTICIPANT ENSEMBLE for a provided pm:EnsembleContextDescriptor and a +provided ensemble-id. + */ +message EnsembleIdRequest { + string descriptor_handle = 1; + string ensemble_id = 2; // ensemble-id that refers to the SDC PARTICIPANT ENSEMBLE +} + diff --git a/src/t2iapi/context/context_responses.proto b/src/t2iapi/context/context_responses.proto index 4f7c649..19658de 100644 --- a/src/t2iapi/context/context_responses.proto +++ b/src/t2iapi/context/context_responses.proto @@ -51,3 +51,23 @@ message EnsembleContextIndicateMembershipWithIdentificationResponse { BasicResponse status = 1; repeated IdentificationList identification_list = 3; } + +/* +Response which contains a list of ensemble-ids referring to each SDC PARTICIPANT ENSEMBLE membership can be +indicated in by a pm:EnsembleContextState with @ContextAssociation = 'Assoc' of a provided pm:EnsembleContextDescriptor. + */ +message GetEnsembleIdsResponse { + BasicResponse status = 1; + repeated string ensemble_id = 2; +} + +/* +Response containing the @Handles of the newly created or adapted pm:EnsembleContextStates. They are created or adapted +such that their @ContextAssociation is 'Assoc' in order to indicate membership in an SDC PARTICIPANT ENSEMBLE specified +by the provided ensemble-id. + */ +message IndicateMembershipInEnsembleByEnsembleIdResponse { + BasicResponse status = 1; + repeated string context_state_handle = 2; // @Handles of the pm:EnsembleContextStates, that were created or adapted + // to indicate membership in an SDC PARTICIPANT ENSEMBLE +} \ No newline at end of file diff --git a/src/t2iapi/context/service.proto b/src/t2iapi/context/service.proto index 82cdff1..6871c2d 100644 --- a/src/t2iapi/context/service.proto +++ b/src/t2iapi/context/service.proto @@ -158,6 +158,71 @@ service ContextService { rpc EnsembleContextIndicateMembershipWithIdentification (BasicHandleRequest) returns (EnsembleContextIndicateMembershipWithIdentificationResponse); + /* + Get all ensemble-ids for a provided pm:EnsembleContextDescriptor and return them. + + The ensemble-id is an identifier specified by the USER that uniquely refers to an SDC PARTICIPANT ENSEMBLE. The list + shall contain all ensemble-ids needed to cover each SDC PARTICIPANT ENSEMBLE membership can be indicated in by a + pm:EnsembleContextState with @ContextAssociation = 'Assoc' of the provided pm:EnsembleContextDescriptor. + The ensemble-ids are valid until the next call of this manipulation. + */ + rpc GetEnsembleIds (BasicHandleRequest) + returns (GetEnsembleIdsResponse); + + /* + Indicate membership in an SDC PARTICIPANT ENSEMBLE for a provided pm:EnsembleContextDescriptor and a provided + ensemble-id by creating or adapting all needed pm:EnsembleContextStates such that their @ContextAssociation is + "Assoc". Return a list that contains only the @Handles of the associated pm:EnsembleContextStates that indicate + membership in the SDC PARTICIPANT ENSEMBLE referred by the provided ensemble-id. + + The ensemble-id is an identifier specified by the USER that uniquely refers to an SDC PARTICIPANT ENSEMBLE. + To clarify which pm:EnsembleContextStates are needed and which @Handles shall be returned, four examples are given. + + Example 1: treatment session + The fact that a POC MEDICAL DEVICE is currently working in a (temporal) logical group based on a treatment session + may be expressed by the states of a pm:EnsembleContextDescriptor. If each of its pm:EnsembleContextStates describes + a step in this treatment session, then the manipulation returns only the state handle of the pm:EnsembleContextState + with @ContextAssociation = 'Assoc' that indicates membership in the logical group resp. SDC PARTICIPANT ENSEMBLE. + The provided ensemble-id refers to this logical group resp. SDC PARTICIPANT ENSEMBLE. In this scenario there shall + be only one pm:EnsembleContextState with @ContextAssociation = 'Assoc' at a time for the provided + pm:EnsembleContextDescriptor. + + Example 2: location inferring + If a pm:EnsembleContextDescriptor has multiple pm:EnsembleContextStates whereby each describes a membership of a + location-inferred SDC PARTICIPANT ENSEMBLE if associated. The manipulation shall return the state handle of the + pm:EnsembleContextState with @ContextAssociation = 'Assoc' that indicates membership in the SDC PARTICIPANT + ENSEMBLE referred by the provided ensemble-id. + + Example 3: general hospital process + Consider a general process within the hospital with multiple steps whereby each step is divided into multiple minor + steps describing the major step more precisely. Membership of this main process as well as of the sub processes is + modeled by a pm:EnsembleContextDescriptor that has multiple pm:EnsembleContextStates for the major as well as for + the minor steps. To indicate membership in a sub process referred by the provided ensemble-id a + pm:EnsembleContextState representing a major step and a pm:EnsembleContextState representing a major's minor step + have to be associated. The manipulation shall return only the state handle of the pm:EnsembleContextState + representing the minor step. + + Example 4: multiple states for one ensemble-id + Consider a scenario where multiple pm:EnsembleContextStates of a provided pm:EnsembleContextDescriptor are needed to + indicate membership in the same SDC PARTICIPANT ENSEMBLE referenced by the given ensemble-id. These states are all + associated at the same time and the manipulation shall return their handles. + + The state shall be persistent until a next manipulation call. If the device is not able to maintain the static state, + it shall return RESULT_NOT_SUPPORTED. + */ + rpc IndicateMembershipInEnsembleByEnsembleId (EnsembleIdRequest) + returns (IndicateMembershipInEnsembleByEnsembleIdResponse); + + /* + End membership in an SDC PARTICIPANT ENSEMBLE for a provided pm:EnsembleContextDescriptor and a provided ensemble-id. + The ensemble-id is an identifier specified by the USER that uniquely refers to an SDC PARTICIPANT ENSEMBLE. + + The state shall be persistent until a next manipulation call. If the device is not able to maintain the static state, + it shall return RESULT_NOT_SUPPORTED. + */ + rpc EndMembershipInEnsembleByEnsembleId (EnsembleIdRequest) + returns (BasicResponse); + /* Returns all types of contexts which are supported by the DUT. */ diff --git a/src/t2iapi/context/types.proto b/src/t2iapi/context/types.proto index 638dcff..fb0cff3 100644 --- a/src/t2iapi/context/types.proto +++ b/src/t2iapi/context/types.proto @@ -78,4 +78,4 @@ enum ContextType { CONTEXT_TYPE_OPERATOR = 3; CONTEXT_TYPE_MEANS = 4; CONTEXT_TYPE_ENSEMBLE = 5; -} \ No newline at end of file +}