<?php

// Copyright (C) 2010-2011 Aron Racho <*****@*****.**>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
require_once library_src('RuleCriteriaFactory.php');
/**
 * Description of RuleCriteraFilterFactory
 *
 * @author aron
 */
class RuleCriteriaFilterFactory extends RuleCriteriaFactory
{
    function modify($criteria, $ruleId)
    {
        // noop
    }
}
Beispiel #2
0
</script>

<script language="javascript" src="<?php 
js_src('list.js');
?>
"></script>
<script language="javascript" src="<?php 
js_src('jQuery.fn.sortElements.js');
?>
"></script>

<script type="text/javascript">
	$(document).ready(function() {	
		//load plans	
		$("#cdr-plans").load('<?php 
library_src('RulesPlanMappingEventHandlers_ajax.php');
?>
');
		
	    $.post(
	    	'<?php 
echo _base_url() . '/library/RulesPlanMappingEventHandlers_ajax.php?action=getNonCQMPlans';
?>
'
	    )
	    .done(function(resp) {
	        var data = $.parseJSON(resp);

	        $.each(data, function(idx, obj) {
	        	$('<option id="' + obj.plan_id + '" p_id="' + obj.plan_pid + '" value="' + obj.plan_id + '">' + obj.plan_title + '</option>')
	        		.insertAfter('#select_plan')
<?php

// Copyright (C) 2010-2011 Aron Racho <*****@*****.**>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
require_once library_src('RuleCriteriaSimpleText.php');
/**
 * Description of RuleCriteriaMedication
 *
 * @author aron
 */
class RuleCriteriaMedication extends RuleCriteriaSimpleText
{
    function __construct($title, $value = '')
    {
        parent::__construct($title, $value);
    }
    function getDbView()
    {
        $dbView = parent::getDbView();
        $dbView->method = "lists";
        $dbView->methodDetail = "medication";
        $dbView->value = $this->value;
        return $dbView;
    }
}
<?php

// Copyright (C) 2010-2011 Aron Racho <*****@*****.**>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
require_once library_src('RuleCriteriaBuilder.php');
/**
 * Description of RuleCriteriaAgeBuilder
 *
 * @author aron
 */
class RuleCriteriaAgeBuilder extends RuleCriteriaBuilder
{
    /**
     * @return RuleCriteriaType
     */
    function resolveRuleCriteriaType($method, $methodDetail, $value)
    {
        if (strpos($method, "age_max")) {
            return RuleCriteriaType::from(RuleCriteriaType::ageMax);
        }
        if (strpos($method, "age_min")) {
            return RuleCriteriaType::from(RuleCriteriaType::ageMin);
        }
        return null;
    }
    /**
     * @param RuleCriteriaType $ruleCriteriaType