Class AbstractPrescriberIntegrationModule

  • All Implemented Interfaces:
    be.recipe.api.prescriber.GetPrescription.Command<be.recipe.api.prescriber.GetPrescription,​be.recipe.api.Prescription.PlainText>, be.recipe.api.prescriber.ListPrescriptions.Command<be.recipe.api.prescriber.ListPrescriptions,​be.recipe.api.prescriber.ListPrescriptions.Response.PlainText>, be.recipe.api.prescriber.PutVisionOtherPrescribers.Command<be.recipe.api.prescriber.PutVisionOtherPrescribers>
    Direct Known Subclasses:
    HospitalPrescriberIntegrationModuleDevV4Impl, HospitalPrescriberIntegrationModuleV4Impl, PrescriberIntegrationModuleDevV4Impl, PrescriberIntegrationModuleV4Impl

    public abstract class AbstractPrescriberIntegrationModule
    extends AbstractIntegrationModule
    implements be.recipe.api.prescriber.ListPrescriptions.Command<be.recipe.api.prescriber.ListPrescriptions,​be.recipe.api.prescriber.ListPrescriptions.Response.PlainText>, be.recipe.api.prescriber.PutVisionOtherPrescribers.Command<be.recipe.api.prescriber.PutVisionOtherPrescribers>, be.recipe.api.prescriber.GetPrescription.Command<be.recipe.api.prescriber.GetPrescription,​be.recipe.api.Prescription.PlainText>
    The Class AbstractPrescriberIntegrationModule.
    • Field Detail

      • target

        public final be.recipe.api.prescriber.PrescriptionService.Ciphering.Simplified target
      • keyCache

        protected Map<String,​be.ehealth.technicalconnector.service.kgss.domain.KeyResult> keyCache
        The key cache.
      • kgssService

        protected KgssService kgssService
        The kgss service.
      • prescriptionContentFactory

        protected be.recipe.api.PrescriptionContent.Factory prescriptionContentFactory
    • Constructor Detail

      • AbstractPrescriberIntegrationModule

        public AbstractPrescriberIntegrationModule()
        Instantiates a new abstract prescriber integration module. @ the integration module exception
    • Method Detail

      • checkStatus

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

        public void checkStatus​(ResponseType response)
        Check status.
        Parameters:
        response - the response @ 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
      • setPersonalPassword

        public void setPersonalPassword​(String personalPassword)
        Sets the personal password.
        Parameters:
        personalPassword - the new personal password @ the integration module exception
      • getKmehrHelper

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

        protected byte[] getSealedData​(ValidationPropertiesParam validationPropertiesParam)
        Gets the sealed data.
        Parameters:
        validationPropertiesParam - the validation properties param
        Returns:
        the sealed data @ the integration module exception
      • getNewKey

        public be.ehealth.technicalconnector.service.kgss.domain.KeyResult getNewKey​(String patientId)
        Gets the new key.
        Parameters:
        patientId - the patient id
        Returns:
        the new key @ the integration module exception
      • getNewKeyFromKgss

        protected be.ehealth.technicalconnector.service.kgss.domain.KeyResult getNewKeyFromKgss​(String patientId)
      • sealPrescriptionForUnknown

        public byte[] sealPrescriptionForUnknown​(be.ehealth.technicalconnector.service.kgss.domain.KeyResult key,
                                                 byte[] messageToProtect)
        Seal prescription for unknown.
        Parameters:
        key - the key
        messageToProtect - the message to protect
        Returns:
        the byte[] @ the integration module exception
      • unsealFeedback

        protected byte[] unsealFeedback​(byte[] message)
        Unseal feedback.
        Parameters:
        message - the message
        Returns:
        the byte[] @ the integration module exception
      • sealNotification

        protected byte[] sealNotification​(be.fgov.ehealth.etee.crypto.encrypt.EncryptionToken paramEncryptionToken,
                                          byte[] paramArrayOfByte)
        Seal notification.
        Parameters:
        paramEncryptionToken - the param encryption token
        paramArrayOfByte - the param array of byte
        Returns:
        the byte[] @ the integration module exception
      • getSealedData

        protected byte[] getSealedData​(ListRidsHistoryParam listRidHistoryParam)
        Gets the sealed data.
        Parameters:
        listRidHistoryParam - the request
        Returns:
        the sealed data @ the integration module exception
      • getSealedData

        protected byte[] getSealedData​(GetPrescriptionStatusParam request)
        Gets the sealed data.
        Parameters:
        request - the request
        Returns:
        the sealed data @ the integration module exception
      • getSealedData

        protected byte[] getSealedData​(PutVisionParam putVisionParam)
        Gets the sealed data.
        Parameters:
        putVisionParam - the request
        Returns:
        the sealed data @ the integration module exception
      • getSealedData

        protected byte[] getSealedData​(ListOpenRidsParam listOpenRidsParam)
        Gets the sealed data.
        Parameters:
        listOpenRidsParam - the request
        Returns:
        the sealed data @ the integration module exception
      • validateCreatePrescriptionDTOs

        protected void validateCreatePrescriptionDTOs​(List<CreatePrescriptionDTO> dtos)
        Parameters:
        dtos - the dtos
      • validateKmehr

        public void validateKmehr​(byte[] prescription,
                                  String prescriptionType,
                                  String expirationDateFromRequest)
        Perform validation.
        Parameters:
        prescription - the prescription
        prescriptionType - the prescription type
        expirationDateFromRequest - the expiration date from request @ the integration module exception
      • createSecuredContentType

        public SecuredContentType createSecuredContentType​(byte[] content)
        Creates the secured content type.
        Parameters:
        content - the content
        Returns:
        the secured content type
      • get

        public be.recipe.api.Prescription.PlainText get​(be.recipe.api.prescriber.GetPrescription request)
        Specified by:
        get in interface be.recipe.api.prescriber.GetPrescription.Command<be.recipe.api.prescriber.GetPrescription,​be.recipe.api.Prescription.PlainText>
      • list

        public be.recipe.api.prescriber.ListPrescriptions.PartialResult<be.recipe.api.prescriber.ListPrescriptions.Response.PlainText> list​(be.recipe.api.prescriber.ListPrescriptions request)
        Specified by:
        list in interface be.recipe.api.prescriber.ListPrescriptions.Command<be.recipe.api.prescriber.ListPrescriptions,​be.recipe.api.prescriber.ListPrescriptions.Response.PlainText>
      • update

        public void update​(be.recipe.api.prescriber.PutVisionOtherPrescribers request)
        Specified by:
        update in interface be.recipe.api.prescriber.PutVisionOtherPrescribers.Command<be.recipe.api.prescriber.PutVisionOtherPrescribers>