(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-310a7939"],{"1a98":function(t,e,r){"use strict";r("9a19")},"1c89":function(t,e,r){"use strict";r.r(e);varn=function(){vart=this,e=t.$createElement,r=t._self._c||e;returnr("div",[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-7"},[r("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers,items:t.patients,"single-select":t.singleSelect,"item-key":"id_paciente","show-select":""},scopedSlots:t._u([{key:"top",fn:function(){return[r("v-switch",{staticClass:"pa-3",attrs:{label:"Selección Única"},model:{value:t.singleSelect,callback:function(e){t.singleSelect=e},expression:"singleSelect"}})]},proxy:!0}]),model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}})],1),r("div",{staticClass:"col-md-5",attrs:{id:"centers-table"}},[r("v-data-table",{staticClass:"elevation-1",attrs:{headers:t.headers_cat,"single-select":t.singleSelectCenters,items:t.centers,"item-key":"nombre_centro","show-select":"",search:t.search,"custom-filter":t.customFilter},scopedSlots:t._u([{key:"top",fn:function(){return[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-5",attrs:{id:"filter-organism"}},[r("v-autocomplete",{attrs:{label:"Organismo",items:t.items,chips:"","small-chips":"",multiple:""}})],1),r("div",{staticClass:"col-md-5",attrs:{id:"filter-categorie"}},[r("v-select",{attrs:{label:"Categoria",items:t.categorias_name,chips:"","small-chips":"",multiple:""},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)])]},proxy:!0}]),model:{value:t.selectedCenters,callback:function(e){t.selectedCenters=e},expression:"selectedCenters"}})],1)])])},a=[],o=r("1da1"),i=(r("96cf"),r("d3b7"),r("25f0"),r("4de4"),r("3ca3"),r("ddb0"),r("159b"),r("39f4")),c=r("db53"),s=r("0364"),u=(r("2ef0"),{data:function(){return{singleSelect:!1,selected:[],headers:[{text:"Nombre",align:"start",sortable:!0,value:"nombre"},{text:"Apellidos",value:"apellidos"},{text:"Edad",value:"edad"},{text:"Sexo",value:"sexo"},{text:"Categoría",value:"categoria"},{text:"Clasificación",value:"clasificacion"}],patients:[],singleSelectCenters:!0,selectedCenters:[],headers_cat:[{text:"Nombre",align:"start",sortable:!0,value:"nombre_centro"},{text:"Municipio",value:"municipio"},{text:"Organismo",value:"organismo"}],search:"",centers:[],categorias:[],categorias_name:[]}},created:function(){this.getPatientsData(),this.getCentersData()},methods:{customFilter:function(t,e,r){returnconsole.log("bdkwbdkjwkjwjwjjjjjjjjjjjjjjjjjjjjjjjjj"),e=e.toString().toLowerCase(),t.filter((function(t){returnr(t["type"],e)}))},printValue:function(t){returnObject(o["a"])(regeneratorRuntime.mark((functione(){returnregeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case0:console.log("VALUE: ",t);case1:case"end":returne.stop()}}),e)})))()},getPatientsData:function(){vart=this;returnObject(o["a"])(regeneratorRuntime.mark((functione(){varr,n;returnregeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case0:returne.prev=0,e.next=3,Object(i["d"])();case3:returnr=e.sent,e.next=6,r.data.pacientes;case6:n=e.sent,t.getCategoriesData(n),t.patients=n,console.log("Patientsss",n),e.next=15;break;case12:e.prev=12,e.t0=e["catch"](0),t.$toast.error(e.t0.toString(),{position:"bottom-center",timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",icon:!0,rtl:!1});case15:case"end":returne.stop()}}),e,null,[[0,12]])})))()},getCategoriesData:function(t){vare=this;returnObject(o["a"])(regeneratorRuntime.mark((functionr(){returnregeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case0:returnr.prev=0,r.delegateYield(regeneratorRuntime.mark((functionr(){varn,a,o,i,s,u;returnregeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case0:returnr.next=2,Object(c["c"])();case2:returnn=r.sent,r.next=5,n.data;case5:for(uina=r.sent,o=0,console.log("MOCK CAT ",a),i=!1,s=function(r){r=t[o];a.forEach((function(t){i||e.categorias_name.push(t.nombre),t.id==r.categoria&&(r.categoria=t.nombre)})),i=!0,t[o]=r,o+=1},t)s(u);console.log("Fix patients categorie",t),console.log("categorias_name",e.categorias_name),console.log("categorias",e.categorias);case14:case"end":returnr.stop()}}),r)}))(),"t0",2);case2:r.next=7;break;case4:r.prev=4,r.t1=r["catch"](0),e.$toast.error(r.t1.toString(),{position:"bottom-center",timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",icon:!0,rtl:!1});case7:case"end":returnr.stop()}}),r,null,[[0,4]])})))()},getCentersData:function(t){vare=this;returnObject(o["a"])(regeneratorRuntime.mark((functiont(){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returnt.prev=0,t.next=3,Object(s["b"])();case3:returnr=t.sent,t.next=6,r.data.centros;case6:n=t.sent,0,e.centers=n,console.log("Centers",n),t.next=15;break;case12:t.prev=12,t.t0=t["catch"](0),e.$toast.error(t.t0.toString(),{position:"bottom-center",timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!1,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:"button",icon:!0,rtl:!1});case15:case"end":returnt.stop()}}),t,null,[[0,12]])})))()}}}),l=u,p=(r("1a98"),r("2877")),h=r("6544"),f=r.n(h),d=r("c6a6"),g=r("8fea"),v=r("b974"),m=r("b73d"),y=Object(p["a"])(l,n,a,!1,null,null,null);e["default"]=y.exports;f()(y,{VAutocomplete:d["a"],VDataTable:g["a"],VSelect:v["a"],VSwitch:m["a"]})},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){returna}));r("d3b7");functionn(t,e,r,n,a,o,i){try{varc=t[o](i),s=c.value}catch(u){returnvoidr(u)}c.done?e(s):Promise.resolve(s).then(n,a)}functiona(t){returnfunction(){vare=this,r=arguments;returnnewPromise((function(a,o){vari=t.apply(e,r);functionc(t){n(i,a,o,c,s,"next",t)}functions(t){n(i,a,o,c,s,"throw",t)}c(void0)}))}}},"39f4":function(t,e,r){"use strict";r.d(e,"d",(function(){returns})),r.d(e,"c",(function(){returnl})),r.d(e,"e",(function(){returnh})),r.d(e,"b",(function(){returnd})),r.d(e,"f",(function(){returnv})),r.d(e,"a",(function(){returny}));varn=r("1da1"),a=(r("99af"),r("96cf"),r("bc3a")),o=r.n(a),i=r("c9d9"),c=r("4e40");functions(t){returnu.apply(this,arguments)}functionu(){returnu=Object(n["a"])(regeneratorRuntime.mark((functiont(e){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returnr="".concat(i["d"],"pacientes"),t.next=3,o.a.get(r,Object(c["b"])(e));case3:returnn=t.sent,t.abrupt("return",n);case5:case"end":returnt.stop()}}),t)}))),u.apply(this,arguments)}functionl(t){returnp.apply(this,arguments)}functionp(){returnp=Object(n["a"])(regeneratorRuntime.mark((functiont(e){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returnr="".concat(i["d"],"pacientes/").concat(e),t.next=3,o.a.get(r,Object(c["b"])());case3:returnn=t.sent,t.abrupt("return",n);case5:case"end":returnt.stop()}}),t)}))),p.apply(this,arguments)}functionh(t){returnf.apply(this,arguments)}functionf(){returnf=Object(n["a"])(regeneratorRuntime.mark((functiont(e){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returnr="".concat(i["d"],"pacientes"),t.next=3,o.a.post(r,e,Object(c["b"])());case3:returnn=t.sent,t.abrupt("return",n);case5:case"end":returnt.stop()}}),t)}))),f.apply(this,arguments)}functiond(t){returng.apply(this,arguments)}functiong(){returng=Object(n["a"])(regeneratorRuntime.mark((functiont(e){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returnr="".concat(i["d"],"pacientes/").concat(e),t.next=3,o.a.delete(r,Object(c["b"])());case3:returnn=t.sent,t.abrupt("return",n);case5:case"end":returnt.stop()}}),t)}))),g.apply(this,arguments)}functionv(t){returnm.apply(this,arguments)}functionm(){returnm=Object(n["a"])(regeneratorRuntime.mark((functiont(e){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returnr="".concat(i["d"],"pacientes/").concat(e.id_paciente),t.next=3,o.a.put(r,e,Object(c["b"])());case3:returnn=t.sent,t.abrupt("return",n);case5:case"end":returnt.stop()}}),t)}))),m.apply(this,arguments)}functiony(t){returnb.apply(this,arguments)}functionb(){returnb=Object(n["a"])(regeneratorRuntime.mark((functiont(e){varr,n;returnregeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case0:returne.estado_sistema=3,r="".concat(i["d"],"pacientes/").concat(e.id_paciente),t.next=4,o.a.put(r,e,Object(c["b"])());case4:returnn=t.sent,t.abrupt("return",n);case6:case"end":returnt.stop()}}),t)}))),b.apply(this,arguments)}},"4e40":function(t,e,r){"use strict";r.d(e,"a",(function(){returna})),r.d(e,"b",(function(){returno}));varn=r("c9d9");functiona(t){return{params:t,headers:{"Content-Type":"application/json",Accept:"application/json"},httpsAgent:{AGENT:n["a"]}}}functiono(t){return{params:t,headers:{Authorization:"Bearer "+localStorage.getItem("tkn"),"Content-Type":"application/json",Accept:"application/json"},httpsAgent:{AGENT:n["a"]}}}},"96cf":function(t,e,r){varn=function(t){"use strict";vare,r=Object.prototype,n=r.hasOwnProperty,a="function"===typeofSymbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";functions(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(A){s=function(t,e,r){returnt[e]=r}}functionu(t,e,r,n){vara=e&&e.prototypeinstanceofv?e:v,o=Object.create(a.prototype),i=newR(n||[]);returno._invoke=C(t,r,i),o}functionl(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(A){return{type:"throw",arg:A}}}t.wrap=u;varp="suspendedStart",h="suspendedYield",f="executing",d="completed",g={};functionv(){}functionm(){}functiony(){}varb={};b[o]=function(){returnthis};varw=Object.getPrototypeOf,x=w&&w(w(S([])));x&&x!==r&&n.call(x,o)&&(b=x);varj=y.prototype=v.prototype=Object.create(b);functionO(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){returnthis._invoke(e,t)}))}))}functionk(t,e){functionr(a,o,i,c){vars=l(t[a],t,o);if("throw"!==s.type){varu=s.arg,p=u.value;returnp&&"object"===typeofp&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(p).then((function(t){u.value=t,i(u)}),(function(t){returnr("throw",t,i,c)}))}c(s.arg)}vara;functiono(t,n){functiono(){returnnewe((function(e,a){r(t,n,e,a)}))}returna=a?a.then(o,o):o()}this._invoke=o}functionC(t,e,r){varn=p;returnfunction(a,o){if(n===f)thrownewError("Generator is already running");if(n===d){if("throw"===a)throwo;returnP()}r.method=a,r.arg=o;while(1){vari=r.delegate;if(i){varc=L(i,r);if(c){if(c===g)continue;returnc}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if(n===p)thrown=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;vars=l(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}functionL(t,r){varn=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method))returng;r.method="throw",r.arg=newTypeError("The iterator does not provide a 'throw' method")}returng}vara=l(n,t.iterator,r.arg);if("throw"===a.type)returnr.method="throw",r.arg=a.arg,r.delegate=null,g;varo=a.arg;returno?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=newTypeError("iterator result is not an object"),r.delegate=null,g)}function_(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionE(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}functionR(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}functionS(t){if(t){varr=t[o];if(r)returnr.call(t);if("function"===typeoft.next)returnt;if(!isNaN(t.length)){vara=-1,i=functionr(){while(++a<t.length)if(n.call(t,a))returnr.value=t[a],r.done=!1,r;returnr.value=e,r.done=!0,r};returni.next=i}}return{next:P}}functionP(){return{value:e,done:!0}}returnm.prototype=j.constructor=y,y.constructor=m,m.displayName=s(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){vare="function"===typeoft&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,s(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},O(k.prototype),k.prototype[i]=function(){returnthis},t.AsyncIterator=k,t.async=function(e,r,n,a,o){void0===o&&(o=Promise);vari=newk(u(e,r,n,a),o);returnt.isGeneratorFunction(r)?i:i.next().then((function(t){returnt.done?t.value:i.next()}))},O(j),s(j,c,"Generator"),j[o]=function(){returnthis},j.toString=function(){return"[object Generator]"},t.keys=function(t){vare=[];for(varrint)e.push(r);returne.reverse(),functionr(){while(e.length){varn=e.pop();if(nint)returnr.value=n,r.done=!1,r}returnr.done=!0,r}},t.values=S,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(varrinthis)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;vart=this.tryEntries[0],e=t.completion;if("throw"===e.type)throwe.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;varr=this;functiona(n,a){returnc.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(varo=this.tryEntries.length-1;o>=0;--o){vari=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)returna("end");if(i.tryLoc<=this.prev){vars=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)returna(i.catchLoc,!0);if(this.prev<i.finallyLoc)returna(i.finallyLoc)}elseif(s){if(this.prev<i.catchLoc)returna(i.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returna(i.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){vara=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){varo=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);vari=o?o.completion:{};returni.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),E(r),g}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){vara=n.arg;E(r)}returna}}thrownewError("illegal catch attempt")},delegateYield:function(t,r,n){returnthis.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(a){Function("r","regeneratorRuntime = r")(n)}},"9a19":function(t,e,r){}}]);//# sourceMappingURL=chunk-310a7939.e62d5f04.js.map