diff --git a/CHANGELOG.md b/CHANGELOG.md index 92f529a..30ecfd7 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 AssociateValidateAndChangeIdentificationOfPatientOrLocationContextState for contexts - manipulation ProvideInformationAboutLastCalibration for devices - manipulation ProvideInformationAboutNextCalibration for devices - manipulation SetSystemContextActivationStateAndContextAssociation for combined settings diff --git a/src/t2iapi/context/context_requests.proto b/src/t2iapi/context/context_requests.proto index b03e3fa..e5f1ced 100644 --- a/src/t2iapi/context/context_requests.proto +++ b/src/t2iapi/context/context_requests.proto @@ -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. */ diff --git a/src/t2iapi/context/context_responses.proto b/src/t2iapi/context/context_responses.proto index a394b58..4f7c649 100644 --- a/src/t2iapi/context/context_responses.proto +++ b/src/t2iapi/context/context_responses.proto @@ -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. */ diff --git a/src/t2iapi/context/service.proto b/src/t2iapi/context/service.proto index 48e9a2c..82cdff1 100644 --- a/src/t2iapi/context/service.proto +++ b/src/t2iapi/context/service.proto @@ -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.