Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DataStructure

Data Structure class

Hierarchy

  • BasicFunctions
    • DataStructure

Index

Constructors

constructor

  • new DataStructure(__namedParameters?: DataStructureParameters): DataStructure

Properties

Optional analysisVariableSets

analysisVariableSets: AnalysisVariableSets

CDISC Library attribute.

Optional className

className: string

CDISC Library attribute.

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 description

description: string

CDISC Library attribute.

Optional href

href: string

CDISC Library API endpoint.

Optional id

id: string

CLA Wrapper attribute. Data structure ID.

Optional label

label: string

CDISC Library attribute.

Optional name

name: 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.

    • options: MatchingOptions

    Returns ItemType[]

    Array of matched items.

getFormattedItems

  • getFormattedItems(format: "json" | "csv", addItemGroupId?: boolean): string | ItemType[]
  • Get items in a specific format.

    Parameters

    • format: "json" | "csv"

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

    • addItemGroupId: boolean = false

    Returns string | ItemType[]

    String with formatted items or an array with item details.

getItem

  • getItem(name: string): Promise<ItemType>
  • Get an object with specified item name

    property

    {String} name Variable/field name.

    Parameters

    • name: string

    Returns Promise<ItemType>

    An object with variable/field if found

getItems

  • getItems(): Items
  • Get an object with all variables/fields for that data structure

    Returns 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.

getVariableSetList

  • getVariableSetList(options?: { descriptions?: boolean }): object | string[]
  • Get an array or object with variable sets and their descriptions in a specific format.

    Parameters

    • options: { descriptions?: boolean } = {}
      • Optional descriptions?: boolean

    Returns object | string[]

    List of variable sets.

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(dsRaw: any): void
  • Parse API response to data structure

    Parameters

    • dsRaw: any

      Raw CDISC API response

    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