Fee sheet enhancements
[openemr.git] / interface / forms / fee_sheet / review / fee_sheet_search_queries.php
blobfcfbed26017d61f1758f109109cd10fbabab241e
1 <?php
2 /**
3 * Functions to help search for codes on the fee sheet
4 *
5 * Copyright (C) 2013 Kevin Yeh <kevin.y@integralemr.com> and OEMR <www.oemr.org>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Kevin Yeh <kevin.y@integralemr.com>
20 * @link http://www.open-emr.org
22 require_once("$srcdir/../custom/code_types.inc.php");
24 /**
26 * wrapper for sequential code set search
28 * @param type $search_type_id The integer ID used for code_type in codes (e.g. 2 for ICD9)
29 * @param type $search_type A string representing the code type to be searched on (e.g. ICD9, DSMIV)
30 * @param type $search_query The text to search on.
31 * @return array
33 function diagnosis_search($search_type_id,$search_type,$search_query)
35 $retval=array();
36 $search=main_code_set_search($search_type,$search_query,20);
37 while($code=sqlFetchArray($search))
39 array_push($retval,new code_info($code['code'],$search_type,$code['code_text']));
41 return $retval;