Package dev.dsf.bpe.v2.service
Interface ReadAccessHelper
public interface ReadAccessHelper
Methods to configure read access for FHIR resources on a DSF FHIR server. Methods add and check resource
Meta
tags.-
Method Summary
Modifier and TypeMethodDescription<R extends org.hl7.fhir.r4.model.Resource>
RaddAll(R resource) Adds All tag.<R extends org.hl7.fhir.r4.model.Resource>
RaddLocal(R resource) Adds LOCAL tag.<R extends org.hl7.fhir.r4.model.Resource>
RaddOrganization(R resource, String organizationIdentifier) Adds ORGANIZATION tag for the given organization.<R extends org.hl7.fhir.r4.model.Resource>
RaddOrganization(R resource, org.hl7.fhir.r4.model.Organization organization) Adds ORGANIZATION tag for the given organization.<R extends org.hl7.fhir.r4.model.Resource>
RAdds ROLE tag for the given affiliation.<R extends org.hl7.fhir.r4.model.Resource>
RaddRole(R resource, org.hl7.fhir.r4.model.OrganizationAffiliation affiliation) Adds ROLE tag for the given affiliation.booleanhasAll(org.hl7.fhir.r4.model.Resource resource) booleanhasAnyOrganization(org.hl7.fhir.r4.model.Resource resource) booleanhasAnyRole(org.hl7.fhir.r4.model.Resource resource) booleanhasLocal(org.hl7.fhir.r4.model.Resource resource) booleanhasOrganization(org.hl7.fhir.r4.model.Resource resource, String organizationIdentifier) booleanhasOrganization(org.hl7.fhir.r4.model.Resource resource, org.hl7.fhir.r4.model.Organization organization) booleanhasRole(org.hl7.fhir.r4.model.Resource resource, String consortiumIdentifier, String roleSystem, String roleCode) booleanhasRole(org.hl7.fhir.r4.model.Resource resource, List<org.hl7.fhir.r4.model.OrganizationAffiliation> affiliations) booleanhasRole(org.hl7.fhir.r4.model.Resource resource, org.hl7.fhir.r4.model.OrganizationAffiliation affiliation) booleanisValid(org.hl7.fhir.r4.model.Resource resource) Resource with access tags valid if:
1 LOCAL tag and n {ORGANIZATION, ROLE} tags(n >= 0)
or
1 ALL tag
All tags {LOCAL, ORGANIZATION, ROLE, ALL} valid
Does not check if referenced organizations or roles existbooleanisValid(org.hl7.fhir.r4.model.Resource resource, Predicate<org.hl7.fhir.r4.model.Identifier> organizationWithIdentifierExists, Predicate<org.hl7.fhir.r4.model.Coding> roleExists) Resource with access tags valid if:
1 LOCAL tag and n {ORGANIZATION, ROLE} tags(n >= 0)
or
1 ALL tag
All tags {LOCAL, ORGANIZATION, ROLE, ALL} valid
-
Method Details
-
addLocal
<R extends org.hl7.fhir.r4.model.Resource> R addLocal(R resource) Adds LOCAL tag. Removes ALL tag if present.- Type Parameters:
R- the resource type- Parameters:
resource- may benull- Returns:
nullif given resource isnull- See Also:
-
addOrganization
<R extends org.hl7.fhir.r4.model.Resource> R addOrganization(R resource, String organizationIdentifier) Adds ORGANIZATION tag for the given organization. Adds LOCAL tag if not present, removes ALL tag if present.- Type Parameters:
R- the resource type- Parameters:
resource- may benullorganizationIdentifier- notnull- Returns:
nullif given resource isnull- See Also:
-
addOrganization
<R extends org.hl7.fhir.r4.model.Resource> R addOrganization(R resource, org.hl7.fhir.r4.model.Organization organization) Adds ORGANIZATION tag for the given organization. Adds LOCAL tag if not present, removes ALL tag if present.- Type Parameters:
R- the resource type- Parameters:
resource- may benullorganization- notnull- Returns:
nullif given resource isnull- Throws:
NullPointerException- if given organization isnullIllegalArgumentException- if given organization does not have valid identifier- See Also:
-
addRole
<R extends org.hl7.fhir.r4.model.Resource> R addRole(R resource, String consortiumIdentifier, String roleSystem, String roleCode) Adds ROLE tag for the given affiliation. Adds LOCAL tag if not present, removes ALL tag if present.- Type Parameters:
R- the resource type- Parameters:
resource- may benullconsortiumIdentifier- notnullroleSystem- notnullroleCode- notnull- Returns:
nullif given resource isnull- See Also:
-
addRole
<R extends org.hl7.fhir.r4.model.Resource> R addRole(R resource, org.hl7.fhir.r4.model.OrganizationAffiliation affiliation) Adds ROLE tag for the given affiliation. Adds LOCAL tag if not present, removes ALL tag if present.- Type Parameters:
R- the resource type- Parameters:
resource- may benullaffiliation- notnull- Returns:
nullif given resource isnull- Throws:
NullPointerException- if given affiliation isnullIllegalArgumentException- if given affiliation does not have valid consortium identifier or organization role (only one role supported)- See Also:
-
addAll
<R extends org.hl7.fhir.r4.model.Resource> R addAll(R resource) Adds All tag. Removes LOCAL, ORGANIZATION and ROLE tags if present.- Type Parameters:
R- the resource type- Parameters:
resource- may benull- Returns:
nullif given resource isnull- See Also:
-
hasLocal
boolean hasLocal(org.hl7.fhir.r4.model.Resource resource) -
hasOrganization
-
hasOrganization
boolean hasOrganization(org.hl7.fhir.r4.model.Resource resource, org.hl7.fhir.r4.model.Organization organization) -
hasAnyOrganization
boolean hasAnyOrganization(org.hl7.fhir.r4.model.Resource resource) -
hasRole
-
hasRole
boolean hasRole(org.hl7.fhir.r4.model.Resource resource, org.hl7.fhir.r4.model.OrganizationAffiliation affiliation) -
hasRole
boolean hasRole(org.hl7.fhir.r4.model.Resource resource, List<org.hl7.fhir.r4.model.OrganizationAffiliation> affiliations) -
hasAnyRole
boolean hasAnyRole(org.hl7.fhir.r4.model.Resource resource) -
hasAll
boolean hasAll(org.hl7.fhir.r4.model.Resource resource) -
isValid
boolean isValid(org.hl7.fhir.r4.model.Resource resource) Resource with access tags valid if:
1 LOCAL tag and n {ORGANIZATION, ROLE} tags(n >= 0)
or
1 ALL tag
All tags {LOCAL, ORGANIZATION, ROLE, ALL} valid
Does not check if referenced organizations or roles exist- Parameters:
resource- may benull- Returns:
falseif given resource isnullor resource not valid
-
isValid
boolean isValid(org.hl7.fhir.r4.model.Resource resource, Predicate<org.hl7.fhir.r4.model.Identifier> organizationWithIdentifierExists, Predicate<org.hl7.fhir.r4.model.Coding> roleExists) Resource with access tags valid if:
1 LOCAL tag and n {ORGANIZATION, ROLE} tags(n >= 0)
or
1 ALL tag
All tags {LOCAL, ORGANIZATION, ROLE, ALL} valid- Parameters:
resource- may benullorganizationWithIdentifierExists- notnullroleExists- notnull- Returns:
falseif given resource isnullor resource not valid
-