Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.ehealth.businessconnector.hub.session.impl
Class HubServiceImpl

    java.lang.Object
      be.ehealth.businessconnector.hub.session.impl.HubServiceImpl

All Implemented Interfaces:
  HubService

    public class HubServiceImpl

extends Object
implements HubService

As part of the Business Connector for General Practitioners, a Hub Consultation component is foreseen that provides connectivity to a local hub. As part of this component a set of 23 operations are available. They can be grouped as follows:

- Transactions: Put, Get, Revoke, Get List, Declare
- Request Publication
- Health Care Party: Get, Put
- Patient: Get, Put
- Health Care Party Consent: Put, Get, Revoke
- Patient Consent: Put, Get, Revoke
- Therapeutic Link: Put, Get, Revoke
- Access Right: Put, Get, Revoke
- Get Patient Audit Trail

The Hub Consultation component, part of the Business Connector for General Practitioners, provides a simple API to access the wide range of hub operations. It hides the complexity on both functional and technical level (web service communication, simplified data interface, handles encryption/decryption, etc).

The following principles have been applied while defining the interface for the set of operations:

- The request/response messages exchanged with the hub system include a header element that includes some general information related to the message and sender. This information will be added automatically, no intervention is required by the client application using the API. The necessary information will be retrieved from the Business Connector's configuration file.
- The Kmehr XML format is used extensively to structure data elements that are exchanged between hubs, hospitals and a General Practitioner. Whenever a Kmehr document is requested as input parameter or provided as response, the Kmehr XML format is foreseen as interface for the operation. This means that the client application must provide a valid Kmehr XML structure as input or will receive a Kmehr XML structure as response for certain operations.
- As medical information is exchanged, the sensitive data will be encrypted using the end-to-end encryption framework. The Hub Consultation component will take care of the encryption/decryption of the content.

Implementation of `HubService`

Constructor Summary
`HubServiceImpl(SessionValidator sessionValidator)` Instantiates a new Hub Service.

Method Summary
`List<IDKMEHR>` | `declareTransaction(KmehrHeaderDeclareTransaction kmehrHeader)` This operation should be used to declare a transaction within a hub.
`AccessRightListType` | `getAccessRight(TransactionIdType transaction)` This operation should be used to get access rights on a transaction within a hub.
`HCPartyAdaptedType` | `getHCParty(HCPartyIdType hcParty)` This operation should be used to retrieve the data associated with a healthcare party within a hub.
`ConsentHCPartyType` | `getHCPartyConsent(HCPartyIdType hcPartyId)` This operation should be used to retrieve the consent of a healthcare party within a hub.
`PersonType` | `getPatient(PatientIdType patientId)` This operation should be used to declare the consent of an healthcare party within a hub.
`TransactionAccessListType` | `getPatientAuditTrail(SelectGetPatientAuditTrailType patientAuditTrail)` This operation should be used to get the list of transaction accesses for a given patient.
`ConsentType` | `getPatientConsent(SelectGetPatientConsentType patientConsent)` This operation should be used to retrieve the consent of a patient within a hub.
`Collection<TherapeuticLinkType>` | `getTherapeuticLink(SelectGetHCPartyPatientConsentType patientConsent)` This operation should be used to get therapeutic link between a patient and a healthcare party within a hub.
`Kmehrmessage` | `getTransaction(PatientIdType patient, TransactionBaseType transaction)` This operation should be used to retrieve a transaction (given a transaction identifier) within a hub.
`KmehrHeaderGetTransactionList` | `getTransactionList(PatientIdType patient, LocalSearchType searchType, TransactionWithPeriodType transaction)` This operation should be used to get the list of available transactions that fulfill some given criteria.
`void` | `putAccessRight(AccessRightType accessRight)` This operation should be used to put an access right on a transaction within a hub.
`HCPartyAdaptedType` | `putHCParty(HCPartyAdaptedType hcParty)` This operation should be used to create a healthcare party within a hub.
`void` | `putHCPartyConsent(ConsentHCPartyType consent)` This operation should be used to declare the consent of an healthcare party within a hub.
`PersonType` | `putPatient(PersonType patient)` This operation should be used to create a patient within a hub.
`void` | `putPatientConsent(ConsentType patientConsent)` This operation should be used to declare the consent of a patient within a hub.
`void` | `putTherapeuticLink(TherapeuticLinkType therapeuticLink)` This operation should be used to declare therapeutic link between a patient and a healthcare party within a hub.
`void` | `putTransaction(Kmehrmessage kmehrHeader)` This operation should be used to declare and to store a given transaction within a hub.
`void` | `requestPublication(PatientIdType patient, TransactionWithPeriodType transaction, String comment)` This operation allows a healthcare party to ask to another healthcare party to publish documents related to a patient.
`void` | `revokeAccessRight(SelectRevokeAccessRightType accessRight)` This operation should be used to revoke access right on a transaction within a hub.
`void` | `revokeHCPartyConsent(ConsentHCPartyType consent)` This operation should be used to revoke the consent of a healthcare party within a hub.
`void` | `revokePatientConsent(ConsentType patientConsent)` This operation should be used to revoke the consent of a patient within a hub.
`void` | `revokeTherapeuticLink(TherapeuticLinkType therapeuticLink)` This operation should be used to revoke a therapeutic link between a patient and a healthcare party within a hub.
`void` | `revokeTransaction(PatientIdType patient, TransactionIdType transaction)` This operation should be used to 'unpublish' a given transaction.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HubServiceImpl

    public HubServiceImpl(SessionValidator sessionValidator)
                   throws TechnicalConnectorException,
                          IntraHubBusinessConnectorException

  Instantiates a new Hub Service.

  Parameters:
    `sessionValidator` - the session validator
  Throws:
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

Method Detail

### declareTransaction

    public List<IDKMEHR> declareTransaction(KmehrHeaderDeclareTransaction kmehrHeader)
                                     throws TechnicalConnectorException,
                                            IntraHubBusinessConnectorException

  This operation should be used to declare a transaction within a hub.

  Specified by:
    `declareTransaction` in interface `HubService`
  Parameters:
    `kmehrHeader` - A Kmehr message formatted as XML String containing a Patient and a Transaction.
  Returns:
    A list of Transaction ID's.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException`

### putTransaction

    public void putTransaction(Kmehrmessage kmehrHeader)
                        throws TechnicalConnectorException,
                               IntraHubBusinessConnectorException

  This operation should be used to declare and to store a given transaction within a hub.

  Specified by:
    `putTransaction` in interface `HubService`
  Parameters:
    `kmehrHeader` - A Kmehr message formatted as XML String containing a Patient and a Transaction.
  Throws:
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException`

### revokeTransaction

    public void revokeTransaction(PatientIdType patient,
                                  TransactionIdType transaction)
                           throws TechnicalConnectorException,
                                  IntraHubBusinessConnectorException

  This operation should be used to 'unpublish' a given transaction.

  Specified by:
    `revokeTransaction` in interface `HubService`
  Parameters:
    `patient` - Patient for which to revoke the transaction.
    `transaction` - Transaction to revoke.
  Throws:
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException`

### getTransactionList

    public KmehrHeaderGetTransactionList getTransactionList(PatientIdType patient,
                                                            LocalSearchType searchType,
                                                            TransactionWithPeriodType transaction)
                                                     throws TechnicalConnectorException,
                                                            IntraHubBusinessConnectorException

  This operation should be used to get the list of available transactions that fulfill some given criteria.

  Specified by:
    `getTransactionList` in interface `HubService`
  Parameters:
    `patient` - Patient for which to retrieve the transaction list.
    `searchType` - The search type (local or national)
    `transaction` - Transaction types to search.
  Returns:
    A Kmehr message formatted as XML String containing a Patient and 1 or more Transactions.
  Throws:
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### getTransaction

    public Kmehrmessage getTransaction(PatientIdType patient,
                                       TransactionBaseType transaction)
                                throws TechnicalConnectorException,
                                       IntraHubBusinessConnectorException

  This operation should be used to retrieve a transaction (given a transaction identifier) within a hub.

  Specified by:
    `getTransaction` in interface `HubService`
  Parameters:
    `patient` - Patient for which to retrieve the transaction.
    `transaction` - Transaction identification
  Returns:
    the transaction
  Throws:
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### requestPublication

    public void requestPublication(PatientIdType patient,
                                   TransactionWithPeriodType transaction,
                                   String comment)
                            throws TechnicalConnectorException,
                                   IntraHubBusinessConnectorException

  This operation allows a healthcare party to ask to another healthcare party to publish documents related to a patient.

  Specified by:
    `requestPublication` in interface `HubService`
  Parameters:
    `patient` - The Patient for who the ation is.
    `transaction` - Transaction types and Health Care Parties
    `comment` - Comment
  Throws:
    `IntraHubBusinessConnectorException`
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception

### getHCParty

    public HCPartyAdaptedType getHCParty(HCPartyIdType hcParty)
                                  throws TechnicalConnectorException,
                                         IntraHubBusinessConnectorException

  This operation should be used to retrieve the data associated with a healthcare party within a hub.

  Specified by:
    `getHCParty` in interface `HubService`
  Parameters:
    `hcParty` - This is the NIHII or SSIN number according to the type of healthcare party. Other local identifiers are allowed.
  Returns:
    Information about the healthcare party
  Throws:
    `IntraHubBusinessConnectorException`
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception

### putHCParty

    public HCPartyAdaptedType putHCParty(HCPartyAdaptedType hcParty)
                                  throws TechnicalConnectorException,
                                         IntraHubBusinessConnectorException

  This operation should be used to create a healthcare party within a hub. It can also be used to update the information about this healthcare party.

  Specified by:
    `putHCParty` in interface `HubService`
  Parameters:
    `hcParty` - Information about the healthcare party
  Returns:
    Information about the healthcare party
  Throws:
    `IntraHubBusinessConnectorException`
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception

### putHCPartyConsent

    public void putHCPartyConsent(ConsentHCPartyType consent)
                           throws TechnicalConnectorException,
                                  IntraHubBusinessConnectorException

  This operation should be used to declare the consent of an healthcare party within a hub.

  Specified by:
    `putHCPartyConsent` in interface `HubService`
  Parameters:
    `consent` - A Consent containing a HCParty and the signature date.
  Throws:
    `IntraHubBusinessConnectorException`
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception

### getHCPartyConsent

    public ConsentHCPartyType getHCPartyConsent(HCPartyIdType hcPartyId)
                                         throws TechnicalConnectorException,
                                                IntraHubBusinessConnectorException

  This operation should be used to retrieve the consent of a healthcare party within a hub.

  Specified by:
    `getHCPartyConsent` in interface `HubService`
  Parameters:
    `hcPartyId` - This is the NIHII or INSS number according to the type of healthcare party. Other local identifiers are allowed.
  Returns:
    A Consent containing a HCParty and the signature date.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### revokeHCPartyConsent

    public void revokeHCPartyConsent(ConsentHCPartyType consent)
                              throws TechnicalConnectorException,
                                     IntraHubBusinessConnectorException

  This operation should be used to revoke the consent of a healthcare party within a hub.

  Specified by:
    `revokeHCPartyConsent` in interface `HubService`
  Parameters:
    `consent` - A Consent containing a HCParty and the signature date.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException`

### putPatient

    public PersonType putPatient(PersonType patient)
                          throws TechnicalConnectorException,
                                 IntraHubBusinessConnectorException

  This operation should be used to create a patient within a hub. It can also be used to update the information about a patient.

  Specified by:
    `putPatient` in interface `HubService`
  Parameters:
    `patient` - Information about a patient
  Returns:
    Information about a patient.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### getPatient

    public PersonType getPatient(PatientIdType patientId)
                          throws TechnicalConnectorException,
                                 IntraHubBusinessConnectorException

  This operation should be used to declare the consent of an healthcare party within a hub.

  Specified by:
    `getPatient` in interface `HubService`
  Parameters:
    `patientId` - Patient contains only the identifiers of the patient. Several identifiers of the same patient are allowed.
  Returns:
    Information about a patient.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### putPatientConsent

    public void putPatientConsent(ConsentType patientConsent)
                           throws TechnicalConnectorException,
                                  IntraHubBusinessConnectorException

  This operation should be used to declare the consent of a patient within a hub.

  Specified by:
    `putPatientConsent` in interface `HubService`
  Parameters:
    `patientConsent` - Patient Consent data structure that contains signing date of the consent, scope of the consent, 'retrospective'/ 'prospective' attribute.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### getPatientConsent

    public ConsentType getPatientConsent(SelectGetPatientConsentType patientConsent)
                                  throws TechnicalConnectorException,
                                         IntraHubBusinessConnectorException

  This operation should be used to retrieve the consent of a patient within a hub.

  Specified by:
    `getPatientConsent` in interface `HubService`
  Parameters:
    `patientConsent` - Contains the Patient Identifiers and the scope of the consent
  Returns:
    Patient Consent data structure that contains signing date of the consent, scope of the consent, 'retrospective' 'prospective' attribute.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### revokePatientConsent

    public void revokePatientConsent(ConsentType patientConsent)
                              throws TechnicalConnectorException,
                                     IntraHubBusinessConnectorException

  This operation should be used to revoke the consent of a patient within a hub.

  Specified by:
    `revokePatientConsent` in interface `HubService`
  Parameters:
    `patientConsent` - Patient Consent data structure that contains signing date of the consent, scope of the consent, 'retrospective' 'prospective' attribute.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### putTherapeuticLink

    public void putTherapeuticLink(TherapeuticLinkType therapeuticLink)
                            throws ConnectorException,
                                   SessionManagementException

  This operation should be used to declare therapeutic link between a patient and a healthcare party within a hub.

  Specified by:
    `putTherapeuticLink` in interface `HubService`
  Parameters:
    `therapeuticLink` - A Therapeutic link containing Patient Identifier, HCP identifier, Link type, link start date , link end date (optional), comment (optional)).
  Throws:
    `SessionManagementException`
    `ConnectorException`

### getTherapeuticLink

    public Collection<TherapeuticLinkType> getTherapeuticLink(SelectGetHCPartyPatientConsentType patientConsent)
                                                       throws ConnectorException

  This operation should be used to get therapeutic link between a patient and a healthcare party within a hub.

  Specified by:
    `getTherapeuticLink` in interface `HubService`
  Parameters:
    `patientConsent` - Contains the Patient Identifiers and the scope of the consent
  Returns:
    the therapeutic link
  Throws:
    `ConnectorException`
    `SessionManagementException` - the session management exception

### revokeTherapeuticLink

    public void revokeTherapeuticLink(TherapeuticLinkType therapeuticLink)
                               throws TechnicalConnectorException,
                                      IntraHubBusinessConnectorException

  This operation should be used to revoke a therapeutic link between a patient and a healthcare party within a hub.

  Specified by:
    `revokeTherapeuticLink` in interface `HubService`
  Parameters:
    `therapeuticLink` - the therapeutic link
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### putAccessRight

    public void putAccessRight(AccessRightType accessRight)
                        throws TechnicalConnectorException,
                               IntraHubBusinessConnectorException

  This operation should be used to put an access right on a transaction within a hub.

  Specified by:
    `putAccessRight` in interface `HubService`
  Parameters:
    `accessRight` - the access right
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### getAccessRight

    public AccessRightListType getAccessRight(TransactionIdType transaction)
                                       throws TechnicalConnectorException,
                                              IntraHubBusinessConnectorException

  This operation should be used to get access rights on a transaction within a hub.

  Specified by:
    `getAccessRight` in interface `HubService`
  Parameters:
    `transaction` - A transaction ID Type containing the Transaction Identifier.
  Returns:
    The List of access rights on a transaction. Can be empty.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### revokeAccessRight

    public void revokeAccessRight(SelectRevokeAccessRightType accessRight)
                           throws TechnicalConnectorException,
                                  IntraHubBusinessConnectorException

  This operation should be used to revoke access right on a transaction within a hub.

  Specified by:
    `revokeAccessRight` in interface `HubService`
  Parameters:
    `accessRight` - Contains a transaction and a HC Party
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

### getPatientAuditTrail

    public TransactionAccessListType getPatientAuditTrail(SelectGetPatientAuditTrailType patientAuditTrail)
                                                   throws TechnicalConnectorException,
                                                          IntraHubBusinessConnectorException

  This operation should be used to get the list of transaction accesses for a given patient.

  Specified by:
    `getPatientAuditTrail` in interface `HubService`
  Parameters:
    `patientAuditTrail` - Contains the search parameters for the audit trail.
  Returns:
    A list of Transaction Access elements.
  Throws:
    `SessionManagementException`
    `TechnicalConnectorException` - the technical connector exception
    `IntraHubBusinessConnectorException` - the business connector exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Connector Packaging PHYSIOTHERAPIST 3.15.1 API
Copyright © {inceptionYear}-2018 eHealth. All Rights Reserved.