Object Model Reference
This reference documents the objects a Document Template or an Import Script can read, and the attributes of each. Both use the same names, and Choosing and Counting Objects describes how to query the sets of objects listed here.
Note
This list is exhaustive. Objects and attributes which are not documented here cannot be read from a Document Template or an Import Script: each reports an error naming what it refused rather than giving an empty value. If you need an attribute which is not listed, ask Support.
The few attributes marked Document Templates only are worked out while a document is being generated, and an Import Script cannot read them.
Objects of any kind
A few objects point at another object that can be of any kind. The pointer is called
content_object, and it is found on:
TicketObjectRelation, the Draft objects a ticket is about
Comment, the object a comment was made on
Object Label, the object a label is attached to
Custom Property, the object a value is set on
content_object is the object itself, so once you have it you can read its attributes, its Custom
Properties and the objects it leads to, exactly as listed for that kind below. Whatever its kind, it
also answers two questions:
verbose_name()The name of its kind as the application shows it, such as
Form,FieldorEdit Check. For a Custom Object it is the name of its type, such asReport Specification. Use it to decide what to read next. Python's__class__andtype()are not available in a template or a script, so this is the way to tell kinds apart.get_absolute_url()The link to the object in the application, starting from
/. Most objects have one; a few that are only shown inside another object, such as Edit Check Steps, do not.
Printing the object gives only its name or OID, such as DM or SEX, and not its kind. Use
verbose_name() for the kind. content_object is None when the object it pointed at
has been deleted, so check it before reading from it. A deleted Project or Draft is the exception: it
is kept, and is still returned.
A ticket is usually about Edit Checks, Forms or Test Cases. This template lists what each open ticket in a Project is about, and for a Form also gives its name:
{% for ticket in project.ticket_set.filter(open=True).order_by("iid") %}
#{{ ticket.iid }} {{ ticket.title }}
{% for relation in ticket.ticketobjectrelation_set.all() %}
{% set item = relation.content_object %}
{% if item %}
{{ item.verbose_name() }} {{ item }}{{ " (" ~ item.DraftFormName ~ ")" if item.verbose_name() == "Form" }} {{ item.get_absolute_url() }}
{% endif %}
{% endfor %}
{% endfor %}
For a ticket about Form AE and Edit Check AE_SER it gives:
#1 Coding
Form AE (Adverse Events) /form/5805
Edit Check AE_SER /checks/9120
The choice for a Form is written inside {{ }}. Written as {% if %}...{% endif %} at the end
of the line instead, it would run every object onto one line, because the line break after a tag is
removed. See Line breaks after tags.
An Import Script reads them the same way. This script logs the same report:
for ticket in importer.context.project.ticket_set.filter(open=True).order_by("iid"):
importer.log(f"#{ticket.iid} {ticket.title}")
for relation in ticket.ticketobjectrelation_set.all():
item = relation.content_object
if item is None:
continue
kind = item.verbose_name()
name = f" ({item.DraftFormName})" if kind == "Form" else ""
importer.log(f" {kind} {item}{name} {item.get_absolute_url()}")
Draft
The Draft is where you start for the data in a Draft:
a Document Template with a scope of Draft Home receives it as
draft, one of the objects in the template contextan Import Script with a scope of Draft reads it as
importer.context.draft
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
deleted |
datetime in UTC timezone. May be None. |
Date/time this object was (soft) deleted |
Project |
Project reference |
|
DraftName |
string(2000) |
|
DeleteExisting |
boolean |
From the ALS upload attribute of the same name. |
ProjectName |
string(2000) |
From the ALS upload attribute of the same name. If the Draft was created from an ALS file then this value will be set to the name of the Architect Project that this Draft was downloaded from. It may be different to Project.ProjectName which is the name of the Project this Draft was loaded into in TrialGrid. |
ProjectType |
string(19) |
From the ALS upload attribute of the same name. |
PrimaryForm |
Form reference. May be None. |
|
DefaultMatrix |
Matrix reference. May be None. |
|
ConfirmationMessage |
string(4000) |
|
SignaturePrompt |
string(2000) |
|
LabStandardGroup |
string(2000) |
|
ReferenceLabs |
string(2000) |
|
AlertLabs |
string(2000) |
|
SyncOIDProject |
string(2000) |
From the ALS upload attribute of the same name. |
SyncOIDDraft |
string(2000) |
From the ALS upload attribute of the same name. |
SyncOIDProjectType |
string(19) |
From the ALS upload attribute of the same name. |
SyncOIDOriginIsVersion |
boolean |
From the ALS upload attribute of the same name. |
StandardsDraftParent |
CRF Draft reference. May be None. |
A reference to the Standard Library Draft this Draft is pointed to (if any). |
standards_draft_change_flag |
datetime in UTC timezone. May be None. |
When this value is not None it means the Draft Standards Compliance is currently being calculated. |
show_uat_coverage |
boolean |
Show Test Coverage? |
approvals |
List of string(2000). May be None. |
List of Project Roles which have approved this Draft. |
is_locked |
boolean |
Is this Draft locked? |
als_forms_set |
Object Manager. Set of related Forms |
Set of related Forms. |
als_fields_set |
Object Manager. Set of related Fields |
Set of all field objects belonging to Forms in this Draft. |
als_folders_set |
Object Manager. Set of related Folders |
Set of all Folder objects in this Draft. |
als_datadictionaries_set |
Object Manager. Set of related Data Dictionaries |
Set of all Data Dictionary objects in this Draft. |
als_datadictionaryentries_set |
Object Manager. Set of related Data Dictionary Entries |
Set of all Data Dictionary Entry objects belonging to Data Dictionaries in this Draft. |
als_unitdictionaries_set |
Object Manager. Set of related Unit Dictionaries |
Set of all Unit Dictionary objects in this Draft. |
als_unitdictionaryentries_set |
Object Manager. Set of related Unit Dictionary Entries |
Set of all Unit Dictionary Entry objects belonging to Unit Dictionaries in this Draft. |
als_matrices_set |
Object Manager. |
Set of related Matrices |
als_checks_set |
Object Manager. |
Set of related Edit Checks |
als_checksteps_set |
Object Manager. |
Set of related Edit Check Steps |
als_checkactions_set |
Object Manager. |
Set of related Edit Check Actions |
als_derivations_set |
Object Manager. |
Set of related Derivations |
als_derivationsteps_set |
Object Manager. |
Set of related Derivation Steps |
als_labvariablemappings_set |
Object Manager. |
Set of related Lab Variable Mappings |
als_customfunctions_set |
Object Manager. |
Set of related Custom Functions |
als_coderconfiguration_set |
Object Manager. |
Set of related Coder Configurations |
als_codersupplementalterms_set |
Object Manager. |
Set of related Coder Supplemental Terms |
als_codercomponentterms_set |
Object Manager. |
Set of related Coder Component Terms |
als_matrixfolders_set |
Object Manager. |
Set of related Matrix Folders |
activities |
Object Manager. Set of related Activity Records |
Set of all activity records which are related to this Draft (not all objects within it, just the Draft object itself). Document Templates only. |
customobject_set |
Object Manager. |
Set of related Custom Objects |
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
rules |
Object Manager. Set of related Standard Rules |
Set of all rules which are defined in this Draft (if this draft is a Library) |
draftrule_set |
Object Manager. Set of related Activated Draft Rules |
Set of activated Rules in this Draft from the Library to which it is associated. |
comment_set |
Object Manager. |
Set of related Comments |
testcase_set |
Object Manager. |
Set of related Test Cases |
custom_object_property_changes(...) |
Method returning a list of dicts. |
User-initiated changes to Custom Object properties made in this Draft. See draft.custom_object_property_changes() below. |
draft.custom_object_property_changes()
Returns the list of user-initiated Custom Object property changes made in this Draft. Useful for producing "what changed" tables in Veeva Document Templates: only edits made by users are included, so property values that arrived via Veeva SDS import are excluded automatically.
Signature:
draft.custom_object_property_changes(
custom_object_definition_id=None,
include_user_managed=False,
latest_only=True,
)
Parameters:
custom_object_definition_id- when set, narrows the result to a single Custom Object Definition (e.g. only Edit Checks).include_user_managed- by default, Custom Object Definitions withuser_managed=Trueare excluded (they are considered infrastructure-like and not meaningful in change-tracking tables). Set toTrueto include them.latest_only- whenTrue(default), only the most recent change per(custom_object, property_definition)pair is returned. WhenFalse, every insert/update event is returned in chronological order.
Each entry is a dict with the following keys:
Key |
Type |
Description |
|---|---|---|
object_type |
string |
Name of the Custom Object Definition. |
object_name |
string |
Identifier of the Custom Object. |
object_id |
integer |
Primary key of the Custom Object. |
property |
string |
Name of the Property Definition. |
property_id |
integer |
Primary key of the Property Definition. |
old_value |
string |
Value before the change. Empty string for insert events. |
new_value |
string |
Value after the change. Reference-type properties are rendered as the referenced object's display identifier rather than a raw id. |
value_type |
string |
Value type of the property (e.g. |
change_type |
string |
|
changed_at |
datetime in UTC timezone. |
When the change was recorded. |
Rows are deterministically sorted by
(object_type, object_name, property, changed_at, object_id). Rows for
Custom Objects or Property Definitions that have since been deleted are
silently skipped.
Example usage in a Jinja2 Document Template:
{% for change in draft.custom_object_property_changes() %}
<row>
<cell>{{ change.object_type }}</cell>
<cell>{{ change.object_name }}</cell>
<cell>{{ change.property }}</cell>
<cell>{{ change.new_value }}</cell>
</row>
{% endfor %}
Organization
All URL objects within TrialGrid belong to an Organization.
The URLs of an Organization can be reached from it with raveurl_set, for example draft.Project.rave_url.organization.raveurl_set.all(). The list is limited to the URLs that the person generating the document, or running the Import Script, has permission to view. A URL they cannot view is left out, so two people generating the same document can see different lists. Deleted URLs are never included, and neither are URLs of a type the Organization is not licensed for.
Name |
Type |
Description |
|---|---|---|
name |
string(100) |
The name of the Organization |
raveurl_set |
Object Manager. Set of related URLs |
The URLs of this Organization that the person generating the document or running the script has permission to view. Other URLs, deleted URLs and URLs of a type the Organization is not licensed for are not included. |
Project
The Project is where you start for the data in a Project:
a Document Template with a scope of Project Home or Project Tickets receives it as
projectan Import Script with a scope of Project or Draft reads it as
importer.context.project
Name |
Type |
Description |
|---|---|---|
ProjectName |
string |
The name of the Project in TrialGrid |
ProjectDescription |
string |
The description of the Project if set |
ProtocolName |
string |
The protocol name of the Project if set |
rave_url |
URL reference |
A reference to the URL to which this Project belongs |
view_all |
boolean |
True if this Project is set to "view all" |
is_library |
boolean |
True if this Project is a library project |
active |
boolean |
True if this project has been marked as Active |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
activities |
Object Manager. Set of related Activity Records |
Set of all activity records which are related to this Project object (just the object, not all objects within it). Document Templates only. |
als_crfdraft_set |
Object Manager. Set of related CRF Drafts |
Set of all CRF Drafts in this Project |
ticket_set |
Object Manager. Set of related Tickets |
Set of all CRF Drafts in this Project |
page_set |
Object Manager. Set of related Wiki Pages |
Set of all Wiki pages in this Project, for example project.page_set.order_by("title") |
all_draft_testcases() |
Dictionary with Test Case Name as key and list of Test Case objects as value |
Function which returns all Test Cases from all CRF Drafts in this Project |
Ticket
A ticket in a Project.
Name |
Type |
Description |
|---|---|---|
iid |
integer |
The unique id of the ticket within this project (first ticket is iid=1, second is iid=2 etc). |
title |
string |
The title of the ticket |
body |
string |
The body text of the ticket. Note that this may be in Markdown format. |
created |
datetime |
The date/time that the ticket was created in UTC timezone. |
created_by |
User reference |
A reference to the user who created this URL. |
closed_on |
datetime |
The date/time that the ticket was closed in UTC timezone. None if not yet closed. |
closed_by |
User reference to the user who closed the ticket. None if not yet closed. |
A reference to the user who created this URL. |
due_date |
datetime in UTC timezone. May be None. |
Typically only the date part of this date/time is important. |
open |
boolean |
True if the ticket is open, otherwise False (ticket Closed) |
ticketobjectrelation_set |
Object Manager. |
Set of related TicketObjectRelation objects. |
ticketassign_set |
Object Manager. |
Set of related TicketAssign objects representing users assigned to the ticket. |
comments |
Object Manager. |
Set of related Comments for this Ticket |
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
activities |
Object Manager. Set of related Activity Records |
Set of all activity records which are related to this Ticket. Document Templates only. |
images() |
List of Embedded Images |
The images shown in the description of this ticket, oldest first. An image quoted inside a code block is shown as text, so it is not listed. |
TicketObjectRelation
A relationship between a Ticket and a related Draft object (e.g. a Form or Edit Check)
Name |
Type |
Description |
|---|---|---|
ticket |
Ticket reference |
A link to the ticket this TicketObjectRelation record belongs to |
assigned_by |
Reference to the user who related this object with the ticket |
|
assigned_on |
datetime |
The date/time that the object referenced by content_object was assigned to this ticket with UTC timezone. |
draft |
Reference to the the draft the related object belongs to |
|
content_object |
Any kind of object; |
The Draft object this ticket is about (e.g. Form, Field etc) |
object_id |
integer. May be None. The id of the object referenced in content_object |
The ID of the Draft object this ticket is about |
content_type_id |
integer. May be None. |
An ID representing the unique type of the Object referenced by the object_id |
TicketAssign
A relationship between a Ticket and a User who is assigned to the ticket.
Name |
Type |
Description |
|---|---|---|
ticket |
Ticket reference |
A link to the ticket this TicketObjectRelation record belongs to |
assigned_to |
User (May be None) |
If the ticket is assigned to a user then this will be set to a reference to the user. If assigned to a role it will be None |
assigned_to_role |
Role (May be None) |
If the ticket is assigned to a role then this will be set to a reference to the ProjectRole. If assigned to a user it will be None |
assigned_by |
Reference to the user who assigned the ticket to the assigned_to User or Role |
|
assigned_on |
datetime |
The date/time that the user was assigned to this ticket with UTC timezone. |
Wiki Page
A page of a Project's Wiki. Reach the pages of a Project with project.page_set.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
title |
string |
The name of the page |
project |
Project reference |
The Project whose Wiki holds this page |
get_latest_revision() |
Wiki Page Revision reference. May be None. |
The current version of the page. page.get_latest_revision().content is the text of the page. None for a page that has never been saved with any text. |
get_history() |
Object Manager. Set of related Wiki Page Revisions |
Every version of the page, newest first |
revision_set |
Object Manager. Set of related Wiki Page Revisions |
Every version of the page, in no particular order. Use page.get_history() for newest first, or page.revision_set.order_by("created") for oldest first. |
fenced_blocks() |
List of blocks, each with a |
The code blocks in the current version of the page, in the order they appear. A block
whose opening line names |
images() |
List of Embedded Images |
The images shown in the current version of the page, oldest first. An image quoted inside a code block is shown as text, so it is not listed. |
This script logs the data held in each JSON block of a Project's Wiki, and the images on each page:
for page in importer.context.project.page_set.order_by("title"):
for block in page.fenced_blocks():
if block.language != "json":
continue
try:
data = parse_json(block.content)
except ValueError as error:
importer.log(f"{page.title}: a JSON block is not valid JSON. {error}")
continue
importer.log(f"{page.title}: a JSON block holding {len(data)} entries")
for image in page.images():
importer.log(f"{page.title}: an image {image.width} by {image.height} pixels, {image.status}")
Wiki Page Revision
One version of a Wiki Page. A new version is kept each time the page is saved.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
page |
Wiki Page reference |
The page this is a version of |
content |
string |
The text of the page in this version, as written in the Wiki editor |
created |
datetime |
The date/time this version was saved, in UTC timezone |
created_by |
User reference |
The person who saved this version |
Embedded Image
An image pasted into a Ticket, a comment or a Wiki page. List the images of one with its images().
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
token |
UUID |
The identifier the text uses for the image, as in |
kind |
string |
Where the image was pasted: |
status |
string |
|
content_type |
string |
The type of image, such as |
width |
integer. May be None. |
The width of the stored image, in pixels |
height |
integer. May be None. |
The height of the stored image, in pixels |
size_in_bytes |
integer. May be None. |
The size of the stored image |
created |
datetime |
The date/time the image was pasted, in UTC timezone |
created_by |
User reference. May be None. |
The person who pasted the image |
data_uri() |
string. May be None. |
The image itself, as a |
URL
The TrialGrid URL object which the Draft is contained by.
Name |
Type |
Description |
|---|---|---|
name |
string |
The name of the URL object |
organization |
Organization reference |
The Organization to which the Rave URL belongs. |
url |
string |
The Rave URL name if set in the URL settings (e.g. https://example.mdsol.com) |
created_by |
User reference |
A reference to the user who created this URL. |
customobjectdefinition_set |
Object Manager. Set of related Custom Object Definitions |
The types of object defined in this URL, including built-in types such as Forms and Edit Checks. Find one by name, e.g. customobjectdefinition_set.get(name="Report Specification"). |
ProjectRole
The definition of a Project Role in an Organization. Roles are defined once for the Organization and shared by all of its URLs.
Name |
Type |
Description |
|---|---|---|
name |
string |
The name of the ProjectRole definition |
organization |
Organization reference |
The Organization to which the Role Definition belongs |
created |
datetime in UTC timezone. May be None. |
date/time the Role was created |
updated |
datetime in UTC timezone. May be None. |
last updated date/time |
description |
string |
Description of the Role (if any set) |
UserProjectRole
The definition of a Users role in a project. This could be a ProjectRole as above but when a user does not have a set role in the Project it could be of type NoPermissionRole or UrlManagerRole.
When using the project_role_for_user(user_object) function in document templates only reference these attributes which are shared with ProjectRole above to avoid errors because you might expect to get a ProjectRole object but instead might receive a NoPermissionRole or UrlManagerRole instance.
UserProjectRole objects have the following attributes:
Name |
Type |
Description |
|---|---|---|
name |
string |
The name of the Role |
description |
string |
Description of the Role (if any set) |
User
The User object represents users in the system. A few attributes of users are available for reporting.
Name |
Type |
Description |
|---|---|---|
username |
string |
The username for the user object e.g. "james_smith" |
string |
Email address of the user, from their user profile. |
|
first_name |
string |
The first name of the user, if set by the user in their profile e.g. "James" |
last_name |
string |
The last name of the user, if set by the user in their profile e.g. "Smith" |
Custom Function
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
FunctionName |
string(2000) |
|
SourceCode |
string(8000) |
|
Lang |
string(2000) |
Language |
DownloadedFromObjectId |
string(2000) |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
compliance_fingerprint |
string(33) |
Like the fingerprint but only contains core properties and custom property values which are included in compliance calculations. Important: Will only be set for objects which are in a draft linked to a library and where the object cannot be found in the library. These compliance fingerprints are matched to Standards Deviation Explanations which identify that an object not found in the library with this exact compliance fingerprint has been approved/denied etc. |
copied_from |
Custom Function reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Custom Function reference. May be None. |
Compliance object |
is_alwaystrue |
boolean. May be None. |
Returns true |
rave_api_version |
string(5). May be None. |
The Rave API the C# source code uses: "v1", "v2", "mixed" (both) or "none" (neither). None for SQL Custom Functions, and for C# Custom Functions saved before this attribute was introduced until they have been recalculated. |
rave_api_conversion |
string(10). May be None. |
How much work converting the C# source code from the V1 to the V2 Rave API takes: "automatic" (every V1 reference has a mechanical replacement), "manual" (something has no V2 equivalent, or uses a removed or blacklisted method) or "n/a" (SQL, or no V1). None until the Custom Function has been recalculated. |
als_checksteps_set |
Object Manager. Set of related Edit Check Steps |
|
als_derivationsteps_set |
Object Manager. Set of related Derivation Steps |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
header_comment() |
Method returning a string. |
The comment block at the top of the source code. See Reading a Custom Function's source code. |
header_comment_lines() |
Method returning a list of strings. |
The comment block at the top of the source code, one string per line. See Reading a Custom Function's source code. |
strings_in_source_code() |
Method returning a set of strings. |
Every quoted word in the source code, comments excluded. See Reading a Custom Function's source code. |
source_code_field_oid_strings() |
Method returning a list of strings. |
Quoted words that match a Field OID in this Draft. See Reading a Custom Function's source code. |
source_code_form_oid_strings() |
Method returning a list of strings. |
Quoted words that match a Form OID in this Draft. See Reading a Custom Function's source code. |
source_code_folder_oid_strings() |
Method returning a list of strings. |
Quoted words that match a Folder OID in this Draft. See Reading a Custom Function's source code. |
called_customfunction_names() |
Method returning a list of strings. |
Names this function calls with PerformCustomFunction, in the V1 or V2 API. See Reading a Custom Function's source code. |
called_customfunctions() |
Method returning a queryset of Custom Functions. |
The Custom Functions in this Draft matching those names. See Reading a Custom Function's source code. |
called_by() |
Method returning a list of Custom Functions. |
Custom Functions in this Draft that call this one. See Reading a Custom Function's source code. |
Reading a Custom Function's source code
Custom Function source code is a single block of text, which makes it awkward to report on. These methods pull structure out of it, so a template can describe what a function refers to rather than just printing it.
For C# functions they read a parse of the source code, so code inside comments is ignored and text inside strings is never mistaken for code. Both the V1 and the V2 Medidata Rave API are recognised. They report what the source says, not what it does when it runs: a function name built at run time, for example, cannot be known from the source.
header_comment()
Returns the comment block at the top of the source code, or an empty string when there is not one.
Handles both a leading /* ... */ block and a run of leading // lines (-- for SQL). Line
breaks are returned as <br/>, so replace them if you are not emitting HTML:
{{ cf.header_comment()|replace("<br/>", "\n") }}
header_comment_lines() returns the same lines as a list, for example
{{ cf.header_comment_lines()|join("\n") }}.
A header comment describes what the author intended, which is not always what the code does. It is useful context, not a statement of fact.
strings_in_source_code()
Returns every quoted word in the source code, uppercased, with comments removed first. Only words made of letters, numbers and underscores are returned, so query text and messages are excluded and what remains is mostly OIDs and coded values.
The OID matching methods
source_code_field_oid_strings(), source_code_form_oid_strings() and
source_code_folder_oid_strings() each return the quoted words that match an OID of that type
in this Draft, sorted. These are
intersections: a word only appears if the object exists.
That makes the difference between the two useful. A word in strings_in_source_code() that is not
in any of the OID lists matches nothing in the Draft - which is what a mistyped OID looks like:
{% set matched = (cf.source_code_field_oid_strings() + cf.source_code_form_oid_strings()
+ cf.source_code_folder_oid_strings())|map("upper")|list %}
{% set unmatched = cf.strings_in_source_code()|reject("in", matched)|sort|list %}
{% if unmatched %}
<para>Quoted words matching nothing in this Draft: {{ unmatched|join(", ") }}</para>
{% endif %}
Coded values and ordinary strings appear in unmatched too, so this is a list to review rather
than a list of errors.
Each call queries the Draft, so assign the result to a variable rather than calling it repeatedly inside a loop.
called_customfunction_names(), called_customfunctions(), called_by()
called_customfunction_names() returns the names this function passes to PerformCustomFunction
as literal strings, through either CustomFunction.PerformCustomFunction (V1) or
Rave.PerformCustomFunction (V2). A call whose name is worked out at run time can't be known, so it
is not included. called_customfunctions() returns the Custom Functions in the Draft with those
names, matched case-insensitively - which may be fewer, if a name does not resolve.
called_by() returns the other Custom Functions in the Draft that call this one, in name order.
{% set callers = cf.called_by() %}
{% if callers %}
<para>Called by: {{ callers|map(attribute="FunctionName")|join(", ") }}</para>
{% endif %}
Coder Component Term
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
ComponentTerm |
string(2000) |
|
ComponentName |
string(2000) |
Coder Configuration
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
CodingLevel |
string(2000) |
|
Priority |
string(2000) |
|
Locale |
string(2000) |
|
IsApprovalRequired |
boolean |
|
IsAutoApproval |
boolean |
Coder Supplemental Term
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
SupplementalTerm |
string(2000) |
Data Dictionary
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
DataDictionaryName |
string(2000) |
Name |
DownloadedFromObjectId |
string(2000) |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Data Dictionary reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Data Dictionary reference. May be None. |
Compliance object |
allow_deletes |
boolean |
Allow Entries to be deleted |
allow_inserts |
boolean |
Allow Entries to be added |
master_dictionary |
Data Dictionary reference. May be None. |
For standard, the master dictionary from which elements may be selected |
als_fields_set |
Object Manager. Set of related Fields |
|
als_datadictionaryentries_set |
Object Manager. Set of related Data Dictionary Entries |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Data Dictionary Entry
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
DataDictionary |
Data Dictionary reference. May be None. |
|
CodedData |
string(2000) |
|
Ordinal |
integer. May be None. |
|
UserDataString |
string(2000) |
|
Specify |
boolean |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
std_required |
boolean |
Required by Standards |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
Derivation
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
DerivationName |
string(2000) |
Name |
Active |
boolean |
|
Folder |
Folder reference. May be None. |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
VariableOID |
string(2000) |
|
RecordPosition |
integer. May be None. |
|
AllVariablesInFolders |
boolean |
|
AllVariablesInFields |
boolean |
|
FormRepeatNumber |
integer. May be None. |
|
FolderRepeatNumber |
integer. May be None. |
|
BypassDuringMigration |
boolean |
|
CopySource |
string(2000) |
|
NeedsRetesting |
boolean |
|
RetestingReason |
string(2000) |
|
cql |
string(2000+) |
Derivation Logic |
quickedit |
string(2000+) |
|
target_cql |
string(2000+) |
Applied To |
has_error |
integer |
0 = No errors, 1 = No Steps, 2 = Syntax Error, 3 = Missing Objects (see below) |
missing_folders |
List of string(2000). May be None. |
Missing Folders |
missing_forms |
List of string(2000). May be None. |
Missing Forms |
missing_fields |
List of string(2000). May be None. |
Missing Fields |
missing_variables |
List of string(2000). May be None. |
Missing Variables |
missing_customfunctions |
List of string(2000). May be None. |
Missing Custom Functions |
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Derivation reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Derivation reference. May be None. |
Compliance object |
als_derivationsteps_set |
Object Manager. Set of related Derivation Steps |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Derivation Step
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
CRFDraft |
CRF Draft reference |
|
Derivation |
Derivation reference. May be None. |
|
StepOrdinal |
integer. May be None. |
Ordinal |
DataFormat |
string(2000) |
|
VariableOID |
string(2000) |
|
StepValue |
string(2000) |
Value |
StepFunction |
string(2000) |
Function |
Folder |
Folder reference. May be None. |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
CustomFunction |
Custom Function reference. May be None. |
|
RecordPosition |
integer. May be None. |
|
LogicalRecordPosition |
string(2000) |
|
Scope |
string(2000) |
|
OrderBy |
string(2000) |
|
FormRepeatNumber |
integer. May be None. |
|
FolderRepeatNumber |
integer. May be None. |
Edit Check
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
CheckName |
string(2000) |
Name of the check |
CheckActive |
boolean |
Active |
BypassDuringMigration |
boolean |
|
Infix |
string(2000+) |
|
CopySource |
string(2000) |
|
NeedsRetesting |
boolean |
|
RetestingReason |
string(2000) |
|
DownloadedFromObjectId |
string(2000) |
|
cql |
string(2000+) |
Check Logic |
description |
string(2000+) |
HTML formatted description of the Check generated from the Check Steps and Check Actions. |
text_description |
string(2000+) |
Text formatted description of the Check generated from the Check Steps and Check Actions. |
quickedit |
string(2000+) |
The quickedit representation of steps without the actions or the CheckName / CheckActive / BypassDuringMigration attributes |
full_quickedit |
string(2000+) |
The quickedit representation of steps, actions and the CheckName / CheckActive / BypassDuringMigration attributes as you see in Medidata Rave |
has_error |
integer |
0 = No Errors, 1 = No Steps, 2 = Syntax Error, 3 = No Actions, 4 = Missing Objects (see below) |
missing_folders |
List of string(2000). May be None. |
Missing Folders |
missing_forms |
List of string(2000). May be None. |
Missing Forms |
missing_fields |
List of string(2000). May be None. |
Missing Fields |
missing_variables |
List of string(2000). May be None. |
Missing Variables |
missing_customfunctions |
List of string(2000). May be None. |
Missing Custom Functions |
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Edit Check reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Edit Check reference. May be None. |
Compliance object |
als_checksteps_set |
Object Manager. Set of related Edit Check Steps |
|
als_checkactions_set |
Object Manager. Set of related Edit Check Actions |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Edit Check Step
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
CRFDraft |
CRF Draft reference |
|
Check |
Edit Check reference. May be None. |
|
StepOrdinal |
integer. May be None. |
|
CheckFunction |
string(2000) |
|
StaticValue |
string(2000) |
|
DataFormat |
string(2000) |
|
VariableOID |
string(2000) |
|
Folder |
Folder reference. May be None. |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
RecordPosition |
integer. May be None. |
|
CustomFunction |
Custom Function reference. May be None. |
|
LogicalRecordPosition |
string(2000) |
|
Scope |
string(2000) |
|
OrderBy |
string(2000) |
|
FormRepeatNumber |
integer. May be None. |
|
FolderRepeatNumber |
integer. May be None. |
Edit Check Action
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
CRFDraft |
CRF Draft reference |
|
Check |
Edit Check reference. May be None. |
|
Folder |
Folder reference. May be None. |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
VariableOID |
string(2000) |
|
RecordPosition |
integer. May be None. |
|
PageRepeatNumber |
integer. May be None. |
|
InstanceRepeatNumber |
integer. May be None. |
|
LogicalRecordPosition |
string(2000) |
|
Scope |
string(2000) |
|
OrderBy |
string(2000) |
|
ActionType |
string(27) |
|
ActionString |
string(2000) |
|
ActionOptions |
string(2000) |
|
ActionScript |
string(2000) |
|
cql |
string(2000+) |
Action Target |
missing_folders |
List of string(2000). May be None. |
Missing Folders |
missing_forms |
List of string(2000). May be None. |
Missing Forms |
missing_fields |
List of string(2000). May be None. |
Missing Fields |
missing_variables |
List of string(2000). May be None. |
Missing Variables |
missing_customfunctions |
List of string(2000). May be None. |
Missing Custom Functions |
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
Form
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
OID |
string(2000) |
|
Ordinal |
integer. May be None. |
|
DraftFormName |
string(2000) |
Name |
DraftFormActive |
boolean |
Active |
HelpText |
string(4000) |
|
IsTemplate |
boolean |
|
IsSignatureRequired |
boolean |
|
IsEproForm |
boolean |
|
ViewRestrictions |
List of string(2000). May be None. |
|
EntryRestrictions |
List of string(2000). May be None. |
|
LogDirection |
string(2000) |
|
DDEOption |
string(2000) |
|
ConfirmationStyle |
string(2000) |
|
LinkFolder |
Folder reference. May be None. |
|
LinkForm |
Form reference. May be None. |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Form reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Form reference. May be None. |
Compliance object |
allow_deletes |
boolean |
Allow Fields to be deleted |
allow_inserts |
boolean |
Allow Fields to be added |
allowed_changes |
List of string(4000). May be None. |
Allowed changes |
als_crfdraft_set |
Object Manager. Set of related Form |
|
als_forms_set |
Object Manager. Set of related Forms |
|
als_fields_set |
Object Manager. Set of related Fields |
|
als_checksteps_set |
Object Manager. Set of related Check Steps |
|
als_checkactions_set |
Object Manager. Set of related Check Actions |
|
als_derivations_set |
Object Manager. Set of related Derivations |
|
als_derivationsteps_set |
Object Manager. Set of related Derivation Steps |
|
als_labvariablemappings_set |
Object Manager. Set of related Lab Variable Mappings |
|
als_coderconfiguration_set |
Object Manager. Set of related Coder Configurations |
|
als_codersupplementalterms_set |
Object Manager. Set of related Coder Supplemental Terms |
|
als_codercomponentterms_set |
Object Manager. Set of related Coder Component Terms |
|
als_matrixfolders_set |
Object Manager. Set of related Matrix Folders |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
has_log_fields() |
boolean method |
Returns True if the Form has log fields (including inactive ones), False otherwise. |
Field
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
Form |
Form reference. May be None. |
|
FieldOID |
string(2000) |
|
Ordinal |
integer. May be None. |
|
DraftFieldNumber |
string(50) |
Number |
DraftFieldName |
string(2000) |
Name |
DraftFieldActive |
boolean |
Active |
VariableOID |
string(50) |
|
DataFormat |
string(50) |
|
DataDictionary |
Data Dictionary reference. May be None. |
|
UnitDictionary |
Unit Dictionary reference. May be None. |
|
CodingDictionary |
string(2000) |
|
ControlType |
string(2000) |
|
AcceptableFileExtensions |
string(256) |
|
IndentLevel |
integer. May be None. |
|
PreText |
string(4000) |
The question text or question label. |
FixedUnit |
string(200) |
|
HeaderText |
string(200) |
|
HelpText |
string(4000) |
|
SourceDocument |
boolean |
SDV |
IsLog |
boolean |
Log |
data_type |
string |
Returns the data type for a field based on its dataformat. Possible values are: integer, float, text, time, partialTime, date, partialDate, datetime, partialDateTime |
DefaultValue |
string(500) |
|
SASLabel |
string(256) |
|
SASFormat |
string(25) |
|
EproFormat |
string(2000) |
|
IsRequired |
boolean |
Required |
QueryFutureDate |
boolean |
|
IsVisible |
boolean |
Visible |
IsTranslationRequired |
boolean |
Translation Required |
AnalyteName |
string(2000) |
|
IsClinicalSignificance |
boolean |
Clinical Significance |
QueryNonConformance |
boolean |
|
OtherVisits |
boolean |
|
CanSetRecordDate |
boolean |
Set Record Date |
CanSetDataPageDate |
boolean |
Set DataPage Date |
CanSetInstanceDate |
boolean |
Set Instance Date |
CanSetSubjectDate |
boolean |
Set Subject Date |
DoesNotBreakSignature |
boolean |
Does Not Participate in Signature |
LowerRange |
string(10) |
|
UpperRange |
string(10) |
|
NCLowerRange |
string(10) |
Non Conformance Lower Range |
NCUpperRange |
string(10) |
Non Conformance Upper Range |
ViewRestrictions |
List of string(2000). May be None. |
|
EntryRestrictions |
List of string(2000). May be None. |
|
ReviewGroups |
List of string(2000). May be None. |
|
IsVisualVerify |
boolean |
Visual Verify |
Integration |
string(255) |
RTSM integration name |
IntegrationConfiguration |
string(255) |
RTSM integration configuration value |
IntegrationValue |
string(255) |
RTSM integration value |
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Field reference. May be None. |
Copied from |
std_required |
boolean |
Required by Standards |
allowed_changes |
List of string(4000). May be None. |
Allowed Changes |
als_checksteps_set |
Object Manager. Set of related Check Steps |
|
als_checkactions_set |
Object Manager. Set of related Check Actions |
|
als_derivations_set |
Object Manager. Set of related Derivations |
|
als_derivationsteps_set |
Object Manager. Set of related Derivation Steps |
|
als_labvariablemappings_set |
Object Manager. Set of related Lab Variable Mappings |
|
als_coderconfiguration_set |
Object Manager. Set of related Coder Configurations |
|
als_codersupplementalterms_set |
Object Manager. Set of related Coder Supplemental Terms |
|
als_codercomponentterms_set |
Object Manager. Set of related Coder Component Terms |
|
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Folder
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
OID |
string(2000) |
|
Ordinal |
integer. May be None. |
|
FolderName |
string(2000) |
Name |
AccessDays |
integer. May be None. |
|
StartWinDays |
integer. May be None. |
Start Window Days |
Targetdays |
integer. May be None. |
|
EndWinDays |
integer. May be None. |
End Window Days |
OverDueDays |
integer. May be None. |
|
CloseDays |
integer. May be None. |
|
ParentFolder |
Folder reference. May be None. |
|
IsReusable |
boolean |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Folder reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Folder reference. May be None. |
Compliance object |
als_forms_set |
Object Manager. Set of related Forms |
|
als_folders_set |
Object Manager. Set of related Folder |
|
als_checksteps_set |
Object Manager. Set of related Check Steps |
|
als_checkactions_set |
Object Manager. Set of related Check Actions |
|
als_derivations_set |
Object Manager. Set of related Derivations |
|
als_derivationsteps_set |
Object Manager. Set of related Derivation Steps |
|
als_labvariablemappings_set |
Object Manager. Set of related Lab Variable Mappings |
|
als_matrixfolders_set |
Object Manager. Set of related Matrix Folders |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Lab Variable Mapping
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
GlobalVariableOID |
string(2000) |
|
Form |
Form reference. May be None. |
|
Field |
Field reference. May be None. |
|
Folder |
Folder reference. May be None. |
|
LocationMethod |
string(2000) |
Matrix
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
MatrixName |
string(2000) |
|
OID |
string(2000) |
|
Addable |
boolean |
|
Maximum |
integer |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Matrix reference. May be None. |
Copied from |
color |
string(2000+) |
Matrix Color |
als_matrixfolders_set |
Object Manager. Set of related Matrix Folders |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Matrix Folder
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
Matrix |
Matrix reference. May be None. |
|
Folder |
Folder reference. May be None. |
|
Form |
Form reference. May be None. |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
Test Case
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
CRFDraft |
CRF Draft reference |
|
name |
string(2000) |
Test Case Name |
created |
datetime |
|
last_updated |
datetime |
last updated |
last_updated_by |
User reference. May be None. |
last updated by |
valid |
boolean |
Is test case valid? |
content |
string(2000+) |
Test Content |
parsed_md5 |
md5 hash of the test case content |
|
copied_from |
Test Case reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Test Case reference. May be None. |
Compliance object |
scenarios |
integer |
Number of scenarios |
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
roles |
List of string(200). May be None. |
List of EDC Roles referenced in this Test Case. |
testcaserun_set |
Object Manager. Set of related Test Case Runs |
Set of all Test Case Runs for this Test Case |
testcaserelatedobject_set |
Object Manager. Set of related test case objects such as Forms, Edit Checks etc. |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
get_simple_diff() |
List of changes to this Test Case. |
Function returning a list of changes made to this Test Case, including before/after comparison of the Test Case content
|
Test Case Run
Name |
Type |
Description |
|---|---|---|
name |
string(2000) |
Test Case Run Name |
started |
datetime. May be None. |
When the run started |
finished |
datetime. May be None. |
When the run finished |
state |
string(30) |
Run state (e.g. created, running, passed, failed, cancelled) |
testsetrun |
Test Set Run reference |
The Test Set Run this Test Case Run belongs to |
subjects |
Object Manager. Set of related Test Case Run Subjects |
Subjects created or selected during this Test Case Run |
Test Case Run Subject
Name |
Type |
Description |
|---|---|---|
subject_id |
string(100) |
Subject identifier |
attributes |
JSON object |
Runner-specific subject attributes. For Rave: |
created |
datetime |
When this subject record was created |
Unit Dictionary
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
UnitDictionaryName |
string(2000) |
Name |
StandardUnitName |
string(2000) |
|
DownloadedFromObjectId |
string(2000) |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Unit Dictionary reference. May be None. |
Copied from |
standard_library |
CRF Draft reference. May be None. |
Standard Library |
standard_match_identifier |
string(2000). May be None. |
Standard Match Identifier |
compliance_state |
string(2). May be None. |
Compliance state. 0 = Not Applicable / No Information Set, 1 = Calculating, 2 = Not Found, 3 = Different, 4 = Allowed Change, 5 = Match |
compliance_object |
Unit Dictionary reference. May be None. |
Compliance object |
als_fields_set |
Object Manager. Set of related Fields |
|
als_unitdictionaryentries_set |
Object Manager. Set of related Unit Dictionary Entries |
|
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
Unit Dictionary Entry
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
UnitDictionary |
Unit Dictionary reference. May be None. |
|
CodedUnit |
string(2000) |
|
Ordinal |
integer. May be None. |
|
ConstantA |
float. May be None. |
|
ConstantB |
float. May be None. |
|
ConstantC |
float. May be None. |
|
ConstantK |
float. May be None. |
|
UnitString |
string(2000) |
|
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
Draft Rule
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
CRFDraft |
CRF Draft reference |
Draft Rule is used in |
rule |
Rule reference |
Rule
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
CRFDraft |
CRF Draft reference |
Draft Rule is created in |
rule_id |
string(100). May be None. |
Rule identifier |
logic |
string(2000+) |
Logical expression |
rule_type_id |
integer |
Rule Type |
object_type_id |
integer |
Object Type |
object_identifier |
string(2000) |
Object identifier |
value_attribute_name |
string(200) |
Attribute identifier for Value Rules |
value_attribute_value |
string(8000) |
Attribute value for Value Rules |
priority |
integer |
|
active |
boolean |
Rule active? |
description |
string(2000+) |
Description of the rule |
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
properties_referenced |
List of string(2000). May be None. |
Names of Project Properties referenced |
draftrule_set |
Object Manager. Set of related Activated Rules |
Set of DraftRules in Drafts which make use of this Library Draft and which have this rule Activated. |
Object Label
An object label is a join between an Object and a Label. In practice this means you will access labels for an object, fetching the name of the label from the associated label object:
{% for object_label in form.labels.all() %}
{{ object_label.label.name }}
{% endfor %}
See Accessing Labels for more information.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
label |
Label reference. May be None. |
|
assigned_by |
User reference. May be None. |
assigned by |
assigned_on |
datetime |
assigned on |
draft |
CRF Draft reference. May be None. |
|
content_object |
Any kind of object; |
The object to which this label is attached (e.g. Form, Folder etc) |
object_id |
integer. May be None. |
The ID of the object to which this label is attached |
content_type_id |
integer. May be None. |
An ID representing the unique type of the Object referenced by the object_id |
Label
A definition of a label in a URL. Objects may be labelled with ObjectLabels which point to this Label definition.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
rave_url |
RaveURL reference |
rave url |
name |
string(100) |
Label Name |
description |
string(2000+). May be None. |
|
color |
string(2000+) |
Hex color code for label including # |
Comment
One or more comments may be associated with any Draft object.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
created_by |
User reference |
created by |
created |
datetime |
|
body |
string(2000+). May be None. |
Comment |
deleted |
boolean |
|
draft |
CRF Draft reference. May be None. |
|
content_object |
Any kind of object; |
The object this comment was made on (e.g. Form, Folder etc) |
object_id |
integer. May be None. |
The ID of the object to which this comment is attached |
content_type_id |
integer. May be None. |
An ID representing the unique type of the Object referenced by the object_id |
images() |
List of Embedded Images |
The images shown in this comment, oldest first. An image quoted inside a code block is shown as text, so it is not listed. |
PropertyDefinition
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
rave_url |
RaveURL reference |
rave url |
content_type_id |
integer |
An integer ID which identifies the type of object (Form, Folder etc) |
name |
string(100) |
|
description |
string(2000+). May be None. |
|
value_type |
string(20) |
Value type |
value_choices |
List of string(2000). May be None. |
Value choices |
display_order |
integer |
Display order |
show_in_lists |
boolean |
Show Property in Object List? |
include_in_agent_context |
boolean |
True if this Property's value is sent to AI Agents as part of the object's specification |
llm_instruction |
string. May be empty. |
Guidance for AI Agents on how to read this Property's value |
Custom Property
A custom property (metadata) value for an object.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
property |
PropertyDefinition reference |
|
value |
string(2000+) |
|
draft |
CRF Draft reference. May be None. |
|
content_object |
Any kind of object; |
The object this custom property is set on (e.g. Form, Folder etc) |
object_id |
integer. May be None. |
The ID of the object to which this custom property is attached |
content_type_id |
integer. May be None. |
An ID representing the unique type of the Object referenced by the object_id |
ActivityRecord
An ActivityRecord represents an audit trail record for an object.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
organization |
Organization reference. May be None. |
|
rave_url |
RaveURL reference. May be None. |
rave url |
project |
Project reference. May be None. |
|
draft |
CRF Draft reference. May be None. |
|
action |
string(1) |
Action type (C)reate / U(pdate) / D(delete) |
description |
string(2000+) |
Description of the change |
when |
datetime |
A datetime in UTC timezone when this action was performed |
who |
User reference |
A reference to the user who performed this action |
content_type_id |
integer. May be None. |
An ID representing the unique type of the Object referenced by the object_id |
object_id |
integer. May be None. |
object id |
Custom Object Definition
A definition of a type of object in a URL. Drafts may have instances of these types. Built-in types such as Forms and Edit Checks have a definition too, which holds their Agent instruction. Reach the definition from any object with object_definition, or from the URL with customobjectdefinition_set when no object of the type exists.
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
rave_url |
RaveURL reference |
rave url |
name |
string(100) |
The name of the custom object, e.g. "Report Specification" |
plural_name |
string(100) |
The plural name of the custom object e.g. "Report Specifications" |
external_name |
string(31) |
The name this type is given in files that go in and out of TrialGrid. For a type your Organization defined, a Draft download writes its objects to a sheet of this name, so it is what tells you which type a sheet holds. Built-in types such as Forms and Edit Checks are written to the fixed sheets of the Rave ALS format instead, which this name does not give. |
icon |
string(50) |
The name of the icon assigned this custom object type |
description |
string(2000+). May be None. |
|
parent_model |
Set if this is a child object of another custom object, links to the parent custom object. |
|
display_order |
Integer |
The position of this custom object definition in the display list |
display |
Boolean |
When False this object will not have a listing in the Draft except in child-object lists if it is a child object. |
has_dedicated_model |
Boolean |
True for a built-in type such as Forms, Edit Checks or Test Cases. False for a type whose objects are Custom Objects. |
user_managed |
Boolean |
True for a type defined by your Organization. False for a built-in type, and for a type that is supplied by the system and cannot be edited. |
has_ordinal |
Boolean |
Do objects of this type have Ordinals |
identifier_parts |
Tuple of strings. May be empty. |
The names whose values make up an object's identifier, in the order they are joined, with identifier_separator between each pair. For a type your Organization defined these are its identifier properties, and a Draft download heads each property's column with the property name, so these are the headings to read an object's identifier out of a sheet. For a built-in type there is one part, the column of the model that holds the identifier, which is not always the heading the download writes it under: a Standard Rule's rule_id is written under "Identifier". Empty for a type with no identifier property, whose objects have no identifier. |
identifier_separator |
string(10) |
Separator for identifiers if there are multiple identifiers, defaults to " | " |
llm_instruction |
string. May be empty. |
Guidance for AI Agents on how to read objects of this type |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties defined for this type of object in its URL, whether or not any object has them set. Loop properties.values() to list them, or index by lowercase name. Each has the same attributes as a property read from an object, with an empty value and is_set False. |
CustomObject
Name |
Type |
Description |
|---|---|---|
id |
integer |
|
ordinal |
integer |
If the custom object definition has ordinal then this will be set to the ordinal of this instance in the draft or if a child object of another custom object, the ordinal within that parent object. |
last_updated_by |
User reference. May be None. |
last updated by |
last_updated |
datetime in UTC timezone. May be None. |
last updated |
CRFDraft |
CRF Draft reference |
|
identifier |
string(2000) |
The identifier (name) of the custom object, made up from identifier property values. |
fingerprint |
string(40) |
Fingerprint Hash. See Fingerprints. |
copied_from |
Custom Object reference. May be None. |
Reference to the object this was copied from |
custom_object_definition |
reference to the definition of this custom object. |
|
customobject_set |
Object Manager |
Set of child Custom Objects for this object if this is a parent object. |
labels |
Object Manager. Set of related Object Labels |
Set of related Object Labels. See Labels. |
properties |
Ordered dictionary keyed by the lowercase property name. |
The Custom Properties (metadata) set on this object. Loop properties.values() to list them, or index by lowercase name, e.g. properties["sdtm domain"].value. See Custom Properties (Metadata). |
object_definition |
Custom Object Definition reference. May be None. |
The definition of this type of object in the URL, which holds the Agent instruction for the type, e.g. object_definition.llm_instruction. None if the URL has no definition for this type. |
parent_model |
Custom Object reference if this is a child of another custom object. May be None. |
Only set if this custom object is a child of a parent custom object. |