Package org.emau.icmvc.ganimed.ttp.cm2
Interface GICSService
public interface GICSService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlias(String domainName, SignerIdDTO originalSignerId, SignerIdDTO aliasSignerId) creates an alias between two signer ids; used for mergesvoidaddConsent(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.voidaddScanToConsent(ConsentKeyDTO consentKeyDTO, String scanBase64, String fileType, String fileName) add the given scan to the given consentvoidaddSignerIdToConsent(ConsentKeyDTO consentKeyDTO, SignerIdDTO signerIdDTO) adds the given signerId to the given consentvoidaddSignerIdToSignerId(String domainName, SignerIdDTO existentSignerIdDTO, SignerIdDTO newSignerIdDTO) adds newSignerId (e.g.longcountConsentsForDomainWithFilter(String domainName, PaginationConfig config) count all consents for the given domain with the given filterlongcountSignedPolicies(String domainName) Returns the number of all signed policies for a given domain..voiddeactivateAlias(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.booleanisConsented(Set<SignerIdDTO> signerIdDTOs, PolicyKeyDTO policyKeyDTO, CheckConsentConfig config) checks whether there's a signed consent for the given patient and policy in the given specific versionbooleanisConsentedFromExcludingToExcluding(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"booleanisConsentedFromExcludingToIncluding(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"booleanisConsentedFromIncludingToExcluding(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"booleanisConsentedFromIncludingToIncluding(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 domainvoidrefuseConsent(ConsentTemplateKeyDTO ctKeyDTO, Set<SignerIdDTO> signerIdDTOs) Stores a "refused" consent.voidremoveScanFromConsent(ConsentKeyDTO consentKeyDTO, String fhirId) Remove a scan from the given consentvoidsetQCForConsent(ConsentKeyDTO consentKeyDTO, QCDTO qc) updates the qc for the given consentvoidupdateConsentInUse(ConsentKeyDTO consentKeyDTO, String externProperties, String comment, ConsentScanDTO scan) Updates the given consent.voidvalidateConsent(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:
UnknownDomainExceptionUnknownModuleExceptionUnknownConsentTemplateExceptionInvalidParameterExceptionInvalidVersionExceptionMissingRequiredObjectException- when there's no given value for a mandatory free text fieldInvalidFreeTextExceptionMandatoryFieldsException- seeMandatoryFieldsExceptionUnknownSignerIdTypeExceptionDuplicateEntryExceptionRequirementsNotFullfilledException
-
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:
UnknownSignerIdTypeExceptionInvalidParameterExceptionUnknownConsentTemplateExceptionInvalidVersionExceptionRequirementsNotFullfilledExceptionUnknownModuleExceptionInvalidFreeTextExceptionUnknownDomainExceptionMissingRequiredObjectExceptionMandatoryFieldsExceptionDuplicateEntryException
-
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:
UnknownDomainExceptionUnknownPolicyExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionUnknownPolicyExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionException
-
listModules
List<ModuleDTO> listModules(String domainName, boolean onlyFinal) throws UnknownDomainException, InvalidParameterException, InvalidVersionException lists all modules of the given domain- Parameters:
domainName-onlyFinal-- Returns:
- Throws:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionException
-
getModule
ModuleDTO getModule(ModuleKeyDTO keyDTO) throws UnknownDomainException, UnknownModuleException, InvalidParameterException, InvalidVersionException returns all attributes of the requested module- Parameters:
keyDTO-- Returns:
- Throws:
UnknownDomainExceptionUnknownModuleExceptionInvalidParameterExceptionInvalidVersionException
-
listPolicies
List<PolicyDTO> listPolicies(String domainName, boolean onlyFinal) throws UnknownDomainException, InvalidParameterException, InvalidVersionException lists all policies of the given domain- Parameters:
domainName-onlyFinal-- Returns:
- Throws:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionException
-
getPolicy
PolicyDTO getPolicy(PolicyKeyDTO keyDTO) throws UnknownDomainException, UnknownPolicyException, InvalidParameterException, InvalidVersionException returns all attributes of the requested policy- Parameters:
keyDTO-- Returns:
- Throws:
UnknownDomainExceptionUnknownPolicyExceptionInvalidParameterExceptionInvalidVersionException
-
getConsentTemplate
ConsentTemplateDTO getConsentTemplate(ConsentTemplateKeyDTO ctKeyDTO) throws UnknownDomainException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException returns all attributes of the requested consent template- Parameters:
ctKeyDTO-- Returns:
- Throws:
UnknownDomainExceptionUnknownConsentTemplateExceptionInvalidParameterExceptionInvalidVersionException
-
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:
UnknownDomainExceptionUnknownConsentTemplateExceptionInvalidParameterExceptionInvalidVersionException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeExceptionInconsistentStatusException
-
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:
UnknownDomainExceptionUnknownConsentTemplateExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeExceptionInconsistentStatusException
-
getAllConsentsForConsentTemplate
List<ConsentLightDTO> getAllConsentsForConsentTemplate(ConsentTemplateKeyDTO ctKeyDTO) throws UnknownDomainException, UnknownConsentTemplateException, InvalidParameterException, InvalidVersionException, InconsistentStatusException lists all consents for the given consent template- Parameters:
ctKeyDTO-- Returns:
- Throws:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionInconsistentStatusExceptionUnknownConsentTemplateException
-
getAllConsentsForDomain
List<ConsentLightDTO> getAllConsentsForDomain(String domainName) throws InconsistentStatusException, InvalidParameterException, InvalidVersionException, UnknownDomainException lists all consents for the given domain- Parameters:
domainName-- Returns:
- Throws:
InconsistentStatusExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownDomainException
-
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:
InconsistentStatusExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownDomainException
-
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:
InvalidParameterExceptionInvalidVersionExceptionUnknownDomainException
-
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:
UnknownDomainExceptionInvalidParameterExceptionInvalidVersionExceptionInconsistentStatusException
-
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:
InvalidParameterExceptionUnknownDomainException- 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:
InvalidParameterExceptionInvalidVersionExceptionUnknownDomainExceptionUnknownConsentTemplateExceptionUnknownSignerIdTypeExceptionUnknownConsentException
-
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:
UnknownDomainExceptionUnknownConsentTemplateExceptionUnknownConsentExceptionDuplicateEntryException- if there's already a scan attached to that consentInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionUnknownConsentTemplateExceptionUnknownConsentExceptionDuplicateEntryExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeException
-
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:
InvalidParameterExceptionUnknownDomainException- 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:
InvalidParameterExceptionUnknownDomainException- 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:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdTypeException
-
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:
UnknownDomainExceptionUnknownSignerIdTypeExceptionUnknownPolicyExceptionInvalidParameterExceptionInvalidVersionExceptionInconsistentStatusException
-
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:
InvalidParameterExceptionInvalidVersionExceptionMissingRequiredObjectExceptionMandatoryFieldsExceptionUnknownModuleExceptionUnknownConsentTemplateExceptionUnknownDomainException
-
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:
InternalExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownSignerIdTypeExceptionUnknownConsentTemplateExceptionUnknownDomainException
-
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:
InternalExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownConsentExceptionUnknownSignerIdTypeExceptionUnknownConsentTemplateExceptionUnknownDomainExceptionIllegalArgumentException
-
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:
UnknownSignerIdTypeExceptionInvalidParameterExceptionIllegalArgumentExceptionInternalExceptionUnknownDomainException
-
getConsentDates
ConsentDateValuesDTO getConsentDates(ConsentKeyDTO consentKeyDTO) throws InvalidParameterException, InvalidVersionException, UnknownConsentException, UnknownSignerIdTypeException, UnknownConsentTemplateException, UnknownDomainException returns the important dates for the given consent- Parameters:
consentKeyDTO-- Returns:
- Throws:
InvalidParameterExceptionInvalidVersionExceptionUnknownConsentExceptionUnknownSignerIdTypeExceptionUnknownConsentTemplateExceptionUnknownDomainException
-
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:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdException- 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:
InvalidParameterExceptionUnknownAliasExceptionUnknownDomainExceptionUnknownSignerIdExceptionUnknownSignerIdTypeException
-
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:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdExceptionUnknownSignerIdTypeException
-
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:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdExceptionUnknownSignerIdTypeException
-
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:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdExceptionUnknownSignerIdTypeException
-
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:
InvalidParameterExceptionInvalidVersionExceptionUnknownConsentExceptionUnknownSignerIdTypeExceptionUnknownConsentTemplateExceptionUnknownDomainException
-
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:
InvalidParameterExceptionInvalidVersionExceptionUnknownConsentExceptionUnknownSignerIdTypeExceptionUnknownConsentTemplateExceptionUnknownDomainException
-
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 invalidUnknownSignerIdTypeExceptionInvalidVersionExceptionInconsistentStatusException
-
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
-