|
@@ -205,9 +205,11 @@ if($recordType === 'NOTE'){
|
|
init: function() {
|
|
init: function() {
|
|
var probs = this.problems;
|
|
var probs = this.problems;
|
|
for (var i = 0; i < probs.length; i++) {
|
|
for (var i = 0; i < probs.length; i++) {
|
|
- var split = probs[i].split(' ('); // splitting description from ICD
|
|
|
|
- var description = split[0];
|
|
|
|
- var reason = split[1].split(')')[0]; // removing the closing parenthesis
|
|
|
|
|
|
+ var probNameArr = probs[i].split(' ');
|
|
|
|
+ var reason = probNameArr[probNameArr.length - 1].replace(/[()]/g, ''); //getting ICD Code
|
|
|
|
+ probNameArr.splice(probNameArr.length - 1, 1); //removing ICD Code from array
|
|
|
|
+
|
|
|
|
+ var description = probNameArr.join(' ');
|
|
var reasonExists = false;
|
|
var reasonExists = false;
|
|
|
|
|
|
for (var x = 1; x <= 4; x++) { // loop through all reasons initiated at the top
|
|
for (var x = 1; x <= 4; x++) { // loop through all reasons initiated at the top
|