Package: usdm
CDISC / Transcelerate DDF USDM PackageThis package provides an implementation of the Digital Data Flow (DDF) CDISC / TransCelerate Unified Study Definitions Model (USDM). Two main parts are provided:Within theusdm_modeldirectory are a set of classes reflecting the USDM model as transported using the DDF USDM APIWithin theusdm_exceldirectory is a class,USDMExcel, that can be used to import an entire study definition from an excel file and build the equivalent json as defined by the APIWarningThis package was, originally, not intended for public use and, consequently, only informal testing has been performed on the package to date. Formal testing has just begun. Use this at your own risk.SetupSetup is via pippip install usdmThe package requires a single environment variableCDISC_API_KEYthat should be set to your CDISC library API key. This is used to access CDISC CT and BC definitions in the CDISC library.See below for a simple example program.USDM ModelNot further information as yet.Excel ImportExample ProgramThe following code imports an Excel file (in the appropriate structure) and processes it. The data are then exported to a file in JSON API format.Note: The logging is not needed.import logging
log = logging.basicConfig(level=logging.INFO)

import json
from usdm_excel import USDMExcel

excel = USDMExcel("source_data/simple_1.xlsx")
with open('source_data/simple_1.json', 'w', encoding='utf-8') as f:
  f.write(json.dumps(json.loads(excel.to_json()), indent=2))Format of WorkbookExampleAn example spreadsheet in maintained within thedocument directory.SheetsThe workbook consists of several sheets each with a dedicated purpose. All sheets must be present except for those marked optional.Study sheetStudy Identifiers sheetStudy Amendments sheetStudy Design sheetOne or more Timeline sheetsStudy Design Timing sheetStudy Design Activities sheet (optional)Study Design Indications sheetStudy Design Interventions sheetStudy Design Populations sheetStudy Design Objectives and Endpoints sheetStudy Design Eligibility Criteria sheetStudy Design Estimands sheetStudy Design Procedures sheetStudy Design Encounters sheetStudy Design Elements sheetStudy Design Content sheetStudy Design Sites sheet (optional)Dictionaries SheetConfiguration sheetThe content of each sheet is described below.CDISC TerminologyFor those cells where CDISC codes are used the user can enter either the CDISC C Code, for exampleC15602, the CDISC submission value, for examplePHASE III TRIAL, or the preferred term, for examplePhase III TrialMultiple ValuesSome cells allow for multiple values. These are all comma separated. If users wish to include a comma within such strings then the string can be enclosed in quotes. For example123, "123,456", 789.External TerminologyFor those cells where external CT is referenced the user can enter code in the form<code system>: <code> = <decode>. For exampleSPONSOR: A = decode 1, SPONSOR: B = decode 2. Where multiple codes are needed then the values are separated by commas.Boolean ValuesFor boolean fields the following can be used to indicate atruevalue'Y', 'YES', 'T', 'TRUE', '1'or the lower case equivalents.Address ValuesAn address is of the form:line,district,city,state,postal_code,<country code>. All fields are text strings except for<country code>.<country code>is either a two or three character ISO-3166 country code. Note that|can be used in place of the commas for backward compatibility.Identifiers and Cross ReferencesSome content defined within the sheets contain unique identifiers such that the content can be cross referenced in other sheets. This is done so as to link content or expand definitions. Identifiers are simple strings that need to be unique within the workbook. There is a single definition and one or more cross references.See theinfographicfor further information.Timing ValuesA number of fields specify timing values, either single relative values or ranges. These can be entered as
aTiming Valueof<value> <unit>or aTiming Rangeof<lower>..<upper> <unit>. The unit can be entered as follows:Years: 'Y', 'YRS', 'YR', 'YEARS', 'YEAR'Months: 'MTHS', 'MTH', 'MONTHS', 'MONTH'Weeks: 'W', 'WKS', 'WK', 'WEEKS', 'WEEK'Days: 'D', 'DYS', 'DY', 'DAYS', 'DAY'Hours: 'H', 'HRS', 'HR', 'HOURS', 'HOUR'Minutes: 'M', 'MINS', 'MIN', 'MINUTES', 'MINUTE'Seconds: 'S', 'SECS', 'SEC', 'SECONDS', 'SECOND'So3 Y,3 YRS,3 YR,3 YEARS,3 YEARare all equivalent. Only a single value and unit should be entered, i.e. combination values are not supported.Templated TextSome entries can include "tags" that allow the text to reference structured content from elsewhere in the model. An example is an activity name. These sections of text are formatted as[tag_name]within the text. Thetag_namerefers to an entry within a dictionary (see the dictionaries sheet)An example of Templated Text isSubjects shall be between [min_age] and [max_age]where the min and max ages will be inserted using the dictionary entries that refer to particular attribute values from within the structured parts of the model.Sheet DescriptionsThe sheet descriptions detail the fields found within each sheet and the details of the data required. Note:Some fields have multiple names due to model changes and a desire to preserve backwards compatibility. Any of the choices documented can be used.Some columns are optional and thus can be included or omitted. Again this is to preserve backwards compatibility. A default value is specified if the column is not included.Study SheetSheet NamestudySheet ContentsThe study sheet consists of two parts, the upper section for those single values and then a section for the potentially repeating protocol version informaionFor the single values, the keyword is in column A while the value is in column B.RowRow NamePurposeFormat and Values1studyTitleThe study titleText string2studyVersionString versionText string3studyType or typeThe study typeCDISC code reference4studyPhaseThe study phaseCDISC code reference5studyAcronymThe study acronymText string6studyRationalethe study rationaleText string7businessTherapeuticAreasThe set of business therapuetic area codesExternal CT code format. Likely filled with sponsor terms8briefTitleThe brief titleText string9officialTitleThe officiall titleText string10publicTitleThe public titleText string11scientificTitleThe scientific titleText string12protocolVersionThe version of the protocolText string13protocolStatusThe statusCDISC code referenceA header row in row 16 followed by repeating rows from row 17, containing a series of dates:ColumnColumn NamePurposeFormat and ValuesAcategoryThe date categoryEitherstudy_versionorprotocol_documentfor a date that applies to the study version or the documentBnameA name for the datetext stringCdescriptionA date descriptionText string, can be blankDlabelA date labelText stringEtypethe type of dateCDISC code referenceFdateThe dateDate field, dd/mm/yyyyHscopesThe geographic scopes for the dateGeographic scoped, see belowThe geographic is of the form:Global,Region: <region>or ,Country: <country>. Regions and Countries are taken from the ISO3166 value set. Examples areGlobalorRegion: Europe, Country: USA. Where multiple codes are needed then the values are separated by commas. Note, if a global entry is specified then no other values are required and will be ignored.Study Identifiers	SheetSheet NamestudyIdentifiersSheet ContentsA header row in row 1 followed by repeating rows from row 2, each containing a study identifier:ColumnColumn NamePurposeFormat and ValuesAorganisationIdentifierSchemeThe scheme for the organisation identifier.Example would be 'DUNS'BorganisationIdentifierOrganisation identifierText stringCorganisationName or nameOrganisation nameText stringD (optional)labelDisplay labelText string, can be empty. Default value is ''EorganisationType or typeOrganisation typeCDISC code referenceFstudyIdentifierThe identifier for the studyText stringGorganisationAddressThe organisation addressAddressStudy Amendments	SheetSheet NamestudyAmendmentsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing a study amendment:ColumnColumn NamePurposeFormat and ValuesAnumberThe amendment numberIntegerBsummaryThe amendment summaryText stringCsubstantialImpactTrue or false value  indicating if the amendment is substantialBooleanDprimaryReasonPrimary reason for the amendmentCDISC code referenceEsecondaryReasonsSecondary reasons for amendment. Multiple values can be supplied separated by a commaCDISC code referenceFenrollmentThe current state of subject enrollment, either global, regional or countryGeographic scoped, see belowThe enrollment data is of the form:Global: <enrollment>,Region: <region>=<enrollment>or ,Country: <country>=<enrollment>.
The enrollment is either a percentage or an absolute value. Regions and Countries are taken from the ISO3166 value set. Examples areGlobal: 65%orRegion: Europe=15, Country: USA=20%. Where multiple codes are needed then the values are separated by commas. Note, if a global entry is specified then no other values are required and will be ignored.The primary and secondary reasons should be set to one (primary) or one or more (secondary) values from the following reasons:Regulatory Agency Request To AmendNew Regulatory GuidanceIRB/IEC FeedbackNew Safety Information AvailableManufacturing ChangeIMP AdditionChange In StrategyChange In Standard Of CareNew Data Available (Other Than Safety Data)Investigator/Site FeedbackRecruitment DifficultyInconsistency And/Or Error In The ProtocolProtocol Design ErrorOtherNot ApplicableStudy Design sheetSheet NamestudyDesignSheet ContentsThe study design sheet consists of two parts, the upper section for those single values and then a section for the arms and epochs.For the single values, the keyword is in column A while the value is in column B. Some rows can repeatRow NamePurposeFormat and ValuesRepeatstudyDesignName or nameStudy design nameText stringNostudyDesignDescription or descriptionStudy design descriptionText stringNolabelStudy design label. Default value is ''Text stringNotherapeuticAreasSet of therapeutic area codesSet of external CT references, comma separatedNostudyDesignRationaleStudy design rationaleText stringNostudyDesignBlindingSchemeCode for the blinding schemeCDISC code referenceNotrialIntentTypesCodes for the trial intent typesComma separated CDISC code referencesNotrialTypesCode for the trial typeCDISC code referenceNointerventionModelCDISC code referenceNomaskingA masking roleTakes form of Role=description where the role is a CDISC Code ReferenceYescharacteristicsSet of characteristicsSet of CDISC code referencesNomainTimelineName of main timeline sheetThis must be presentNootherTimelinesNames of other timeline sheeText stringCommma separated list of sheet names. Can be emptyNoFor the arms and epochs, a simple table is required. The table starts in row 12 and can consists of a header row and 1 or more arm rows.The header row consists of a cell in column A that is ignored followed by 1 or more cells (columns) containing the epoch names. Each epoch name should have a corresponding entry in the Study Design Epochs sheet, see below.The arm rows consist of the arm name in the first column followed by a cells for each epoch containing one or more references to study design elements defined in the studyDesignElements sheet. Each arm name should have a corresponding entry in the Study Design Arms sheet, see bwlow.Study Design Arms sheetSheet NamestudyDesignArmsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing the details of a study arm:ColumnColumn NamePurposeFormat and ValuesAstudyArmName or nameIdentifierText string. Should match an arm name in the Study Design sheetBstudyArmDescription or descriptionDescriptionText string, can be emptyC (optional)labelDisplay labelText string, can be empty. Default value is ''DstudyArmType or typeThe arm typeCDISC code referenceEstudyArmDataOriginDescription or dataOriginDescriptionThe description of the data origin for the armText stringFstudyArmDataOriginType or dataOriginTypeThe type of arm data originCDISC code referenceStudy Design Epochs sheetSheet NamestudyDesignEpochsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing the details of a study epoch:ColumnColumn NamePurposeFormat and ValuesAstudyEpochName or nameThe epoch nameText string. Should match an epoch name in the Study Design sheetBstudyEpochDescription or descriptionDescriptionText string, can be emptyC (optional)labelDisplay labelText string, can be empty. Default value is ''DstudyEpochType or typeThe epoch typeCDISC code referenceV1 Timeline sheetsSheet NameAs defined within the study design sheet, see above.Sheet ContentsGeneralThis is a complicated sheet. It is, in essence, an enhanced SoA. There are several sections within the sheet:The name, description and condition located top rightThe remainder of the sheet is the SoA with:The timing set in the top rows, the "timepoints"The activities down the left hand sideThe link between activities and "timepoints", the classic 'X'Name, Description, ConditionThe name description and condition are located in columns A and B, rows 1 and 2. It is a vertical name value pair configurationRowRow NamePurposeFormat and Values1NameThe timeline nameText string2DescriptionTimeline descriptionText string3ConditionTimeline entry conditionText stringTimingThe timing seciton consists of multiple columns starting in column D. As many columns as needed can be created. A title block is held in Column C. The section consists of eight rows in rows 1 to 8 as follows:RowRow NamePurposeFormat and Values1EpochThe name of the epoch within which the timepoint falls. Note the cells in this row can be merged to link an epoch with many timepointsText string2CycleThe cycle in which the "timepoint" exists. Can be empty or set to '-' (empty)Text string3First Cycle StartThe time at which the cycle starts. Should be specified. Empty if not part of a cycleText string4Cycle PeriodThe cycle period. Shoudl be specified. Empty if not part of a cycleText string5Cycle End RuleThe cycle end rule. Can be empty. Empty if not part of a cycleText string6Timing"Timepoint" timing.A timing string, see below7Encounter xrefCross reference to the encounter in which the timepoint belongs. Can be emptyText string8WindowTiming window. Can be emptyATiming RangeThe timepont timing takes the form defined as follows (using pseudo BNF).<entry> ::= <type> [<count>] : [<relative timing>]
<type> ::= N | P| A | C
<count> ::= any positive integer (will default to 1)
<relative timing> ::= A single Timing ValueN = Next, P = Previous, A = Anchor and C = Cycle Start. The count when used with N or P indicates a relative to the Nth next or previous timepoint. When not specificed it defaults to 1.P2: +14 Daysindicates the timepoiint is relative to the 2nd previous timepoint by 14 days. A plus or minus sign can be entered but will be ignored as times are absolute.N1: 1 Dayis equivalent toN: 1 Dayand indicates the timepoiint is relative to the next timepoint by 1 day.A:is an anchorActivityThe activity section consists of three columns, A to C, starting in row 10, row 9 being a title row. As many rows as needed can be added.ColumnColumn NamePurposeFormat and ValuesAParent ActivityParent Activity. Not used currentlySet to '-'BChild ActivityChild activity nameText stringCBC/Procedure/TimelineA set of BCs, procedures or timelines. Comma separated or the form detailed below:---The BC, procedure, timeline format is defined as follows (using pseudo BNF):<entries> ::= <entry> | <entries> <entry>
<entry> ::= <type> : <name> | empty
<type> ::= PR | BC | TL
<name> ::= <name of item>BC: Age, BC: Sec, PR:Informed Consent Form, TL:Exerciseindicates the activity consists of the bcs Age and Sex, a procedure for the informed consent and a timeline specified in the Exercise sheet.LinkThe link section consists of a set of cells into which an upper case 'X' can be placed to link a timepoint with an activity. Otherwise the cell will be ignored. A '-' can be used to fill in cells but "empty".V2 Timeline sheetsSheet NameAs defined within the study design sheet, see above.Sheet ContentsGeneralThis is a complicated sheet. It is, in essence, an enhanced SoA. There are several sections within the sheet:The name, description and condition located top rightThe remainder of the sheet is the SoA with:The timing set in the top rows, the "timepoints"The activities down the left hand sideThe link between activities and "timepoints", the classic 'X'Name, Description, ConditionThe name description and condition are located in columns A and B, rows 1 and 2. It is a vertical name value pair configurationRowRow NamePurposeFormat and Values1NameThe timeline nameText string2DescriptionTimeline descriptionText string3ConditionTimeline entry conditionText stringTimingThe timing seciton consists of multiple columns starting in column D. As many columns as needed can be created. A title block is held in Column C. The section consists of eight rows in rows 1 to 8 as follows:RowRow NamePurposeFormat and Values1nameIdentifierText string2descriptionDescriptionText string, can be empty3labelDisplay labelText string, can be empty4typeTimepoint typeActivityorDecision5defaultTimepoint LinkThe name (as per row 1) of the next activity in the sequence, the default connection6conditionTimepoint LinksThe names (as per row 1) of the activities to link to for one or more conditions (command separated list)7epochName of the epoch within which the timepoint fallsText string8encounterName of the encounter in which the timepoint belongsText string. Can be emptyActivityThe activity section consists of three columns, A to C, starting in row 10, row 9 being a title row. As many rows as needed can be added.ColumnColumn NamePurposeFormat and ValuesAParent ActivityParent Activity. Not used currentlySet to '-'BChild ActivityChild activity nameText stringCBC/Procedure/TimelineA set of BCs, procedures or timelines. Comma separated or the form detailed below:---The BC, procedure, timeline format is defined as follows (using pseudo BNF):<entries> ::= <entry> | <entries> <entry>
<entry> ::= <type> : <name> | empty
<type> ::= PR | BC | TL
<name> ::= <name of item>BC: Age, BC: Sec, PR:Informed Consent Form, TL:Exerciseindicates the activity consists of the bcs Age and Sex, a procedure for the informed consent and a timeline specified in the Exercise sheet.LinkThe link section consists of a set of cells into which an upper case 'X' can be placed to link a timepoint with an activity. Otherwise the cell will be ignored.Study Design Timing sheetSheet NamestudyDesignTimingSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing encounter definitions.ColumnColumn NamePurposeFormat and ValuesAnameNameText stringBdescriptionDescriptionText string, can be emptyClabelDisplay labelText string, can be emptyDtypeThe type of timingEitherBefore,AfterorFixedEfromTimeing point refThe name of a timing point from a timeline sheetEtoTimeing point refThe name of a timing point from a timeline sheetEtimingValueTimingThe relative value for aBefore,Aftertiming value or an absolute time forFixedEtoFromTiming precisionEitherS2S,S2E,E2S,E2Eto set the precise timing for aBefore,Aftertiming valueEwindowTiming windowA timing rangeStudy Design Activities sheetSheet NamestudyDesignActivitiesSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing encounter definitions.ColumnColumn NamePurposeFormat and ValuesAactivityName or nameNameText stringBactivityDescription or descriptionDescriptionText string, can be emptyC (optional)labelDisplay labelText string, can be empty. Default value is ''Note that this sheet is optional. If the sheet is not provided the activities will be created from those defined in the timeline sheets. These activities will have the name and description set to the name used in the timeline sheet and no condition will be set.If the sheet is provided but there is no definition in the sheet for an activity referenced in a timeline sheet then the name and description will be set to the name used in the timeline sheet and no condition will be set.Study Design Indications SheetSheet NamestudyDesignIndicationsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing an indication or intervention:ColumnColumn NamePurposeFormat and ValuesAnameThe nameText stringBdescriptionDescriptionText string, can be emptyClabelDisplay labelText string, can be emptyDisRareDiseaseRare disease flagBooleanEcodesThe set of indication or intervention codesA set of external CT codes, comma separatedStudy Design Interventions SheetSheet NamestudyDesignInterventionsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing an intervention. Note that columns J through S can repeat for the same content in columns A to I. For additional administrations rows leave columns A to I blank.ColumnColumn NamePurposeFormat and ValuesAnameNameText stringBdescriptionDescriptionText string, can be emptyClabelDisplay labelText string, can be emptyDcodesThe set of intervention codesA set of external CT codes, comma separatedEroleThe role th eintervanetion playsA single M11 codeFtypeThe intervention typeGpharmacologicalClassThe pharmalogical classA single external CT codeHproductDesignationThe product designationA single M11 codeIminimumResponseDurationThe minimum response durationJadministrationNameNameText stringKadministrationDescriptionDescriptionText string, can be emptyLadministrationLabelDisplay labelText string, can be emptyMadministrationRouteRoute of administrationCDISC code referenceNadministrationDoseDose quantityQuantityOadministrationFrequencyAdministration freqeunceCDISC code referencePadministrationDurationDescriptionDescriptionText string, can be emptyQadministrationDurationWillVaryDuration will vary flagBooleanRadministrationDurationWillVaryReasonDuration will vary reasonText stringSadministrationDurationQuantityadministration quantityQuantityStudy Design Populations sheetSheet NamestudyDesignPopulationsSheet ContentsA header row in row 1 followed by repeating rows from row 2 containing population or sub-population definitions. Note that not every entry in columns E through I need to be filled in, just enough to define  either the whole population of the sub-populations. Sub-population need not be specificed.ColumnColumn NamePurposeFormat and ValuesAlevelLevel of entrySet to eitherMAINfor the main population entry. All other values equate to a cohort (sub population) entryBnameIdentifierText stringCdescriptionDescriptionText string, can be emptyDlabelDisplay labelText string, can be emptyEplannedCompletionNumberNumber of participants to complete the studyIntegerFplannedEnrollmentNumberNumber of participants to be enrolledIntegerGplannedAgeAge range of participantsRangeHplannedSexOfParticipantsSex of participantsCDISC code referenceIincludesHealthSubjectsHealthy subjects flagBooleanStudy Design Objectives and Endpoints sheetSheet NamestudyDesignOESheet ContentsA header row in row 1 followed by repeating rows from row 2, containing objective and endpoint definitions. Note that columns D through G can repeat for the same content in columns A to C. For additional endpoint rows leave columns A to C blank.ColumnColumn NamePurposeFormat and ValuesAobjectiveXref	or objectiveNameIdentifierText stringBobjectiveDescriptionDescriptionText string, can be emptyC (optional)objectiveLabelDisplay labelText string, can be empty. Default value is ''DobjectiveTextThe objectiveTemplated textEobjectiveLevelObjective levelCDISC code referenceFobjectiveDictionaryDictionary cross referenceThe dictionary from which the templated text tags are taken. If no tags are used can be emptyGendpointXref or endpointNameIdentifierText string. Note columns G to M can repeat for each endpoiint for an objectiveHendpointDescriptionDescriptionText string, can be emptyI (optional)endpointLabelDisplay labelText string, can be empty. Default value is ''JendpointTextThe objectiveTemplated textKendpointPurposeLendpointLevelLevelCDISC code referenceMendpointDictionaryDictionary cross referenceThe dictionary from which the templated text tags are taken. If no tags are used can be emptyStudy Design Eligibility Criteria sheetSheet NamestudyDesignEligibilityCriteriaSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing eligibility definitions.ColumnColumn NamePurposeFormat and ValuesAcategoryCategoryEitherInclusionorExclusionBidentifierIdentifierText string, the identifier for the criteriaCnameThe name identifier for the criteriaText stringDdescriptionDescriptionText string, can be emptyElabelDisplay labelText string, can be emptyFtextCriteria textTemplated textGdictionaryDictionary cross referenceThe dictionary from which the templated text tags are taken. If no tags are used can be emptyStudy Design Estimands sheetSheet NamestudyDesignEstimandsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing estimand definitions. Note that column H can repeat for the same content in columns A through G.ColumnColumn NamePurposeFormat and ValuesAxref or nameIdentifierText stringBsummaryMeasureThe summary measureText stringCpopulationDescriptionDescriptionText string, can be emptyD (optional)labelDisplay labelText string, can be empty. Default value is ''EintercurrentEventName or nameNameText stringFintercurrentEventDescription or descriptionDescriptionText string, can be emptyGtreatmentXrefTreatment cross referenceCross reference to a treatmentHendpointXrefEndpoint cross referenceCross reference to an endpontIintercurrentEventstrategyStrategyText string. This column can be repeated fo reach intercurrent event required for the EstimandStudy Design Procedures sheetSheet NamestudyDesignProceduresSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing procedure definitions.ColumnColumn NamePurposeFormat and ValuesAxref, procedureName or nameIdentifierText stringBprocedureDescription or descriptionTypeText string, can be emptyC (optional)labelDisplay labelText string, can be empty. Default value is ''DprocedureTypeTypeText stringEprocedureCode or codeCode referenceExternal CT referenceStudy Design Encounters sheetSheet NamestudyDesignEncountersSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing encounter definitions.ColumnColumn NamePurposeFormat and ValuesAxrefIdentifierText stringBencounterName or nameNameText stringCencounterDescription or descriptionDescriptionText string, can be emptyD (optional)labelDisplay labelText string, can be empty. Default value is ''EencounterType or typeThe typeCDISC code referenceFencounterEnvironmentalSettingEncounter environmentOne or more CDISC code referencesGencounterContactModesContact modesOne or more CDISC code referencesHtransitionStartRuleStart ruleText stringItransitionEndRuleEnd RuleText stringJwindowTiming reference that defines the windowText stringStudy Design Elements sheetSheet NamestudyDesignElementsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing element definitions.ColumnColumn NamePurposeFormat and ValuesAxrefIdentifierText stringBstudyElementName or nameNameText stringCstudyElementDescription or descriptionDescriptionText string, can be emptyD (optional)labelDisplay labelText string, can be empty. Default value is ''EtransitionStartRuleStart ruleText stringFtransitionEndRuleEnd ruleText stringStudy Design Content sheetSheet NamestudyDesignContentSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing the narrative content:ColumnColumn NamePurposeFormat and ValuesAsectionNumberThe section numberText string with section numbers separated by '.' characters. Section numbers from row to row can only increase by a single level down, e.g. '1.2' to '1.2.1' and not '1.2.1.1'. The section numbers will be used to create parent child relationships in the data created.BnameName of the section.Text string. Can be left blank in which case a default value will be used based on the section numberCsectionTitleThe section titleText StringDsectionTextThe section textHTML formatted text StringThere are some prefined macros that can be used to generate content. These are pre processed when the content sheet is read and transated into the appropriate USDM referencesusdm:reforusdm:tag. These macros use a similar syntax to the USDM references:<usdm:macro id="macro name" attrib1="data1" attrib2="data2" .../>Macro NamePurposeAttributesxrefRefer to a data element by name reference'klass', 'name' and 'attribute'. The name is the name used within the workbook to define the content.imageInsert an mage into the document'file' and 'type'. The file attribute specifies the name of a file in the same directory as the Excel workbook.elementRefer to a predefined element'name' of the element. Supported element names are 'study_phase', 'study_short_title', 'study_full_title', 'study_acronym', 'study_rationale', 'study_version_identifier', 'study_identifier', 'study_regulatory_identifiers', 'study_date', 'approval_date', 'organization_name_and_address', 'amendment' and 'amendment_scope'sectionAdd a pre defined section into the document'name' and 'template'. Supported section are 'title_page', 'inclusion', 'exclusion' and 'objective_endpoints'. Supported templates are 'm11' and 'plain'noteInsert a note into the document'text'Examples of macros are:<usdm:macro id="xref" klass="Objective" name="OBJ1" attribute="text"/><usdm:macro id="xref" klass="StudyDesignPopulation" name="STUDY_POP" attribute="@plannedCompletionNumber/Range/maxValue"/><usdm:macro id="element" name="study_identifier"/><usdm:macro id="image" file="design.png" type="png"/><usdm:macro id="section" name="inclusion" template="plain"/><usdm:macro id="note" text="A note here please"/>Study Design Sites sheetSheet NamestudyDesignSitesSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing organizations and associated sites. Note that columns G through I can repeat for the same content in columns A to F. For additional site rows leave columns A to F blank.ColumnColumn NamePurposeFormat and ValuesAnameOrganization nameText stringBlabelOrganization display labelText string, can be emptyCtypeOrganisation typeCDISC code referenceDidentifierSchemeThe scheme for the organisation identifierExample would be 'DUNS'EidentifierOrganisation identifierText stringFaddressOrganisation addressAddressGsiteNameSite nameFormated using a pipe delimited form, see belowHsiteDescriptionSite descriptionText string, can be emptyIsiteLabelSite display LabelText string, can be emptyStudy Design Conditions sheetSheet NamestudyDesignConditionsSheet ContentsA header row in row 1 followed by repeating rows from row 2, containing the conditions:ColumnColumn NamePurposeFormat and ValuesAnameCondition nameText stringBlabelCondition display labelText string, can be emptyCdescriptionCondition descriptionCDISC code referenceDtextThe condition textText stringEappliesToList of cross references for items to which the condition appliesComms separated listFcontextList of cross references for the context in which the condition appliesComma separated listDictionary SheetSheet NamedictionariesSheet ContentsA header row in row 1 followed by repeating rows from row 2. Each row contains a dictionary and dictionary entry definitions. The sheet defines one or more dictionaries and the entries within each dictionary. Note that columns D through F can repeat for the same content in columns A to C. For additional dictionary entry rows leave columns A to C blank.ColumnColumn NamePurposeFormat and ValuesAnameThe dictionary nameText stringBdescriptionDescriptionText string. Can be emptyClabelLabelText string. Can be emptyDkeyThe entry keyText String. Must be unique within the dictionaryEclassThe class nameThe name of the class within the model from which the data for the dictionary entry is to be takenFxrefCross reference nameThe name of the instance from which the data is to be taken. Use the entries in the name columns from other sheetsGatrributeThe attribute path or nameThe name or path of the attribute from which the data is to be takenH (optonal)valueThe valueA fixed value. If this column is used then the 'class', 'xref' and 'attribute' fields should be emptyThe attribute path follows a simplified 'Xpath' syntax of@attribute-name[/class/@attribute-name]form. The class attribute pairs can be repeated to arrive as the desired attribute. This has been provided since not all instances of all classes are named which prevents thenm being addressed directly, for example Range of Quantity instances.An example for accessing the Population planned age, max value is@plannedAge/Range/@maxValue. In this instance theclasscolumn would be set toPopulationand thexrefcolumn set to the name of the Population entry in the population shseet.Note that the '@' symbol does not need to be included with attribute names but it guides the eye making it easier to read the path.Configuration SheetSheet NameconfigurationSheet ContentsA set of rows consisting of configuration parameters. The first column is the type of configuration parameter while the second is the value. The values for specific parameters may vary in their formatParameterDescriptionFormat and ValuesCT VersionAllows for the version of a specific external CT to be set. Multiple rows can be included to set the versions for several CTsOf the form CT name = Version value, For exampleSNOMED = 21st June 2012Empty NoneAllows for string fields to be set to '' rather than null/none values so as to accomodate the SDR validation checksSet to 'EMPTY' to use ''. Any other value will permit  null values to be usedSDR Prev NextDeprecatedDeprecatedSDR RootDeprecatedDeprecatedSDR DescriptionDeprecatedDeprecatedIssuesSee thegithub issuesBuild NotesBuild withpython3 -m build --sdist --wheelUpload to pypi usingtwine upload dist/*