diff --git a/ehr/resources/views/ehrTemplates.html b/ehr/resources/views/ehrTemplates.html index 85e8be151..8bc92b752 100644 --- a/ehr/resources/views/ehrTemplates.html +++ b/ehr/resources/views/ehrTemplates.html @@ -37,14 +37,18 @@ } createEHRBillingDomainHandler = function () { - var ctx = EHR.Utils.getEHRContext(); + const ctx = EHR.Utils.getEHRContext(); + const container = document.getElementById("ehrbilling_container").value; + if (!container) { + LABKEY.Utils.alert("Error", "Must enter the container path of the billing folder."); + } LABKEY.Domain.create({ module: ctx ? ctx['EHRCustomModule'] : null, domainKind: "EHR_Billing", domainGroup: "ehr_billing", importData: false, - containerPath: ctx ? ctx['EHRStudyContainer'] : null, + containerPath: container, success: function () { LABKEY.Utils.alert("Success","EHR_Billing tables updated successfully."); }, @@ -55,8 +59,8 @@ } createEHRComplianceDomainHandler = function () { - var ctx = EHR.Utils.getEHRContext(); - var container = document.getElementById("ehrcompliance_container").value; + const ctx = EHR.Utils.getEHRContext(); + const container = document.getElementById("ehrcompliance_container").value; if (!container) { LABKEY.Utils.alert("Error", "Must enter the container path of the compliance folder."); } @@ -90,16 +94,19 @@