Removes frames from login gui and condense login gui into a single file.
[openemr.git] / Tests / code_types / CodesTests.php
blob82b580b26400e77dcedbd8135d99443083a08e7c
1 <?php
2 $GLOBALS['OE_SITE_DIR']="/var/www/openemr/sites/default";
3 set_include_path(get_include_path() . PATH_SEPARATOR . "/var/www/openemr");
4 require_once("library/sql.inc");
5 require_once("library/htmlspecialchars.inc.php");
6 require_once("library/translation.inc.php");
7 require_once("custom/code_types.inc.php");
9 function search_test($type,$string,$mode='default',$return_only_one=false)
11 echo "<ol>";
12 $res=code_set_search($type,$string,false,true,$return_only_one,0,10,array(),null,$mode);
13 while ($code = sqlFetchArray($res))
15 echo "<li>". $code['code_type_name'].":".$code['code'].":".$code['code_text'].":".$code['code_text_short']."</li>";
17 echo "</ol>";
21 <?php
22 search_test("SNOMED-CT","","description");
24 search_test("CVX","1","code");
25 search_test("CVX","Hep ped","description");
28 search_test("ICD9","401");
29 search_test("ICD9","001","code");
30 search_test("ICD9","401","code");
31 search_test("ICD9","essential hyper","description");
34 search_test("CPT4","99");
37 search_test("ICD10","I10","code");
38 search_test("ICD10","Hypertension");
39 search_test("ICD10","Hypertension","description");
41 search_test("SNOMED","Hypertension","description");
42 search_test("SNOMED-CT","Hypertension","description");
43 search_test("SNOMED-PR","Incision Drai","description");
45 search_test("SNOMED-PR","Incision and","default");
47 search_test("ICD10","A01.01","default",true);
48 search_test("ICD10","A01.01","code",true);
49 search_test("ICD10","A01.01","description",true);