1 / 75

Define.XML

Define.XML. A CASE study describing how to produce Define.XML from within SAS. Dianne Weatherall Sep 2012. Topics for Discussion. Note. Examples and code are based on the Draft Define V2 Slides are based on SDTM Define, but similar principles can be applied to the ADaM Define

camille
Download Presentation

Define.XML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Define.XML A CASE study describing how to produce Define.XML from within SAS Dianne Weatherall Sep 2012

  2. Topics for Discussion

  3. Note • Examples and code are based on the Draft Define V2 • Slides are based on SDTM Define, but similar principles can be applied to the ADaMDefine • Key differences are explained in the Define Draft V2

  4. WHY

  5. Requirements? • What? • How? • Summary • Why? Why?

  6. Requirements? • What? • How? • Summary • Why? Why? • To describe what is included in the electronic data transfer (datasets, variables, codelists, etc) -> METADATA-> an elaborate “PROC CONTENTS” and more • To provide a user-friendly document with links to navigate easily, and to access information easily • To easily access the annotated CRF and datasets • To have a standard format to describe the electronic data transfer • Why XML? • Machine readable format for use by software applications • Browser-based report (through the use of an XSL stylesheet) • Vendor neutral, platform independent

  7. REQUIREMENTS

  8. Requirements? • What? • How? • Summary • Why? Requirements? • Metadata in a usable format, easy to capture and ability to import into SAS (recommended format = Excel) • Dataset metadata: list of domains -> name, description, class, structure, purpose, keys, location • Variable metadata:list of variables: -> name, label, type, controlled terms / format, origin, role, comment • Controlled terms:coded value, decode • Value-level metadata:variable, where, type, controlled terms or format, origin, computation method • Computational algorithms:reference name, name, computation method • Data in XPT format • Annotated CRF in PDF format • Supporting documentation: • Reviewers guide / complex algorithms in PDF format

  9. Requirements? • What? • How? • Summary • Why? Requirements? • Example: dataset metadata

  10. Requirements? • What? • How? • Summary • Why? Requirements? • Example: variable metadata

  11. Requirements? • What? • How? • Summary • Why? Requirements? • Example: controlled terms • Usually includes all possibilities on the CRF, not only those in the data • Needs to be set up from the CRF, not the data

  12. Requirements? • What? • How? • Summary • Why? Requirements? • Example: value-level metadata • 2 types: SUPPQUAL (QVAL) and FINDINGS (ORRES) • Can be generated from the data, especially electronic labs

  13. Requirements? • What? • How? • Summary • Why? Requirements? • Example: computational algorithms • Used for standard algorithms that can be applied across variables • Very long derivations should rather be specified in a PDF file, and linked from the variable comment

  14. Requirements? • What? • How? • Summary • Why? Requirements? • Specification vs Metadata • Specification • Instructions to a programmer to get to the final SDTM / ADaM dataset • Contains derivations that often refer to raw variable names (for programming) • May contain SAS code in some cases • May refer to other documents (e.g. SAP etc) • Metadata • Describes the contents of the final SDTM/ADaM dataset • Contains derivations that describe in words how the data was derived (for traceability and reviewer information) • Does not contain SAS code and does not refer to raw variables • Contains links to other documents

  15. Requirements? • What? • How? • Summary • Why? Requirements? • Specification vs Metadata • To combine or not to combine? • It makes sense to create one document that serves both purposes • Prevents rework • Consistency • Less work • BUT… make sure you separate programmer notes from reviewer comments • Example:

  16. WHAT

  17. What? • Define.XML with and without stylesheet

  18. Requirements? • What? • How? • Summary • Why? What?

  19. Requirements? • What? • How? • Summary • Why? What?

  20. Requirements? • What? • How? • Summary • Why? What?

  21. Requirements? • What? • How? • Summary • Why? What?

  22. Requirements? • What? • How? • Summary • Why? What?

  23. Requirements? • What? • How? • Summary • Why? What? • Define-XML Version 2.0.0 can be used for SDTM and ADaM • Terminology: • Def: declaration of an object • Ref: reference to an object • OID: identify a metadata object • Validation of the Define.XML: • It must properly reference versions of the CDISC standards • Conform to schemas • Meet all requirements of the Define-XML Specification • Can be checked using OpenCDISC according to defined rules

  24. Requirements? • What? • How? • Summary • Why? What? • Structure of the XML file • XML header, the ODM root element, Study and MetaDataVersion • Linked supporting PDF documents (e.g. aCRF) • Value List definitions (e.g. for Supplemental Qualifiers / Findings Tests) • Where Clause definitions (referenced in Value List definitions) • Dataset definitions (ItemGroup) • Variable definitions (ItemDef) • Code List definitions (Codelist) • Methods definitions (MethodDef) • Comments definitions (CommentDef) • Leafs definitions

  25. HOW

  26. Requirements? • What? • How? • Summary • Why? PREPARATION BEFORE WRITING TO XML FILE • Create XPT files of the SDTM datasets • Import the specifications into SAS and create a dataset containing the Dataset and Variable metadata • Import the methods into SAS and merge onto the metadata by the method name • XML does not like special characters – convert characters to text • Create a value-level metadata dataset by choosing “TESTCD”, “PARMCD” and “QNAM” variables and obtaining the values in those variables from the data • Create a codelist dataset by running through variables and value-level variables with codelists attached to them and obtaining the values for those variables • Codelists -> set up in specs vs create from data

  27. Requirements? • What? • How? • Summary • Why? How? • Create XML file within SAS using: • DATA steps • FILE and PUT statements

  28. Requirements? • What? • How? • Summary • Why? XML Header + ODM root element • Example code:

  29. Requirements? • What? • How? • Summary • Why? XML Header + ODM root element • Example code: Study-specific derivations: - Creation date/time

  30. Requirements? • What? • How? • Summary • Why? XML Header + ODM root element • Example code: Simple FILE and PUT statements Study-specific parameters can be read in using macro parameters or derived - e.g. creation date/time

  31. Requirements? • What? • How? • Summary • Why? Study + MetaDataVersion • Example code:

  32. Requirements? • What? • How? • Summary • Why? Study + MetaDataVersion

  33. Requirements? • What? • How? • Summary • Why? Study + MetaDataVersion • Example code: Simple FILE and PUT statements – use the MOD option on the FILE statement to append to the text file Study-specific parameters can be read in using macro parameters or derived - e.g. study name and description

  34. Requirements? • What? • How? • Summary • Why? Linked supporting PDF documents (e.g. aCRF) + Leafs definition • Example code:

  35. Requirements? • What? • How? • Summary • Why? Linked supporting PDF documents (e.g. aCRF) + Leafs definition

  36. Requirements? • What? • How? • Summary • Why? Linked supporting PDF documents (e.g. aCRF) + Leafs definition • Example code: Simple FILE and PUT statements with a MOD option

  37. Requirements? • What? • How? • Summary • Why? Linked supporting PDF documents (e.g. aCRF) + Leafs definition • Example code: Simple FILE and PUT statements with a MOD option

  38. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. Findings Tests) and Where Clause definitions • Example code:

  39. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. Findings Tests) and Where Clause definitions • Example code:

  40. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. Findings Tests) and Where Clause definitions

  41. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. Findings Tests) and Where Clause definitions • Example code: Example: VSORRES Create a dataset in SAS of value-level variables and their values. Output an ITEMREF statement for each value of VSORRES (e.g. DIABP) and reference a WHERECLAUSE.

  42. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. Findings Tests) and Where Clause definitions • Example code: Example: VSORRES Output a WHERECLAUSEDEF statement for each value of VSORRES (e.g. DIABP) and use the same WHERECLAUSE name referenced in the ITEMREF.

  43. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. for Supplemental Qualifiers) and Where Clause definitions • Example code:

  44. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. for Supplemental Qualifiers) and Where Clause definitions • Example code:

  45. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. for Supplemental Qualifiers) and Where Clause definitions

  46. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. for Supplemental Qualifiers) and Where Clause definitions • Example code: Example: SUPPDM.QVAL Output an ITEMREF statement for each value of SUPPDM.QNAM (e.g. RACE1) and reference a WHERECLAUSE.

  47. Requirements? • What? • How? • Summary • Why? Value List definitions (e.g. for Supplemental Qualifiers) and Where Clause definitions • Example code: Example: SUPPDM.QVAL Output a WHERECLAUSEDEF statement for each value of SUPPDM.QVAL (e.g. RACE1) and use the same WHERECLAUSE name referenced in the ITEMREF.

  48. Requirements? • What? • How? • Summary • Why? Dataset definitions (ItemGroup) • Dataset Definitions: • Dataset definitions: • ItemGroupDef element • Include references to variable definitions • Include references to actual data file • Variable references: • ItemDef element • Dataset definition: • def:leaf element

  49. Requirements? • What? • How? • Summary • Why? Dataset definitions (ItemGroup) • Attributes: • Repeating: • No for datasets with one record per subject • Yes for datasets with more than one record per subject • Mandatory: • Yes for required variables • No for Expected or Permissible variables • Domain: • Name of the domain • IsReferenceData: • Yes for reference datasets (no subjects) • No for subject-level datasets

  50. Requirements? • What? • How? • Summary • Why? Dataset definitions (ItemGroup) • Example code:

More Related