Class AbstractPrescriberIntegrationModule
- java.lang.Object
-
- be.business.connector.common.module.AbstractIntegrationModule
-
- be.business.connector.recipe.prescriber.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 Summary
Fields Modifier and Type Field Description protected Map<String,be.ehealth.technicalconnector.service.kgss.domain.KeyResult>keyCacheThe key cache.protected KgssServicekgssServiceThe kgss service.protected be.recipe.api.PrescriptionContent.FactoryprescriptionContentFactorybe.recipe.api.prescriber.PrescriptionService.Ciphering.Simplifiedtarget-
Fields inherited from class be.business.connector.common.module.AbstractIntegrationModule
dataUnsealer, EHEALTH_SUCCESS_CODE_100, EHEALTH_SUCCESS_CODE_200, EHEALTH_SUCCESS_CODE_300, EHEALTH_SUCCESS_CODE_400, EHEALTH_SUCCESS_CODE_500
-
-
Constructor Summary
Constructors Constructor Description AbstractPrescriberIntegrationModule()Instantiates a new abstract prescriber integration module. @ the integration module exception
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckStatus(be.fgov.ehealth.commons.protocol.v1.ResponseType response)Check status.voidcheckStatus(ResponseType response)Check status.protected be.fgov.ehealth.commons.core.v1.IdentifierTypecreateIdentifierType(String id, String type)Creates the identifier type.SecuredContentTypecreateSecuredContentType(byte[] content)Creates the secured content type.be.recipe.api.Prescription.PlainTextget(be.recipe.api.prescriber.GetPrescription request)protected KmehrHelpergetKmehrHelper()Gets the kmehr helper.be.ehealth.technicalconnector.service.kgss.domain.KeyResultgetNewKey(String patientId)Gets the new key.protected be.ehealth.technicalconnector.service.kgss.domain.KeyResultgetNewKeyFromKgss(String patientId)protected byte[]getSealedData(GetPrescriptionStatusParam request)Gets the sealed data.protected byte[]getSealedData(ListOpenRidsParam listOpenRidsParam)Gets the sealed data.protected byte[]getSealedData(ListRidsHistoryParam listRidHistoryParam)Gets the sealed data.protected byte[]getSealedData(PutVisionParam putVisionParam)Gets the sealed data.protected byte[]getSealedData(ValidationPropertiesParam validationPropertiesParam)Gets the sealed data.be.recipe.api.prescriber.ListPrescriptions.PartialResult<be.recipe.api.prescriber.ListPrescriptions.Response.PlainText>list(be.recipe.api.prescriber.ListPrescriptions request)protected byte[]sealNotification(be.fgov.ehealth.etee.crypto.encrypt.EncryptionToken paramEncryptionToken, byte[] paramArrayOfByte)Seal notification.byte[]sealPrescriptionForUnknown(be.ehealth.technicalconnector.service.kgss.domain.KeyResult key, byte[] messageToProtect)Seal prescription for unknown.voidsetPersonalPassword(String personalPassword)Sets the personal password.protected byte[]unsealFeedback(byte[] message)Unseal feedback.voidupdate(be.recipe.api.prescriber.PutVisionOtherPrescribers request)protected voidvalidateCreatePrescriptionDTOs(List<CreatePrescriptionDTO> dtos)voidvalidateKmehr(byte[] prescription, String prescriptionType, String expirationDateFromRequest)Perform validation.-
Methods inherited from class be.business.connector.common.module.AbstractIntegrationModule
buildDefaultPage, extractExpirationDateFromKmehr, extractReferenceSourceVersionFromKmehr, getArchivedFilePath, getArchivedPrescription, getCurrentXMLGregorianCalendar, getEncryptionUtils, getEtkHelper, getId, getJaxContextCentralizer, getKeyFromKgss, getKeyFromKgss, getOldDataSealer, getOldDataUnsealer, getPropertyHandler, getSymmKey, init, initEncryption, sealRequest, setDataUnsealer, setOldDataSealer, setOldDataUnsealer, unsealForUnknown, unsealNotif, unsealNotiffeed, unsealNotifOld, unsealPrescriptionForUnknown, unsealRequest, unsealWithSymKey, unsealWithSymKey
-
-
-
-
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
-
-
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 idtype- 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 keymessageToProtect- 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 tokenparamArrayOfByte- 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 prescriptionprescriptionType- the prescription typeexpirationDateFromRequest- 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:
getin interfacebe.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:
listin interfacebe.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:
updatein interfacebe.recipe.api.prescriber.PutVisionOtherPrescribers.Command<be.recipe.api.prescriber.PutVisionOtherPrescribers>
-
-