Options
All
  • Public
  • Public/Protected
  • All
Menu

Product class

Hierarchy

  • BasicFunctions
    • Product

Index

Constructors

constructor

  • new Product(__namedParameters?: ProductParameters): Product
  • Parameters

    • __namedParameters: ProductParameters = {}

    Returns Product

Properties

Optional codelists

codelists: {}

CDISC Library attribute.

Type declaration

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 dataClasses

dataClasses: {}

CDISC Library attribute.

Type declaration

Optional dataStructures

dataStructures: {}

CDISC Library attribute.

Type declaration

Optional datasetType

datasetType: "dataStructures" | "dataClasses" | "domains" | "datasets" | "codelists"

CLA Wrapper attribute. Name of the attribute which contains child groups (e.g., dataStructures, dataClasses, domains, codelits)

Optional dependencies

dependencies: {}

CLA Wrapper attribute. Model and Prior version.

Type declaration

  • [name: string]: ProductDependency

Optional description

description: string

CDISC Library attribute.

Optional effectiveDate

effectiveDate: string

CDISC Library attribute.

Optional fullyLoaded

fullyLoaded: boolean

CLA Wrapper attribute. Set to TRUE when the product is fully loaded, FALSE otherwise.

Optional href

href: string

CDISC Library API endpoint.

Optional id

id: string

CLA Wrapper attribute. Product ID.

Optional label

label: string

CDISC Library attribute.

Optional model

model: string

CLA Wrapper attribute. Model of the product (e.g., ADaM, SDTM, SEND, CDASH)

Optional name

name: string

CDISC Library attribute.

Optional registrationStatus

registrationStatus: string

CDISC Library attribute.

Optional source

source: string

CDISC Library attribute.

Optional title

title: string

CDISC Library attribute.

Optional type

type: string

CDISC Library attribute.

Optional version

version: string

CDISC Library attribute.

Methods

findMatchingItems

  • findMatchingItems(name: string, options?: MatchingOptions): ItemType[]
  • Find all matching variables/fields. For example TRxxPGy matches TR01PG12.

    Parameters

    • name: string

      Variable/Field name.

    • Optional options: MatchingOptions

    Returns ItemType[]

    Array of matched items.

getCodeList

  • getCodeList(codeListId: string, options?: GetItemGroupOptions): Promise<string | CodeList | Term[]>
  • Get a codelist.

    Parameters

    • codeListId: string

      Concept ID of the codelist.

    • options: GetItemGroupOptions = {}

    Returns Promise<string | CodeList | Term[]>

    Codelist.

getCodeListList

  • getCodeListList(options?: GetItemGroupsOptions): Promise<{ conceptId: string; href?: string; preferredTerm: string }[]>
  • Get a list of codelists in for that terminology.

    Parameters

    • options: GetItemGroupsOptions = ...

    Returns Promise<{ conceptId: string; href?: string; preferredTerm: string }[]>

    Array of codelist IDs and titles.

getCurrentItemGroups

  • getCurrentItemGroups(): ItemGroups
  • Get an object with all datasets/dataStructures/domains for that product which are currently loaded

    Returns ItemGroups

    An object with datasets/dataStructures/domains

getCurrentItems

  • getCurrentItems(): Items
  • Get an object with all variables/fields for that product which are currently loaded

    Returns Items

    An object with variables/fields

getItemGroup

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

    Parameters

    • name: string

      Dataset name

    • Optional options: GetItemGroupOptions

      {@link GetItemGroupOptions}

    Returns Promise<string | ItemGroupType>

    Dataset/DataStruture/Domain

getItemGroups

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

    Parameters

    • Optional options: GetItemGroupsOptions

      {@link GetItemGroupsOptions}

    Returns Promise<any>

    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.

getItems

  • getItems(): Promise<Items>
  • Get an object with all variables/fields for that product

    Returns Promise<Items>

    An object with variables/fields

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(pRaw: any, nciSiteResponse?: boolean): void
  • Parse API response to product

    Parameters

    • pRaw: any

      Raw CDISC API response

    • nciSiteResponse: boolean = false

      Indicates whether the reponse is from the NCI site

    Returns void

removeContent

  • removeContent(): 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