Interface TemplateService

All Superinterfaces:
BaseService

public interface TemplateService extends BaseService
  • Method Details

    • getAllTemplates

      List<org.ehrbase.response.ehrscape.TemplateMetaDataDto> getAllTemplates()
    • buildExample

      com.nedap.archie.rm.composition.Composition buildExample(String templateId)
    • findTemplate

      org.ehrbase.webtemplate.model.WebTemplate findTemplate(String templateId)
    • findOperationalTemplate

      String findOperationalTemplate(String templateId, OperationalTemplateFormat format) throws RuntimeException
      Finds and returns the given operational template as string represented in requested format.
      Parameters:
      templateId - - Unique name of operational template
      format - - As enum value from OperationalTemplateFormat
      Returns:
      Throws:
      RuntimeException - When the template couldn't be found, the format isn't support or in case of another error.
    • create

      String create(org.openehr.schemas.v1.OPERATIONALTEMPLATE content)
    • adminDeleteTemplate

      boolean adminDeleteTemplate(String templateId)
      Deletes a given template from storage physically. The template is no longer available. If you try to delete a template that is used in at least one Composition Entry or in one history entry the deletion will be rejected.
      Parameters:
      templateId - - Template id to delete, e.g. "IDCR Allergies List.v0"
      Returns:
      - Whether the template could be removed or not
    • adminUpdateTemplate

      String adminUpdateTemplate(String templateId, String content)
      Replaces a given template in the storage and updates the cache with the new template content. Will be rejected if the template has referencing Compositions.
      Parameters:
      templateId - - Tempalte id to update, e.g. "IDCR Allergies List.v0"
      content - - New content to overwrite the template with
      Returns:
      - New template id
    • adminDeleteAllTemplates

      int adminDeleteAllTemplates()
      Deletes all templates from target template storage and returns the number of deleted templates. If any template is referenced by at least one Composition the deletion will be rejected and no template will be removed.
      Returns:
      - Number of deleted templates