Package org.ehrbase.ehr.knowledge
Interface I_KnowledgeCache
- All Known Implementing Classes:
KnowledgeCacheService
public interface I_KnowledgeCache
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddOperationalTemplate(InputStream content, String tenantIdentifier) Adds operational template to system and also in current cache.addOperationalTemplate(org.openehr.schemas.v1.OPERATIONALTEMPLATE template, String tenantIdentifier) booleandeleteOperationalTemplate(org.openehr.schemas.v1.OPERATIONALTEMPLATE template) Deletes a given operational template physically from cache and from template storage and from cache.getConceptByConceptId(int code, String language, BiFunction<Integer, String, I_KnowledgeCache.ConceptValue> provider) getConceptByDescription(String description, String language, BiFunction<String, String, I_KnowledgeCache.ConceptValue> provider) getConceptById(UUID uuid, Function<UUID, I_KnowledgeCache.ConceptValue> provider) getLanguageByCode(String languageCode, Function<String, I_KnowledgeCache.LanguageValue> provider) getTerritoryCodeByTwoLetterCode(String territoryAsString, Function<String, I_KnowledgeCache.TerritoryValue> provider) resolveForTemplate(String templateId, Collection<org.ehrbase.webtemplate.parser.NodeId> jsonQueryExpression) Optional<org.openehr.schemas.v1.OPERATIONALTEMPLATE>retrieve an operational template document instanceOptional<org.openehr.schemas.v1.OPERATIONALTEMPLATE>retrieve a cached operational template document instance using its unique Id
-
Field Details
-
TEMPLATE_ID
- See Also:
-
-
Method Details
-
getAllTemplateIds
-
addOperationalTemplate
Adds operational template to system and also in current cache.- Parameters:
content- operational template input- Returns:
- resulting template ID, when successful
- Throws:
InvalidApiParameterException- when input can't be pared to OPT instanceStateConflictException- when template with same template ID is already in the systemInternalServerException- when an unspecified problem occurs
-
addOperationalTemplate
-
listAllOperationalTemplates
- Throws:
IOException
-
retrieveOperationalTemplate
retrieve an operational template document instance- Parameters:
key- the name of the operational template- Returns:
- an OPERATIONALTEMPLATE document instance or null
- See Also:
-
OPERATIONALTEMPLATE
-
retrieveOperationalTemplate
retrieve a cached operational template document instance using its unique Id- Parameters:
uuid- the name of the operational template- Returns:
- an OPERATIONALTEMPLATE document instance or null
- Throws:
Exception- See Also:
-
OPERATIONALTEMPLATE
-
deleteOperationalTemplate
boolean deleteOperationalTemplate(org.openehr.schemas.v1.OPERATIONALTEMPLATE template) Deletes a given operational template physically from cache and from template storage and from cache. Should only be executed if the template is no longer referenced by any Composition. Make sure you check for references before deleting a template otherwise this causes inconsistencies and no longer deliverable Composition entries.- Parameters:
template- - The template instance to delete- Returns:
- - Template has been deleted
-
resolveForTemplate
JsonPathQueryResult resolveForTemplate(String templateId, Collection<org.ehrbase.webtemplate.parser.NodeId> jsonQueryExpression) -
getConceptByConceptId
I_KnowledgeCache.ConceptValue getConceptByConceptId(int code, String language, BiFunction<Integer, String, I_KnowledgeCache.ConceptValue> provider) -
getConceptById
I_KnowledgeCache.ConceptValue getConceptById(UUID uuid, Function<UUID, I_KnowledgeCache.ConceptValue> provider) -
getConceptByDescription
I_KnowledgeCache.ConceptValue getConceptByDescription(String description, String language, BiFunction<String, String, I_KnowledgeCache.ConceptValue> provider) -
getTerritoryCodeByTwoLetterCode
I_KnowledgeCache.TerritoryValue getTerritoryCodeByTwoLetterCode(String territoryAsString, Function<String, I_KnowledgeCache.TerritoryValue> provider) -
getLanguageByCode
I_KnowledgeCache.LanguageValue getLanguageByCode(String languageCode, Function<String, I_KnowledgeCache.LanguageValue> provider)
-