Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added manipulation for creating ContextStates with Identification #79

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- manipulation SetSystemContextActivationStateAndContextAssociation for combined settings
- manipulation CreateContextStateWithAssocAndSpecificValidatorAndSpecificIdentification for contexts

## [4.1.0] - 2024-02-22

Expand Down
12 changes: 12 additions & 0 deletions src/t2iapi/context/context_requests.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ message CreateContextStateWithAssocAndSpecificValidatorRequest {
ValidatorType validator_type = 3; // type of pm:Validator
}

/*
Request to create or adapt a context state with a given association, a list of specific validators
and a specific Identification.
*/
message CreateContextStateWithAssocAndSpecificValidatorAndSpecificIdentificationRequest {
string descriptor_handle = 1;
ContextAssociation context_association = 2; // the initial association of the context state
string num_validators = 3; // number of pm:Validator elements
string identification_root = 4; // pm:Identification/@Root
string identification_extension = 5; // pm:Identification/@Extension
}

/*
Request to associate a specific patient type.
*/
Expand Down
19 changes: 19 additions & 0 deletions src/t2iapi/context/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@ service ContextService {
t2iapi.context.CreateContextStateWithAssocAndSpecificValidatorRequest)
returns (t2iapi.context.CreateContextStateWithAssociationResponse);

/*
Create or adapt a ContextState instance for the given descriptor handle, that
- is related to the given descriptor_handle and of appropriate class for a state of this descriptor,
- has the given context_association value,
- has the given number of pm:Validators (num_validators)
- has exactly one pm:Identification with the given identification_root
and identification_extension and no other children.
Shall return the handle of the context state. This context state shall either be
newly created or it shall be adapted from a previously existing context state of the same descriptor, by
- disassociating it (in case it was associated)
- changing its Validators and Identifications
- setting its @contextAssociation to the given value.
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 CreateContextStateWithAssocAndSpecificValidatorAndSpecificIdentification(
t2iapi.context.CreateContextStateWithAssocAndSpecificValidatorAndSpecificIdentificationRequest)
returns (t2iapi.context.CreateContextStateWithAssociationResponse);

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