// This file is the descriptor for the Custom code recipe patient-cohort { // Meta data for display purposes "meta": { // label: name of the recipe as displayed, should be short "label": "Patient cohort", // description: longer string to help end users understand what this recipe does "description": "Choose from the columns in the input tables to create your cohort dataset", // icon: must be one of the FontAwesome 3.2.1 icons, complete list here at https://fontawesome.com/v3.2.1/icons/ "icon": "icon-puzzle-piece" }, "kind": "PYTHON", "paramsPythonSetup": "select-columns_input1.py", "selectableFromDataset": "input_A_role", // Inputs and outputs are defined by roles. In the recipe's I/O tab, the user can associate one // or more dataset to each input and output role. // The "arity" field indicates whether the user can associate several datasets to the role ('NARY') // or at most one ('UNARY'). The "required" field indicates whether the user is allowed to // associate no dataset with the role. "inputRoles": [ { "name": "input_A_role", "label": "Fact Rx Table", "description": "Claims details", "arity": "UNARY", "required": true, "acceptsDataset": true }, { "name": "input_B_role", "label": "Product Table", "description": "Product details", "arity": "UNARY", "required": true, "acceptsDataset": true }, { "name": "input_C_role", "label": "Patient Table", "description": "Patient details", "arity": "UNARY", "required": false, "acceptsDataset": true }, { "name": "input_D_role", "label": "Plan Table", "description": "Plan details", "arity": "UNARY", "required": false, "acceptsDataset": true }, { "name": "input_E_role", "label": "Provider Table", "description": "Provider details", "arity": "UNARY", "required": false, "acceptsDataset": true }, { "name": "input_F_role", "label": "Reject Table", "description": "Rejection details", "arity": "UNARY", "required": true, "acceptsDataset": true }, { "name": "input_H_role", "label": "Patient MPD Table", "description": "Patient MPD details", "arity": "UNARY", "required": false, "acceptsDataset": true }, { "name": "input_G_role", "label": "Mx Table", "description": "Diagnosis details", "arity": "UNARY", "required": false, "acceptsDataset": true } // ... ], "outputRoles": [ { "name": "main_output", "label": "main output displayed name", "description": "what main output means", "arity": "UNARY", "required": true, "acceptsDataset": true } // ... ], /* The field "params" holds a list of all the params for wich the user will be prompted for values in the Settings tab of the recipe. The available parameter types include: STRING, STRINGS, INT, DOUBLE, BOOLEAN, SELECT, MULTISELECT, MAP, TEXTAREA, PRESET, COLUMN, COLUMN For the full list and for more details, see the documentation: https://doc.dataiku.com/dss/latest/plugins/reference/params.html */ "params": [ { "name": "Select-Columns_A", "label": "Rx table columns", "type": "COLUMNS", "columnRole":"input_A_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_B", "label": "Product table columns", "type": "COLUMNS", //"getChoicesFromPython": true, "columnRole":"input_B_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_G", "label": "Mx table columns", "type": "COLUMNS", "columnRole":"input_G_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_C", "label": "Patient table columns", "type": "COLUMNS", "columnRole":"input_C_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_D", "label": "Plan table columns", "type": "COLUMNS", "columnRole":"input_D_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_E", "label": "Provider table columns", "type": "COLUMNS", "columnRole":"input_E_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_F", "label": "Reject table columns", "type": "COLUMNS", "columnRole":"input_F_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true }, { "name": "Select-Columns_H", "label": "MPD patient table columns", "type": "COLUMNS", "columnRole":"input_H_role", "description": "Selected columns will be joined in a SQL query to create the patient cohort", "mandatory": true } /*, { "name": "parameter2", "type": "INT", "defaultValue": 42 /* Note that standard json parsing will return it as a double in Python (instead of an int), so you need to write int(get_recipe_config()['parameter2']) }, // A "SELECT" parameter is a multi-choice selector. Choices are specified using the selectChoice field { "name": "parameter3", "type": "SELECT", "selectChoices": [ { "value": "val_x", "label": "display name for val_x" }, { "value": "val_y", "label": "display name for val_y" } ] }, // A 'COLUMN' parameter is a string, whose value is a column name from an input schema. // To specify the input schema whose column names are used, use the "columnRole" field like below. // The column names will come from the schema of the first dataset associated to that role. { "name": "parameter4", "type": "COLUMN", "columnRole": "input_B_role" }*/ // The 'COLUMNS' type works in the same way, except that it is a list of strings. ], // The field "resourceKeys" holds a list of keys that allows to limit the number // of concurrent executions and activities triggered by this recipe. // // Administrators can configure the limit per resource key in the Administration > Settings > Flow build // screen. "resourceKeys": [] }