Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

DeepSee.Populate

class DeepSee.Populate extends %Library.RegisteredObject

This class is part of the DeepSee Patients sample, whose purpose is to provide sample data for use with DeepSee.

It defines overall methods to generate data for this sample. It also contains general-purpose utilities for populating these tables.

Method Inventory

Methods

classmethod BirthDateODBC(age As %Numeric) as %String
Given an age, returns an appropriate birthdate as a string.
classmethod BuildCompoundCubes()
Builds the cubes in the correct order for the compound cube example. These cubes have shared dimensions and so must be built in a specific order. This is useful as a separate method in case you want to experiment with the definitions of these cubes.
classmethod BuildRelatedCubes()
Builds the related cubes in the correct order. This is useful as a separate method in case you want to experiment with the definitions of these cubes.
classmethod Count(cls) as %Numeric
Returns count of IDs in the given extent or 0 if none.
classmethod GenerateAll(patCount As %Integer = 1000, options As %String = "ADTR", restore As %Boolean = 0)
invoke this method to set up all the data for these classes NB: restore argument no longer does anything
classmethod GenerateData(patCount As %Integer = 10000, patientsPerDoc As %Numeric = 25, options As %String = "ADT", genNulls As %Boolean = 1, genDateNulls As %Boolean = 0) as %Status
This method generates the sample data for the patients and related classes.

patCount specifies the number of patients to generate in DeepSee.Study.Patients.

patientsPerDoc specifies the approximate ratio of patients per doctor. At least one doctor is always created.

options is a case-insensitive string that controls whether certain child data is also generated.

  • If it includes the letter A, allergy data is generated. This option is on by default.
  • If it includes the letter D, diagnosis data is generated. This option is on by default.
  • If it includes the letter T, the PatientDetails table is populated. This option is on by default.
  • If it includes the letter E, the PatientEncounter table is populated. This option is off by default.
  • If it includes the letter R, the CityRainfall table is populated. This option is off by default.
  • If it includes the letter X, half the patients are written to the DeepSee.Study.PatientSet2 table (the "extra" Set) and half are written to DeepSee.Study.Patients. This option is off by default.
genNulls specifies whether to insert random null values. By default, this option is on, and the GenerateData method sets the patient's primary care physician, part of the allergy data, and assorted other data to null in a percentage of cases (or in some cases, it simply does not generate child data).

genDateNulls specifies whether to insert random null values for birth dates. By default, this option is off.

For DeepSee I, it is recommended that you disable the DeepSee incremental update feature while generating any large amounts of data (Site Options > ETL > Incremental Updates).

This method does not rebuild the DeepSee I indices. See the DeepSee I documentation.

classmethod GeneratePatientQuerySample(patCount As %Integer = 100)
classmethod GetRandomId(cls) as %String
Returns a random ID from the given class. This method assumes that you have already run UpdateIdCache().
classmethod RandomGenderAndAge() as %String
Returns a string containing age+gender chosen from 2000 census distribution

format: gender,age

gender is M or F

classmethod RandomMMMD(year As %Integer) as %String
Given a year, returns a suitable date in that year, in the form "MMM D, YYYY"

For example: Jul 1, 2003

Note: This is not currently used.

classmethod RandomODBCDateString(year As %Integer) as %String
Given a year, returns a suitable date in that year, in the form "YYYY-MM-DD"

For example: 2008-07-01

classmethod RandomTrue(cutoff As %Numeric, scale As %Numeric = 1000000)
Returns true randomly some percentage of the time.
classmethod ReassignPatients() as %Status
Use this to try out dependsOn attribute
classmethod Restore()
restore initial state of generated data
classmethod SetUpCodeTables() as %Status
Called by GenerateData
classmethod Setup(patCount As %Integer = 1000, options As %String = "ADTR", restore As %Boolean = 0)
Add this alias so that each DeepSee sample has a Setup() method
classmethod SetupTermLists()
Purely for demo purposes, this method defines term lists used by this sample.
classmethod SetupVariables()
Purely for demo purposes, this method defines pivot variables used by this sample.
classmethod UpdateIdCache(cls) as %Status
Given a class, creates a cache that contains all the current IDs for that class. Use GetRandomId() to get a random ID from this cache.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab