Package org.emau.icmvc.ganimed.ttp.cm2
Interface GICSService
public interface GICSService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAlias
(String domainName, SignerIdDTO originalSignerId, SignerIdDTO aliasSignerId) creates an alias between two signer ids; used for mergesvoid
addConsent
(ConsentDTO consentDTO) Stores the given consent.addConsentOptOut
(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs) this is the short-variant to add an opt-out-consent without given module-states, scans and signatures.void
addScanToConsent
(ConsentKeyDTO consentKeyDTO, String scanBase64, String fileType, String fileName) add the given scan to the given consentvoid
addSignerIdToConsent
(ConsentKeyDTO consentKeyDTO, SignerIdDTO signerIdDTO) adds the given signerId to the given consentvoid
addSignerIdToSignerId
(String domainName, SignerIdDTO existentSignerIdDTO, SignerIdDTO newSignerIdDTO) adds newSignerId (e.g.long
countConsentsForDomainWithFilter
(String domainName, PaginationConfig config) count all consents for the given domain with the given filterlong
countSignedPolicies
(String domainName) Returns the number of all signed policies for a given domain..void
deactivateAlias
(String domainName, SignerIdDTO originalSignerId, SignerIdDTO aliasSignerId) deactivates the given aliasgetAliasesForSignerId
(String domainName, SignerIdDTO originalSignerId) returns a list with all signer ids which are connected via an alias to the given signer idgetAliasesForSignerIds
(String domainName, List<SignerIdDTO> originalSignerIds) returns a map with all signer ids which are connected via an alias to the given signer idsgetAllConsentedIdsFor
(String signerIdTypeName, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) list all consented ids for the given policy and signerIdTypelists all consents for the given consent templategetAllConsentsForDomain
(String domainName) lists all consents for the given domaingetAllConsentsForDomainWithoutScan
(String domainName) lists all consents for the given domain which doesn't have a scan attachedgetAllConsentsForSignerIds
(String domainName, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) lists all consents for the person with the given idgetAllIdsForSignerIdType
(String domainName, String signerIdTypeName) returns all id for the given signer id type and domaingetConsent
(ConsentKeyDTO keyDTO) get the complete dto for the given key - thought to be used in addition to the list functionsgetConsentDates
(ConsentKeyDTO consentKeyDTO) returns the important dates for the given consentgetConsentLight
(ConsentKeyDTO keyDTO) get the light dto for the given keygetConsentsForDomainPaginated
(String domainName, PaginationConfig config) lists all consents for the given domain paginatedgetConsentStatusType
(Set<SignerIdDTO> signerIdDTOs, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given specific versiongetConsentStatusTypeFromExcludingToExcluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"getConsentStatusTypeFromExcludingToIncluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"getConsentStatusTypeFromIncludingToExcluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"getConsentStatusTypeFromIncludingToIncluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"getConsentTemplate
(ConsentTemplateKeyDTO ctKeyDTO) returns all attributes of the requested consent templategetCurrentConsentForSignerIdsAndCT
(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs, boolean ignoreVersionNumber, boolean useAliases) returns the current consent for the given signerIds
current means: the consent with the highest versionNumber of the associated ConsentTemplate; if there are more then one, the newest (ConsentDate) of them
if "ignoreVersionNumber" is true, then the newest of all consents belonging to the signerIds, regardless of the VersionNumber of the associated ConsentTemplategetCurrentConsentTemplate
(String consentTemplateName, String domainName) returns all attributes of the current (highest version) consent template with the given namegetCurrentPolicyStatesForSignerIds
(String domainName, Set<SignerIdDTO> signerIdDTOs, CheckConsentConfig config) returns the current signed policies which are signed by any person with the given ids (depends onCheckConsentConfig.getIdMatchingType()
)returns all information for the given domaingetMappedTemplatesForSignerId
(String domainName, ConsentTemplateType ctType, SignerIdDTO signerId, boolean useAliases) Returns all mapped consent templates for a signer ID in the specified domain.getModule
(ModuleKeyDTO keyDTO) returns all attributes of the requested module<T extends FhirIdDTO>
TgetObjectByFhirID
(Class<T> clazz, String fhirID) Searches the object with the given fhirID.getPolicy
(PolicyKeyDTO keyDTO) returns all attributes of the requested policygetPolicyStatesForPolicyAndSignerIds
(PolicyKeyDTO policyKeyDTO, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) returns all signed policies for the given policy which are signed by any person with at least one of the given idsgetPolicyStatesForPolicyNameAndSignerIds
(String domainName, String policyName, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) returns all signed policies for the given policy name (thus ignoring the version number of the policy) which are signed by the person with the given idgetPolicyStatesForSignerIds
(String domainName, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) returns all signed policies which are signed by any person with at least one of the given idsgetPolicyValidityStatusChangesForConsent
(ConsentLightDTO consentDTO, Date fromDate, Date toDate) getQCHistoryForConsent
(ConsentKeyDTO consentKeyDTO) returns a list with all qc entries for the given consentgetQCProblemHistoryForQCProblem
(QCProblemDTO qcProblemDTO, ConsentKeyDTO consentKeyDTO) getSignerIdsForAlias
(String domainName, SignerIdDTO aliasSignerId) returns a list with all signer ids that have the given id as an aliasgetSignerIdType
(String domainName, String signerIdTypeName) returns all information for the given signerIdTypegetTemplatesWithPolicies
(List<PolicyKeyDTO> policyKeyDTOs) Returns all consent templates which relate to at least one of the specified policies.boolean
isConsented
(Set<SignerIdDTO> signerIdDTOs, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given specific versionboolean
isConsentedFromExcludingToExcluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"boolean
isConsentedFromExcludingToIncluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"boolean
isConsentedFromIncludingToExcluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"boolean
isConsentedFromIncludingToIncluding
(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"listConsentTemplates
(String domainName, boolean onlyFinal) lists all consent templates of the given domainlistCurrentConsentTemplates
(String domainName) lists the most recent version of all consent templates of the given domainlistModules
(String domainName, boolean onlyFinal) lists all modules of the given domainlistPolicies
(String domainName, boolean onlyFinal) lists all policies of the given domainlistSignerIdTypes
(String domainName) list all signerIDTypes for the given domainvoid
refuseConsent
(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs) Stores a "refused" consent.void
removeScanFromConsent
(ConsentKeyDTO consentKeyDTO, String fhirId) Remove a scan from the given consentvoid
setQCForConsent
(ConsentKeyDTO consentKeyDTO, QCDTO qc) updates the qc for the given consentvoid
updateConsentInUse
(ConsentKeyDTO consentKeyDTO, String externProperties, String comment, ConsentScanDTO scan) Updates the given consent.void
validateConsent
(ConsentDTO consentDTO, boolean allowRevoke, boolean validateScan) validates the given consentDTO
checks the given domain, consent template and assures, that the given modules are part of the consent template all mandatory modules need to be either accepted or declined when there's at least one declined mandatory module, no module may be accepted no child module may be accepted if its parent is not when there's at least one accepted module, the two signatures have to be provided when there's at least one accepted module and scan is mandatory in domain config and parameter validateScan is true, scan must be present
-
Method Details
-
addConsent
void addConsent(ConsentDTO consentDTO) throws UnknownDomainException, UnknownModuleException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException, MissingRequiredObjectException, InvalidFreeTextException, MandatoryFieldsException, UnknownSignerIdTypeException, DuplicateEntryException, RequirementsNotFullfilledException Stores the given consent. The policies within the modulDTOs are ignored and therefore doesn't need to be set.- Parameters:
consentDTO
-- Throws:
UnknownDomainException
UnknownModuleException
UnknownConsentTemplateException
InvalidParameterException
InvalidVersionException
MissingRequiredObjectException
- when there's no given value for a mandatory free text fieldInvalidFreeTextException
MandatoryFieldsException
- seeMandatoryFieldsException
UnknownSignerIdTypeException
DuplicateEntryException
RequirementsNotFullfilledException
-
addConsentOptOut
ConsentLightDTO addConsentOptOut(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs) throws UnknownSignerIdTypeException, InvalidParameterException, UnknownConsentTemplateException, InvalidVersionException, RequirementsNotFullfilledException, UnknownModuleException, InvalidFreeTextException, UnknownDomainException, MissingRequiredObjectException, MandatoryFieldsException, DuplicateEntryException this is the short-variant to add an opt-out-consent without given module-states, scans and signatures. It is equal to 'addConsent' with a fully filled opt-out-consent with default-module-states and current consentDate.- Parameters:
ctKeyDTO
-signerIdDTOs
-- Returns:
- Throws:
UnknownSignerIdTypeException
InvalidParameterException
UnknownConsentTemplateException
InvalidVersionException
RequirementsNotFullfilledException
UnknownModuleException
InvalidFreeTextException
UnknownDomainException
MissingRequiredObjectException
MandatoryFieldsException
DuplicateEntryException
-
isConsented
boolean isConsented(Set<SignerIdDTO> signerIdDTOs, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) throws UnknownDomainException, UnknownPolicyException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given specific version- Parameters:
signerIdDTOs
- ids of the signer (patient)policyKeyDTO
-config
- seeCheckConsentConfig
- Returns:
- Throws:
UnknownDomainException
UnknownPolicyException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
isConsentedFromIncludingToIncluding
boolean isConsentedFromIncludingToIncluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
isConsentedFromExcludingToIncluding
boolean isConsentedFromExcludingToIncluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
isConsentedFromIncludingToExcluding
boolean isConsentedFromIncludingToExcluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
isConsentedFromExcludingToExcluding
boolean isConsentedFromExcludingToExcluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
countSignedPolicies
Returns the number of all signed policies for a given domain..- Parameters:
domainName
- the name of the domain- Returns:
- the number of all signed policies for a given domain.
- Throws:
UnknownDomainException
- if there is no such domain
-
getConsentStatusType
ConsentStatusType getConsentStatusType(Set<SignerIdDTO> signerIdDTOs, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) throws UnknownDomainException, UnknownPolicyException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given specific version- Parameters:
signerIdDTOs
- ids of the signer (patient)policyKeyDTO
-config
- seeCheckConsentConfig
- Returns:
- see
ConsentStatusType
- Throws:
UnknownDomainException
UnknownPolicyException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getConsentStatusTypeFromIncludingToIncluding
ConsentStatusType getConsentStatusTypeFromIncludingToIncluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- see
ConsentStatusType
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getConsentStatusTypeFromExcludingToIncluding
ConsentStatusType getConsentStatusTypeFromExcludingToIncluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<'= to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- see
ConsentStatusType
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getConsentStatusTypeFromIncludingToExcluding
ConsentStatusType getConsentStatusTypeFromIncludingToExcluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<'= version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- see
ConsentStatusType
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getConsentStatusTypeFromExcludingToExcluding
ConsentStatusType getConsentStatusTypeFromExcludingToExcluding(Set<SignerIdDTO> signerIdDTOs, String domainName, String policyName, String versionFrom, String versionTo, CheckConsentConfig config) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException checks whether there's a signed consent for the given patient and policy in the given version range: from invalid input: '<' version invalid input: '<' to
ignores the config parameter "ignoreVersionNumber"- Parameters:
signerIdDTOs
- ids of the signer (patient)domainName
-policyName
-versionFrom
-versionTo
-config
- seeCheckConsentConfig
- Returns:
- see
ConsentStatusType
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
listConsentTemplates
List<ConsentTemplateDTO> listConsentTemplates(String domainName, boolean onlyFinal) throws UnknownDomainException, InvalidParameterException, InvalidVersionException lists all consent templates of the given domain- Parameters:
domainName
-onlyFinal
-- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
-
listCurrentConsentTemplates
List<ConsentTemplateDTO> listCurrentConsentTemplates(String domainName) throws UnknownDomainException, InvalidParameterException, InvalidVersionException lists the most recent version of all consent templates of the given domain- Parameters:
domainName
-- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
-
listModules
List<ModuleDTO> listModules(String domainName, boolean onlyFinal) throws UnknownDomainException, InvalidParameterException, InvalidVersionException lists all modules of the given domain- Parameters:
domainName
-onlyFinal
-- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
-
getModule
ModuleDTO getModule(ModuleKeyDTO keyDTO) throws UnknownDomainException, UnknownModuleException, InvalidParameterException, InvalidVersionException returns all attributes of the requested module- Parameters:
keyDTO
-- Returns:
- Throws:
UnknownDomainException
UnknownModuleException
InvalidParameterException
InvalidVersionException
-
listPolicies
List<PolicyDTO> listPolicies(String domainName, boolean onlyFinal) throws UnknownDomainException, InvalidParameterException, InvalidVersionException lists all policies of the given domain- Parameters:
domainName
-onlyFinal
-- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
-
getPolicy
PolicyDTO getPolicy(PolicyKeyDTO keyDTO) throws UnknownDomainException, UnknownPolicyException, InvalidParameterException, InvalidVersionException returns all attributes of the requested policy- Parameters:
keyDTO
-- Returns:
- Throws:
UnknownDomainException
UnknownPolicyException
InvalidParameterException
InvalidVersionException
-
getConsentTemplate
ConsentTemplateDTO getConsentTemplate(ConsentTemplateKeyDTO ctKeyDTO) throws UnknownDomainException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException returns all attributes of the requested consent template- Parameters:
ctKeyDTO
-- Returns:
- Throws:
UnknownDomainException
UnknownConsentTemplateException
InvalidParameterException
InvalidVersionException
-
getCurrentConsentTemplate
ConsentTemplateDTO getCurrentConsentTemplate(String consentTemplateName, String domainName) throws UnknownDomainException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException returns all attributes of the current (highest version) consent template with the given name- Parameters:
consentTemplateName
-domainName
-- Returns:
- Throws:
UnknownDomainException
UnknownConsentTemplateException
InvalidParameterException
InvalidVersionException
-
getPolicyStatesForSignerIds
List<SignedPolicyDTO> getPolicyStatesForSignerIds(String domainName, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException returns all signed policies which are signed by any person with at least one of the given ids- Parameters:
domainName
-signerIdDTOs
- ids of the signer (patient)useAliases
- check aliases for related signerIds- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getPolicyStatesForPolicyAndSignerIds
List<SignedPolicyDTO> getPolicyStatesForPolicyAndSignerIds(PolicyKeyDTO policyKeyDTO, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException returns all signed policies for the given policy which are signed by any person with at least one of the given ids- Parameters:
policyKeyDTO
-signerIdDTOs
- ids of the signer (patient)useAliases
- check aliases for related signerIds- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getPolicyStatesForPolicyNameAndSignerIds
List<SignedPolicyDTO> getPolicyStatesForPolicyNameAndSignerIds(String domainName, String policyName, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException returns all signed policies for the given policy name (thus ignoring the version number of the policy) which are signed by the person with the given id- Parameters:
domainName
-policyName
-signerIdDTOs
- ids of the signer (patient)useAliases
- check aliases for related signerIds- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getCurrentPolicyStatesForSignerIds
List<SignedPolicyDTO> getCurrentPolicyStatesForSignerIds(String domainName, Set<SignerIdDTO> signerIdDTOs, CheckConsentConfig config) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException returns the current signed policies which are signed by any person with the given ids (depends onCheckConsentConfig.getIdMatchingType()
)- Parameters:
domainName
-signerIdDTOs
- ids of the signer (patient)config
- seeCheckConsentConfig
CheckConsentConfig.getIgnoreVersionNumber()
is ignored- Returns:
- Throws:
InvalidParameterException
UnknownDomainException
UnknownSignerIdException
UnknownSignerIdTypeException
-
getAllConsentsForSignerIds
List<ConsentLightDTO> getAllConsentsForSignerIds(String domainName, Set<SignerIdDTO> signerIdDTOs, boolean useAliases) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException, InconsistentStatusException lists all consents for the person with the given id- Parameters:
domainName
-signerIdDTOs
- ids of the signer (patient)useAliases
- check aliases for related signerIds- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
InconsistentStatusException
-
getCurrentConsentForSignerIdsAndCT
ConsentDTO getCurrentConsentForSignerIdsAndCT(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs, boolean ignoreVersionNumber, boolean useAliases) throws UnknownDomainException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException, InconsistentStatusException returns the current consent for the given signerIds
current means: the consent with the highest versionNumber of the associated ConsentTemplate; if there are more then one, the newest (ConsentDate) of them
if "ignoreVersionNumber" is true, then the newest of all consents belonging to the signerIds, regardless of the VersionNumber of the associated ConsentTemplate- Parameters:
ctKeyDTO
-signerIdDTOs
-ignoreVersionNumber
-useAliases
- check aliases for related signerIds- Returns:
- Throws:
UnknownDomainException
UnknownConsentTemplateException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
InconsistentStatusException
-
getAllConsentsForConsentTemplate
List<ConsentLightDTO> getAllConsentsForConsentTemplate(ConsentTemplateKeyDTO ctKeyDTO) throws UnknownDomainException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException, InconsistentStatusException lists all consents for the given consent template- Parameters:
ctKeyDTO
-- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
InconsistentStatusException
UnknownConsentTemplateException
-
getAllConsentsForDomain
List<ConsentLightDTO> getAllConsentsForDomain(String domainName) throws InconsistentStatusException, InvalidParameterException, InvalidVersionException, UnknownDomainException lists all consents for the given domain- Parameters:
domainName
-- Returns:
- Throws:
InconsistentStatusException
InvalidParameterException
InvalidVersionException
UnknownDomainException
-
getConsentsForDomainPaginated
List<ConsentLightDTO> getConsentsForDomainPaginated(String domainName, PaginationConfig config) throws InconsistentStatusException, InvalidParameterException, InvalidVersionException, UnknownDomainException lists all consents for the given domain paginated- Parameters:
domainName
-config
- seePaginationConfig
- Returns:
- Throws:
InconsistentStatusException
InvalidParameterException
InvalidVersionException
UnknownDomainException
-
countConsentsForDomainWithFilter
long countConsentsForDomainWithFilter(String domainName, PaginationConfig config) throws InvalidParameterException, InvalidVersionException, UnknownDomainException count all consents for the given domain with the given filter- Parameters:
domainName
-config
- seePaginationConfig
, onlyPaginationConfig.getFilter()
,PaginationConfig.isFilterFieldsAreTreatedAsConjunction()
andPaginationConfig.isFilterIsCaseSensitive()
are used- Returns:
- count with consents within domain with consideration of given filter criterion
- Throws:
InvalidParameterException
InvalidVersionException
UnknownDomainException
-
getAllConsentsForDomainWithoutScan
List<ConsentLightDTO> getAllConsentsForDomainWithoutScan(String domainName) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, InconsistentStatusException lists all consents for the given domain which doesn't have a scan attached- Parameters:
domainName
-- Returns:
- Throws:
UnknownDomainException
InvalidParameterException
InvalidVersionException
InconsistentStatusException
-
getConsent
ConsentDTO getConsent(ConsentKeyDTO keyDTO) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, InconsistentStatusException, UnknownConsentTemplateException, UnknownSignerIdTypeException, UnknownConsentException get the complete dto for the given key - thought to be used in addition to the list functions -
getConsentLight
ConsentLightDTO getConsentLight(ConsentKeyDTO keyDTO) throws UnknownDomainException, InvalidParameterException, InvalidVersionException, InconsistentStatusException, UnknownConsentTemplateException, UnknownSignerIdTypeException, UnknownConsentException get the light dto for the given key -
getDomain
returns all information for the given domain- Parameters:
domainName
- identifier- Returns:
- see
DomainDTO
- Throws:
InvalidParameterException
UnknownDomainException
- if the given domain is not found
-
listDomains
- Returns:
- list of all domains within the database; see
DomainDTO
-
updateConsentInUse
void updateConsentInUse(ConsentKeyDTO consentKeyDTO, String externProperties, String comment, ConsentScanDTO scan) throws InvalidParameterException, InvalidVersionException, UnknownDomainException, UnknownConsentTemplateException, UnknownSignerIdTypeException, UnknownConsentException Updates the given consent.- Parameters:
consentKeyDTO
-externProperties
-comment
-scan
-- Throws:
InvalidParameterException
InvalidVersionException
UnknownDomainException
UnknownConsentTemplateException
UnknownSignerIdTypeException
UnknownConsentException
-
addScanToConsent
void addScanToConsent(ConsentKeyDTO consentKeyDTO, String scanBase64, String fileType, String fileName) throws UnknownDomainException, UnknownConsentTemplateException, UnknownConsentException, DuplicateEntryException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException add the given scan to the given consent- Parameters:
consentKeyDTO
-scanBase64
-fileType
-fileName
-- Throws:
UnknownDomainException
UnknownConsentTemplateException
UnknownConsentException
DuplicateEntryException
- if there's already a scan attached to that consentInvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
removeScanFromConsent
void removeScanFromConsent(ConsentKeyDTO consentKeyDTO, String fhirId) throws UnknownDomainException, UnknownConsentTemplateException, UnknownConsentException, DuplicateEntryException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException Remove a scan from the given consent- Parameters:
consentKeyDTO
-fhirId
-- Throws:
UnknownDomainException
UnknownConsentTemplateException
UnknownConsentException
DuplicateEntryException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
-
getSignerIdType
SignerIdTypeDTO getSignerIdType(String domainName, String signerIdTypeName) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdTypeException returns all information for the given signerIdType- Parameters:
domainName
- domain to which the signerIdType belongs tosignerIdTypeName
- identifier- Returns:
- see
SignerIdTypeDTO
- Throws:
InvalidParameterException
UnknownDomainException
- if the given domain is not foundUnknownSignerIdTypeException
- if the given signerIdType is not found
-
listSignerIdTypes
List<SignerIdTypeDTO> listSignerIdTypes(String domainName) throws InvalidParameterException, UnknownDomainException list all signerIDTypes for the given domain- Parameters:
domainName
- domain to which the signerIdTypes belongs to- Returns:
- list of all domains within the database; see
SignerIdTypeDTO
- Throws:
InvalidParameterException
UnknownDomainException
- if the given domain is not found
-
getAllIdsForSignerIdType
List<String> getAllIdsForSignerIdType(String domainName, String signerIdTypeName) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdTypeException returns all id for the given signer id type and domain- Parameters:
domainName
- domain to which the signerIdType belongs tosignerIdTypeName
- identifier of the signerIdType- Returns:
- Throws:
InvalidParameterException
UnknownDomainException
UnknownSignerIdTypeException
-
getAllConsentedIdsFor
List<String> getAllConsentedIdsFor(String signerIdTypeName, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) throws UnknownDomainException, UnknownSignerIdTypeException, UnknownPolicyException, InvalidParameterException, InvalidVersionException, InconsistentStatusException list all consented ids for the given policy and signerIdType- Parameters:
signerIdTypeName
-policyKeyDTO
-config
-- Returns:
- Throws:
UnknownDomainException
UnknownSignerIdTypeException
UnknownPolicyException
InvalidParameterException
InvalidVersionException
InconsistentStatusException
-
validateConsent
void validateConsent(ConsentDTO consentDTO, boolean allowRevoke, boolean validateScan) throws InvalidParameterException, InvalidVersionException, MissingRequiredObjectException, MandatoryFieldsException, UnknownModuleException, UnknownConsentTemplateException, UnknownDomainException validates the given consentDTO
- checks the given domain, consent template and assures, that the given modules are part of the consent template
- all mandatory modules need to be either accepted or declined
- when there's at least one declined mandatory module, no module may be accepted
- no child module may be accepted if its parent is not
- when there's at least one accepted module, the two signatures have to be provided
- when there's at least one accepted module and scan is mandatory in domain config and parameter validateScan is true, scan must be present
- Parameters:
consentDTO
-allowRevoke
-validateScan
-- Throws:
InvalidParameterException
InvalidVersionException
MissingRequiredObjectException
MandatoryFieldsException
UnknownModuleException
UnknownConsentTemplateException
UnknownDomainException
-
refuseConsent
void refuseConsent(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs) throws InternalException, InvalidParameterException, InvalidVersionException, UnknownSignerIdTypeException, UnknownConsentTemplateException, UnknownDomainException Stores a "refused" consent. The consent is not declined, the participant didn't want to fill a consent.
The date of the refused consent is set to the current date.- Parameters:
ctKeyDTO
-signerIdDTOs
-- Throws:
InternalException
InvalidParameterException
InvalidVersionException
UnknownSignerIdTypeException
UnknownConsentTemplateException
UnknownDomainException
-
addSignerIdToConsent
void addSignerIdToConsent(ConsentKeyDTO consentKeyDTO, SignerIdDTO signerIdDTO) throws InternalException, InvalidParameterException, InvalidVersionException, UnknownConsentException, UnknownSignerIdTypeException, UnknownConsentTemplateException, IllegalArgumentException, UnknownDomainException adds the given signerId to the given consent- Parameters:
consentKeyDTO
-signerIdDTO
-- Throws:
InternalException
InvalidParameterException
InvalidVersionException
UnknownConsentException
UnknownSignerIdTypeException
UnknownConsentTemplateException
UnknownDomainException
IllegalArgumentException
-
addSignerIdToSignerId
void addSignerIdToSignerId(String domainName, SignerIdDTO existentSignerIdDTO, SignerIdDTO newSignerIdDTO) throws UnknownSignerIdTypeException, InvalidParameterException, IllegalArgumentException, InternalException, UnknownDomainException adds newSignerId (e.g. case number) to one or more virtual persons (which are using the given existentSignerId (e.g. pseudonym))- Parameters:
existentSignerIdDTO
- existing signerID identifying used by one or more virtual personsnewSignerIdDTO
- new signerID to be added to identified virtual persons- Throws:
UnknownSignerIdTypeException
InvalidParameterException
IllegalArgumentException
InternalException
UnknownDomainException
-
getConsentDates
ConsentDateValuesDTO getConsentDates(ConsentKeyDTO consentKeyDTO) throws InvalidParameterException, InvalidVersionException, UnknownConsentException, UnknownSignerIdTypeException, UnknownConsentTemplateException, UnknownDomainException returns the important dates for the given consent- Parameters:
consentKeyDTO
-- Returns:
- Throws:
InvalidParameterException
InvalidVersionException
UnknownConsentException
UnknownSignerIdTypeException
UnknownConsentTemplateException
UnknownDomainException
-
addAlias
void addAlias(String domainName, SignerIdDTO originalSignerId, SignerIdDTO aliasSignerId) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException creates an alias between two signer ids; used for merges- Parameters:
domainName
-originalSignerId
-aliasSignerId
-- Throws:
InvalidParameterException
UnknownDomainException
UnknownSignerIdException
- if the originalSignerId doesn't exists within the given domainUnknownSignerIdTypeException
-
deactivateAlias
void deactivateAlias(String domainName, SignerIdDTO originalSignerId, SignerIdDTO aliasSignerId) throws InvalidParameterException, UnknownAliasException, UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException deactivates the given alias- Parameters:
domainName
-originalSignerId
-aliasSignerId
-- Throws:
InvalidParameterException
UnknownAliasException
UnknownDomainException
UnknownSignerIdException
UnknownSignerIdTypeException
-
getAliasesForSignerId
List<SignerIdDTO> getAliasesForSignerId(String domainName, SignerIdDTO originalSignerId) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException returns a list with all signer ids which are connected via an alias to the given signer id- Parameters:
domainName
-originalSignerId
-- Returns:
- Throws:
InvalidParameterException
UnknownDomainException
UnknownSignerIdException
UnknownSignerIdTypeException
-
getAliasesForSignerIds
Map<SignerIdDTO,SignerIdDTO[]> getAliasesForSignerIds(String domainName, List<SignerIdDTO> originalSignerIds) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException returns a map with all signer ids which are connected via an alias to the given signer ids- Parameters:
domainName
-originalSignerIds
-- Returns:
- Throws:
InvalidParameterException
UnknownDomainException
UnknownSignerIdException
UnknownSignerIdTypeException
-
getSignerIdsForAlias
List<SignerIdDTO> getSignerIdsForAlias(String domainName, SignerIdDTO aliasSignerId) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException returns a list with all signer ids that have the given id as an alias- Parameters:
domainName
-aliasSignerId
-- Returns:
- Throws:
InvalidParameterException
UnknownDomainException
UnknownSignerIdException
UnknownSignerIdTypeException
-
setQCForConsent
void setQCForConsent(ConsentKeyDTO consentKeyDTO, QCDTO qc) throws InvalidParameterException, InvalidVersionException, UnknownConsentException, UnknownSignerIdTypeException, UnknownConsentTemplateException, UnknownDomainException updates the qc for the given consent- Parameters:
consentKeyDTO
-qc
-- Throws:
InvalidParameterException
InvalidVersionException
UnknownConsentException
UnknownSignerIdTypeException
UnknownConsentTemplateException
UnknownDomainException
-
getQCHistoryForConsent
List<QCHistoryDTO> getQCHistoryForConsent(ConsentKeyDTO consentKeyDTO) throws InvalidParameterException, InvalidVersionException, UnknownConsentException, UnknownSignerIdTypeException, UnknownConsentTemplateException, UnknownDomainException returns a list with all qc entries for the given consent- Parameters:
consentKeyDTO
-- Returns:
- Throws:
InvalidParameterException
InvalidVersionException
UnknownConsentException
UnknownSignerIdTypeException
UnknownConsentTemplateException
UnknownDomainException
-
getQCProblemHistoryForQCProblem
List<QCProblemHistoryDTO> getQCProblemHistoryForQCProblem(QCProblemDTO qcProblemDTO, ConsentKeyDTO consentKeyDTO) throws InvalidParameterException, InvalidVersionException, UnknownConsentException, UnknownSignerIdTypeException, UnknownConsentTemplateException, UnknownDomainException -
getTemplatesWithPolicies
List<ConsentTemplateKeyDTO> getTemplatesWithPolicies(List<PolicyKeyDTO> policyKeyDTOs) throws InvalidParameterException, UnknownDomainException, InvalidVersionException Returns all consent templates which relate to at least one of the specified policies. (Template zurückgeben, wenn min. 1 der übergebenen Policies vorkommt) --> zum Vorfiltern der Auswahllisten)- Parameters:
policyKeyDTOs
- the keys of the policies to find related consent templates for- Returns:
- consent templates relating to the specified policies
- Throws:
UnknownDomainException
- if the related domain is unknownInvalidVersionException
- if any of the consent templates version is invalidInvalidParameterException
- if parameters are invalid
-
getMappedTemplatesForSignerId
List<ConsentTemplateKeyDTO> getMappedTemplatesForSignerId(String domainName, ConsentTemplateType ctType, SignerIdDTO signerId, boolean useAliases) throws UnknownDomainException, UnknownSignerIdException, UnknownSignerIdTypeException, InvalidVersionException, InconsistentStatusException, InvalidParameterException Returns all mapped consent templates for a signer ID in the specified domain. (Durch holen aller Einwilligungsvorlagen der signerId)- Parameters:
domainName
- the name of the domain to return consent templates forctType
- the type of consent templates to returnsignerId
- the signer ID to return consent templates foruseAliases
- true to use aliases- Returns:
- all mapped consent templates for a signer ID in the specified domain
- Throws:
UnknownDomainException
- if the domain is unknownUnknownSignerIdException
- if the signer ID is unknownInvalidParameterException
- if parameters are invalidUnknownSignerIdTypeException
InvalidVersionException
InconsistentStatusException
-
getObjectByFhirID
<T extends FhirIdDTO> T getObjectByFhirID(Class<T> clazz, String fhirID) throws UnknownFhirIdObjectException, UnknownIDException Searches the object with the given fhirID.- Parameters:
clazz
- the class of the object to search forfhirID
- the FHIR ID to search for- Returns:
- the object with the given fhirID
- Throws:
UnknownFhirIdObjectException
- if that object is not known (DAO.getObjectByFhirID)UnknownIDException
- if that object is not found
-
getPolicyValidityStatusChangesForConsent
List<PolicyValidityChangedDTO> getPolicyValidityStatusChangesForConsent(ConsentLightDTO consentDTO, Date fromDate, Date toDate) throws InvalidParameterException, UnknownSignerIdTypeException, UnknownConsentTemplateException, InvalidVersionException, InconsistentStatusException, UnknownDomainException, UnknownConsentException, UnknownPolicyException
-