Skip to content

Commit

Permalink
Add manipulation to create ContextState with Association, specific Va…
Browse files Browse the repository at this point in the history
…lidator and excluded Identification (#80)

The Manipulation is useful for testing EnsembleContexts.

# 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
ben-Draeger authored Jul 1, 2024
1 parent 8192aaa commit 02babf7
Show file tree
Hide file tree
Showing 4 changed files with 42 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 AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts
- manipulation ProvideInformationAboutLastCalibration for devices
- manipulation ProvideInformationAboutNextCalibration for devices
- manipulation SetSystemContextActivationStateAndContextAssociation for combined settings
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 @@ -55,6 +55,16 @@ message CreateContextStateWithAssociationAndValidatorsRequest {
string num_validators = 3; // number of pm:Validator elements
}

/*
Request to create or adapt a pm:PatientContextState or pm:LocationContextState instance with
@ContextAssociation = Assoc for the given @DescriptorHandle, with a given number
of pm:Validator elements and a changed pm:Identification.
*/
message AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateRequest {
string descriptor_handle = 1;
string num_validators = 2; // number of pm:Validator elements
}

/*
Request to create or adapt a context state with a given association and specific validator.
*/
Expand Down
11 changes: 11 additions & 0 deletions src/t2iapi/context/context_responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ message CreateContextStateWithAssociationResponse {
string context_state_handle = 2; // handle of the context state, that was created or adapted
}

/*
Response containing the context state handle and the prior mdib version.
*/
message AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateResponse {
BasicResponse status = 1;
string context_state_handle = 2; // handle of the context state, that was created or adapted
uint64 prior_mdib_version = 3; // mdib version before the change - contains the previously associated
// context state whose pm:Identification the changed
// pm:Identification must structurally differ from.
}

/*
Response which contains all context types supported by the DUT.
*/
Expand Down
20 changes: 20 additions & 0 deletions src/t2iapi/context/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,26 @@ service ContextService {
t2iapi.context.CreateContextStateWithAssocAndSpecificValidatorRequest)
returns (t2iapi.context.CreateContextStateWithAssociationResponse);

/*
Create or adapt a patient- or location context state, such that
- it belongs to the given @DescriptorHandle,
- it has @ContextAssociation = Assoc,
- it has the given number of pm:Validators, and
- its pm:Identification changes.
The pm:Identification of the created resp. adapted context state must differ structurally from
the pm:Identification of the previously associated context state of the same @DescriptorHandle.
Returns the handle of the created or adapted context state and an mdib version
that contains the version of the previously associated context state whose pm:Identification
the changed pm:Identification must structurally differ from.
The mdib version must represent the mdib of the device before the changes of the
manipulation are applied to the mdib.
The manipulated 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 AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState(
t2iapi.context.AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateRequest)
returns (AssociateValidateAndChangeIdentificationOfPatientOrLocationContextStateResponse);

/*
Create or adapt neonatal patient with a given type of association and
including the mothers identification.
Expand Down

0 comments on commit 02babf7

Please sign in to comment.