my attempt to rid the clinical world of excel › download › sde › rtp2016 › ... · my...
Post on 25-Jun-2020
1 Views
Preview:
TRANSCRIPT
MY ATTEMPT TO RID THE CLINICAL WORLD OF EXCEL
MIKE MOLTER
DIRECTOR OF STATISTICAL PROGRAMMING AND
TECHNOLOGY
WRIGHT AVE
OCTOBER 27, 2016
Agenda
• Introduction to Study Designer
• Development tools
• Database
• Interface
• Brief demo (if time)
• Future of Study Designer
Technologies in Use:
• Neo4j
• Cypher
• HTML, Javascript, CSS
• Python
• Jinja2
• Google App Engine
Technologies NOT in Use:
• SAS
• Excel
What is Study Designer?
Study Designer is a web-based tool used for entering metadata (i.e. programming specs and define.xml) for a study
Signature features
• Database of CDISC data models, implementation guides, and study metadata
• Web interface that guides the user through the development of metadata by way of a study design sequence
Database
Database
Sam 10/27/16
TEMP 99.5 F
NAME DATE TEST RESULT
UNIT
Sam 10/27/16
HEIGHT
73 in
Sam 10/27/16
WEIGHT
220 lb
Sam 10/27/16
SYSBP 118 mmHg
Sam 10/27/16
DIABP 75 mmHg
Tony 10/24/16
TEMP 99.1 F
Tony 10/24/16
HEIGHT
70 IN
Tony 10/24/16
DIABP 73 mmHg
Tony 10/24/16
SYSBP 122 mmHg
Observations(records)
Properties (variables or fields)
Keys
Table
Traditional rectangular SQL database
Name :SamDate :10/27/16Test : TEMPResult : 99.5Unit : F
node Properties
Observation (node)
:VSnode label
Neo4j – Graph Database
:VS
:VS
:VS
:VS
:VS
:VS:VS
:VS
:VS:LB
:LB
:LB
:LB
:LB
:LB:LB
:LB
FirstName : TomLastName: HanksBorn: 1956
: ACTOR
[:ACTEDIN]
[:DIRECTED]
Neo4j – Graph Database
[:ACTEDIN]
Cypher – the query language of Neo4j
MATCH (tom:Person {name: "Tom Hanks"})-
[:ACTED_IN]->
(tomHanksMovies:Movie)
RETURN tom, tomHanksMovies
alternatively,RETURN tom.born, tomHanksMovies.tagline
see demo
CDISC standards in Neo4j<ItemGroupDef
Name=“AE”
other attributes>
<ItemRef ItemOID=“IT.STUDYID” Order=“1” Mandatory=“Yes”/>
<ItemRef ItemOID=“IT.AESEV” Order=“15” Mandatory=“Yes”/>
One ItemRef for each variable in the dataset
</ItemGroupDef>
<ItemDef
Name=“STUDYID”
OID=“IT.STUDYID”
STUDYID attributes>
</ItemDef>
<ItemDef
Name=“STUDYID”
OID=“IT.AESEV”
AESEV attributes>
<CodeListRef CodeListOID=“CT.SEV”>
</ItemDef>
<CodeList
OID=“CT.SEV”
<EnumeratedItem CodedValue=“MILD”>
More EnumeratedItem elements
</CodeList>
Name : AEClass : EventsPurpose:Tabulation
: ItemGroupDef
Order: 15Mandatory: Yes
: ContainsItem
CDISC standards in Neo4j
CDISC standards in Neo4j
CDISC standards in Neo4j
CDISC standards in Neo4j
InstantiatesModel
Using Python to interact with Neo4j
from py2neo import Graph
graph = Graph()
defaults to localhost:7474
results = graph.cypher.execute(‘match (:IG)-[]->
(igd:ItemGroupDef) return igd.name,igd.class,igd.purpose’)
name class purpose
CM Interventions Tabulation
VS Findings Tabulation
AE Events Tabulation
results (a Python object called a RecordList)
Google App Engine
• A cloud computing platform for developing
and hosting web applications in Google-
managed data centers
• When downloaded and installed, a local
development server is created and listens
on port 8080.
• Comes with a Python package that allows
application developers to…
• associate web form URLs with code to
be executed
• capture and process web form input
from users
app =
webapp2.WSGIApplication([
(‘URL1’,URL1_code_class),
(‘URL2’,URL2_code_class),
(‘/’,FrontPage)
], debug=True)
class FrontPage:
def get(self):
<pre-processing code>
<code to render web form>
see demo
class FrontPage:
def get(self):
allstudies = <Cypher query to return all current
studies in the database>
<code to render web form>
self.render(webform.html, studylist=allstudies)
Jinja 2
• Templating language used for
generating dynamic HTML
• HTML generated by what is found in
the database
• Think of the SAS macro language
• Supports …
• reference of parameters passed in
from application ({{x}})
• conditional logic ({% if condition
%})
• iterative logic ({% for x in list-
name %}
HTML for dropdowns
<select name=“mydropdown”>
<option>Choose an Option</option>
<option>choice1</option>
<option>choice2</option>
<option>choice3</option>
</select>
self.render(webform.html,studylist=allstudies)
<select name=“mydropdown”>
<option>Choose a study</option>
{% for x in studylist %}
<option>{{x[0]}}</option>
{% endfor %}
</select>
Capturing web form choices in Python
<select name=“mydropdown”>
<option>Choose a study</option>
{% for x in studylist %}
<option>{{x[0]}}</option>
{% endfor %}
</select>
HTML World…
Back in Python Land…
chosenstudy=self.get.request(“mydropdown”)
self.get.request returns the user choice from the dropdown
USER:Enters application
URL into web browser
PYTHON:1. Execute code
based on URL (e.g. querying database)
2. Render a web form, passing parameters to build dynamic HTML
USER:1. Populates form
fields2. Clicks Submit
button
PYTHON:1. Execute code
based on URL (e.g. adding to database, querying database)
2. Render a web form, passing parameters to build dynamic HTML
Brief summary of the User input/Code Execution Cycle
In Summary
In order to replace Excel, we need• a database to house standards• a user interface
• collects information from users• interacts with the database
To connect the dots• Python code to touch the database• Python code to pass parameters to dynamic
HTML (Jinja2 templates)• Python code to capture user choices• Google App Engine to pair Python code with
URLs and provide methods for capturing user choices
The Current and Future State of Study Designer
• Custom domains
• Controlled Terminology+extensions
• define.xml
• spec.xml
• standards development
• Trial Design
• Visit Schedules
• Version control
• Dependency tracking
• protocol.xml extraction???
top related