Project

General

Profile

« Previous | Next » 

Revision 5993

include data search - new form fields and semQuery schema to allow searching for Characteristics data

View differences:

search.js
32 32
        	    if (searchValue!="") {
33 33
	        	    submitFormObj.query.value += 
34 34
	        	    	"<condition " +
35
		        		"concept='" + searchClass + "' " +
36
						"operator='EQUALS'>" +
37
						searchValue +
38
					"</condition>";
35
		        		"type='" + searchClass + "' " +
36
		        		"concept='" + searchValue + "' " +
37
					"/>";
39 38
        	    }
40 39
    		} else {
41 40
	        	for (var i=0; i < submitFormObj.activeEntitiesValue.length; i++) {
42 41
	        		var searchClass = submitFormObj.activeEntitiesClass[i].value;
43 42
	        	    var searchValue = submitFormObj.activeEntitiesValue[i].value;
44 43
	        	    if (searchValue!="") {
45
		        	    submitFormObj.query.value += 
44
	        	    	submitFormObj.query.value += 
46 45
		        	    	"<condition " +
47
			        		"concept='" + searchClass + "' " +
48
							"operator='EQUALS'>" +
49
							searchValue +
50
						"</condition>";
46
			        		"type='" + searchClass + "' " +
47
			        		"concept='" + searchValue + "' " +
48
						"/>";
51 49
	        	    }
52 50
	        	}
53 51
    		}
......
55 53
    		if (submitFormObj.activeCharacteristicsClass.value) {
56 54
    			var searchClass = submitFormObj.activeCharacteristicsClass.value;
57 55
        	    var searchValue = submitFormObj.activeCharacteristicsValue.value;
56
        	    var dataValue = submitFormObj.dataValue.value;
57
        	    var dataOperator = submitFormObj.dataOperator.value;
58 58
        	    if (searchValue!="") {
59 59
	        	    submitFormObj.query.value += 
60 60
	        	    	"<condition " +
61
		        		"concept='" + searchClass + "' " +
62
						"operator='EQUALS'>" +
63
						searchValue +
61
		        		"type='" + searchClass + "' " +
62
		        		"concept='" + searchValue + "' " +
63
						"operator='" + dataOperator + "'>" +
64
						dataValue +
64 65
					"</condition>";
65 66
        	    }
66 67
    		} else {
67 68
	        	for (var i=0; i < submitFormObj.activeCharacteristicsValue.length; i++) {
68 69
	        		var searchClass = submitFormObj.activeCharacteristicsClass[i].value;
69 70
	        	    var searchValue = submitFormObj.activeCharacteristicsValue[i].value;
71
	        	    var dataValue = submitFormObj.dataValue[i].value;
72
	        	    var dataOperator = submitFormObj.dataOperator[i].value;
70 73
	        	    if (searchValue!="") {
71
		        	    submitFormObj.query.value += 
74
	        	    	submitFormObj.query.value += 
72 75
		        	    	"<condition " +
73
			        		"concept='" + searchClass + "' " +
74
							"operator='EQUALS'>" +
75
							searchValue +
76
			        		"type='" + searchClass + "' " +
77
			        		"concept='" + searchValue + "' " +
78
							"operator='" + dataOperator + "'>" +
79
							dataValue +
76 80
						"</condition>";
77 81
	        	    }
78 82
	        	}
......
82 86
    			var searchClass = submitFormObj.activeProtocolsClass.value;
83 87
        	    var searchValue = submitFormObj.activeProtocolsValue.value;
84 88
        	    if (searchValue!="") {
85
	        	    submitFormObj.query.value += 
89
        	    	submitFormObj.query.value += 
86 90
	        	    	"<condition " +
87
		        		"concept='" + searchClass + "' " +
88
						"operator='EQUALS'>" +
89
						searchValue +
90
					"</condition>";
91
		        		"type='" + searchClass + "' " +
92
		        		"concept='" + searchValue + "' " +
93
					"/>";
91 94
        	    }
92 95
    		} else {
93 96
	        	for (var i=0; i < submitFormObj.activeProtocolsValue.length; i++) {
94 97
	        		var searchClass = submitFormObj.activeProtocolsClass[i].value;
95 98
	        	    var searchValue = submitFormObj.activeProtocolsValue[i].value;
96 99
	        	    if (searchValue!="") {
97
		        	    submitFormObj.query.value += 
100
	        	    	submitFormObj.query.value += 
98 101
		        	    	"<condition " +
99
			        		"concept='" + searchClass + "' " +
100
							"operator='EQUALS'>" +
101
							searchValue +
102
						"</condition>";
102
			        		"type='" + searchClass + "' " +
103
			        		"concept='" + searchValue + "' " +
104
						"/>";
103 105
	        	    }
104 106
	        	}
105 107
    		}	
......
108 110
    			var searchClass = submitFormObj.activeMeasurementsClass.value;
109 111
        	    var searchValue = submitFormObj.activeMeasurementsValue.value;
110 112
        	    if (searchValue!="") {
111
	        	    submitFormObj.query.value += 
113
        	    	submitFormObj.query.value += 
112 114
	        	    	"<condition " +
113
		        		"concept='" + searchClass + "' " +
114
						"operator='EQUALS'>" +
115
						searchValue +
116
					"</condition>";
115
		        		"type='" + searchClass + "' " +
116
		        		"concept='" + searchValue + "' " +
117
					"/>";
117 118
        	    }
118 119
    		} else {
119 120
	        	for (var i=0; i < submitFormObj.activeMeasurementsValue.length; i++) {
120 121
	        		var searchClass = submitFormObj.activeMeasurementsClass[i].value;
121 122
	        	    var searchValue = submitFormObj.activeMeasurementsValue[i].value;
122 123
	        	    if (searchValue!="") {
123
		        	    submitFormObj.query.value += 
124
	        	    	submitFormObj.query.value += 
124 125
		        	    	"<condition " +
125
			        		"concept='" + searchClass + "' " +
126
							"operator='EQUALS'>" +
127
							searchValue +
128
						"</condition>";
126
			        		"type='" + searchClass + "' " +
127
			        		"concept='" + searchValue + "' " +
128
						"/>";
129 129
	        	    }
130 130
	        	}
131 131
    		}

Also available in: Unified diff