当前位置: 首页>>代码示例>>PHP>>正文


PHP REDCap::getRecordIdField方法代码示例

本文整理汇总了PHP中REDCap::getRecordIdField方法的典型用法代码示例。如果您正苦于以下问题:PHP REDCap::getRecordIdField方法的具体用法?PHP REDCap::getRecordIdField怎么用?PHP REDCap::getRecordIdField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在REDCap的用法示例。


在下文中一共展示了REDCap::getRecordIdField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderTestRow

 public function renderTestRow($id, $label, $selectedRecord, $selectedEvent)
 {
     // Make a dropdown that contains all record_ids.
     $data = REDCap::getData('array', NULL, REDCap::getRecordIdField());
     //error_log("data: ".print_r($data,true));
     foreach ($data as $record_id => $arr) {
         $record_id_options[$record_id] = $record_id;
     }
     // Get all Events
     $events = REDCap::getEventNames(TRUE, FALSE);
     $row = RCView::tr(array(), RCView::td(array('class' => 'td1'), self::insertHelp('test')) . RCView::td(array('class' => 'td2'), "<label for='test-{$id}'><b>{$label}:</b></label>") . RCView::td(array('class' => 'td3'), RCView::span(array(), "Test logic using " . REDCap::getRecordIdField() . ":" . RCView::select(array('id' => "test_record-{$id}", 'name' => "test_record-{$id}", 'class' => "tbi x-form-text x-form-field", 'style' => 'height:20px;border:0px;', 'onchange' => "testLogic('{$id}');"), $record_id_options, $selectedRecord)) . RCView::span(array('style' => 'display:' . (REDCap::isLongitudinal() ? 'inline;' : 'none;')), " of event " . RCView::select(array('id' => "test_event-{$id}", 'name' => "test_event-{$id}", 'class' => "tbi x-form-text x-form-field", 'style' => 'height:20px;border:0px;', 'onchange' => "testLogic('{$id}');"), $events, $selectedEvent)) . RCView::span(array(), RCView::button(array('class' => 'jqbuttonmed ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only', 'onclick' => 'testLogic("' . $id . '");', 'style' => 'margin:0px 10px;'), 'Test') . RCView::span(array('id' => 'result-' . $id)))));
     return $row;
 }
开发者ID:mypandos,项目名称:REDCap-AutoNotify,代码行数:13,代码来源:common.php

示例2: empty

}
######## HTML PAGE ###########
?>
<style type='text/css'>
	td.td1 {vertical-align:text-top;}
	td.td2 {vertical-align:text-top; padding-top: 5px; padding-right:15px; width:70px;}
	td.td2 label {font-variant:small-caps; font-size: 12px;}
	div.desc {font-variant:normal; font-style:italic; font-size: smaller; padding-top:5px; width:70px;}
	table.tbi input {width: 500px; display: inline; height:20px}
	table.tbi input[type='radio'] {width: 14px; display: normal;}
	table.tbi textarea {width: 500px; display:inline; height:50px;}
</style>

<?php 
$instructions = "The Auto-Notification plugin is tested each time a record is saved in your project.  When the condition is 'true' a message will be sent as configured.  A message is written to the log recording the record, event, and name of the trigger.  A given record-event-trigger will only be fired once.";
$section = $an->renderTriggers() . RCView::div(array(), RCView::button(array('class' => 'jqbuttonmed ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only', 'onclick' => 'javascript:addTrigger();'), RCView::img(array('src' => 'add.png', 'class' => 'imgfix')) . ' Add another trigger')) . RCView::div(array('class' => 'round chklist', 'id' => 'notification_config'), RCView::div(array('class' => 'chklisthdr', 'style' => 'color:rgb(128,0,0);margin-top:10px;'), "Configure Notification Email") . RCView::p(array(), 'This notification email will include a link to the record and will therefore include the value of the ' . REDCap::getRecordIdField() . ' field.  For this reasons, this first field <b>SHOULD NOT INCLUDE PHI</b>.  It is recommended to use an auto-numbering first field as best practice and include PHI as a secondary identifier.') . RCView::table(array('cellspacing' => '5', 'class' => 'tbi'), AutoNotify::renderRow('to', 'To', $an->config['to']) . AutoNotify::renderRow('from', 'From', $an->config['from']) . AutoNotify::renderRow('subject', 'Subject', empty($an->config['subject']) ? 'SECURE:' : $an->config['subject']) . AutoNotify::renderRow('message', 'Message', $an->config['message']))) . RCView::div(array('class' => 'round chklist', 'id' => 'det_config'), RCView::div(array('class' => 'chklisthdr', 'style' => 'color:rgb(128,0,0);margin-top:10px;'), "Pre- and Post- AutoNotification DET Triggers") . RCView::p(array(), 'You can run another Data Entry Trigger before or after this auto-notification test by inserting the complete DET urls below.<br><i>Please note that these DET urls will be called each time this DET is called, whether the conditional logic evaluates to true or not.</i>') . RCView::table(array('cellspacing' => '5', 'class' => 'tbi'), AutoNotify::renderRow('pre_script_det_url', 'Pre-notification DET Url', $an->config['pre_script_det_url']) . AutoNotify::renderRow('post_script_det_url', 'Post-notification DET Url', $an->config['post_script_det_url'])));
$page = RCView::div(array('class' => 'autonotify_config'), RCView::h3(array(), 'AutoNotify: a DET-based Notification Plugin') . $section . RCView::div(array(), RCView::button(array('class' => 'jqbuttonmed ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only', 'onclick' => 'javascript:save();'), RCView::img(array('src' => 'bullet_disk.png', 'class' => 'imgfix')) . '<b>Save Configuration</b>') . " " . RCView::button(array('class' => 'jqbuttonmed ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only', 'onclick' => 'javascript:refresh();'), 'Refresh')));
print $page;
print AutoNotify::renderHelpDivs();
?>

<script type="text/javascript">

	// Take all input elements inside our autonotify_config div and post them to this page
	function save() {
		var params = new Object;	// Info to save
		// Loop through each trigger
		var triggers = new Object;
		i=0;
		$('div.trigger', '#triggers_config').each (function (index1, value1) {
			i++;
开发者ID:mypandos,项目名称:REDCap-AutoNotify,代码行数:31,代码来源:index.php


注:本文中的REDCap::getRecordIdField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。