be.ehealth.businessconnector.chapterIV.builders.impl

## Class ConsultationBuilderImpl

- java.lang.Object
- - be.ehealth.businessconnector.chapterIV.builders.impl.ConsultationBuilderImpl

- All Implemented Interfaces:
    ConsultationBuilder, ConfigurationModuleBootstrap.ModuleBootstrapHook

      public final class ConsultationBuilderImpl
      extends Object
      implements ConsultationBuilder, ConfigurationModuleBootstrap.ModuleBootstrapHook

  A builder for the chapter IV consultation service. Implements : `ConsultationBuilder`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConsultationBuilderImpl()` default constructor, only needed for ModuleBootstrapHook.
    `ConsultationBuilderImpl(CommonBuilder commonBuilder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `bootstrap()`
    `ChapterIVBuilderResponse` | `build(FolderType folder, boolean isTest, ChapterIVReferences references, org.joda.time.DateTime agreementStartDate)`
    `ConsultChap4MedicalAdvisorAgreementRequest` | `buildRequest(FolderType folder, boolean isTest, ChapterIVReferences references, org.joda.time.DateTime agreementStartDate)`
    `ConsultChap4MedicalAdvisorAgreementRequest` | `buildRequest(FolderType folder, boolean isTest, String commonReference, String commonNIPReference, org.joda.time.DateTime agreementStartDate)` builds the `ConsultChap4MedicalAdvisorAgreementRequest` the folder should contain at least the following elements for the connector to work : the ids list in folder.patient.ids should contain at least one id.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConsultationBuilderImpl

          public ConsultationBuilderImpl(CommonBuilder commonBuilder)

    - #### ConsultationBuilderImpl

          public ConsultationBuilderImpl()

      default constructor, only needed for ModuleBootstrapHook.

  - ### Method Detail

    - #### buildRequest

          public ConsultChap4MedicalAdvisorAgreementRequest buildRequest(FolderType folder,
                                                                         boolean isTest,
                                                                         String commonReference,
                                                                         String commonNIPReference,
                                                                         org.joda.time.DateTime agreementStartDate)
                                                                  throws ChapterIVBusinessConnectorException,
                                                                         TechnicalConnectorException

      Description copied from interface: `ConsultationBuilder`
      builds the `ConsultChap4MedicalAdvisorAgreementRequest` the folder should contain at least the following elements for the connector to work :
      - the ids list in folder.patient.ids should contain at least one id. for the agreementStartDate parameter utility method is proviced in `FolderTypeUtils` .retrieveConsultationStartDateOrAgreementStartDate(FolderType folder), if this value is null you need to provide the agreementStartDate yourself , following the chapterIV documentation
      Specified by:
        `buildRequest` in interface `ConsultationBuilder`
      Parameters:
        `folder` - `FolderType` contains the information to retrieve/send
        `isTest` - boolean indicating if this message is a test or not
        `commonReference` - String used to fill out commonReference field in CommonInput tag
        `commonNIPReference` - String used to fill out commonNipReference field in CommonInput tag
        `agreementStartDate` - not nullable : the agreementStartDate to be used in the request for the webservice : value : see documentation chapterIV
      Returns:
        ConsultChap4MedicalAdvisorAgreementRequest
      Throws:
        `ChapterIVBusinessConnectorException`
        `TechnicalConnectorException`
      See Also:
        `be.ehealth.businessconnector.chapterIV.builders.ConsultationBuilder#buildRequest(be.fgov.ehealth.standards.kmehr.schema.v1.FolderType, boolean, java.lang.String, java.lang.String, String)`

    - #### buildRequest

          public ConsultChap4MedicalAdvisorAgreementRequest buildRequest(FolderType folder,
                                                                         boolean isTest,
                                                                         ChapterIVReferences references,
                                                                         org.joda.time.DateTime agreementStartDate)
                                                                  throws ChapterIVBusinessConnectorException,
                                                                         TechnicalConnectorException

      Specified by:
        `buildRequest` in interface `ConsultationBuilder`
      Parameters:
        `folder` - `FolderType` contains the information to retrieve/send
        `isTest` - boolean indicating if this message is a test or not
        `references` - contains all the references needed by ChapterIV
        `agreementStartDate` - not nullable : the agreementStartDate to be used in the request for the webservice : value : see documentation chapterIV
      Returns:
        filled out ConsultChap4MedicalAdvisorAgreementRequest
      Throws:
        `ChapterIVBusinessConnectorException`
        `TechnicalConnectorException`
      See Also:
        `ConsultationBuilder.buildRequest(be.fgov.ehealth.standards.kmehr.schema.v1.FolderType, boolean, be.ehealth.businessconnector.chapterIV.domain.ChapterIVReferences, org.joda.time.DateTime)`

    - #### build

          public ChapterIVBuilderResponse build(FolderType folder,
                                                boolean isTest,
                                                ChapterIVReferences references,
                                                org.joda.time.DateTime agreementStartDate)
                                         throws ChapterIVBusinessConnectorException,
                                                TechnicalConnectorException

      Specified by:
        `build` in interface `ConsultationBuilder`
      Parameters:
        `folder` - `FolderType` contains the information to retrieve/send
        `isTest` - boolean indicating if this message is a test or not
        `references` - contains all the references needed by ChapterIV
        `agreementStartDate` - not nullable : the agreementStartDate to be used in the request for the webservice : value : see documentation chapterIV
      Returns:
        filled out ConsultChap4MedicalAdvisorAgreementRequest
      Throws:
        `ChapterIVBusinessConnectorException`
        `TechnicalConnectorException`
      See Also:
        `ConsultationBuilder.build(be.fgov.ehealth.standards.kmehr.schema.v1.FolderType, boolean, be.ehealth.businessconnector.chapterIV.domain.ChapterIVReferences, org.joda.time.DateTime)`

    - #### bootstrap

          public void bootstrap()

      Specified by:
        `bootstrap` in interface `ConfigurationModuleBootstrap.ModuleBootstrapHook`

Connector Packaging PERSPHYSICIAN 4.8.6 API
Copyright © {inceptionYear}-2026 eHealth. All Rights Reserved.