فهرست منبع

MC initializer names update

Vijayakrishnan 4 سال پیش
والد
کامیت
f1c89bce4b

+ 5 - 1
public/js/mc-init.js

@@ -1,12 +1,16 @@
 window.mcInitializers = {};
 window.addMCInitializer = function(_name, _func) {
+    if(!!window.mcInitializers[_name]) {
+        console.warn('ALIX initializer ' + _name + ' exists. Will overwrite.');
+    }
     window.mcInitializers[_name] = _func;
 };
 window.runMCInitializers = function() {
     if(!!mcInitializers) {
-        for(var func in mcInitializers) {
+        for(let func in mcInitializers) {
             if(mcInitializers.hasOwnProperty(func)) {
                 try {
+                    console.log("ALIX running MC initer", func);
                     mcInitializers[func]();
                 }
                 catch(e) {

+ 1 - 1
resources/views/app/patient/canvas-sections/allergies/form.blade.php

@@ -165,6 +165,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-allergy-{{ $patient->uid }}', init);
+        addMCInitializer('client-allergy', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/care-team/form.blade.php

@@ -165,6 +165,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-care-team-{{ $patient->uid }}', init);
+        addMCInitializer('client-care-team', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/dx/form.blade.php

@@ -284,6 +284,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-dx-{{ $patient->uid }}', init);
+        addMCInitializer('client-dx', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/fancy/form.blade.php

@@ -90,6 +90,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-fhx-{{ $patient->uid }}', init);
+        addMCInitializer('client-fancy', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/fhx/form.blade.php

@@ -302,6 +302,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-fhx-{{ $patient->uid }}', init);
+        addMCInitializer('client-fhx', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/pmhx/form.blade.php

@@ -250,6 +250,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-pmhx-{{ $patient->uid }}', init);
+        addMCInitializer('client-pmhx', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/pshx/form.blade.php

@@ -226,6 +226,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-pshx-{{ $patient->uid }}', init);
+        addMCInitializer('client-pshx', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/rx/form.blade.php

@@ -215,6 +215,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-rx-{{ $patient->uid }}', init);
+        addMCInitializer('client-rx', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/sochx/form.blade.php

@@ -222,6 +222,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-sochx-{{ $patient->uid }}', init);
+        addMCInitializer('client-sochx', init);
     })();
 </script>

+ 1 - 1
resources/views/app/patient/canvas-sections/vitals/form.blade.php

@@ -163,6 +163,6 @@ $formID = rand(0, 100000);
                 }
             });
         }
-        addMCInitializer('client-vitals-{{ $patient->uid }}', init);
+        addMCInitializer('client-vitals', init);
     })();
 </script>