1"use strict";(self.webpackChunkwapp_rcopia4ui=self.webpackChunkwapp_rcopia4ui||[]).push([[8298],{76030:(L,g,e)=>{function W(n,u){(null==u||u>n.length)&&(u=n.length);for(var l=0,S=Array(u);l<u;l++)S[l]=n[l];return S;}e.d(g,{A:()=>tt}),e(52675),e(89463),e(2259),e(28706),e(50113),e(23418),e(23792),e(34782),e(54554),e(62010),e(26099),e(27495),e(38781),e(47764),e(62953),e(86871),e(40655);const tt=["PatientFactory","$filter","EventGenerator",function(n,u,l){var S="Select a status";return{scope:{readOnly:"=",patientKey:"=?",viewMode:"@",origin:"@?",widgetId:"@",uniqueWidgetId:"@"},controller:["$scope","$q","$state","PrescriptionFactory","MessageBarFactory","RcopiaUtil","ModalsFactory","PermissionsService","FormsFactory","UserService","$rootScope","SsoFactory","HisSuppressionService","PatientDemographicsFactory",function(t,i,h,A,b,j,B,C,I,at,nt,p,it,st){var ot=[S].concat(function Q(n){return function $(n){if(Array.isArray(n))return W(n);}(n)||function q(n){if(typeof Symbol<"u"&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n);}(n)||function Z(n,u){if(n){if("string"==typeof n)return W(n,u);var l={}.toString.call(n).slice(8,-1);return"Object"===l&&n.constructor&&(l=n.constructor.name),"Map"===l||"Set"===l?Array.from(n):"Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?W(n,u):void 0;}}(n)||function Y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}();}(I.smokingStatusOptions)),f=null;t.childScope={},t.permissionsService=C,t.privileges={canViewSmokingStatus:t.permissionsService.hasPermission("smokingStatus","view"),canModifySmokingStatus:t.permissionsService.hasPermission("smokingStatus","change"),canPatientMerge:!t.permissionsService.hasRole("frontDeskStaff")&&!p.isSinglePatientMode(),canPatientDelete:t.permissionsService.hasPermission("patient","delete")&&!p.isSinglePatientMode(),canPatientModify:t.permissionsService.hasPermission("patient","change")&&!p.isSinglePatientMode(),canEmergencyAccess:t.permissionsService.hasPermission("emergencyPhi","allow")},t.patientSmokingStatusString=null,t.patientSmokingStatusObject=null,t.init=function(){var s;if(t.privileges.canViewSmokingStatus&&t.compoundData&&t.compoundData.patient&&(t.patientSmokingStatusString=null!==(s=t.compoundData.patient.smokingStatus)&&void 0!==s?s:void 0,I.getSmokingStatusCode(t.compoundData.patient).then(function(_){(f=_.entries||null)&&f.length&&(t.patientSmokingStatusObject=f[0]);})),n.comingFromEligibilityTool&&(n.comingFromEligibilityTool=!1,t.doEditPatient()),t.compoundData&&t.compoundData.patient)if(typeof t.compoundData.patient.addressList>"u")t.compoundData.patient.addressList=[{}],t.compoundData.patient.addressList[0].phoneNumbers=[];else{var a,o,d,v,r,M,c,m;"@null"==(null===(a=t.compoundData)||void 0===a||null===(o=a.patient)||void 0===o||null===(d=o.addressList)||void 0===d||null===(v=d[0])||void 0===v?void 0:v.address1)&&(t.compoundData.patient.addressList[0].address1=""),"@null"==(null===(r=t.compoundData)||void 0===r||null===(M=r.patient)||void 0===M||null===(c=M.addressList)||void 0===c||null===(m=c[0])||void 0===m?void 0:m.address2)&&(t.compoundData.patient.addressList[0].address2="");}};var dt=function(a){return at.fetchUserInfo(a).then(function(o){return o;},function(){return!1;});},ut=function(){return t.modalMsgs=[],t.form.selectedSmokeStatus&&t.form.selectedSmokeStatus!==S?(t.modalMsgs=[],t.showWidgetLoader=!0,n.setSmokingStatus(t.form.selectedSmokeStatus===S?"":t.form.selectedSmokeStatus,null===(a=t.compoundData)||void 0===a?void 0:a.patient).then(function(){var a;t.showWidgetLoader=!1,I.getSmokingStatusCode(null===(a=t.compoundData)||void 0===a?void 0:a.patient).then(function(o){var d;(f=o.entries||null)&&f.length&&(t.patientSmokingStatusObject=f[0],null!==(d=t.compoundData)&&void 0!==d&&d.patient&&(t.compoundData.patient.smokingStatus=t.patientSmokingStatusObject.smokingStatus||void 0),t.patientSmokingStatusString=t.patientSmokingStatusObject?t.patientSmokingStatusObject.smokingStatus:"Not specified",t.messageBarFactory.addAlert("Patient smoking status updated successfully.","success","patient-demographics",1e4,t.patientKey));});},function(){t.showWidgetLoader=!1,t.messageBarFactory.addAlert("Patient smoking status could not be updated.","danger","patient-demographics",null,t.patientKey);})):(t.modalMsgs.push({type:"danger",msg:"Please select a smoking status from the drop down menu."}),!1);var a;};t.modalsFactory=B,t.widgetMsgs=[],t.canViewClinicalReports=C.hasPermission("medication","view")&&C.hasPermission("patientDiagnosis","view")&&C.hasPermission("allergy","view"),t.messageBarFactory=b,t.hisSuppressPatientConsent=it.checkSuppressHisPatientConsent(),t.doEditPatient=function(){var s,a;t.patientCopy=angular.copy(null===(s=t.compoundData)||void 0===s?void 0:s.patient),null!==(a=t.patientCopy)&&void 0!==a&&a.externalIdentifiersObject&&delete t.patientCopy.externalIdentifiersObject,t.showEditPatient=!0;},t.finishEditPatient=function(){t.showEditPatient=!1,delete t.patientCopy;},t.deletePatient=function(s){var M={personId:s.personId};t.deleteMsg="Are you sure you want to delete this patient?",A.find(null,M,null,{value:"pending"},null,{resultsPerPage:5}).then(function(m){m.data.totalRecords>0&&(t.deleteMsg="Pending prescription(s) exist for this patient. Deleting the patient record will also delete all pending prescriptions.");});var c=setTimeout(function(){var m={message:t.deleteMsg,cancelBtn:!0,template:e(56700).A,okLabel:"Confirm Delete",scope:t,onOk:function(){return n.delete(s.personId).then(function(){t.messageBarFactory.addAlert("Patient "+j.capitalize(s.name.firstName)+" "+j.capitalize(s.name.lastName)+" deleted successfully.","success","patient-search",1e4),l.patientEvents.publishPatientChangeEvent(t.origin,t.widgetId,s,"deleted"),t.showWidgetLoader=!1;});}};t.modalsFactory.open(m),clearTimeout(c);},500);},t.goToPatientMerge=function(){n.useCurrentPatient=!0,h.go("merge-duplicate-patients");},t.goToProviderClinicalReport=function(){h.go("provider-clinical-report");},t.goToPatientClinicalReport=function(){h.go("patient-clinical-report");},t.openEditSmokingStatus=function(){t.smokingStatusOptions=ot,t.items=f,t.form={selectedSmokeStatus:S,canModifySmokingStatus:t.privileges.canModifySmokingStatus},t.modalMsgs=[];var s={scope:t,cancelBtn:!0,okLabel:"Set Status",onOk:ut,template:e(46091).A},a=[];for(var o in t.showWidgetLoader=!0,t.items){var d=t.items[o];null!=d&&d.recordingUserId&&a.push(dt(d.recordingUserId));}a.length?i.all(a).then(function(v){(function(a,o,d){if(o&&o.length)for(var v in typeof d>"u"&&(d="recordingUserId"),o){var r=o[v];for(var M in a){var c,m,_=a[M];if((null==r||null===(c=r[d])||void 0===c?void 0:c.simpleId)==(null==_||null===(m=_.personId)||void 0===m?void 0:m.simpleId)){null!=r&&r.recordingUser||r&&(r.recordingUser={}),r&&r.recordingUser&&(r.recordingUser.name=_?.name);break;}}}})(v,t.items),t.showWidgetLoader=!1,t.modalsFactory.open(s);}):(t.showWidgetLoader=!1,t.modalsFactory.open(s));},t.setFocus=function(s,a){if(a)var o=setTimeout(function(){angular.element(s).focus(),clearTimeout(o);},a);else angular.element(s).focus();},t.closeModalMsg=function(s){t.modalMsgs.splice(s,1),t.setFocus("#button_submit");},t.requestModifiedPHIAccess=function(){t.messageBarFactory.clearAlertByName("global"),C.modifyPHIAccess(!0,t.patientKey).then(function(){t.messageBarFactory.addAlert("Emergency access granted.","success","global",7e3,t.patientKey);},function(){});},t.doSavePatient=function(){var s;t.savePatientLoader=!0,st.savePatientForm(null===(s=t.compoundData)||void 0===s?void 0:s.patient).then(function(a){t.savePatientLoader=!1,l.patientEvents.publishPatientChangeEvent(t.origin,t.widgetId,a.patient,"modified"),nt.$broadcast("patientData.update."+t.patientKey,a);},function(){window.scrollTo(0,0),t.savePatientLoader=!1;});};}],template:e(32979).A,link:function(i,h,A){var b;i.standalone="standalone"in A||null,i.origin=i.origin||"patient-demographics-"+i.widgetId,i.showWidgetLoader=!0,i.widgetMsgs=u("filter")(i.messageBarFactory.alerts,{widget:"patient-demographics",patientKey:A.patientKey||""},!0),i.$watch(function(){return i.messageBarFactory.alerts;},function(j){i.widgetMsgs=u("filter")(j,{widget:"patient-demographics",patientKey:A.patientKey||""},!0);},!0),i.patientKey=A.patientKey||i.patientKey,i.compoundData=n.dataStore[i.patientKey],i.$on("patientData.update."+i.patientKey,function(j,B){B?(i.compoundData=n.dataStore[i.patientKey],i.init(),i.showWidgetLoader=!1):(i.compoundData=null,i.showWidgetLoader=!0);}),i.patientKey||l.publishErrorEvent(i.origin,i.widgetId,"WidgetMissingParameterException","Widget requires patient but was not provided one
1: "+(null==h||null===(b=h[0])||void 0===b?void 0:b.tagName)),i.init(),i.showWidgetLoader=!1;}};}];},15917:(L,g,e)=>{e.r(g),e.d(g,{default:()=>R}),e(62010);var P=e(42048).default,D=e(16987).default,O=e(94794).default,E=e(22102).default,K=e(76030).A,T=e(76079).A;const R=angular.module("df-w-patient-demographics",[P.name,D.name,O.name,E.name]).directive("dfWPatientDemographics",K).factory("PatientDemographicsFactory",T);},76079:(L,g,e)=>{e.d(g,{A:()=>y});const y=["_","PatientFactory",function(P,D){var O={};return O.validateExternalIdentifiers=D.validateExternalIdentifiersToBeSaved,O.savePatientForm=function(E){return D.update({personId:E.personId,breastfeeding:E.breastfeeding,pregnant:E.pregnant});},O;}];},56700:(L,g,e)=>{e.d(g,{A:()=>P});const P='<df-modal modal-name="\'delete-patient-modal\'"> <df-modal-header modal-title="\'Delete Patient\'" modal-name="\'delete-patient-modal\'"> </df-modal-header> <df-modal-body modal-name="\'delete-patient-modal\'"> <p a-id="deleteText">{{deleteMsg}}</p> </df-modal-body> <df-modal-footer> <button s-id="delete-patient-modal.ok" a-id="okButton" class="btn btn-primary" type="button" ng-click="modalsFactory.ok()"> {{okLabel}} </button> <button s-id="delete-patient-modal.cancel" a-id="cancelButton" class="btn btn-warning" type="button" ng-click="modalsFactory.close()" ng-if="cancelBtn"> {{cancelLabel}} </button> </df-modal-footer> </df-modal> ';},46091:(L,g,e)=>{e.d(g,{A:()=>P});const P='<df-modal modal-name="\'show-view-edit-smoking-status\'"> <df-modal-header modal-title="\'Patient Smoking Status\'" modal-name="\'show-view-edit-smoking-status\'"> </df-modal-header> <df-modal-body modal-name="\'show-view-edit-smoking-status\'"> <form s-id class="form form-horizontal" a-id="manageForm" name="manageSmokingStatus" novalidate ng-submit="modalsFactory.ok()"> <div a-id="addStatusWrapper" ng-if="form.canModifySmokingStatus" class="margin-bottom-20"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12"> <div uib-alert id="{{msg.id}}" s-id="alert.{{msg.widget}}.{{msg.type}}" a-id="messageBar" ng-repeat="msg in modalMsgs track by $index" ng-class="\'alert-\' + (msg.type || \'warning\')"> <span ng-bind-html="msg.msg"></span><button ng-click="closeModalMsg($index)" type="button" class="close" data-dismiss="alert" ng-if="!msg.cannotCollapse"> <span aria-hidden="true">×</span><span class="sr-only">Close</span> </button> </div> </div> </div> <div class="row"> <div class="col-md-6 form-inline"> <label>Status</label> <ui-select id="select_status" a-id="selectStatusDropDown" name="smokingStatus" ng-model="form.selectedSmokeStatus" class="form-control df-select df-select__smoking-status" on-select="setFocus(\'#button_submit\')" search-enabled="false"> <ui-select-match data-html="true"> <span>{{$select.selected}}</span> </ui-select-match> <ui-select-choices repeat="status as status in smokingStatusOptions"> <span>{{status}}</span> </ui-select-choices> </ui-select> <button s-id="show-view-edit-smoking-status.ok" a-id="setStatusButton" type="submit" class="btn btn-primary" id="button_submit" ng-init="setFocus(\'#button_submit\', 700)"> {{okLabel}} </button> </div> </div> </div> </form> <div class="row scrollable-table" a-id="smokingHistoryWrapper"> <div class="col-md-12"> <table s-id="smoking-status-history" a-id="statusTable" class="table table-bordered table-striped" ts-wrapper> <thead> <tr> <th>Smoking Status</th> <th>Modified Date</th> <th>Modified By</th> </tr> </thead> <tbody> <tr a-id="row" class="PatientSmokingStatus_SmokingStatusHistory_Row" ng-repeat="item in items"> <td a-id="statusColumn" class="PatientSmokingStatus_SmokingStatusHistory_Column_SmokingStatus"> {{item.smokingStatus || "No data"}} </td> <td a-id="modifyDateColumn" class="PatientSmokingStatus_SmokingStatusHistory_Column_ModifiedDate"> {{item.dateRecorded | date: \'MM/dd/yyyy\'}} </td> <td a-id="modifiedByColumn" class="PatientSmokingStatus_SmokingStatusHistory_Column_ModifiedBy"> <span ng-if="item.recordingUser.name">{{item.recordingUser.name.firstName}} {{item.recordingUser.name.middleName}} {{item.recordingUser.name.lastName}}
1<span ng-if="item.recordingUser.name.suffix">, {{item.recordingUser.name.suffix}}</span></span> </td> </tr> <tr a-id="row" ng-if="!items || items.length == 0"> <td a-id="noDataMessageColumn" colspan="3">No smoking status data found.</td> </tr> </tbody> </table> </div> </div> </df-modal-body> <df-modal-footer> <button s-id="show-view-edit-smoking-status.cancel" a-id="cancelButton" type="submit" class="btn btn-warning center-block" ng-click="modalsFactory.cancel()" ng-if="cancelBtn"> {{cancelLabel}} </button> </df-modal-footer> </df-modal> ';}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.