some assorted updates
[openemr.git] / custom / code_types.inc.php
blobf47470a805669680389ec73616421b6973dd1c60
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 $code_types = array(
16 // USA Clinics:
17 'ICD9' => array('id' => 2, 'fee' => 0, 'mod' => 2, 'just' => '' , 'rel' => 0, 'nofs' => 0),
18 'CPT4' => array('id' => 1, 'fee' => 1, 'mod' => 2, 'just' => 'ICD9', 'rel' => 0, 'nofs' => 0),
19 'HCPCS' => array('id' => 3, 'fee' => 1, 'mod' => 2, 'just' => 'ICD9', 'rel' => 0, 'nofs' => 0)
21 /* UK Sports Medicine:
22 'OSICS10' => array('id' => 9, 'fee' => 0, 'mod' => 4, 'just' => '', 'rel' => 0, 'nofs' => 0),
23 'OPCS' => array('id' => 6, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
24 'PTCJ' => array('id' => 7, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
25 'CPT4' => array('id' => 1, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
26 'SMPC' => array('id' => 10, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0) */
28 /* IPPF:
29 'ICD9' => array('id' => 2, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 0),
30 'MA' => array('id' => 12, 'fee' => 1, 'mod' => 0, 'just' => '', 'rel' => 1, 'nofs' => 0),
31 'IPPF' => array('id' => 11, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 1),
32 'CPT4' => array('id' => 1, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 1),
33 'ACCT' => array('id' => 13, 'fee' => 0, 'mod' => 0, 'just' => '', 'rel' => 0, 'nofs' => 1), */
36 $default_search_type = 'ICD9'; // US
37 // $default_search_type = 'OSICS10'; // UK Sports
38 // $default_search_type = 'MA'; // IPPF
40 function fees_are_used() {
41 global $code_types;
42 foreach ($code_types as $value) { if ($value['fee']) return true; }
43 return false;
46 function modifiers_are_used($fee_sheet=false) {
47 global $code_types;
48 foreach ($code_types as $value) {
49 if ($fee_sheet && !empty($value['nofs'])) continue;
50 if ($value['mod']) return true;
52 return false;
55 function related_codes_are_used() {
56 global $code_types;
57 foreach ($code_types as $value) { if ($value['rel']) return true; }
58 return false;