Skip to content

Commit

Permalink
Add new manipulations to indicate and end membership in an ensemble (#96
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
pstaeck authored Dec 10, 2024
1 parent 7cdb1df commit 0f18538
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 10 additions & 0 deletions src/t2iapi/context/context_requests.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

20 changes: 20 additions & 0 deletions src/t2iapi/context/context_responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
65 changes: 65 additions & 0 deletions src/t2iapi/context/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/t2iapi/context/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ enum ContextType {
CONTEXT_TYPE_OPERATOR = 3;
CONTEXT_TYPE_MEANS = 4;
CONTEXT_TYPE_ENSEMBLE = 5;
}
}

0 comments on commit 0f18538

Please sign in to comment.