Class AbstractExecutorIntegrationModule

    • Constructor Detail

      • AbstractExecutorIntegrationModule

        public AbstractExecutorIntegrationModule()
        Instantiates a new abstract executor integration module.
        Throws:
        IntegrationModuleException - the integration module exception
    • Method Detail

      • getKmehrHelper

        protected KmehrHelper getKmehrHelper()
        Gets the kmehr helper.
        Returns:
        the kmehr helper
      • getSealedRevokePrescriptionParam

        protected byte[] getSealedRevokePrescriptionParam​(String rid,
                                                          String reason,
                                                          String mandateHolderId,
                                                          MandateHolderType mandateHolderType)
        Gets the sealed revoke prescription param.
        Parameters:
        rid - the rid
        reason - the reason
        mandateHolderId - the mandateHolderId
        mandateHolderType - the mandateHolderType
        Returns:
        the sealed revoke prescription param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedMarkAsArchivedParam

        public byte[] getSealedMarkAsArchivedParam​(String rid,
                                                   String mandateHolderId,
                                                   MandateHolderType mandateHolderType)
        Gets the sealed mark as archived param.
        Parameters:
        rid - the rid
        mandateHolderId - the mandateHolderId
        mandateHolderType - the mandateHolderType
        Returns:
        the sealed mark as archived param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedMarkAsDeliveredParam

        public byte[] getSealedMarkAsDeliveredParam​(String rid,
                                                    String mandateHolderId,
                                                    MandateHolderType mandateHolderType)
        Gets the sealed mark as delivered param.
        Parameters:
        rid - the rid
        mandateHolderId - the mandateHolderId
        mandateHolderType - the mandateHolderType
        Returns:
        the sealed mark as delivered param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedMarkAsUnDeliveredParam

        public byte[] getSealedMarkAsUnDeliveredParam​(String rid,
                                                      String mandateHolderId,
                                                      MandateHolderType mandateHolderType)
        Gets the sealed data.
        Parameters:
        rid - the rid
        mandateHolderId - the mandateHolderId
        mandateHolderType - the mandateHolderType
        Returns:
        the sealed mark as undelivered param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedGetPrescriptionForExecutorParam

        public byte[] getSealedGetPrescriptionForExecutorParam​(String rid)
        Gets the sealed get prescription for executor param.
        Parameters:
        rid - the rid
        Returns:
        the sealed get prescription for executor param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedGetPrescriptionForExecutorParam

        protected byte[] getSealedGetPrescriptionForExecutorParam​(String rid,
                                                                  String patientId,
                                                                  String madateHolderId,
                                                                  MandateHolderType mandateHolderType,
                                                                  boolean alreadyDelivered)
        Gets the sealed get prescription for executor param.
        Parameters:
        rid - the rid
        patientId - the patient id
        Returns:
        the sealed get prescription for executor param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedCreateFeedbackParam

        protected byte[] getSealedCreateFeedbackParam​(byte[] feedbackText,
                                                      be.fgov.ehealth.etee.crypto.encrypt.EncryptionToken etkRecipient,
                                                      String rid,
                                                      String prescriberId,
                                                      String mandateHolderId,
                                                      MandateHolderType mandateHolderType)
                                               throws Exception
        Gets the sealed create feedback param.
        Parameters:
        feedbackText - the feedback text
        etkRecipient - the etk recipient
        rid - the rid
        prescriberId - the prescriber id
        Returns:
        the sealed create feedback param
        Throws:
        Exception - the exception
      • getSealedListNotificationsParam

        public byte[] getSealedListNotificationsParam​(boolean readFlag,
                                                      String mandateHoldeId,
                                                      MandateHolderType mandateHolderType)
        Gets the sealed list notifications param.
        Parameters:
        readFlag - the read flag
        Returns:
        the sealed list notifications param
        Throws:
        IntegrationModuleException - the integration module exception
      • getSealedData

        public byte[] getSealedData​(GetPrescriptionStatusParam getPrescriptionStatusParam)
        Gets the sealed data.
        Parameters:
        getPrescriptionStatusParam - the get prescription status param
        Returns:
        the sealed data
        Throws:
        IntegrationModuleException - the integration module exception
      • sealForRecipe

        protected <T> byte[] sealForRecipe​(T data,
                                           Class<T> type)
        Seal for recipe.
        Type Parameters:
        T - the generic type
        Parameters:
        data - the data
        type - the type
        Returns:
        the byte[]
        Throws:
        IntegrationModuleException - the integration module exception
      • createListNotificationItems

        protected List<ListNotificationsItem> createListNotificationItems​(byte[] sealedExecutorResponse)
        Creates the list notification items.
        Parameters:
        sealedExecutorResponse - the sealed executor response
        Returns:
        the list
        Throws:
        IntegrationModuleException - the integration module exception
      • checkStatus

        public void checkStatus​(be.fgov.ehealth.commons.protocol.v1.ResponseType responseType)
        Check status.
        Parameters:
        responseType - the response
        Throws:
        IntegrationModuleException - the integration module exception
      • checkResponseStatus

        protected void checkResponseStatus​(be.fgov.ehealth.commons.protocol.v2.StatusResponseType statusType)
      • checkStatus

        public void checkStatus​(ResponseType responseType)
        Check status.
        Parameters:
        responseType - the response
        Throws:
        IntegrationModuleException - the integration module exception
      • createIdentifierType

        protected be.fgov.ehealth.commons.core.v1.IdentifierType createIdentifierType​(String id,
                                                                                      String type)
        Creates the identifier type.
        Parameters:
        id - the id
        type - the type
        Returns:
        the identifier type
      • writeReservationsOnDisk

        protected void writeReservationsOnDisk​(ListReservationsParam listReservationsParam,
                                               ListReservationsResult listReservationsResult,
                                               Calendar lastSyncDate)
        Write reservations on disk.
        Parameters:
        listReservationsParam - the data
        listReservationsResult - the unsealed result
        lastSyncDate - the last sync date
        Throws:
        IntegrationModuleException - the integration module exception
      • writeLastDateToDisk

        protected void writeLastDateToDisk​(ListReservationsParam listReservationsParam,
                                           Calendar lastSyncDate)
        Write last date to disk.
        Parameters:
        listReservationsParam - the data
        lastSyncDate - the last sync date
        Throws:
        IntegrationModuleException - the integration module exception
      • readLastDateToDisk

        protected Calendar readLastDateToDisk()
        Read last date to disk.
        Returns:
        the calendar
        Throws:
        IntegrationModuleException - the integration module exception