Bug fix regarding extra period at the end of a sentence.
[openemr.git] / custom / code_types.inc.php
blob6188e0d6b4ef6078a93f8667c21cfdf3b65cbb73
1 <?php
2 // This array provides abstraction of billing code types. This is desirable
3 // because different countries or fields of practice use different methods for
4 // coding diagnoses, procedures and supplies. Fees will not be relevant where
5 // medical care is socialized. Attribues are:
6 //
7 // id - the numeric identifier of this code type in the codes table
8 // fee - 1 if fees are used, else 0
9 // mod - the maximum length of a modifier, 0 if modifiers are not used
10 // just - the code type used for justification, empty if none
11 // rel - 1 if other billing codes may be "related" to this code type
12 // nofs - 1 if this code type should NOT appear in the Fee Sheet
14 if ($GLOBALS['ippf_specific']) {
15 // IPPF:
16 $code_types = array(
17 'ICD9' => array('id' => 2, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
18 'MA' => array('id' => 12, 'fee' => 1, 'mod' => 0, 'just' => '', 'rel' => 1, 'nofs' => 0),
19 'IPPF' => array('id' => 11, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 1),
20 'CPT4' => array('id' => 1, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 1),
21 'ACCT' => array('id' => 13, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 1),
23 $default_search_type = 'MA';
25 else if ($GLOBALS['athletic_team']) {
26 // UK Sports Medicine:
27 $code_types = array(
28 'OSICS10' => array('id' => 9, 'fee' => 0, 'mod' => 4, 'just' => '', 'rel' => 0, 'nofs' => 0),
29 'OPCS' => array('id' => 6, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
30 'PTCJ' => array('id' => 7, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
31 'CPT4' => array('id' => 1, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
32 'SMPC' => array('id' => 10, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
34 $default_search_type = 'OSICS10';
36 else {
37 // USA Clinics:
38 $code_types = array(
39 'ICD9' => array('id' => 2, 'fee' => 0, 'mod' => 2, 'just' => '' , 'rel' => 0, 'nofs' => 0),
40 'CPT4' => array('id' => 1, 'fee' => 1, 'mod' => 2, 'just' => 'ICD9', 'rel' => 0, 'nofs' => 0),
41 'HCPCS' => array('id' => 3, 'fee' => 1, 'mod' => 2, 'just' => 'ICD9', 'rel' => 0, 'nofs' => 0),
43 $default_search_type = 'ICD9';
46 function fees_are_used() {
47 global $code_types;
48 foreach ($code_types as $value) { if ($value['fee']) return true; }
49 return false;
52 function modifiers_are_used($fee_sheet=false) {
53 global $code_types;
54 foreach ($code_types as $value) {
55 if ($fee_sheet && !empty($value['nofs'])) continue;
56 if ($value['mod']) return true;
58 return false;
61 function related_codes_are_used() {
62 global $code_types;
63 foreach ($code_types as $value) { if ($value['rel']) return true; }
64 return false;