Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ProductGroup

Product Group class

Hierarchy

  • BasicFunctions
    • ProductGroup

Index

Constructors

constructor

  • new ProductGroup(__namedParameters?: { coreObject?: CoreObject; name?: string; products?: {} }): ProductGroup
  • Parameters

    • __namedParameters: { coreObject?: CoreObject; name?: string; products?: {} } = {}
      • Optional coreObject?: CoreObject
      • Optional name?: string
      • Optional products?: {}

    Returns ProductGroup

Properties

coreObject

coreObject: CoreObject

CLA Wrapper attribute. Object used to send API requests and store technical information. Must be the same object for all classes within an instance of a CdiscLibrary class.

Optional href

href: string

CDISC Library API endpoint.

name

name: string

Product group name.

products

products: {}

An object with products.

Type declaration

Methods

getFullProduct

  • getFullProduct(alias: string, loadBasicInfo?: boolean): Promise<Product>
  • Get an object with a fully loaded product by name or alias

    Parameters

    • alias: string

      Product name alias

    • Optional loadBasicInfo: boolean

      If true, will load only basic product details. By default a full product is loaded.

    Returns Promise<Product>

    Product

getItemGroup

  • getItemGroup(name: string, productAlias: string, options?: GetItemGroupOptions): Promise<string | ItemGroupType>
  • Get a dataset/dataStructure/domain for a specific product

    Parameters

    • name: string

      Dataset name

    • productAlias: string

      Product name alias. Examples: sdtmig3-3, sdtm1.7, adamig11.

    • Optional options: GetItemGroupOptions

      {@link GetItemGroupOptions}

    Returns Promise<string | ItemGroupType>

    Dataset/DataStruture/Domain

getItemGroups

  • getItemGroups(productAlias: string, options?: GetItemGroupsOptions): Promise<ItemGroups>
  • Get an object with all datasets/domains/dataStructure
    This method does not update the main object

    Parameters

    • productAlias: string

      Product alias

    • Optional options: GetItemGroupsOptions

      {@link GetItemGroupsOptions}

    Returns Promise<ItemGroups>

    An object with datasets/domains/dataStructures
    In case options.short is set to true, only name and label for each itemGroup are returned. This approach does not load the full product and loads only the dataset information from the CDISC Library.

getProductIdByAlias

  • getProductIdByAlias(alias: string): { productId: string }
  • Get a product ID by alias or substring, e.g., adamig11 agamig1-1 adamig1.1 will return { productId: 'adamig-1-1' }.

    Parameters

    • alias: string

    Returns { productId: string }

    Product ID

    • productId: string

getProductList

  • getProductList(format?: "json" | "csv"): object | string[]
  • Get a list of product IDs

    Parameters

    • format: "json" | "csv" = 'json'

      Specifies the output format. Possible values: json, csv.

    Returns object | string[]

    List of product names (IDs)

getProducts

  • getProducts(): {}

getRawResponse

  • getRawResponse(href?: string): Promise<object>
  • Get raw API response

    Parameters

    • Optional href: string

      CDISC Library API endpoint. If not specified, href attribute of the object is used.

    Returns Promise<object>

    Returns a JSON response if the request was successfull, otherwise returns undefined.

load

  • load(href?: string): Promise<boolean>
  • Load object from the CDISC Library

    Parameters

    • Optional href: string

      CDISC Library API endpoint. If not specified, href attribute of the object is used.

    Returns Promise<boolean>

    Returns true in the object was successfully loaded, false otherwise

parseResponse

  • parseResponse(pgRaw: object[], name: string): void
  • Parse API response to product groups

    Parameters

    • pgRaw: object[]

      Raw CDISC API response

    • name: string

      name

    Returns void

toSimpleObject

  • toSimpleObject(): any
  • Convert class to a simple object, removes methods and technical elements (e.g., coreObject).

    Returns any

    A new object

Generated using TypeDoc