Package in.cdac.medinfo.csnotk.csnolib.disb.api

## Interface IDISBAgent

- All Superinterfaces:
    `java.io.Serializable`
  All Known Implementing Classes:
    `DISBAgent`

      public interface IDISBAgent
      extends java.io.Serializable

  Library interface for application. It provides the basic methods to query the DISB for retrieving JSON for known concept identifiers.
  See Also:
    `SubstanceDetail`, `MedicineDetail`, `GenericDrug`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getGenericDetail​(java.lang.String conceptId)` | Retrives data from DISB
    `GenericDrug` | `getGenericDetailObj​(java.lang.String conceptId)` | Retrives data from DISB
    `java.lang.String` | `getMedicineDetail​(java.lang.String conceptId)` | Retrives data from DISB
    `MedicineDetail` | `getMedicineDetailObj​(java.lang.String conceptId)` | Retrives data from DISB
    `java.lang.String` | `getSubstanceDetail​(java.lang.String conceptId)` | Retrives data from DISB
    `SubstanceDetail` | `getSubstanceDetailObj​(java.lang.String conceptId)` | Retrives data from DISB
    `void` | `init()` | The method will configure the properties to default values. Protocol for sending request to DISB (default protocol: http). Hostname for remote application DISB (default hostname: localhost). Port for accessing on port to DISB (default port: 9090). Context for requesting to DISB (default context: dis). Location for logs.
    `void` | `init​(java.lang.String protocol, java.lang.String hostname, java.lang.Integer port, java.lang.String context, java.lang.String errorLogDir)` | The method will configure properties by values provided in parameters
    `void` | `testDISBConnection()` | For testing connnection with DISB on entered init properties.

- - ### Method Detail

    - #### getSubstanceDetail

          java.lang.String getSubstanceDetail​(java.lang.String conceptId)
                                       throws java.lang.IllegalArgumentException

      Retrives data from DISB
      Parameters:
        `conceptId` - SNOMED CT concept identifier for Substance
      Returns:
        JSON string of `SubstanceDetail` model
      Throws:
        `java.lang.IllegalArgumentException` - if invalid concept id is passed

    - #### getSubstanceDetailObj

          SubstanceDetail getSubstanceDetailObj​(java.lang.String conceptId)
                                         throws java.lang.IllegalArgumentException

      Retrives data from DISB
      Parameters:
        `conceptId` - SNOMED CT concept identifier for Substance
      Returns:
        `SubstanceDetail` model
      Throws:
        `java.lang.IllegalArgumentException` - if invalid concept id is passed

    - #### getMedicineDetail

          java.lang.String getMedicineDetail​(java.lang.String conceptId)
                                      throws java.lang.IllegalArgumentException

      Retrives data from DISB
      Parameters:
        `conceptId` - SNOMED CT concept identifier for Substance
      Returns:
        JSON string of `MedicineDetail` model
      Throws:
        `java.lang.IllegalArgumentException` - if invalid concept id is passed

    - #### getMedicineDetailObj

          MedicineDetail getMedicineDetailObj​(java.lang.String conceptId)
                                       throws java.lang.IllegalArgumentException

      Retrives data from DISB
      Parameters:
        `conceptId` - SNOMED CT concept identifier for Medicine
      Returns:
        `MedicineDetail` model
      Throws:
        `java.lang.IllegalArgumentException` - if invalid concept id is passed

    - #### getGenericDetail

          java.lang.String getGenericDetail​(java.lang.String conceptId)
                                     throws java.lang.IllegalArgumentException

      Retrives data from DISB
      Parameters:
        `conceptId` - SNOMED CT concept identifier for Generic
      Returns:
        JSON string of `GenericDrug` model
      Throws:
        `java.lang.IllegalArgumentException` - if invalid concept id is passed

    - #### getGenericDetailObj

          GenericDrug getGenericDetailObj​(java.lang.String conceptId)
                                   throws java.lang.IllegalArgumentException

      Retrives data from DISB
      Parameters:
        `conceptId` - SNOMED CT concept identifier for Generic
      Returns:
        `GenericDrug` model
      Throws:
        `java.lang.IllegalArgumentException` - if invalid concept id is passed

    - #### init

          void init()

      The method will configure the properties to default values.
      Protocol for sending request to DISB (default protocol: http).
      Hostname for remote application DISB (default hostname: localhost).
      Port for accessing on port to DISB (default port: 9090).
      Context for requesting to DISB (default context: dis).
      Location for logs. (default errorLogDir: user directory).

    - #### init

          void init​(java.lang.String protocol,
                    java.lang.String hostname,
                    java.lang.Integer port,
                    java.lang.String context,
                    java.lang.String errorLogDir)

      The method will configure properties by values provided in parameters
      Parameters:
        `protocol` - for sending request to DISB (default: http)
        `hostname` - for remote application DISB (default: localhost)
        `port` - for accessing on port to DISB (default: 9090)
        `context` - for requesting to DISB (default: dis)
        `errorLogDir` - location for logs.

    - #### testDISBConnection

          void testDISBConnection()
                           throws java.lang.IllegalArgumentException

      For testing connnection with DISB on entered init properties. If init() is being used then it will use default properties for DISB.
      Throws:
        `java.lang.IllegalArgumentException`