|
@@ -51,7 +51,7 @@ if(!function_exists('chargeForCPT')) {
|
|
|
case "99091": return '$' . 75;
|
|
|
case "99453": return '$' . 40;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return '-';
|
|
|
}
|
|
|
}
|
|
@@ -147,18 +147,18 @@ if(!function_exists('genericBills')) {
|
|
|
$genericBills = $genericBills->where('client_id', $patient->id);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if($careMonth){
|
|
|
$genericBills = $genericBills->where('care_month_id', $careMonth->id);
|
|
|
}
|
|
|
|
|
|
if($entityType && $entityUid) {
|
|
|
-
|
|
|
+
|
|
|
$genericBills = $genericBills
|
|
|
->where('generic_target_entity_type', $entityType)
|
|
|
->where('generic_target_entity_uid', $entityUid);
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
return $genericBills->orderBy('created_at', 'DESC')->get();
|
|
|
}
|
|
@@ -1075,25 +1075,25 @@ if(!function_exists('get_doc_templates')){
|
|
|
}
|
|
|
}
|
|
|
if(!function_exists('format_phone_number')) {
|
|
|
- function format_phone_number($number, $default = '-') {
|
|
|
- if(empty($number)) return $default;
|
|
|
+ function format_phone_number($number, $default = '-') {
|
|
|
+ if(empty($number)) return $default;
|
|
|
return preg_replace('~.*(\d{3})[^\d]{0,7}(\d{3})[^\d]{0,7}(\d{4}).*~', '($1) $2-$3', $number). "\n";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(!function_exists('format_number')) {
|
|
|
- function format_number($number, $places = 2) {
|
|
|
+ function format_number($number, $places = 2) {
|
|
|
return number_format((float)$number, $places, '.', '');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(!function_exists('toHumanReadable')) {
|
|
|
- function toHumanReadable($name) {
|
|
|
+ function toHumanReadable($name) {
|
|
|
return ucwords(preg_replace("/[^0-9a-z]/i", " ", $name));
|
|
|
}
|
|
|
}
|
|
|
if(!function_exists('parseRender')) {
|
|
|
- function parseRender($_data) {
|
|
|
+ function parseRender($_data) {
|
|
|
if($_data) {
|
|
|
$type = gettype($_data);
|
|
|
if(is_string($_data) || is_numeric($_data)) {
|
|
@@ -1128,13 +1128,13 @@ if(!function_exists('parseRender')) {
|
|
|
if(!function_exists('mask_string')) {
|
|
|
function mask_string($string, $mask = "*", $lengthFromLastCharacter = null) {
|
|
|
if(!$lengthFromLastCharacter){
|
|
|
- return str_repeat($mask, strlen($string));
|
|
|
- }
|
|
|
+ return str_repeat($mask, strlen($string));
|
|
|
+ }
|
|
|
$firstCharacters = substr($string, ($lengthFromLastCharacter));
|
|
|
$lastCharacters = substr($string, -$lengthFromLastCharacter);
|
|
|
|
|
|
- $maskedFirstCharacters = str_repeat($mask, strlen($firstCharacters));
|
|
|
-
|
|
|
+ $maskedFirstCharacters = str_repeat($mask, strlen($firstCharacters));
|
|
|
+
|
|
|
return $maskedFirstCharacters . $lastCharacters;
|
|
|
}
|
|
|
}
|
|
@@ -1144,3 +1144,17 @@ if(!function_exists('limit_string_length')) {
|
|
|
return substr($string,0, $length);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+if(!function_exists('get_custom_problems')) {
|
|
|
+ function get_custom_problems() {
|
|
|
+ $customProblems = [
|
|
|
+ [
|
|
|
+ 'sub_text' => "G47. 33",
|
|
|
+ 'text' => "Sleep Apnea"
|
|
|
+ ]
|
|
|
+ ] ;
|
|
|
+
|
|
|
+ return $customProblems;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|