@@ -40,9 +40,10 @@ shinyServer(function(input, output) {
4040 $('td:eq(0)',nRow).html(aData[0].replace(/</g,'<').replace(/>/g,'>'));
4141 $('td:eq(1)',nRow).html(aData[1].replace(/</g,'<').replace(/>/g,'>'));
4242 $('td:eq(2)',nRow).html(aData[2].replace(/</g,'<').replace(/>/g,'>'));
43+ $('td:eq(3)',nRow).html(aData[3].replace(/</g,'<').replace(/>/g,'>'));
4344 }" ),
4445 autoWidth = FALSE ,
45- columns = list (list (sWidth = " 10%" ), list (sWidth = " 10%" ), list (sWidth = " 70 %" )))
46+ columns = list (list (sWidth = " 10%" ), list (sWidth = " 10%" ), list (sWidth = " 40% " ), list ( sWidth = " 40 %" )))
4647
4748 dto_validation <- list (createdRow = I(" function(nRow, aData,index) {
4849 $('td:eq(0)',nRow).html(aData[0].replace(/</g,'<').replace(/>/g,'>'));
@@ -118,12 +119,18 @@ WHERE
118119 query <- paste("
119120PREFIX mms: <http://rdf.cdisc.org/mms#>
120121PREFIX cts:<http://rdf.cdisc.org/ct/schema#>
121- SELECT ?id ?DataElementName ?DataElementDescription
122+ PREFIX cdiscs:<http://rdf.cdisc.org/std/schema#>
123+ SELECT ?id ?DataElementName ?DataElementDescription ?QuestionOrAssumption
122124WHERE
123125{
124126 ?id mms:dataElementDescription ?DataElementDescription .
125127 ?id mms:dataElementName ?DataElementName .
126- FILTER ( regex(?DataElementDescription,'" , interm()," ','i') || regex(?DataElementName, '" , interm()," ','i')) .
128+ OPTIONAL
129+ { ?id cdiscs:questionText ?QuestionOrAssumption .}
130+ OPTIONAL
131+ { ?aid cdiscs:about ?id .
132+ ?aid cdiscs:assumptionText ?QuestionOrAssumption . }
133+ FILTER ( regex(?DataElementDescription,'" , interm()," ','i') || regex(?DataElementName, '" , interm()," ','i') || regex(?QuestionOrAssumption, '" , interm(), " ','i')) .
127134} LIMIT 300" ,sep = " " )
128135 ns <- c(
129136 ' sdtmig-3-1-3' , ' <http://rdf.cdisc.org/std/sdtmig-3-1-3#>' ,
@@ -137,10 +144,19 @@ WHERE
137144 write(intermMatch(),stderr())
138145 d2 $ results $ DataElementName <- gsub(intermMatch()," <span style='background-color: #FFFF00'>\\ 1</span>" , d2 $ results $ DataElementName ,ignore.case = TRUE )
139146 d2 $ results $ DataElementDescription <- gsub(intermMatch()," <span style='background-color: #FFFF00'>\\ 1</span>" , d2 $ results $ DataElementDescription ,ignore.case = TRUE )
147+ d2 $ results $ QuestionOrAssumption <- gsub(intermMatch()," <span style='background-color: #FFFF00'>\\ 1</span>" , d2 $ results $ QuestionOrAssumption ,ignore.case = TRUE )
140148 }
141149
142- d2 $ results
143- },options = dto_standard )
150+ qst <- d2 $ results $ QuestionOrAssumption
151+ qst [is.na(qst )] <- " "
152+ results <- data.frame (Std = sapply(strsplit(d2 $ results $ id , " :" ), function (x ){return (x [1 ])}),
153+ Name = d2 $ results $ DataElementName ,
154+ Description = d2 $ results $ DataElementDescription ,
155+ " QuestionOrAssumptionText" = qst ,
156+ stringsAsFactors = FALSE )
157+ cat(str(results ))
158+ results
159+ },options = dto_standard )
144160
145161 output $ searchResult3 <- renderDataTable({
146162 query <- paste("
0 commit comments