@ampath/esm-dha-workflow-app 4.0.0-next.41 → 4.0.0-next.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/28.js +1 -0
- package/dist/28.js.map +1 -0
- package/dist/327.js +1 -1
- package/dist/327.js.map +1 -1
- package/dist/619.js +1 -0
- package/dist/619.js.map +1 -0
- package/dist/65.js +1 -0
- package/dist/65.js.map +1 -0
- package/dist/752.js +1 -1
- package/dist/esm-dha-workflow-app.js +1 -1
- package/dist/esm-dha-workflow-app.js.buildmanifest.json +103 -100
- package/dist/esm-dha-workflow-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/createDashboardLink.tsx +9 -0
- package/src/index.ts +14 -0
- package/src/pharmacy-dashboard.meta.ts +6 -0
- package/src/queue-dashboard.meta.ts +6 -0
- package/src/registry/registry.component.tsx +1 -4
- package/src/registry-dashboard.meta.ts +6 -0
- package/src/root.component.tsx +1 -2
- package/src/routes.json +31 -1
- package/dist/91.js +0 -1
- package/dist/91.js.map +0 -1
- package/dist/938.js +0 -1
- package/dist/938.js.map +0 -1
package/dist/28.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[28],{5028:(e,n,t)=>{t.r(n),t.d(n,{default:()=>G});var r=t(16072),o=t.n(r),a=t(39246),l=t(85072),c=t.n(l),i=t(97825),s=t.n(i),u=t(77659),_=t.n(u),m=t(55056),f=t.n(m),d=t(10540),A=t.n(d),p=t(41113),w=t.n(p),h=t(46386),b={};b.styleTagTransform=w(),b.setAttributes=f(),b.insert=_().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=A(),c()(h.A,b);const v=h.A&&h.A.locals?h.A.locals:void 0;var y=t(79369),E={};E.styleTagTransform=w(),E.setAttributes=f(),E.insert=_().bind(null,"head"),E.domAPI=s(),E.insertStyleElement=A(),c()(y.A,E);const C=y.A&&y.A.locals?y.A.locals:void 0;var g=t(25987);const I=function(e){var n=e.patients,t=(0,g.useLayoutType)(),r=(0,g.isDesktop)(t);return o().createElement(a.XIK,{size:r?"sm":"lg"},o().createElement(a.ndF,null,o().createElement(a.Hjg,null,o().createElement(a.A0N,null,"No"),o().createElement(a.A0N,null,"Name"),o().createElement(a.A0N,null,"Ticket"),o().createElement(a.A0N,null,"Status"),o().createElement(a.A0N,null,"Priority"))),o().createElement(a.BFY,null,null==n?void 0:n.map((function(e,n){return o().createElement(a.Hjg,null,o().createElement(a.nA6,null,n+1),o().createElement(a.nA6,null,"".concat(e.given_name," ").concat(e.middle_name," ").concat(e.family_name)),o().createElement(a.nA6,null,e.queue_id),o().createElement(a.nA6,null,e.status),o().createElement(a.nA6,null,e.priority))}))))};function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function k(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,n){if(e){if("string"==typeof e)return x(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(e,n):void 0}}const S=function(e){var n,t,l,c,i=e.triageCount,s=e.consultationCount,u=k(i).concat(k(s)).filter((function(e){return"WAITING"===e.status||"IN SERVICE"===e.status})).length,_=(l=(0,r.useState)(null),c=2,function(e){if(Array.isArray(e))return e}(l)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(a.push(r.value),!n||a.length!==n);l=!0);}catch(e){c=!0,o=e}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return a}}(l,c)||T(l,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=_[0],f=_[1],d=null!==(n=null==i?void 0:i.length)&&void 0!==n?n:0,A=null!==(t=null==s?void 0:s.length)&&void 0!==t?t:0,p=[];switch(m){case"Triage Patients":p=null!=i?i:[];break;case"Consultation Patients":p=null!=s?s:[];break;case"Walk-In Patients":case"Emergency Patients":p=[];break;default:p=k(null!=i?i:[]).concat(k(null!=s?s:[]))}return o().createElement(o().Fragment,null,o().createElement("div",{className:C.container},o().createElement(a.FAs,{className:C.card},o().createElement("h4",null,"Total Patients Today"),o().createElement("h5",null,"Patients"),o().createElement("h4",{className:C.total},d+A)),o().createElement(a.FAs,{className:C.card},o().createElement("h4",null,"Patients in Queue Today"),o().createElement("h5",null,"Patients"),o().createElement("h4",{className:C.queue},u)),o().createElement(a.FAs,{className:C.card},o().createElement("h4",null,"Patients in Triage "),o().createElement("h5",null,"Patients"),o().createElement("h4",{className:C.triage},d)),o().createElement(a.FAs,{className:C.card},o().createElement("h4",null,"Patients in Consultation "),o().createElement("h5",null,"Patients"),o().createElement("h4",{className:C.consultation},A)),o().createElement(a.FAs,{className:C.card},o().createElement("h4",null,"Walk-ins Today "),o().createElement("h5",null,"Patients"),o().createElement("h4",null,"0")),o().createElement(a.FAs,{className:C.card},o().createElement("h4",null,"Emergencies Today "),o().createElement("h5",null,"Patients"),o().createElement("h4",{className:C.emergency},"0"))),o().createElement(a.qj6,{className:C.dropdownItem,id:"",items:["Total Patients","Triage Patients","Consultation Patients","Walk-In Patients","Emergency Patients"],label:"Total Patients",titleText:"",onChange:function(e){var n=e.selectedItem;f(n)}}),o().createElement(I,{patients:p}))};var U=t(11314),N=t(75862);function P(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function j(e,n,t,r,o,a,l){try{var c=e[a](l),i=c.value}catch(e){return void t(e)}c.done?n(i):Promise.resolve(i).then(r,o)}function D(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var a=e.apply(n,t);function l(e){j(a,r,o,l,c,"next",e)}function c(e){j(a,r,o,l,c,"throw",e)}l(void 0)}))}}function O(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(a.push(r.value),!n||a.length!==n);l=!0);}catch(e){c=!0,o=e}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return a}}(e,n)||function(e,n){if(e){if("string"==typeof e)return P(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?P(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,n){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=c(0),l.throw=c(1),l.return=c(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function c(c){return function(i){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}}const G=function(){var e=O((0,r.useState)([]),2),n=e[0],t=e[1],l=O((0,r.useState)([]),2),c=l[0],i=l[1],s=(0,g.useSession)().sessionLocation.uuid,u=N.XA.TRIAGE_SERVICE_UUID,_=N.XA.CLINICAL_CONSULTATION_SERVICE_UUID;(0,r.useEffect)((function(){m(),f()}),[]);var m=function(){return D((function(){var e;return L(this,(function(n){switch(n.label){case 0:return[4,(0,U.U3)(u,s)];case 1:return e=n.sent(),t(e),[2]}}))}))()},f=function(){return D((function(){var e;return L(this,(function(n){switch(n.label){case 0:return[4,(0,U.U3)(_,s)];case 1:return e=n.sent(),i(e),[2]}}))}))()};return o().createElement("div",{className:v.container},o().createElement(a.tUM,null,o().createElement(a.wbY,{contained:!0,scrollDebounceWait:200},o().createElement(a.ozo,null,o().createElement("span",{className:v.tabText},"Overview")),o().createElement(a.ozo,null,o().createElement("span",{className:v.tabText},"Pharmacy")),o().createElement(a.ozo,null,o().createElement("span",{className:v.tabText},"Labs")),o().createElement(a.ozo,null,o().createElement("span",{className:v.tabText},"Programs"))),o().createElement(a.T2N,null,o().createElement(a.KpK,null,o().createElement(S,{triageCount:n,consultationCount:c})),o().createElement(a.KpK,null),o().createElement(a.KpK,null),o().createElement(a.KpK,null))))}},11314:(e,n,t)=>{t.d(n,{U3:()=>i,oG:()=>s});var r=t(25987),o=(t(70231),t(59324),t(16072),t(62801));function a(e,n,t,r,o,a,l){try{var c=e[a](l),i=c.value}catch(e){return void t(e)}c.done?n(i):Promise.resolve(i).then(r,o)}function l(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var l=e.apply(n,t);function c(e){a(l,r,o,c,i,"next",e)}function i(e){a(l,r,o,c,i,"throw",e)}c(void 0)}))}}function c(e,n){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=c(0),l.throw=c(1),l.return=c(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function c(c){return function(i){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}}function i(e,n){return l((function(){var t,a,l;return c(this,(function(c){switch(c.label){case 0:return[4,(0,o.SW)()];case 1:return t=c.sent(),a="".concat(t,"/queue-entry"),l=new URLSearchParams({locationUuid:n,serviceUuid:e}).toString(),[4,(0,r.openmrsFetch)("".concat(a,"?").concat(l))];case 2:return[4,c.sent().json()];case 3:return[2,c.sent().data]}}))}))()}function s(e){return l((function(){var n,t;return c(this,(function(o){switch(o.label){case 0:return n="".concat(r.restBaseUrl,"/queue-entry/").concat(e),t={endedAt:(new Date).toISOString()},[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return[4,o.sent().json()];case 2:return[2,o.sent().data]}}))}))()}},46386:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(72996),o=t.n(r),a=t(70159),l=t.n(a)()(o());l.push([e.id,".-esm-dha-workflow__dashboard-component__container___v92cd{margin:3rem}.-esm-dha-workflow__dashboard-component__tabText___QMBHG{font-size:20px}","",{version:3,sources:["webpack://./src/dashboard/dashboard.component.scss"],names:[],mappings:"AAAA,2DACI,WAAA,CAEJ,yDACI,cAAA",sourcesContent:[".container {\n margin: 3rem;\n}\n.tabText {\n font-size: 20px;\n}\n\n"],sourceRoot:""}]),l.locals={container:"-esm-dha-workflow__dashboard-component__container___v92cd",tabText:"-esm-dha-workflow__dashboard-component__tabText___QMBHG"};const c=l},62801:(e,n,t)=>{t.d(n,{E$:()=>i,SW:()=>s,bo:()=>u});var r=t(25987),o=t(56619);function a(e,n,t,r,o,a,l){try{var c=e[a](l),i=c.value}catch(e){return void t(e)}c.done?n(i):Promise.resolve(i).then(r,o)}function l(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var l=e.apply(n,t);function c(e){a(l,r,o,c,i,"next",e)}function i(e){a(l,r,o,c,i,"throw",e)}c(void 0)}))}}function c(e,n){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=c(0),l.throw=c(1),l.return=c(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function c(c){return function(i){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=n.call(e,a)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}}function i(){return l((function(){var e;return c(this,(function(n){switch(n.label){case 0:return[4,(0,r.getConfig)(o.moduleName)];case 1:return[2,null!=(e=n.sent().subDomainUrl)?e:null]}}))}))()}function s(){return l((function(){var e;return c(this,(function(n){switch(n.label){case 0:return[4,(0,r.getConfig)(o.moduleName)];case 1:return[2,null!=(e=n.sent().etlBaseUrl)?e:null]}}))}))()}function u(){return l((function(){var e;return c(this,(function(n){switch(n.label){case 0:return[4,(0,r.getConfig)(o.moduleName)];case 1:return[2,null!=(e=n.sent().hieBaseUrl)?e:null]}}))}))()}},75862:(e,n,t)=>{t.d(n,{XA:()=>a,cn:()=>o,i3:()=>r});var r={NORMAL_PRIORITY_UUID:"bbd99c12-67e9-4381-8b4c-1f231e86f8e2",EMERGENCY_PRIORITY_UUID:"8e86ff12-ec83-41e8-a534-bb410739d880"},o={WAITING_UUID:"89d01aa5-0ab0-4626-934b-37766b4cd779",IN_SERVICE_UUID:"f9cf5768-508f-45de-8d40-eaf6ea3f3b02",COMPLETED_UUID:"a89c1ef8-1350-11df-a1f1-0026b9348838"},a={TRIAGE_SERVICE_UUID:"2d4472e2-d7ab-4430-8e0e-a9ffcd809bf4",CLINICAL_CONSULTATION_SERVICE_UUID:"7f7ec7ad-cdd7-4ed9-bc2e-5c5bd9f065b2",MCH_TRIAGE_SERVICE_UUID:"7e4452bf-f9b7-4977-a21f-1c8b94831bac",MCH_CLINICAL_CONSULTATION_SERVICE_UUID:"0026e273-5f8c-46b5-8bb4-0d8301d50321"}},79369:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(72996),o=t.n(r),a=t(70159),l=t.n(a)()(o());l.push([e.id,".-esm-dha-workflow__overview-component__container___rxZmU{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;gap:1rem}.-esm-dha-workflow__overview-component__container___rxZmU .-esm-dha-workflow__overview-component__card___L-lVb{border:1px solid gray;border-radius:5px;background-color:#fff;font-weight:bold;flex:1 1 calc(33.33% - 1rem)}@media(max-width: 1024px){.-esm-dha-workflow__overview-component__container___rxZmU .-esm-dha-workflow__overview-component__card___L-lVb{flex:1 1 calc(50% - 1rem)}}@media(max-width: 600px){.-esm-dha-workflow__overview-component__container___rxZmU .-esm-dha-workflow__overview-component__card___L-lVb{flex:1 1 100%}}h4{font-weight:bold}.-esm-dha-workflow__overview-component__dropdownItem___yjyLG{display:flex;justify-self:flex-end;width:25%;min-width:180px;max-width:280px;margin-top:5rem;margin-bottom:5rem}.-esm-dha-workflow__overview-component__dropdownContainer___-kewt .-esm-dha-workflow__overview-component__cds--list-box__menu-item__option___4cEpM{font-weight:600}.-esm-dha-workflow__overview-component__dropdownContainer___-kewt .-esm-dha-workflow__overview-component__cds--list-box__field___Q7qml{font-weight:600}.-esm-dha-workflow__overview-component__queue___IhrLF{color:#db7093}.-esm-dha-workflow__overview-component__total___0rutz{color:gray}.-esm-dha-workflow__overview-component__triage___UbCoj{color:yelllow}.-esm-dha-workflow__overview-component__consultation___ppkxk{color:green}.-esm-dha-workflow__overview-component__emergency___Jxdjx{color:red}","",{version:3,sources:["webpack://./src/dashboard/overview/overview.component.scss"],names:[],mappings:"AAAA,0DACI,YAAA,CACA,UAAA,CACA,6BAAA,CACA,cAAA,CACA,QAAA,CAEJ,+GACI,qBAAA,CACA,iBAAA,CACA,qBAAA,CACA,gBAAA,CACA,4BAAA,CAIJ,0BACE,+GACE,yBAAA,CAAA,CAIJ,yBACE,+GACE,aAAA,CAAA,CAKJ,GACI,gBAAA,CAGJ,6DACI,YAAA,CACA,qBAAA,CACA,SAAA,CACA,eAAA,CACA,eAAA,CACA,eAAA,CACA,kBAAA,CAIF,mJACE,eAAA,CAGF,uIACE,eAAA,CAIJ,sDACI,aAAA,CAEJ,sDACI,UAAA,CAGJ,uDACI,aAAA,CAEJ,6DACI,WAAA,CAGJ,0DACI,SAAA",sourcesContent:[".container {\n display: flex;\n width: 100%;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 1rem;\n\n.card {\n border: 1px solid grey;\n border-radius: 5px;\n background-color: white;\n font-weight: bold;\n flex: 1 1 calc(33.33% - 1rem);\n }\n}\n\n@media (max-width: 1024px) {\n .container .card {\n flex: 1 1 calc(50% - 1rem);\n }\n}\n\n@media (max-width: 600px) {\n .container .card {\n flex: 1 1 100%;\n }\n}\n\n\nh4 {\n font-weight: bold;\n}\n\n.dropdownItem {\n display: flex;\n justify-self: flex-end;\n width: 25%; \n min-width: 180px; \n max-width: 280px;\n margin-top: 5rem;\n margin-bottom: 5rem;\n}\n\n.dropdownContainer {\n .cds--list-box__menu-item__option {\n font-weight: 600; \n }\n\n .cds--list-box__field {\n font-weight: 600; \n }\n}\n\n.queue {\n color: palevioletred\n}\n.total {\n color: gray;\n}\n\n.triage {\n color: yelllow;\n}\n.consultation {\n color: green;\n}\n\n.emergency {\n color: red;\n}"],sourceRoot:""}]),l.locals={container:"-esm-dha-workflow__overview-component__container___rxZmU",card:"-esm-dha-workflow__overview-component__card___L-lVb",dropdownItem:"-esm-dha-workflow__overview-component__dropdownItem___yjyLG",dropdownContainer:"-esm-dha-workflow__overview-component__dropdownContainer___-kewt","cds--list-box__menu-item__option":"-esm-dha-workflow__overview-component__cds--list-box__menu-item__option___4cEpM","cds--list-box__field":"-esm-dha-workflow__overview-component__cds--list-box__field___Q7qml",queue:"-esm-dha-workflow__overview-component__queue___IhrLF",total:"-esm-dha-workflow__overview-component__total___0rutz",triage:"-esm-dha-workflow__overview-component__triage___UbCoj",consultation:"-esm-dha-workflow__overview-component__consultation___ppkxk",emergency:"-esm-dha-workflow__overview-component__emergency___Jxdjx"};const c=l}}]);
|
package/dist/28.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"28.js","mappings":"0VAWIA,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAAc,KAAM,QAE3CH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQM,OAAS,IAAQA,YAASC,E,eCf/D,EAAU,CAAC,EAEf,EAAQN,kBAAoB,IAC5B,EAAQC,cAAgB,IAElB,EAAQC,OAAS,SAAc,KAAM,QAE3C,EAAQC,OAAS,IACjB,EAAQC,mBAAqB,IAEhB,IAAI,IAAS,GAKnB,QAAe,KAAW,IAAQC,OAAS,IAAQA,YAASC,E,eCcnE,QA/BgD,Y,IAAGC,EAAAA,EAAAA,SAC3CC,GAASC,EAAAA,EAAAA,iBACTC,GAAUC,EAAAA,EAAAA,WAAUH,GAC1B,OACE,kBAACI,EAAAA,IAAKA,CAACC,KAAMH,EAAU,KAAO,MAC5B,kBAACI,EAAAA,IAASA,KACR,kBAACC,EAAAA,IAAQA,KACP,kBAACC,EAAAA,IAAWA,KAAC,MACb,kBAACA,EAAAA,IAAWA,KAAC,QACb,kBAACA,EAAAA,IAAWA,KAAC,UACb,kBAACA,EAAAA,IAAWA,KAAC,UACb,kBAACA,EAAAA,IAAWA,KAAC,cAGjB,kBAACC,EAAAA,IAASA,KACPV,aAAAA,EAAAA,EAAUW,KAAI,SAACC,EAASC,GACvB,OACE,kBAACL,EAAAA,IAAQA,KACP,kBAACM,EAAAA,IAASA,KAAED,EAAQ,GACpB,kBAACC,EAAAA,IAASA,KAAE,GAAyBF,OAAtBA,EAAQG,WAAW,KAA0BH,OAAvBA,EAAQI,YAAY,KAAuB,OAApBJ,EAAQK,cACpE,kBAACH,EAAAA,IAASA,KAAEF,EAAQM,UACpB,kBAACJ,EAAAA,IAASA,KAAEF,EAAQO,QACpB,kBAACL,EAAAA,IAASA,KAAEF,EAAQQ,UAG1B,KAIR,E,ovBCoEA,QA9F0C,Y,IAMjBC,EACMC,E,IAPcD,EAAAA,EAAAA,YAAaC,EAAAA,EAAAA,kBAElDC,EADoC,EAAIF,GAAAA,OAAa,EAAGC,IACxBE,QACpC,SAACZ,G,MAA+B,YAAnBA,EAAQO,QAA2C,eAAnBP,EAAQO,M,IACrDM,OAC8BC,G,GAAAA,EAAAA,EAAAA,UAAwB,M,EAAA,E,oiBAAjDC,EAAyBD,EAAAA,GAAfE,EAAeF,EAAAA,GAC1BG,EAAoC,QAAnBR,EAAAA,aAAAA,EAAAA,EAAaI,cAAbJ,IAAAA,EAAAA,EAAuB,EACxCS,EAAgD,QAAzBR,EAAAA,aAAAA,EAAAA,EAAmBG,cAAnBH,IAAAA,EAAAA,EAA6B,EActDS,EAAuC,GAE3C,OAAQJ,GACN,IAAK,kBACHI,EAAmBV,QAAAA,EAAe,GAClC,MAEF,IAAK,wBACHU,EAAmBT,QAAAA,EAAqB,GACxC,MACF,IAAK,mBAGL,IAAK,qBACHS,EAAmB,GACnB,MAMF,QACEA,EAAmB,EAAKV,QAAAA,EAAe,IAAE,OAAG,EAAIC,QAAAA,EAAqB,KAIzE,OACE,oCACE,kBAACU,MAAAA,CAAIC,UAAWC,EAAOC,WACrB,kBAACC,EAAAA,IAAIA,CAACH,UAAWC,EAAOG,MACtB,kBAACC,KAAAA,KAAG,wBACJ,kBAACC,KAAAA,KAAG,YACJ,kBAACD,KAAAA,CAAGL,UAAWC,EAAOM,OAAQX,EAAiBC,IAEjD,kBAACM,EAAAA,IAAIA,CAACH,UAAWC,EAAOG,MACtB,kBAACC,KAAAA,KAAG,2BACJ,kBAACC,KAAAA,KAAG,YACJ,kBAACD,KAAAA,CAAGL,UAAWC,EAAOO,OAAQlB,IAEhC,kBAACa,EAAAA,IAAIA,CAACH,UAAWC,EAAOG,MACtB,kBAACC,KAAAA,KAAG,uBACJ,kBAACC,KAAAA,KAAG,YACJ,kBAACD,KAAAA,CAAGL,UAAWC,EAAOQ,QAASb,IAEjC,kBAACO,EAAAA,IAAIA,CAACH,UAAWC,EAAOG,MACtB,kBAACC,KAAAA,KAAG,6BACJ,kBAACC,KAAAA,KAAG,YACJ,kBAACD,KAAAA,CAAGL,UAAWC,EAAOS,cAAeb,IAEvC,kBAACM,EAAAA,IAAIA,CAACH,UAAWC,EAAOG,MACtB,kBAACC,KAAAA,KAAG,mBACJ,kBAACC,KAAAA,KAAG,YACJ,kBAACD,KAAAA,KAAG,MAEN,kBAACF,EAAAA,IAAIA,CAACH,UAAWC,EAAOG,MACtB,kBAACC,KAAAA,KAAG,sBACJ,kBAACC,KAAAA,KAAG,YACJ,kBAACD,KAAAA,CAAGL,UAAWC,EAAOU,WAAW,OAGrC,kBAACC,EAAAA,IAAaA,CACZZ,UAAWC,EAAOY,aAClBC,GAAI,GACJC,MA5EgB,CACpB,iBACA,kBACA,wBACA,mBACA,sBAwEIC,MAAO,iBACPC,UAAW,GACXC,SAvEuB,SAACC,GAC5B,IAAMC,EAAQD,EAAKE,aACnB1B,EAAYyB,EACd,IAsEI,kBAACE,EAAWA,CAACvD,SAAU+B,IAG7B,E,y5EC1CA,QAlD4C,WAC1C,IAAoDL,EAAAA,GAAAA,EAAAA,EAAAA,UAA6B,IAAE,GAA5E8B,EAA6C9B,EAAAA,GAAzB+B,EAAyB/B,EAAAA,GACYA,EAAAA,GAAAA,EAAAA,EAAAA,UAA6B,IAAE,GAAxFgC,EAAyDhC,EAAAA,GAA/BiC,EAA+BjC,EAAAA,GAE1DkC,GADUC,EAAAA,EAAAA,cACaC,gBAAgBC,KACvCC,EAAoBC,EAAAA,GAAoBC,oBACxCC,EAA0BF,EAAAA,GAAoBG,oCACpDC,EAAAA,EAAAA,YAAU,WACRC,IACAC,GACF,GAAG,IAEH,IAAMD,EAAuB,W,yBACrBE,E,kDAAM,O,GAAMC,EAAAA,EAAAA,IAA8BT,EAAmBJ,I,cAA7DY,EAAM,SACZf,EAAsBe,G,OACxB,G,IACMD,EAA6B,W,yBAC3BC,E,kDAAM,O,GAAMC,EAAAA,EAAAA,IAA8BN,EAAyBP,I,cAAnEY,EAAM,SACZb,EAA4Ba,G,OAC9B,G,IACA,OACE,kBAACxC,MAAAA,CAAIC,UAAWC,EAAOC,WACrB,kBAACuC,EAAAA,IAAIA,KACH,kBAACC,EAAAA,IAAOA,CAACC,WAAAA,EAAUC,mBAAoB,KACrC,kBAACC,EAAAA,IAAGA,KACF,kBAACC,OAAAA,CAAK9C,UAAWC,EAAO8C,SAAS,aAEnC,kBAACF,EAAAA,IAAGA,KACF,kBAACC,OAAAA,CAAK9C,UAAWC,EAAO8C,SAAS,aAEnC,kBAACF,EAAAA,IAAGA,KACF,kBAACC,OAAAA,CAAK9C,UAAWC,EAAO8C,SAAS,SAEnC,kBAACF,EAAAA,IAAGA,KACF,kBAACC,OAAAA,CAAK9C,UAAWC,EAAO8C,SAAS,cAGrC,kBAACC,EAAAA,IAASA,KACR,kBAACC,EAAAA,IAAQA,KACP,kBAACC,EAAQA,CAAC9D,YAAamC,EAAoBlC,kBAAmBoC,KAEhE,kBAACwB,EAAAA,IAAQA,MACT,kBAACA,EAAAA,IAAQA,MACT,kBAACA,EAAAA,IAAQA,QAKnB,C,oiDCsFO,SAAeT,EACpBW,EACAxB,G,yBAEMyB,EACAC,EAKAC,E,kDANa,O,GAAMC,EAAAA,EAAAA,O,OAOR,OAPXH,EAAa,SACbC,EAAgB,GAAc,OAAXD,EAAW,gBAK9BE,EAAc,IAAIE,gBAJT,CACb7B,aAAcA,EACdwB,YAAaA,IAEiCM,WAC/B,C,GAAMC,EAAAA,EAAAA,cAAa,GAAoBJ,OAAjBD,EAAc,KAAe,OAAZC,K,OACzC,O,EADE,SACaK,Q,OAC9B,MAAO,C,EADQ,SACDxC,M,GAChB,G,GAEO,SAAeyC,EAAgBC,G,yBAC9BR,EACAS,E,kDAGW,OAJXT,EAAgB,GAA8BQ,OAA3BE,EAAAA,YAAY,iBAA8B,OAAfF,GAC9CC,EAAS,CACbE,SAAS,IAAIC,MAAOC,eAEL,C,GAAMR,EAAAA,EAAAA,cAAaL,EAAe,CACjDc,OAAQ,OACRC,QAAS,CACP,eAAgB,oBAElBC,KAAMC,KAAKC,UAAUT,M,OAER,O,EAPE,SAOaH,Q,OAC9B,MAAO,C,EADQ,SACDxC,M,GAChB,G,yEC7KIqD,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAO5D,GAAI,kJAAmJ,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,sDAAsD,MAAQ,GAAG,SAAW,kCAAkC,eAAiB,CAAC,+EAA+E,WAAa,MAEnb0D,EAAwB3G,OAAS,CAChC,UAAa,4DACb,QAAW,2DAEZ,S,ghDCRO,SAAe8G,I,yBACZC,E,kDAAiB,O,GAAMC,EAAAA,EAAAA,WAAUC,EAAAA,a,OACzC,MAAO,C,EAAAF,OADCA,EAAiB,SAAjBA,cACDA,EAAgB,M,GACzB,G,GAEO,SAAerB,I,yBACZH,E,kDAAe,O,GAAMyB,EAAAA,EAAAA,WAAUC,EAAAA,a,OACvC,MAAO,C,EAAA1B,OADCA,EAAe,SAAfA,YACDA,EAAc,M,GACvB,G,GAEO,SAAe2B,I,yBACZC,E,kDAAe,O,GAAMH,EAAAA,EAAAA,WAAUC,EAAAA,a,OACvC,MAAO,C,EAAAE,OADCA,EAAe,SAAfA,YACDA,EAAc,M,GACvB,G,yDChBA,IAaaC,EAAyB,CACpCC,qBAd2B,uCAe3BC,wBAd8B,wCAiBnBC,EAAqB,CAChCC,aAhBmB,uCAiBnBC,gBAhBsB,uCAiBtBC,eAhBqB,wCAmBVvD,EAAsB,CACjCC,oBAlB0B,uCAmB1BE,mCAlByC,uCAmBzCqD,wBAjB8B,uCAkB9BC,uCAjB6C,uC,sECR3CjB,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAO5D,GAAI,m/CAAo/C,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,8DAA8D,MAAQ,GAAG,SAAW,6XAA6X,eAAiB,CAAC,ogCAAogC,WAAa,MAE5iG0D,EAAwB3G,OAAS,CAChC,UAAa,2DACb,KAAQ,sDACR,aAAgB,8DAChB,kBAAqB,mEACrB,mCAAoC,kFACpC,uBAAwB,sEACxB,MAAS,uDACT,MAAS,uDACT,OAAU,wDACV,aAAgB,8DAChB,UAAa,4DAEd,S","sources":["webpack://@ampath/esm-dha-workflow-app/./src/dashboard/dashboard.component.scss?1f15","webpack://@ampath/esm-dha-workflow-app/./src/dashboard/overview/overview.component.scss?0de4","webpack://@ampath/esm-dha-workflow-app/./src/dashboard/patient-list/patient-list.component.tsx","webpack://@ampath/esm-dha-workflow-app/./src/dashboard/overview/overview.component.tsx","webpack://@ampath/esm-dha-workflow-app/./src/dashboard/dashboard.component.tsx","webpack://@ampath/esm-dha-workflow-app/./src/service-queues/service-queues.resource.ts","webpack://@ampath/esm-dha-workflow-app/./src/dashboard/dashboard.component.scss","webpack://@ampath/esm-dha-workflow-app/./src/shared/utils/get-base-url.ts","webpack://@ampath/esm-dha-workflow-app/./src/shared/constants/concepts.ts","webpack://@ampath/esm-dha-workflow-app/./src/dashboard/overview/overview.component.scss"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","undefined","patients","layout","useLayoutType","desktop","isDesktop","Table","size","TableHead","TableRow","TableHeader","TableBody","map","patient","index","TableCell","given_name","middle_name","family_name","queue_id","status","priority","triageCount","consultationCount","patientsInQueue","filter","length","useState","selected","setSelected","triagePatients","consultationPatients","selectedPatients","div","className","styles","container","Tile","card","h4","h5","total","queue","triage","consultation","emergency","FluidDropdown","dropdownItem","id","items","label","titleText","onChange","data","value","selectedItem","PatientList","triageQueueEntries","setTriageQueueEntries","consultationQueueEntries","setConsultationQueueEntries","locationUuid","useSession","sessionLocation","uuid","triageServiceUuid","QUEUE_SERVICE_UUIDS","TRIAGE_SERVICE_UUID","consultationServiceUuid","CLINICAL_CONSULTATION_SERVICE_UUID","useEffect","getTriageEntryQueues","getConsultationEntryQueues","res","getServiceQueueByLocationUuid","Tabs","TabList","contained","scrollDebounceWait","Tab","span","tabText","TabPanels","TabPanel","Overview","serviceUuid","etlBaseUrl","queueEntryUrl","queryString","getEtlBaseUrl","URLSearchParams","toString","openmrsFetch","json","closeQueueEntry","entryQueueUuid","params","restBaseUrl","endedAt","Date","toISOString","method","headers","body","JSON","stringify","___CSS_LOADER_EXPORT___","push","module","getSubDomainUrl","subDomainUrl","getConfig","moduleName","getHieBaseUrl","hieBaseUrl","QUEUE_PRIORITIES_UUIDS","NORMAL_PRIORITY_UUID","EMERGENCY_PRIORITY_UUID","QUEUE_STATUS_UUIDS","WAITING_UUID","IN_SERVICE_UUID","COMPLETED_UUID","MCH_TRIAGE_SERVICE_UUID","MCH_CLINICAL_CONSULTATION_SERVICE_UUID"],"sourceRoot":""}
|
package/dist/327.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[327],{3754:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__send-to-triage-modal__formSection___8euyX{display:flex;flex-direction:column;width:100%;row-gap:5px;margin-top:15px}.-esm-dha-workflow__send-to-triage-modal__formRow___Hf27O{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__send-to-triage-modal__formControl___Gmnpd{display:flex;flex-direction:column;width:45%;row-gap:5px}.-esm-dha-workflow__send-to-triage-modal__actionSection___Dlgbe{display:flex;flex-direction:row;column-gap:5px;margin-top:15px}.-esm-dha-workflow__send-to-triage-modal__patientAction___ECxUB{display:flex;flex-direction:row;column-gap:5px;margin-top:15px}.-esm-dha-workflow__send-to-triage-modal__greenBtn___wFmfq{background-color:#28a745}","",{version:3,sources:["webpack://./src/registry/modal/send-to-triage/send-to-triage.modal.scss"],names:[],mappings:"AAAA,8DACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CAEJ,0DACG,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEH,8DACG,YAAA,CACA,qBAAA,CACA,SAAA,CACA,WAAA,CAEH,gEACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,eAAA,CAEJ,gEACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,eAAA,CAEJ,2DACI,wBAAA",sourcesContent:[".formSection{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n margin-top: 15px;\n}\n.formRow{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.formControl{\n display: flex;\n flex-direction: column;\n width: 45%;\n row-gap: 5px;\n}\n.actionSection{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n margin-top: 15px;\n}\n.patientAction{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n margin-top: 15px;\n}\n.greenBtn{\n background-color: #28a745;\n}"],sourceRoot:""}]),i.locals={formSection:"-esm-dha-workflow__send-to-triage-modal__formSection___8euyX",formRow:"-esm-dha-workflow__send-to-triage-modal__formRow___Hf27O",formControl:"-esm-dha-workflow__send-to-triage-modal__formControl___Gmnpd",actionSection:"-esm-dha-workflow__send-to-triage-modal__actionSection___Dlgbe",patientAction:"-esm-dha-workflow__send-to-triage-modal__patientAction___ECxUB",greenBtn:"-esm-dha-workflow__send-to-triage-modal__greenBtn___wFmfq"};const l=i},4405:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__otp-input-component__otpDataInput___hnFAW{width:3rem;height:3rem;text-align:center}.-esm-dha-workflow__otp-input-component__otpInputContainer___HV3nG{display:flex;flex-direction:row;column-gap:5px}.-esm-dha-workflow__otp-input-component__otpDataInputContainer___73DPe{width:4rem;height:4rem}","",{version:3,sources:["webpack://./src/shared/ui/otp-input/otp-input.component.scss"],names:[],mappings:"AAAA,8DACE,UAAA,CACA,WAAA,CACA,iBAAA,CAEF,mEACG,YAAA,CACA,kBAAA,CACA,cAAA,CAEH,uEACI,UAAA,CACA,WAAA",sourcesContent:[".otpDataInput{\n width: 3rem;\n height: 3rem;\n text-align: center;\n}\n.otpInputContainer{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n}\n.otpDataInputContainer{\n width: 4rem;\n height: 4rem;\n}"],sourceRoot:""}]),i.locals={otpDataInput:"-esm-dha-workflow__otp-input-component__otpDataInput___hnFAW",otpInputContainer:"-esm-dha-workflow__otp-input-component__otpInputContainer___HV3nG",otpDataInputContainer:"-esm-dha-workflow__otp-input-component__otpDataInputContainer___73DPe"};const l=i},6842:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__registry-component__registryLayout___PF4WP{display:flex;flex-direction:row;width:100%;row-gap:10px;padding:2% 2%}.-esm-dha-workflow__registry-component__mainContent___qOmrp{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__registry-component__registryHeader___YIQ62{display:flex;flex-direction:column;row-gap:10px;width:100%}.-esm-dha-workflow__registry-component__registryContent___W1b-9{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__registry-component__formRow___qlwjG{display:flex;flex-direction:row;width:100%;column-gap:5px;margin-top:10px}.-esm-dha-workflow__registry-component__formControl___R5c2A{width:30%}.-esm-dha-workflow__registry-component__hieData___jx5gt{margin-top:15px;display:flex;flex-direction:column;width:80%;row-gap:10px}.-esm-dha-workflow__registry-component__btnContainer___aXZfC{padding:5px 5px}.-esm-dha-workflow__registry-component__selectionHeader___-zRam{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__registry-component__patientSelect___wgPYw{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__registry-component__patientSelectRadio___3aGYW{width:70%}.-esm-dha-workflow__registry-component__patientConfirmSelection___Py9-y{display:flex;flex-direction:row;width:30%;column-gap:5px}.-esm-dha-workflow__registry-component__formBtn___ok0W6{display:flex;flex-direction:row;column-gap:5px}.-esm-dha-workflow__registry-component__registrySearchBtn___jHA2M{height:30px}.-esm-dha-workflow__registry-component__principalDependantSection___y\\+Uv2{display:flex;flex-direction:row;width:100%;margin-top:15px}.-esm-dha-workflow__registry-component__dependantCard___BUkYp{display:flex;flex-direction:row;width:30%}","",{version:3,sources:["webpack://./src/registry/registry.component.scss"],names:[],mappings:"AAAA,+DACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,YAAA,CACA,aAAA,CAEJ,4DACE,YAAA,CACA,qBAAA,CACA,UAAA,CAEF,+DACI,YAAA,CACA,qBAAA,CACA,YAAA,CACA,UAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CAEJ,wDACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CAEJ,4DACI,SAAA,CAEJ,wDACI,eAAA,CACA,YAAA,CACA,qBAAA,CACA,SAAA,CACA,YAAA,CAEJ,6DACI,eAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,8DACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEJ,mEACI,SAAA,CAEJ,wEACI,YAAA,CACA,kBAAA,CACA,SAAA,CACA,cAAA,CAEJ,wDACI,YAAA,CACA,kBAAA,CACA,cAAA,CAEJ,kEACI,WAAA,CAEJ,2EACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,eAAA,CAEJ,8DACI,YAAA,CACA,kBAAA,CACA,SAAA",sourcesContent:[".registryLayout{\n display: flex;\n flex-direction: row;\n width: 100%;\n row-gap: 10px;\n padding: 2% 2%;\n}\n.mainContent{\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.registryHeader{\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n width: 100%;\n}\n.registryContent{\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.formRow{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n margin-top: 10px;\n}\n.formControl{\n width: 30%;\n}\n.hieData{\n margin-top: 15px;\n display: flex;\n flex-direction: column;\n width: 80%;\n row-gap: 10px;\n}\n.btnContainer{\n padding: 5px 5px;\n}\n.selectionHeader{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.patientSelect{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.patientSelectRadio{\n width: 70%;\n}\n.patientConfirmSelection{\n display: flex;\n flex-direction: row;\n width: 30%;\n column-gap: 5px;\n}\n.formBtn{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n}\n.registrySearchBtn{\n height: 30px;\n}\n.principalDependantSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n margin-top: 15px;\n}\n.dependantCard{\n display: flex;\n flex-direction: row;\n width: 30%;\n}"],sourceRoot:""}]),i.locals={registryLayout:"-esm-dha-workflow__registry-component__registryLayout___PF4WP",mainContent:"-esm-dha-workflow__registry-component__mainContent___qOmrp",registryHeader:"-esm-dha-workflow__registry-component__registryHeader___YIQ62",registryContent:"-esm-dha-workflow__registry-component__registryContent___W1b-9",formRow:"-esm-dha-workflow__registry-component__formRow___qlwjG",formControl:"-esm-dha-workflow__registry-component__formControl___R5c2A",hieData:"-esm-dha-workflow__registry-component__hieData___jx5gt",btnContainer:"-esm-dha-workflow__registry-component__btnContainer___aXZfC",selectionHeader:"-esm-dha-workflow__registry-component__selectionHeader___-zRam",patientSelect:"-esm-dha-workflow__registry-component__patientSelect___wgPYw",patientSelectRadio:"-esm-dha-workflow__registry-component__patientSelectRadio___3aGYW",patientConfirmSelection:"-esm-dha-workflow__registry-component__patientConfirmSelection___Py9-y",formBtn:"-esm-dha-workflow__registry-component__formBtn___ok0W6",registrySearchBtn:"-esm-dha-workflow__registry-component__registrySearchBtn___jHA2M",principalDependantSection:"-esm-dha-workflow__registry-component__principalDependantSection___y+Uv2",dependantCard:"-esm-dha-workflow__registry-component__dependantCard___BUkYp"};const l=i},25838:(e,t,n)=>{n.d(t,{_:()=>l,j:()=>c});var r=n(25987);function a(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,c,"next",e)}function c(e){a(i,r,o,l,c,"throw",e)}l(void 0)}))}}function i(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function l(e){return o((function(){var t,n,a;return i(this,(function(o){switch(o.label){case 0:return t="".concat(r.restBaseUrl,"/visit"),[4,(0,r.openmrsFetch)(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})];case 1:return(n=o.sent()).ok?[3,3]:[4,n.text()];case 2:throw a=o.sent(),new Error("Request failed with ".concat(n.status,": ").concat(a));case 3:return[2,n.json()]}}))}))()}function c(e,t){return o((function(){var n,a,o;return i(this,(function(i){switch(i.label){case 0:return n="".concat(r.restBaseUrl,"/visit/").concat(e),[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return(a=i.sent()).ok?[3,3]:[4,a.text()];case 2:throw o=i.sent(),new Error("Request failed with ".concat(a.status,": ").concat(o));case 3:return[2,a.json()]}}))}))()}},62801:(e,t,n)=>{n.d(t,{E$:()=>c,SW:()=>u,bo:()=>s});var r=n(25987),a=n(38091);function o(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function l(e){o(i,r,a,l,c,"next",e)}function c(e){o(i,r,a,l,c,"throw",e)}l(void 0)}))}}function l(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function c(){return i((function(){var e;return l(this,(function(t){switch(t.label){case 0:return[4,(0,r.getConfig)(a.moduleName)];case 1:return[2,null!=(e=t.sent().subDomainUrl)?e:null]}}))}))()}function u(){return i((function(){var e;return l(this,(function(t){switch(t.label){case 0:return[4,(0,r.getConfig)(a.moduleName)];case 1:return[2,null!=(e=t.sent().etlBaseUrl)?e:null]}}))}))()}function s(){return i((function(){var e;return l(this,(function(t){switch(t.label){case 0:return[4,(0,r.getConfig)(a.moduleName)];case 1:return[2,null!=(e=t.sent().hieBaseUrl)?e:null]}}))}))()}},73327:(e,t,n)=>{n.r(t),n.d(t,{default:()=>$e});var r=n(39246),a=n(16072),o=n.n(a),i=n(85072),l=n.n(i),c=n(97825),u=n.n(c),s=n(77659),d=n.n(s),f=n(55056),m=n.n(f),p=n(10540),A=n.n(p),h=n(41113),_=n.n(h),y=n(6842),b={};b.styleTagTransform=_(),b.setAttributes=m(),b.insert=d().bind(null,"head"),b.domAPI=u(),b.insertStyleElement=A(),l()(y.A,b);const w=y.A&&y.A.locals?y.A.locals:void 0;var g=["National ID","Alien ID","Passport","Mandate Number","Refugee ID"],v=function(e){return e.Draft="DRAFT",e.Sent="SENT",e.Verified="VERIFIED",e}({}),C=function(e){return e.NationalID="National ID",e.SHANumber="SHA Number",e.HouseholdNumber="Household Number",e.RefugeeID="Refugee ID",e.AlienID="Alien ID",e.MandateNumber="Mandate Number",e.Cr="id",e.TemporaryDependantID="Temporary Dependant ID",e.BirthCertificate="Birth Certificate",e}({}),E=n(62801);function x(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){x(o,r,a,i,l,"next",e)}function l(e){x(o,r,a,i,l,"throw",e)}i(void 0)}))}}function k(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function I(e,t){return S((function(){var n,r;return k(this,(function(a){switch(a.label){case 0:return[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return(n=a.sent()).ok?[3,3]:[4,n.text()];case 2:throw r=a.sent(),new Error("Request failed with ".concat(n.status,": ").concat(r));case 3:return[2,n.json()]}}))}))()}function T(e){return S((function(){var t,n,r;return k(this,(function(a){switch(a.label){case 0:return[4,(0,E.bo)()];case 1:return t=a.sent(),n="".concat(t,"/client/search"),r={identificationNumber:e.identificationNumber,identificationType:e.identificationType,locationUuid:e.locationUuid},[2,I(n,r)]}}))}))()}var N=n(25987),D=n(84497),P={};P.styleTagTransform=_(),P.setAttributes=m(),P.insert=d().bind(null,"head"),P.domAPI=u(),P.insertStyleElement=A(),l()(D.A,P);const O=D.A&&D.A.locals?D.A.locals:void 0;var R=function(e){for(var t=e.split(""),n=0;n<e.length;n++)n%2==0&&(t[n]="*");return t.join("")},j=function(e){for(var t=e.split(""),n=0;n<e.length;n++)0!=n&&n!==e.length-1&&(t[n]="*");return t.join("")},F=n(4405),U={};U.styleTagTransform=_(),U.setAttributes=m(),U.insert=d().bind(null,"head"),U.domAPI=u(),U.insertStyleElement=A(),l()(F.A,U);const B=F.A&&F.A.locals?F.A.locals:void 0;function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}const L=function(e){var t,n,i=e.onChange,l=e.otpLength,c=(t=(0,a.useState)(Array(l).fill("")),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(t,n)||M(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],s=c[1],d=(0,a.useRef)([]);if(!l)return o().createElement(o().Fragment,null,"OTP Length not defined");var f=function(e){d.current[e]&&d.current[e].focus()};return o().createElement("div",{className:B.otpInputContainer,onPaste:function(e){e.preventDefault();var t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,l);if(t){var n=H(u);t.split("").forEach((function(e,t){n[t]=e})),s(n),null==i||i(n.join("")),f(t.length-1)}}},u.map((function(e,t){return o().createElement("div",{className:B.otpDataInputContainer},o().createElement(r.ksK,{className:B.otpDataInput,key:t,id:"otp-".concat(t),value:e,labelText:"",hideLabel:!0,maxLength:1,inputMode:"numeric",pattern:"[0-9]*",ref:function(e){return d.current[t]=e},onChange:function(e){return function(e,t){if(/^\d?$/.test(e)){var n=H(u);n[t]=e,s(n),e&&t<l-1&&f(t+1),null==i||i(n.join(""))}}(e.target.value,t)},onKeyDown:function(e){return function(e,t){"Backspace"===e.key&&!u[t]&&t>0&&f(t-1)}(e,t)},style:{height:"4rem",width:"4rem",borderStyle:"solid grey",backgroundColor:"#e5ebf7"}}))})))};var q=n(75485),V={};V.styleTagTransform=_(),V.setAttributes=m(),V.insert=d().bind(null,"head"),V.domAPI=u(),V.insertStyleElement=A(),l()(q.A,V);const G=q.A&&q.A.locals?q.A.locals:void 0;function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const J=function(e){var t,n,r,i,l,c,u,s=e.durationInSeconds,d=(e.resetTimer,e.onTimeUp),f=(t=(0,a.useState)(s),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=f[0],p=f[1];return(0,a.useEffect)((function(){if(!(m<=0)){var e=setInterval((function(){p((function(e){return e-1}))}),1e3);return function(){return clearInterval(e)}}null==d||d()}),[m]),o().createElement(o().Fragment,null,o().createElement("div",{className:G.timerData},o().createElement("b",null,(l=(r=m)%60,c=(i=Math.floor(r/60))>9?i:"0".concat(i),u=l>9?l:"0".concat(l),"".concat(c,":").concat(u)))))};function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function K(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){z(o,r,a,i,l,"next",e)}function l(e){z(o,r,a,i,l,"throw",e)}i(void 0)}))}}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}const Z=function(e){var t=e.requestCustomOtpDto,n=e.phoneNumber,i=e.open,l=e.onModalClose,c=e.onOtpSuccessfullVerification,u=X((0,a.useState)(""),2),s=u[0],d=u[1],f=X((0,a.useState)(v.Draft),2),m=f[0],p=f[1],A=X((0,a.useState)(!1),2),h=A[0],_=A[1],y=X((0,a.useState)(""),2),b=y[0],w=y[1],g=function(e,t,n){(0,N.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(r.aFV,{open:i,size:"md",onSecondarySubmit:l,onRequestClose:l,onRequestSubmit:function(){window.open("https://afyayangu.go.ke/","_blank")},primaryButtonText:"Register on Afya Yangu",secondaryButtonText:"Cancel"},o().createElement(r.cwr,null,o().createElement("div",{className:O.modalVerificationLayout},o().createElement("div",{className:O.sectionHeader},o().createElement("h4",{className:O.sectionTitle},"One Time Password (OTP)"),o().createElement("h6",null,"Enter one time password to proceed")),o().createElement("div",{className:O.sectionContent},o().createElement("div",{className:O.contentHeader},m===v.Draft?o().createElement(o().Fragment,null,o().createElement("h6",null,"Send Code to Phone ",R(n))):o().createElement(o().Fragment,null),m===v.Verified?o().createElement(o().Fragment,null,o().createElement("h6",null,"OTP Verification Successfull!")):o().createElement(o().Fragment,null)),o().createElement("div",{className:O.otpSection},m===v.Sent?o().createElement(o().Fragment,null,o().createElement("div",{className:O.otpForm},o().createElement(r.lRv,null,"Enter OTP"),o().createElement(L,{otpLength:5,onChange:function(e){return d(e)}})),o().createElement("div",{className:O.otpTimer},o().createElement(J,{durationInSeconds:60,resetTimer:function(){},onTimeUp:function(){v.Sent&&p(v.Draft)}}))):o().createElement(o().Fragment,null))),o().createElement("div",{className:O.sectionAction},m===v.Draft?o().createElement(o().Fragment,null,o().createElement(r.$nd,{kind:"primary",onClick:function(){return K((function(){var e,n,r;return Q(this,(function(a){switch(a.label){case 0:if(!t.identificationNumber)return g("error","Invalid Identification Value","Please enter a valid ID value"),[2];_(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(o=t,S((function(){var e,t,n;return k(this,(function(r){switch(r.label){case 0:return[4,(0,E.bo)()];case 1:return e=r.sent(),t="".concat(e,"/client/send-custom-otp"),n={identificationNumber:o.identificationNumber,identificationType:o.identificationType,locationUuid:o.locationUuid},[2,I(t,n)]}}))}))())];case 2:return e=a.sent(),w(e.sessionId),p(v.Sent),g("success","OTP sent successfully","A code was sent to ".concat(e.maskedPhone)),[3,5];case 3:return n=a.sent(),r=n.message||"Failed to send OTP",g("error","Error sending OTP",r),[3,5];case 4:return _(!1),[7];case 5:return[2]}var o}))}))()}},h?o().createElement(r.OuH,{description:"Sending OTP..."}):"Send OTP")):o().createElement(o().Fragment,null),m===v.Sent?o().createElement(o().Fragment,null,o().createElement(r.$nd,{kind:"primary",onClick:function(){return K((function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(!s.trim())return g("error","Please enter the OTP code",""),[2];_(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,(a={sessionId:b,otp:s,locationUuid:t.locationUuid},S((function(){var e,t,n;return k(this,(function(r){switch(r.label){case 0:return[4,(0,E.bo)()];case 1:return e=r.sent(),t="".concat(e,"/client/validate-custom-otp"),n={sessionId:a.sessionId,otp:a.otp,locationUuid:a.locationUuid},[2,I(t,n)]}}))}))())];case 2:return r.sent(),p(v.Verified),(0,N.showSnackbar)({kind:"success",title:"OTP Verified",subtitle:"You can now fetch data from Client Registry."}),[3,5];case 3:return e=r.sent(),n=e.message||"OTP verification failed",(0,N.showSnackbar)({kind:"error",title:"OTP Verification Failed",subtitle:n}),[3,5];case 4:return _(!1),[7];case 5:return[2]}var a}))}))()}},h?o().createElement(r.OuH,{description:"Verifying OTP..."}):"Verify")):o().createElement(o().Fragment,null),m===v.Verified?o().createElement(o().Fragment,null,o().createElement(r.$nd,{kind:"primary",onClick:c},"Continue")):o().createElement(o().Fragment,null))))))};var ee=n(86575),te={};te.styleTagTransform=_(),te.setAttributes=m(),te.insert=d().bind(null,"head"),te.domAPI=u(),te.insertStyleElement=A(),l()(ee.A,te);const ne=ee.A&&ee.A.locals?ee.A.locals:void 0;function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=["id","other_identifications","first_name","middle_name","last_name","gender","date_of_birth","is_alive","deceased_datetime","phone","email","civil_status","place_of_birth","citizenship","country","county","sub_county","ward","village_estate","longitude","latitude","identification_type"];const oe=function(e){var t=e.client,n=(0,a.useMemo)((function(){return e=t,n={},Object.keys(e).filter((function(e){return ae.includes(e)})).forEach((function(t){if("other_identifications"===t){var r=(o=e[t],i={},o.forEach((function(e){i[e.identification_type]=e.identification_number})),i);n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){re(e,t,n[t])}))}return e}({},n,r)}else if("identification_type"===t)n[e.identification_type]=e.identification_number;else{var a=e[t];n[t]=a}var o,i})),n;var e,n}),[t]);return t&&n?o().createElement(o().Fragment,null,o().createElement(r.XIK,null,o().createElement(r.ndF,null,o().createElement(r.Hjg,null,o().createElement(r.A0N,null,"Field"),o().createElement(r.A0N,null,"Value"))),o().createElement(r.BFY,null,Object.keys(n).map((function(e){return o().createElement(r.Hjg,null,o().createElement(r.nA6,null,e),o().createElement(r.nA6,null,n[e]))}))))):o().createElement(o().Fragment,null,o().createElement("h4",null,"No patient Data to Display"))},ie=function(){return o().createElement(o().Fragment,null,o().createElement(r.zWQ,{defaultSelected:"sha",legendText:"Patient",onChange:function(e){},name:"payment-options-radio-group"},o().createElement(r.aaP,{id:"sha",labelText:"Social Health Authority",value:"sha"}),o().createElement(r.aaP,{id:"insurance",labelText:"Other Insurance",value:"other"}),o().createElement(r.aaP,{id:"cash",labelText:"Cash",value:"cash"})))},le=function(e){var t=e.client,n=e.open,a=e.onModalClose,i=(e.onSubmit,e.onSendClientToTriage);return t?o().createElement(o().Fragment,null,o().createElement(r.aFV,{open:n,size:"md",onSecondarySubmit:a,onRequestClose:a,onRequestSubmit:function(){window.open("https://afyayangu.go.ke/","_blank")},primaryButtonText:"Register on Afya Yangu",secondaryButtonText:"Cancel"},o().createElement(r.cwr,null,o().createElement("div",{className:ne.clientDetailsLayout},o().createElement("div",{className:ne.sectionHeader},o().createElement("h4",{className:ne.sectionTitle},"Patient/Payment Details")),o().createElement("div",{className:ne.sectionContent},o().createElement(r.tUM,null,o().createElement(r.wbY,{contained:!0},o().createElement(r.ozo,null,"Patient Details"),o().createElement(r.ozo,null,"Payment Details")),o().createElement(r.T2N,null,o().createElement(r.KpK,null,o().createElement(oe,{client:t})),o().createElement(r.KpK,null,o().createElement(ie,null))))),o().createElement("div",{className:ne.actionSection},o().createElement("div",{className:ne.btnContainer},o().createElement(r.$nd,{kind:"primary"},"Book Appointment")),o().createElement("div",{className:ne.btnContainer},o().createElement(r.$nd,{kind:"secondary"},"Walk In Orders")),o().createElement("div",{className:ne.btnContainer},o().createElement(r.$nd,{kind:"tertiary",onClick:function(){return i(t.id)}},"Send To Triage"))))))):o().createElement(o().Fragment,null,"No Client data")};function ce(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function ue(e){return(t=function(){var t,n,r,a;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(o){switch(o.label){case 0:return t="".concat(N.restBaseUrl,"/patient"),n=new URLSearchParams({q:e,v:"full",includeDead:"true",limit:"10",totalCount:"true"}).toString(),[4,(0,N.openmrsFetch)("".concat(t,"?").concat(n))];case 1:return(r=o.sent()).ok?[3,3]:[4,r.text()];case 2:throw a=o.sent(),new Error("Request failed with ".concat(r.status,": ").concat(a));case 3:return[2,r.json()]}}))},function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){ce(o,r,a,i,l,"next",e)}function l(e){ce(o,r,a,i,l,"throw",e)}i(void 0)}))})();var t}var se=n(3754),de={};de.styleTagTransform=_(),de.setAttributes=m(),de.insert=d().bind(null,"head"),de.domAPI=u(),de.insertStyleElement=A(),l()(se.A,de);const fe=se.A&&se.A.locals?se.A.locals:void 0;function me(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function pe(e){return(t=function(){var t,n,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(a){switch(a.label){case 0:return t="".concat(N.restBaseUrl,"/location"),n="".concat(t,"/").concat(e),[4,(0,N.openmrsFetch)(n)];case 1:return[4,a.sent().json()];case 2:return[2,null!=(r=a.sent())?r:null]}}))},function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){me(o,r,a,i,l,"next",e)}function l(e){me(o,r,a,i,l,"throw",e)}i(void 0)}))})();var t}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function he(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function _e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){he(o,r,a,i,l,"next",e)}function l(e){he(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ye(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function we(e){return _e((function(){var t,n,r,a;return be(this,(function(o){switch(o.label){case 0:return t="".concat(N.restBaseUrl,"/queue"),n=new URLSearchParams({v:"custom:(uuid,display,name,description,service:(uuid,display),allowedPriorities:(uuid,display),allowedStatuses:(uuid,display),location:(uuid,display))",location:e}).toString(),[4,(0,N.openmrsFetch)("".concat(t,"?").concat(n))];case 1:return(r=o.sent()).ok?[3,3]:[4,r.text()];case 2:throw a=o.sent(),new Error("Request failed with ".concat(r.status,": ").concat(a));case 3:return[2,r.json()]}}))}))()}function ge(e){return _e((function(){var t,n,r,a,o,i,l,c,u,s;return be(this,(function(d){switch(d.label){case 0:return[4,pe(e)];case 1:return(t=d.sent())&&(n=t.parentLocation)?[4,pe(n.uuid)]:[2];case 2:if(r=d.sent(),o=null!==(a=r.childLocations)&&void 0!==a?a:[],l=null!==(i=o.map((function(e){return e.uuid})))&&void 0!==i?i:[],c=[],!(l.length>0))return[3,6];u=0,d.label=3;case 3:return u<l.length?[4,we(l[u])]:[3,6];case 4:s=d.sent(),c=ye(c).concat(ye(s.results)),d.label=5;case 5:return u++,[3,3];case 6:return[2,c]}}))}))()}var ve=n(75862),Ce=n(25838);function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Se(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){xe(o,r,a,i,l,"next",e)}function l(e){xe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}const Te=function(e){var t=e.patients,n=e.open,i=e.onModalClose,l=(e.onSubmit,e.client),c=e.onCreateAmrsPatient,u=e.onManualRegistration,s=ke((0,a.useState)(),2),d=s[0],f=s[1],m=ke((0,a.useState)(),2),p=m[0],A=m[1],h=ke((0,a.useState)(),2),_=h[0],y=h[1],b=ke((0,a.useState)(),2),w=b[0],g=b[1],v=ke((0,a.useState)(""),2),C=v[0],E=v[1],x=ke((0,a.useState)(!1),2),S=x[0],k=x[1],I=(0,N.useVisitTypes)(),T=(0,N.useSession)().sessionLocation.uuid,D=(0,a.useMemo)((function(){return I.map((function(e){return{id:e.uuid,text:e.display}}))}),[I]);if((0,a.useEffect)((function(){Se((function(){var e,t,n;return Ie(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,ge(T)];case 1:return(e=r.sent()).length>0&&y(e),[3,3];case 2:return t=r.sent(),(0,N.showSnackbar)({kind:"error",title:"An error occurred while fetching service queues",subtitle:null!==(n=t.message)&&void 0!==n?n:"An error occurred while fetching service queues, please try agin"}),[3,3];case 3:return[2]}}))}))()}),[t]),!t)return o().createElement(o().Fragment,null,"No Client data");var P=function(e){return e.location?e.patient?!!e.visitType||(R("error","Please select a visit",""),!1):(R("error","Please select a patient",""),!1):(R("error","Missing location in create visits",""),!1)},O=function(){var e;return{visitType:p,location:T,startDatetime:null,stopDatetime:null,patient:null!==(e=null==d?void 0:d.uuid)&&void 0!==e?e:""}},R=function(e,t,n){(0,N.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(r.aFV,{open:n,size:"md",onSecondarySubmit:function(){return i({success:!1})},onRequestClose:function(){return i({success:!1})},onRequestSubmit:function(){window.open("https://afyayangu.go.ke/","_blank")},primaryButtonText:"Register on Afya Yangu",secondaryButtonText:"Cancel"},o().createElement(r.cwr,null,o().createElement("div",{className:fe.clientDetailsLayout},o().createElement("div",{className:fe.sectionHeader},o().createElement("h4",{className:fe.sectionTitle},"Send To Triage")),t.length>0?o().createElement("div",{className:fe.sectionContent},o().createElement("div",{className:fe.patientSelect},o().createElement(r.XIK,null,o().createElement(r.ndF,null,o().createElement(r.Hjg,null,o().createElement(r.A0N,null,"No"),o().createElement(r.A0N,null,"Name"),o().createElement(r.A0N,null,"Gender"),o().createElement(r.A0N,null,"Select Patient"))),o().createElement(r.BFY,null,t.map((function(e,t){return o().createElement(r.Hjg,{key:e.uuid},o().createElement(r.nA6,null,t+1),o().createElement(r.nA6,null,e.person.preferredName.display),o().createElement(r.nA6,null,e.person.gender),o().createElement(r.nA6,null,o().createElement(r.Sc0,{id:e.uuid,labelText:"",onChange:function(){f(e)}})))}))))),o().createElement("div",{className:fe.formSection},o().createElement("div",{className:fe.formRow},o().createElement("div",{className:fe.formControl},o().createElement(r.a32,{onChange:function(e){var t=e.selectedItem.id;A(t)},id:"visit-type-combobox",items:D,itemToString:function(e){return e?e.text:""},titleText:"Select a Visit Type"})),o().createElement("div",{className:fe.formControl},o().createElement(r.l6P,{id:"service",labelText:"Select a Service",onChange:function(e){var t=e.target.value;g(t)}},o().createElement(r.ebT,{value:"",text:"Select"}),";",_&&_.map((function(e){var t;return o().createElement(r.ebT,{value:e.uuid,text:"".concat(e.display," (").concat(null!==(t=e.location.display)&&void 0!==t?t:"",")")})}))))),o().createElement("div",{className:fe.formRow},o().createElement("div",{className:fe.formControl},o().createElement(r.l6P,{id:"priority",labelText:"Select Priority",onChange:function(e){return t=e.target.value,void E(t);var t}},o().createElement(r.ebT,{value:"",text:"Select"}),";",o().createElement(r.ebT,{value:ve.i3.NORMAL_PRIORITY_UUID,text:"NORMAL"}),";",o().createElement(r.ebT,{value:ve.i3.EMERGENCY_PRIORITY_UUID,text:"EMERGENCY"}),";"))))):o().createElement(o().Fragment,null),o().createElement("div",{className:fe.actionSection},t.length>0?o().createElement("div",{className:fe.btnContainer},o().createElement(r.$nd,{className:fe.greenBtn,onClick:function(){return Se((function(){var e,t;return Ie(this,(function(n){switch(n.label){case 0:k(!0),n.label=1;case 1:return n.trys.push([1,5,6,7]),[4,Se((function(){var e,t;return Ie(this,(function(n){switch(n.label){case 0:return e=O(),P(e)?[4,(0,Ce._)(e)]:[2,!1];case 1:if(t=n.sent())return R("success","Visit has been created succesfully",""),[2,t];throw R("error","Error creating patient visit",""),new Error("Error creating patient visit")}}))}))()];case 2:return(e=n.sent())?(r=e.uuid,t={visit:{uuid:r},queueEntry:{status:{uuid:ve.cn.WAITING_UUID},priority:{uuid:null!=C?C:ve.i3.NORMAL_PRIORITY_UUID},queue:{uuid:w},patient:{uuid:d.uuid},startedAt:(new Date).toISOString(),sortWeight:0}},[4,(a=t,_e((function(){var e,t,n;return be(this,(function(r){switch(r.label){case 0:return e="".concat(N.restBaseUrl,"/visit-queue-entry"),[4,(0,N.openmrsFetch)(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a)})];case 1:return(t=r.sent()).ok?[3,3]:[4,t.text()];case 2:throw n=r.sent(),new Error("Request failed with ".concat(t.status,": ").concat(n));case 3:return[2,t.json()]}}))}))())]):[3,4];case 3:n.sent()&&(R("success","Patient has succesfully been moved to the Triage queue",""),i({success:!0})),n.label=4;case 4:return[3,7];case 5:return n.sent(),R("error","Error creating visit",""),[3,7];case 6:return k(!1),[7];case 7:return[2]}var r,a}))}))()}},S?o().createElement(r.OuH,{description:"Sending To Triage..."}):"Send To Triage")):o().createElement(o().Fragment,null,o().createElement("div",{className:fe.patientAction},o().createElement("div",{className:fe.btnContainer},o().createElement(r.$nd,{kind:"primary",onClick:function(){return c(l)}},"Automatically Register in AMRS")),o().createElement("div",{className:fe.btnContainer},o().createElement(r.$nd,{kind:"secondary",onClick:u},"Manually Register")))))))))};var Ne=n(27114);function De(e,t){return"".concat(e.first_name," ").concat(j(e.middle_name)," (").concat(e.gender,") (DOB: ").concat(e.date_of_birth,") (").concat(t,") (CR: ").concat(e.id,")")}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oe(e){return function(e){if(Array.isArray(e))return Pe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Re=Oe([C.Cr,C.SHANumber,C.HouseholdNumber,C.RefugeeID,C.MandateNumber,C.AlienID,C.NationalID,C.TemporaryDependantID]).concat(Oe(["first_name","middle_name","last_name"]),Oe(["gender","date_of_birth","is_alive","deceased_datetime"]),Oe(["phone","email","civil_status","place_of_birth","citizenship"]),Oe(["country","county","sub_county","ward","village_estate","longitude","latitude"]));function je(e){var t="";switch(e){case"Divorced":t="a899ad58-1350-11df-a1f1-0026b9348838";break;case"Married":t="a8aa76b0-1350-11df-a1f1-0026b9348838";break;case"Single":t="a899ac7c-1350-11df-a1f1-0026b9348838";break;default:t="a89ad3a4-1350-11df-a1f1-0026b9348838"}return t}function Fe(e){var t;switch(e){case C.NationalID:t="58a47054-1359-11df-a1f1-0026b9348838";break;case C.HouseholdNumber:t="bb74b20e-dcee-4f59-bdf1-2dffc3abf106";break;case C.AlienID:t="12f5b147-3403-4a73-913d-7ded9ffec094";break;case C.SHANumber:t="cf5362b2-8049-4442-b3c6-36f870e320cb";break;case C.MandateNumber:t="aae2d097-20ba-43ca-9b71-fd8296068f39";break;case C.RefugeeID:t="465e81af-8d69-47e9-9127-53a94adc75fb";break;case C.Cr:t="e88dc246-3614-4ee3-8141-1f2a83054e72";break;case C.BirthCertificate:t="7924e13b-131a-4da8-8efa-e294184a1b0d";break;case C.TemporaryDependantID:t="a3d34214-93e8-4faf-bf4d-0272eee079eb"}return t}function Ue(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Be(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Ue(o,r,a,i,l,"next",e)}function l(e){Ue(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Ye(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}var He=function(e,t){return Be((function(){var n,r;return Ye(this,(function(a){switch(a.label){case 0:return[4,Be((function(){var e,t,n,r;return Ye(this,(function(a){switch(a.label){case 0:return[4,(0,E.E$)()];case 1:return e=a.sent(),t=new AbortController,[4,(0,N.openmrsFetch)("".concat(e,"/amrs-id-generator/generateidentifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{user:1},signal:t.signal})];case 2:return[4,a.sent().json()];case 3:return n=a.sent(),[2,null!==(r=n.identifier)&&void 0!==r?r:""]}}))}))()];case 1:return n=a.sent(),r=function(e,t){var n=[];return n.push({identifierType:Fe(C.Cr),identifier:e.id,location:t}),n.push({identifierType:Fe(e.identification_type),identifier:e.identification_number,location:t}),n}(t,e),r.push({identifierType:"58a4732e-1359-11df-a1f1-0026b9348838",identifier:n,location:e,preferred:!0}),[2,r]}}))}))()};function Me(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Le(e,t){return(n=function(){var n,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(a){switch(a.label){case 0:return n=function(e){var t={},n={},r={},a=[];Re.forEach((function(o){"first_name"===o&&(n.givenName=e.first_name),"middle_name"===o&&(n.middleName=e.middle_name),"last_name"===o&&(n.familyName=e.last_name),"gender"===o&&(t.gender="Male"===e.gender?"M":"F"),"date_of_birth"===o&&(t.birthdate=e.date_of_birth,t.birthdateEstimated=!1),"is_alive"===o&&(t.dead=0===e.is_alive),"deceased_datetime"===o&&e.deceased_datetime.length>0&&(t.deathDate=e.deceased_datetime),"country"===o&&e.country.length>0&&(r.country=e.country,r.address1=e.country),"place_of_birth"===o&&e.place_of_birth.length>0&&(r.address10=e.place_of_birth),"county"===o&&e.county.length>0&&(r.countyDistrict=e.county),"sub_county"===o&&e.sub_county.length>0&&(r.address2=e.sub_county,r.stateProvince=e.sub_county),"ward"===o&&e.sub_county.length>0&&(r.address7=e.sub_county,r.address4=e.sub_county),"village_estate"===o&&e.village_estate.length>0&&(r.cityVillage=e.village_estate),"longitude"===o&&e.longitude.length>0&&(r.longitude=e.longitude),"latitude"===o&&e.latitude.length>0&&(r.latitude=e.latitude),"place_of_birth"===o&&e.place_of_birth.length>0&&a.push({value:e.place_of_birth,attributeType:"8d8718c2-c2cc-11de-8d13-0010c6dffd0f"}),"phone"===o&&e.phone.length>0&&a.push({value:e.phone,attributeType:"72a759a8-1359-11df-a1f1-0026b9348838"}),"email"===o&&e.email.length>0&&a.push({value:e.email,attributeType:"2f65dbcb-3e58-45a3-8be7-fd1dc9aa0faa"}),"civil_status"===o&&e.civil_status.length>0&&a.push({value:je(e.civil_status),attributeType:"8d871f2a-c2cc-11de-8d13-0010c6dffd0f"}),"id"===o&&e.id&&a.push({value:e.id,attributeType:"e068e02b-faac-4baf-bd58-fe6e0c29a81f"}),"citizenship"===o&&e.citizenship&&a.push({value:e.citizenship,attributeType:"8d871afc-c2cc-11de-8d13-0010c6dffd0f"})}));var o=function(e){var t=[],n=e.find((function(e){return"Alternative Phone Number"===e.relationship})),r=e.find((function(e){return"Next Of Kin"===e.remarks}));return n&&"Phone"===n.contact_type&&t.push({value:n.contact_id,attributeType:"c725f524-c14a-4468-ac19-4a0e6661c930"}),r&&("Phone"===r.contact_type&&t.push({value:r.contact_id,attributeType:"a657a4f1-9c0f-444b-a1fd-445bb91dd12d"}),t.push({value:r.relationship,attributeType:"5730994e-c267-426b-87b6-c152b606973d"}),t.push({value:r.contact_name,attributeType:"72a75bec-1359-11df-a1f1-0026b9348838"})),t}(e.alternative_contacts);return a=Oe(a).concat(Oe(o)),Object.keys(n).length>0&&(t.names=[n]),Object.keys(r).length>0&&(t.addresses=[r]),a.length>0&&(t.attributes=a),t}(e),[4,He(t,e)];case 1:return r=a.sent(),[4,(o={person:n,identifiers:r},Be((function(){return Ye(this,(function(e){switch(e.label){case 0:return[4,(0,N.openmrsFetch)("".concat(N.restBaseUrl,"/patient"),{method:"POST",headers:{"Content-Type":"application/json"},body:o})];case 1:return[2,e.sent()]}}))}))())];case 2:return[4,a.sent().json()];case 3:return[2,a.sent()]}var o}))},function(){var e=this,t=arguments;return new Promise((function(r,a){var o=n.apply(e,t);function i(e){Me(o,r,a,i,l,"next",e)}function l(e){Me(o,r,a,i,l,"throw",e)}i(void 0)}))})();var n}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ve(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Ge(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Ve(o,r,a,i,l,"next",e)}function l(e){Ve(o,r,a,i,l,"throw",e)}i(void 0)}))}}function We(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}const $e=function(){var e=We((0,a.useState)("National ID"),2),t=e[0],n=e[1],i=We((0,a.useState)(""),2),l=i[0],c=i[1],u=We((0,a.useState)(!1),2),s=u[0],d=u[1],f=We((0,a.useState)(),2),m=f[0],p=f[1],A=We((0,a.useState)(),2),h=A[0],_=A[1],y=We((0,a.useState)([]),2),b=y[0],v=y[1],C=We((0,a.useState)("principal"),2),E=C[0],x=C[1],S=We((0,a.useState)(!1),2),k=S[0],I=S[1],D=We((0,a.useState)(!1),2),P=D[0],O=D[1],F=We((0,a.useState)(!1),2),U=F[0],B=F[1],Y=We((0,a.useState)(),2),H=Y[0],M=Y[1],L=(0,N.useSession)().sessionLocation.uuid,q=(0,Ne.useNavigate)(),V=function(e,t,n){(0,N.showSnackbar)({kind:e,title:t,subtitle:n})},G=function(){O(!1)},W=function(){window.location.href="".concat(window.spaBase,"/patient-registration")},J=function(){return"principal"===E?m:"dependants"===E?h:m},$=function(){p(null),_(null),v([]),x(null),c(""),n("National ID"),O(!1),I(!1),B(!1),x("principal")};return o().createElement(o().Fragment,null,o().createElement("div",{className:w.registryLayout},o().createElement("div",{className:w.mainContent},o().createElement("div",{className:w.registryHeader},o().createElement("h4",null,"Client Registry"),o().createElement("p",null,"Please enter identification number to begin")),o().createElement("div",{className:w.registryContent},o().createElement("div",{className:w.formRow},o().createElement("div",{className:w.formControl},o().createElement(r.msM,{id:"identifier-type-dropdown",label:"Identifier Type",titleText:"Select Identifier Type",items:g,selectedItem:t,onChange:function(e){var t=e.selectedItem;return n(t)}})),o().createElement("div",{className:w.formControl},o().createElement(r.ksK,{id:"identifier-value",labelText:"".concat(t," Value"),value:l,onChange:function(e){return c(e.target.value)},placeholder:"Enter ".concat(t.toLowerCase()," value")}))),o().createElement("div",{className:w.formRow},o().createElement("div",{className:w.formControl},o().createElement("div",{className:w.formBtn},o().createElement(r.$nd,{className:w.registrySearchBtn,kind:"primary",onClick:function(){return Ge((function(){var e,n,r,a,o,i;return Je(this,(function(c){switch(c.label){case 0:d(!0),c.label=1;case 1:return c.trys.push([1,3,4,5]),function(e){return e.identificationNumber?e.identificationType?!!e.locationUuid||(V("error","No default location selected",""),!1):(V("error","Please enter a valid identification type",""),!1):(V("error","Please enter a valid identification number",""),!1)}(e={identificationNumber:l,identificationType:t,locationUuid:L})?(M(e),[4,T(e)]):[2,!1];case 2:if(n=c.sent(),0===(r=Array.isArray(n)?n:[]).length)throw $(),new Error("No matching patient found in Client Registry.");return a=r[0],p(a),V("success","Client Data Loaded","Patient fetched successfully"),[3,5];case 3:return o=c.sent(),i=o.message||"Failed to fetch client data",$(),V("error","Fetch Failed",i),[3,5];case 4:return d(!1),[7];case 5:return[2]}}))}))()},disabled:s},s?o().createElement(r.OuH,{description:"Searching..."}):"Search"),o().createElement(r.$nd,{className:w.registrySearchBtn,kind:"secondary",onClick:W},"Emergency Registration"),o().createElement(r.$nd,{className:w.registrySearchBtn,kind:"tertiary",onClick:function(){window.open("https://afyayangu.go.ke/","_blank")}},"Register on Afya Yangu")))),m?o().createElement("div",{className:w.formRow},o().createElement("div",{className:w.hieData},o().createElement("div",{className:w.selectionHeader},o().createElement("h5",null,"Please select one patient and request patient to share the OTP sent")),o().createElement("div",{className:w.patientSelect},o().createElement("div",{className:w.patientSelectRadio},o().createElement(r.zWQ,{defaultSelected:"principal",legendText:"Patient",onChange:function(e){x(e)},name:"radio-button-default-group"},o().createElement(r.aaP,{id:"principal",labelText:"Principal",value:"principal"}),o().createElement(r.aaP,{id:"dependants",labelText:"Dependants",value:"dependants"}))),o().createElement("div",{className:w.patientConfirmSelection},o().createElement("div",{className:w.btnContainer},o().createElement(r.$nd,{kind:"primary",onClick:function(){I(!0)}}," ","Confirm")),o().createElement("div",{className:w.btnContainer},o().createElement(r.$nd,{kind:"secondary",onClick:$},"Cancel")))),o().createElement("div",{className:w.principalDependantSection},"principal"===E?o().createElement(o().Fragment,null,o().createElement(r.XIK,null,o().createElement(r.ndF,null,o().createElement(r.Hjg,null,o().createElement(r.A0N,null,"Name"),o().createElement(r.A0N,null,"CR"),o().createElement(r.A0N,null,"Phone No"),o().createElement(r.A0N,null,"ID No"))),o().createElement(r.BFY,null,o().createElement(r.Hjg,null,o().createElement(r.nA6,null,m.first_name," ",j(m.middle_name)," ",j(m.last_name)),o().createElement(r.nA6,null,R(m.id)),o().createElement(r.nA6,null,R(m.phone)),o().createElement(r.nA6,null,R(m.identification_number)))))):o().createElement(o().Fragment,null),"dependants"===E?o().createElement(o().Fragment,null,o().createElement(r.zWQ,{defaultSelected:"",helperText:"",invalidText:"",legendText:"",name:"dependant-group",onChange:function(e){return function(e){var t=m.dependants;if(t.length>0){var n=t.find((function(t){return t.result[0].id===e}));n&&_(n.result[0])}}(e)}},m.dependants.map((function(e){var t=e.result[0],n=e.relationship;return o().createElement(r.aaP,{id:t.id,labelText:De(t,n),value:t.id})})))):o().createElement(o().Fragment,null),k?o().createElement(Z,{requestCustomOtpDto:H,phoneNumber:m.phone,open:k,onModalClose:function(){I(!1)},onOtpSuccessfullVerification:function(){I(!1),O(!0)}}):o().createElement(o().Fragment,null),m&&P?o().createElement(o().Fragment,null,o().createElement(le,{client:J(),open:P,onModalClose:G,onSubmit:function(){},onSendClientToTriage:function(e){return Ge((function(){var t;return Je(this,(function(n){switch(n.label){case 0:return G(),[4,ue(e)];case 1:return(t=n.sent()).totalCount>0?(V("success","".concat(t.totalCount," ").concat(t.totalCount>0?"Patients":"Patient"," found in the system with ").concat(e),""),v(t.results),B(!0)):(V("error","Patient not found in the system",""),v([]),B(!0)),[2]}}))}))()}})," "):o().createElement(o().Fragment,null),m&&U?o().createElement(o().Fragment,null,o().createElement(Te,{client:J(),patients:b,open:U,onModalClose:function(e){B(!1),e&&e.success&&q("/triage")},onSubmit:function(){},onCreateAmrsPatient:function(){return Ge((function(){var e,t,n,r,a,o,i,l,c,u,s,d;return Je(this,(function(f){switch(f.label){case 0:if(!(e=J()))return V("error","Principal or dependant not selected",""),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Le(e,L)];case 2:return(t=f.sent())&&(V("success","Patient created succesfully",""),v([t])),[3,4];case 3:if(n=f.sent(),a=null!==(r=n.responseBody)&&void 0!==r?r:n.message,V("error","Error Creating Patient",""),o=function(e){var t=[];if(e&&e.error)if(e.error.error){var n=e.error.error.globalErrors||null;if(n){var r=!0,a=!1,o=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var c=i.value;t.push(c.message)}}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}}}else if(e.error)if(e.error.globalErrors){var u=e.error.globalErrors||null;if(u){var s=!0,d=!1,f=void 0;try{for(var m,p=u[Symbol.iterator]();!(s=(m=p.next()).done);s=!0){var A=m.value;t.push(A.message)}}catch(e){d=!0,f=e}finally{try{s||null==p.return||p.return()}finally{if(d)throw f}}}}else e.error.message&&t.push(e.error.message);else t.push(e.error.error.message||"An error occurred while creating the patient. Please try again or contact support");return t}(a),o&&o.length>0){i=!0,l=!1,c=void 0;try{for(u=o[Symbol.iterator]();!(i=(s=u.next()).done);i=!0)d=s.value,V("error",d,"")}catch(e){l=!0,c=e}finally{try{i||null==u.return||u.return()}finally{if(l)throw c}}}return[3,4];case 4:return[2]}}))}))()},onManualRegistration:function(){B(!1),W()}})):o().createElement(o().Fragment,null)))):o().createElement(o().Fragment,null)))))}},75485:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__timer-component__timerData___FgxzS{height:3rem;font-size:30px;color:#0055a5}","",{version:3,sources:["webpack://./src/shared/ui/timer/timer.component.scss"],names:[],mappings:"AAAA,uDACG,WAAA,CACA,cAAA,CACA,aAAA",sourcesContent:[".timerData{\n height: 3rem;\n font-size: 30px;\n color: #0055a5;\n}"],sourceRoot:""}]),i.locals={timerData:"-esm-dha-workflow__timer-component__timerData___FgxzS"};const l=i},75862:(e,t,n)=>{n.d(t,{XA:()=>o,cn:()=>a,i3:()=>r});var r={NORMAL_PRIORITY_UUID:"bbd99c12-67e9-4381-8b4c-1f231e86f8e2",EMERGENCY_PRIORITY_UUID:"8e86ff12-ec83-41e8-a534-bb410739d880"},a={WAITING_UUID:"89d01aa5-0ab0-4626-934b-37766b4cd779",IN_SERVICE_UUID:"f9cf5768-508f-45de-8d40-eaf6ea3f3b02",COMPLETED_UUID:"a89c1ef8-1350-11df-a1f1-0026b9348838"},o={TRIAGE_SERVICE_UUID:"2d4472e2-d7ab-4430-8e0e-a9ffcd809bf4",CLINICAL_CONSULTATION_SERVICE_UUID:"7f7ec7ad-cdd7-4ed9-bc2e-5c5bd9f065b2",MCH_TRIAGE_SERVICE_UUID:"7e4452bf-f9b7-4977-a21f-1c8b94831bac",MCH_CLINICAL_CONSULTATION_SERVICE_UUID:"0026e273-5f8c-46b5-8bb4-0d8301d50321"}},84497:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__otp-verification-modal__modalVerificationLayout___MST8n{display:flex;flex-direction:column;row-gap:10px;width:100%}.-esm-dha-workflow__otp-verification-modal__sectionHeader___g62oo{display:flex;flex-direction:column;column-gap:5px;margin-top:5px;margin-bottom:5px}.-esm-dha-workflow__otp-verification-modal__otpSection___R\\+cLH{display:flex;flex-direction:row;width:100%;column-gap:15px}.-esm-dha-workflow__otp-verification-modal__otpForm___6EDu\\+{display:flex;flex-direction:column;width:50%;row-gap:15px}.-esm-dha-workflow__otp-verification-modal__otpTimer___ckBNm{display:flex;flex-direction:column;width:50%;padding-top:6%}","",{version:3,sources:["webpack://./src/registry/modal/otp-verification-modal/otp-verification-modal.scss"],names:[],mappings:"AAAA,4EACE,YAAA,CACA,qBAAA,CACA,YAAA,CACA,UAAA,CAEF,kEACE,YAAA,CACA,qBAAA,CACA,cAAA,CACA,cAAA,CACA,iBAAA,CAEF,gEACE,YAAA,CACA,kBAAA,CACA,UAAA,CACA,eAAA,CAEF,6DACE,YAAA,CACA,qBAAA,CACA,SAAA,CACA,YAAA,CAEF,6DACE,YAAA,CACA,qBAAA,CACA,SAAA,CACA,cAAA",sourcesContent:[".modalVerificationLayout {\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n width: 100%;\n}\n.sectionHeader{\n display: flex;\n flex-direction: column;\n column-gap: 5px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n.otpSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 15px;\n}\n.otpForm{\n display: flex;\n flex-direction: column;\n width: 50%;\n row-gap: 15px;\n}\n.otpTimer{\n display: flex;\n flex-direction: column;\n width: 50%;\n padding-top: 6%;\n}"],sourceRoot:""}]),i.locals={modalVerificationLayout:"-esm-dha-workflow__otp-verification-modal__modalVerificationLayout___MST8n",sectionHeader:"-esm-dha-workflow__otp-verification-modal__sectionHeader___g62oo",otpSection:"-esm-dha-workflow__otp-verification-modal__otpSection___R+cLH",otpForm:"-esm-dha-workflow__otp-verification-modal__otpForm___6EDu+",otpTimer:"-esm-dha-workflow__otp-verification-modal__otpTimer___ckBNm"};const l=i},86575:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__client-details-modal__clientDetailsLayout___r5WF\\+{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__client-details-modal__sectionHeader___lH-gL{display:flex;flex-direction:column;row-gap:5px;margin-top:5px;margin-bottom:10px}.-esm-dha-workflow__client-details-modal__sectionContent___QDFT7{display:flex;flex-direction:column;row-gap:5px}.-esm-dha-workflow__client-details-modal__actionSection___okVDp{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__client-details-modal__btnContainer___ETNEk{margin-top:2px;margin-bottom:2px}","",{version:3,sources:["webpack://./src/registry/modal/client-details-modal/client-details-modal.scss"],names:[],mappings:"AAAA,uEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,WAAA,CACA,cAAA,CACA,kBAAA,CAEJ,iEACI,YAAA,CACA,qBAAA,CACA,WAAA,CAEJ,gEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEJ,+DACI,cAAA,CACA,iBAAA",sourcesContent:[".clientDetailsLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.sectionHeader{\n display: flex;\n flex-direction: column;\n row-gap: 5px;\n margin-top: 5px;\n margin-bottom: 10px;\n}\n.sectionContent{\n display: flex;\n flex-direction: column;\n row-gap: 5px;\n}\n.actionSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.btnContainer{\n margin-top: 2px;\n margin-bottom: 2px;\n}"],sourceRoot:""}]),i.locals={clientDetailsLayout:"-esm-dha-workflow__client-details-modal__clientDetailsLayout___r5WF+",sectionHeader:"-esm-dha-workflow__client-details-modal__sectionHeader___lH-gL",sectionContent:"-esm-dha-workflow__client-details-modal__sectionContent___QDFT7",actionSection:"-esm-dha-workflow__client-details-modal__actionSection___okVDp",btnContainer:"-esm-dha-workflow__client-details-modal__btnContainer___ETNEk"};const l=i}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[327],{3754:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__send-to-triage-modal__formSection___8euyX{display:flex;flex-direction:column;width:100%;row-gap:5px;margin-top:15px}.-esm-dha-workflow__send-to-triage-modal__formRow___Hf27O{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__send-to-triage-modal__formControl___Gmnpd{display:flex;flex-direction:column;width:45%;row-gap:5px}.-esm-dha-workflow__send-to-triage-modal__actionSection___Dlgbe{display:flex;flex-direction:row;column-gap:5px;margin-top:15px}.-esm-dha-workflow__send-to-triage-modal__patientAction___ECxUB{display:flex;flex-direction:row;column-gap:5px;margin-top:15px}.-esm-dha-workflow__send-to-triage-modal__greenBtn___wFmfq{background-color:#28a745}","",{version:3,sources:["webpack://./src/registry/modal/send-to-triage/send-to-triage.modal.scss"],names:[],mappings:"AAAA,8DACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CAEJ,0DACG,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEH,8DACG,YAAA,CACA,qBAAA,CACA,SAAA,CACA,WAAA,CAEH,gEACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,eAAA,CAEJ,gEACI,YAAA,CACA,kBAAA,CACA,cAAA,CACA,eAAA,CAEJ,2DACI,wBAAA",sourcesContent:[".formSection{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n margin-top: 15px;\n}\n.formRow{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.formControl{\n display: flex;\n flex-direction: column;\n width: 45%;\n row-gap: 5px;\n}\n.actionSection{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n margin-top: 15px;\n}\n.patientAction{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n margin-top: 15px;\n}\n.greenBtn{\n background-color: #28a745;\n}"],sourceRoot:""}]),i.locals={formSection:"-esm-dha-workflow__send-to-triage-modal__formSection___8euyX",formRow:"-esm-dha-workflow__send-to-triage-modal__formRow___Hf27O",formControl:"-esm-dha-workflow__send-to-triage-modal__formControl___Gmnpd",actionSection:"-esm-dha-workflow__send-to-triage-modal__actionSection___Dlgbe",patientAction:"-esm-dha-workflow__send-to-triage-modal__patientAction___ECxUB",greenBtn:"-esm-dha-workflow__send-to-triage-modal__greenBtn___wFmfq"};const l=i},4405:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__otp-input-component__otpDataInput___hnFAW{width:3rem;height:3rem;text-align:center}.-esm-dha-workflow__otp-input-component__otpInputContainer___HV3nG{display:flex;flex-direction:row;column-gap:5px}.-esm-dha-workflow__otp-input-component__otpDataInputContainer___73DPe{width:4rem;height:4rem}","",{version:3,sources:["webpack://./src/shared/ui/otp-input/otp-input.component.scss"],names:[],mappings:"AAAA,8DACE,UAAA,CACA,WAAA,CACA,iBAAA,CAEF,mEACG,YAAA,CACA,kBAAA,CACA,cAAA,CAEH,uEACI,UAAA,CACA,WAAA",sourcesContent:[".otpDataInput{\n width: 3rem;\n height: 3rem;\n text-align: center;\n}\n.otpInputContainer{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n}\n.otpDataInputContainer{\n width: 4rem;\n height: 4rem;\n}"],sourceRoot:""}]),i.locals={otpDataInput:"-esm-dha-workflow__otp-input-component__otpDataInput___hnFAW",otpInputContainer:"-esm-dha-workflow__otp-input-component__otpInputContainer___HV3nG",otpDataInputContainer:"-esm-dha-workflow__otp-input-component__otpDataInputContainer___73DPe"};const l=i},6842:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__registry-component__registryLayout___PF4WP{display:flex;flex-direction:row;width:100%;row-gap:10px;padding:2% 2%}.-esm-dha-workflow__registry-component__mainContent___qOmrp{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__registry-component__registryHeader___YIQ62{display:flex;flex-direction:column;row-gap:10px;width:100%}.-esm-dha-workflow__registry-component__registryContent___W1b-9{display:flex;flex-direction:column;width:100%}.-esm-dha-workflow__registry-component__formRow___qlwjG{display:flex;flex-direction:row;width:100%;column-gap:5px;margin-top:10px}.-esm-dha-workflow__registry-component__formControl___R5c2A{width:30%}.-esm-dha-workflow__registry-component__hieData___jx5gt{margin-top:15px;display:flex;flex-direction:column;width:80%;row-gap:10px}.-esm-dha-workflow__registry-component__btnContainer___aXZfC{padding:5px 5px}.-esm-dha-workflow__registry-component__selectionHeader___-zRam{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__registry-component__patientSelect___wgPYw{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__registry-component__patientSelectRadio___3aGYW{width:70%}.-esm-dha-workflow__registry-component__patientConfirmSelection___Py9-y{display:flex;flex-direction:row;width:30%;column-gap:5px}.-esm-dha-workflow__registry-component__formBtn___ok0W6{display:flex;flex-direction:row;column-gap:5px}.-esm-dha-workflow__registry-component__registrySearchBtn___jHA2M{height:30px}.-esm-dha-workflow__registry-component__principalDependantSection___y\\+Uv2{display:flex;flex-direction:row;width:100%;margin-top:15px}.-esm-dha-workflow__registry-component__dependantCard___BUkYp{display:flex;flex-direction:row;width:30%}","",{version:3,sources:["webpack://./src/registry/registry.component.scss"],names:[],mappings:"AAAA,+DACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,YAAA,CACA,aAAA,CAEJ,4DACE,YAAA,CACA,qBAAA,CACA,UAAA,CAEF,+DACI,YAAA,CACA,qBAAA,CACA,YAAA,CACA,UAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CAEJ,wDACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CAEJ,4DACI,SAAA,CAEJ,wDACI,eAAA,CACA,YAAA,CACA,qBAAA,CACA,SAAA,CACA,YAAA,CAEJ,6DACI,eAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,8DACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEJ,mEACI,SAAA,CAEJ,wEACI,YAAA,CACA,kBAAA,CACA,SAAA,CACA,cAAA,CAEJ,wDACI,YAAA,CACA,kBAAA,CACA,cAAA,CAEJ,kEACI,WAAA,CAEJ,2EACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,eAAA,CAEJ,8DACI,YAAA,CACA,kBAAA,CACA,SAAA",sourcesContent:[".registryLayout{\n display: flex;\n flex-direction: row;\n width: 100%;\n row-gap: 10px;\n padding: 2% 2%;\n}\n.mainContent{\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.registryHeader{\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n width: 100%;\n}\n.registryContent{\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.formRow{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n margin-top: 10px;\n}\n.formControl{\n width: 30%;\n}\n.hieData{\n margin-top: 15px;\n display: flex;\n flex-direction: column;\n width: 80%;\n row-gap: 10px;\n}\n.btnContainer{\n padding: 5px 5px;\n}\n.selectionHeader{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.patientSelect{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.patientSelectRadio{\n width: 70%;\n}\n.patientConfirmSelection{\n display: flex;\n flex-direction: row;\n width: 30%;\n column-gap: 5px;\n}\n.formBtn{\n display: flex;\n flex-direction: row;\n column-gap: 5px;\n}\n.registrySearchBtn{\n height: 30px;\n}\n.principalDependantSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n margin-top: 15px;\n}\n.dependantCard{\n display: flex;\n flex-direction: row;\n width: 30%;\n}"],sourceRoot:""}]),i.locals={registryLayout:"-esm-dha-workflow__registry-component__registryLayout___PF4WP",mainContent:"-esm-dha-workflow__registry-component__mainContent___qOmrp",registryHeader:"-esm-dha-workflow__registry-component__registryHeader___YIQ62",registryContent:"-esm-dha-workflow__registry-component__registryContent___W1b-9",formRow:"-esm-dha-workflow__registry-component__formRow___qlwjG",formControl:"-esm-dha-workflow__registry-component__formControl___R5c2A",hieData:"-esm-dha-workflow__registry-component__hieData___jx5gt",btnContainer:"-esm-dha-workflow__registry-component__btnContainer___aXZfC",selectionHeader:"-esm-dha-workflow__registry-component__selectionHeader___-zRam",patientSelect:"-esm-dha-workflow__registry-component__patientSelect___wgPYw",patientSelectRadio:"-esm-dha-workflow__registry-component__patientSelectRadio___3aGYW",patientConfirmSelection:"-esm-dha-workflow__registry-component__patientConfirmSelection___Py9-y",formBtn:"-esm-dha-workflow__registry-component__formBtn___ok0W6",registrySearchBtn:"-esm-dha-workflow__registry-component__registrySearchBtn___jHA2M",principalDependantSection:"-esm-dha-workflow__registry-component__principalDependantSection___y+Uv2",dependantCard:"-esm-dha-workflow__registry-component__dependantCard___BUkYp"};const l=i},25838:(e,t,n)=>{n.d(t,{_:()=>l,j:()=>c});var r=n(25987);function a(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,c,"next",e)}function c(e){a(i,r,o,l,c,"throw",e)}l(void 0)}))}}function i(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function l(e){return o((function(){var t,n,a;return i(this,(function(o){switch(o.label){case 0:return t="".concat(r.restBaseUrl,"/visit"),[4,(0,r.openmrsFetch)(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})];case 1:return(n=o.sent()).ok?[3,3]:[4,n.text()];case 2:throw a=o.sent(),new Error("Request failed with ".concat(n.status,": ").concat(a));case 3:return[2,n.json()]}}))}))()}function c(e,t){return o((function(){var n,a,o;return i(this,(function(i){switch(i.label){case 0:return n="".concat(r.restBaseUrl,"/visit/").concat(e),[4,(0,r.openmrsFetch)(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})];case 1:return(a=i.sent()).ok?[3,3]:[4,a.text()];case 2:throw o=i.sent(),new Error("Request failed with ".concat(a.status,": ").concat(o));case 3:return[2,a.json()]}}))}))()}},62801:(e,t,n)=>{n.d(t,{E$:()=>c,SW:()=>u,bo:()=>s});var r=n(25987),a=n(56619);function o(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function l(e){o(i,r,a,l,c,"next",e)}function c(e){o(i,r,a,l,c,"throw",e)}l(void 0)}))}}function l(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function c(){return i((function(){var e;return l(this,(function(t){switch(t.label){case 0:return[4,(0,r.getConfig)(a.moduleName)];case 1:return[2,null!=(e=t.sent().subDomainUrl)?e:null]}}))}))()}function u(){return i((function(){var e;return l(this,(function(t){switch(t.label){case 0:return[4,(0,r.getConfig)(a.moduleName)];case 1:return[2,null!=(e=t.sent().etlBaseUrl)?e:null]}}))}))()}function s(){return i((function(){var e;return l(this,(function(t){switch(t.label){case 0:return[4,(0,r.getConfig)(a.moduleName)];case 1:return[2,null!=(e=t.sent().hieBaseUrl)?e:null]}}))}))()}},73327:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Je});var r=n(39246),a=n(16072),o=n.n(a),i=n(85072),l=n.n(i),c=n(97825),u=n.n(c),s=n(77659),d=n.n(s),f=n(55056),m=n.n(f),p=n(10540),A=n.n(p),h=n(41113),_=n.n(h),y=n(6842),b={};b.styleTagTransform=_(),b.setAttributes=m(),b.insert=d().bind(null,"head"),b.domAPI=u(),b.insertStyleElement=A(),l()(y.A,b);const w=y.A&&y.A.locals?y.A.locals:void 0;var g=["National ID","Alien ID","Passport","Mandate Number","Refugee ID"],v=function(e){return e.Draft="DRAFT",e.Sent="SENT",e.Verified="VERIFIED",e}({}),C=function(e){return e.NationalID="National ID",e.SHANumber="SHA Number",e.HouseholdNumber="Household Number",e.RefugeeID="Refugee ID",e.AlienID="Alien ID",e.MandateNumber="Mandate Number",e.Cr="id",e.TemporaryDependantID="Temporary Dependant ID",e.BirthCertificate="Birth Certificate",e}({}),E=n(62801);function x(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){x(o,r,a,i,l,"next",e)}function l(e){x(o,r,a,i,l,"throw",e)}i(void 0)}))}}function k(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function I(e,t){return S((function(){var n,r;return k(this,(function(a){switch(a.label){case 0:return[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return(n=a.sent()).ok?[3,3]:[4,n.text()];case 2:throw r=a.sent(),new Error("Request failed with ".concat(n.status,": ").concat(r));case 3:return[2,n.json()]}}))}))()}function T(e){return S((function(){var t,n,r;return k(this,(function(a){switch(a.label){case 0:return[4,(0,E.bo)()];case 1:return t=a.sent(),n="".concat(t,"/client/search"),r={identificationNumber:e.identificationNumber,identificationType:e.identificationType,locationUuid:e.locationUuid},[2,I(n,r)]}}))}))()}var N=n(25987),D=n(84497),P={};P.styleTagTransform=_(),P.setAttributes=m(),P.insert=d().bind(null,"head"),P.domAPI=u(),P.insertStyleElement=A(),l()(D.A,P);const O=D.A&&D.A.locals?D.A.locals:void 0;var R=function(e){for(var t=e.split(""),n=0;n<e.length;n++)n%2==0&&(t[n]="*");return t.join("")},j=function(e){for(var t=e.split(""),n=0;n<e.length;n++)0!=n&&n!==e.length-1&&(t[n]="*");return t.join("")},F=n(4405),B={};B.styleTagTransform=_(),B.setAttributes=m(),B.insert=d().bind(null,"head"),B.domAPI=u(),B.insertStyleElement=A(),l()(F.A,B);const U=F.A&&F.A.locals?F.A.locals:void 0;function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}const L=function(e){var t,n,i=e.onChange,l=e.otpLength,c=(t=(0,a.useState)(Array(l).fill("")),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(t,n)||M(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],s=c[1],d=(0,a.useRef)([]);if(!l)return o().createElement(o().Fragment,null,"OTP Length not defined");var f=function(e){d.current[e]&&d.current[e].focus()};return o().createElement("div",{className:U.otpInputContainer,onPaste:function(e){e.preventDefault();var t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,l);if(t){var n=H(u);t.split("").forEach((function(e,t){n[t]=e})),s(n),null==i||i(n.join("")),f(t.length-1)}}},u.map((function(e,t){return o().createElement("div",{className:U.otpDataInputContainer},o().createElement(r.ksK,{className:U.otpDataInput,key:t,id:"otp-".concat(t),value:e,labelText:"",hideLabel:!0,maxLength:1,inputMode:"numeric",pattern:"[0-9]*",ref:function(e){return d.current[t]=e},onChange:function(e){return function(e,t){if(/^\d?$/.test(e)){var n=H(u);n[t]=e,s(n),e&&t<l-1&&f(t+1),null==i||i(n.join(""))}}(e.target.value,t)},onKeyDown:function(e){return function(e,t){"Backspace"===e.key&&!u[t]&&t>0&&f(t-1)}(e,t)},style:{height:"4rem",width:"4rem",borderStyle:"solid grey",backgroundColor:"#e5ebf7"}}))})))};var q=n(75485),V={};V.styleTagTransform=_(),V.setAttributes=m(),V.insert=d().bind(null,"head"),V.domAPI=u(),V.insertStyleElement=A(),l()(q.A,V);const G=q.A&&q.A.locals?q.A.locals:void 0;function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const J=function(e){var t,n,r,i,l,c,u,s=e.durationInSeconds,d=(e.resetTimer,e.onTimeUp),f=(t=(0,a.useState)(s),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=f[0],p=f[1];return(0,a.useEffect)((function(){if(!(m<=0)){var e=setInterval((function(){p((function(e){return e-1}))}),1e3);return function(){return clearInterval(e)}}null==d||d()}),[m]),o().createElement(o().Fragment,null,o().createElement("div",{className:G.timerData},o().createElement("b",null,(l=(r=m)%60,c=(i=Math.floor(r/60))>9?i:"0".concat(i),u=l>9?l:"0".concat(l),"".concat(c,":").concat(u)))))};function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function K(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){z(o,r,a,i,l,"next",e)}function l(e){z(o,r,a,i,l,"throw",e)}i(void 0)}))}}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}const Z=function(e){var t=e.requestCustomOtpDto,n=e.phoneNumber,i=e.open,l=e.onModalClose,c=e.onOtpSuccessfullVerification,u=X((0,a.useState)(""),2),s=u[0],d=u[1],f=X((0,a.useState)(v.Draft),2),m=f[0],p=f[1],A=X((0,a.useState)(!1),2),h=A[0],_=A[1],y=X((0,a.useState)(""),2),b=y[0],w=y[1],g=function(e,t,n){(0,N.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(r.aFV,{open:i,size:"md",onSecondarySubmit:l,onRequestClose:l,onRequestSubmit:function(){window.open("https://afyayangu.go.ke/","_blank")},primaryButtonText:"Register on Afya Yangu",secondaryButtonText:"Cancel"},o().createElement(r.cwr,null,o().createElement("div",{className:O.modalVerificationLayout},o().createElement("div",{className:O.sectionHeader},o().createElement("h4",{className:O.sectionTitle},"One Time Password (OTP)"),o().createElement("h6",null,"Enter one time password to proceed")),o().createElement("div",{className:O.sectionContent},o().createElement("div",{className:O.contentHeader},m===v.Draft?o().createElement(o().Fragment,null,o().createElement("h6",null,"Send Code to Phone ",R(n))):o().createElement(o().Fragment,null),m===v.Verified?o().createElement(o().Fragment,null,o().createElement("h6",null,"OTP Verification Successfull!")):o().createElement(o().Fragment,null)),o().createElement("div",{className:O.otpSection},m===v.Sent?o().createElement(o().Fragment,null,o().createElement("div",{className:O.otpForm},o().createElement(r.lRv,null,"Enter OTP"),o().createElement(L,{otpLength:5,onChange:function(e){return d(e)}})),o().createElement("div",{className:O.otpTimer},o().createElement(J,{durationInSeconds:60,resetTimer:function(){},onTimeUp:function(){v.Sent&&p(v.Draft)}}))):o().createElement(o().Fragment,null))),o().createElement("div",{className:O.sectionAction},m===v.Draft?o().createElement(o().Fragment,null,o().createElement(r.$nd,{kind:"primary",onClick:function(){return K((function(){var e,n,r;return Q(this,(function(a){switch(a.label){case 0:if(!t.identificationNumber)return g("error","Invalid Identification Value","Please enter a valid ID value"),[2];_(!0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,(o=t,S((function(){var e,t,n;return k(this,(function(r){switch(r.label){case 0:return[4,(0,E.bo)()];case 1:return e=r.sent(),t="".concat(e,"/client/send-custom-otp"),n={identificationNumber:o.identificationNumber,identificationType:o.identificationType,locationUuid:o.locationUuid},[2,I(t,n)]}}))}))())];case 2:return e=a.sent(),w(e.sessionId),p(v.Sent),g("success","OTP sent successfully","A code was sent to ".concat(e.maskedPhone)),[3,5];case 3:return n=a.sent(),r=n.message||"Failed to send OTP",g("error","Error sending OTP",r),[3,5];case 4:return _(!1),[7];case 5:return[2]}var o}))}))()}},h?o().createElement(r.OuH,{description:"Sending OTP..."}):"Send OTP")):o().createElement(o().Fragment,null),m===v.Sent?o().createElement(o().Fragment,null,o().createElement(r.$nd,{kind:"primary",onClick:function(){return K((function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(!s.trim())return g("error","Please enter the OTP code",""),[2];_(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,(a={sessionId:b,otp:s,locationUuid:t.locationUuid},S((function(){var e,t,n;return k(this,(function(r){switch(r.label){case 0:return[4,(0,E.bo)()];case 1:return e=r.sent(),t="".concat(e,"/client/validate-custom-otp"),n={sessionId:a.sessionId,otp:a.otp,locationUuid:a.locationUuid},[2,I(t,n)]}}))}))())];case 2:return r.sent(),p(v.Verified),(0,N.showSnackbar)({kind:"success",title:"OTP Verified",subtitle:"You can now fetch data from Client Registry."}),[3,5];case 3:return e=r.sent(),n=e.message||"OTP verification failed",(0,N.showSnackbar)({kind:"error",title:"OTP Verification Failed",subtitle:n}),[3,5];case 4:return _(!1),[7];case 5:return[2]}var a}))}))()}},h?o().createElement(r.OuH,{description:"Verifying OTP..."}):"Verify")):o().createElement(o().Fragment,null),m===v.Verified?o().createElement(o().Fragment,null,o().createElement(r.$nd,{kind:"primary",onClick:c},"Continue")):o().createElement(o().Fragment,null))))))};var ee=n(86575),te={};te.styleTagTransform=_(),te.setAttributes=m(),te.insert=d().bind(null,"head"),te.domAPI=u(),te.insertStyleElement=A(),l()(ee.A,te);const ne=ee.A&&ee.A.locals?ee.A.locals:void 0;function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=["id","other_identifications","first_name","middle_name","last_name","gender","date_of_birth","is_alive","deceased_datetime","phone","email","civil_status","place_of_birth","citizenship","country","county","sub_county","ward","village_estate","longitude","latitude","identification_type"];const oe=function(e){var t=e.client,n=(0,a.useMemo)((function(){return e=t,n={},Object.keys(e).filter((function(e){return ae.includes(e)})).forEach((function(t){if("other_identifications"===t){var r=(o=e[t],i={},o.forEach((function(e){i[e.identification_type]=e.identification_number})),i);n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){re(e,t,n[t])}))}return e}({},n,r)}else if("identification_type"===t)n[e.identification_type]=e.identification_number;else{var a=e[t];n[t]=a}var o,i})),n;var e,n}),[t]);return t&&n?o().createElement(o().Fragment,null,o().createElement(r.XIK,null,o().createElement(r.ndF,null,o().createElement(r.Hjg,null,o().createElement(r.A0N,null,"Field"),o().createElement(r.A0N,null,"Value"))),o().createElement(r.BFY,null,Object.keys(n).map((function(e){return o().createElement(r.Hjg,null,o().createElement(r.nA6,null,e),o().createElement(r.nA6,null,n[e]))}))))):o().createElement(o().Fragment,null,o().createElement("h4",null,"No patient Data to Display"))},ie=function(){return o().createElement(o().Fragment,null,o().createElement(r.zWQ,{defaultSelected:"sha",legendText:"Patient",onChange:function(e){},name:"payment-options-radio-group"},o().createElement(r.aaP,{id:"sha",labelText:"Social Health Authority",value:"sha"}),o().createElement(r.aaP,{id:"insurance",labelText:"Other Insurance",value:"other"}),o().createElement(r.aaP,{id:"cash",labelText:"Cash",value:"cash"})))},le=function(e){var t=e.client,n=e.open,a=e.onModalClose,i=(e.onSubmit,e.onSendClientToTriage);return t?o().createElement(o().Fragment,null,o().createElement(r.aFV,{open:n,size:"md",onSecondarySubmit:a,onRequestClose:a,onRequestSubmit:function(){window.open("https://afyayangu.go.ke/","_blank")},primaryButtonText:"Register on Afya Yangu",secondaryButtonText:"Cancel"},o().createElement(r.cwr,null,o().createElement("div",{className:ne.clientDetailsLayout},o().createElement("div",{className:ne.sectionHeader},o().createElement("h4",{className:ne.sectionTitle},"Patient/Payment Details")),o().createElement("div",{className:ne.sectionContent},o().createElement(r.tUM,null,o().createElement(r.wbY,{contained:!0},o().createElement(r.ozo,null,"Patient Details"),o().createElement(r.ozo,null,"Payment Details")),o().createElement(r.T2N,null,o().createElement(r.KpK,null,o().createElement(oe,{client:t})),o().createElement(r.KpK,null,o().createElement(ie,null))))),o().createElement("div",{className:ne.actionSection},o().createElement("div",{className:ne.btnContainer},o().createElement(r.$nd,{kind:"primary"},"Book Appointment")),o().createElement("div",{className:ne.btnContainer},o().createElement(r.$nd,{kind:"secondary"},"Walk In Orders")),o().createElement("div",{className:ne.btnContainer},o().createElement(r.$nd,{kind:"tertiary",onClick:function(){return i(t.id)}},"Send To Triage"))))))):o().createElement(o().Fragment,null,"No Client data")};function ce(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function ue(e){return(t=function(){var t,n,r,a;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(o){switch(o.label){case 0:return t="".concat(N.restBaseUrl,"/patient"),n=new URLSearchParams({q:e,v:"full",includeDead:"true",limit:"10",totalCount:"true"}).toString(),[4,(0,N.openmrsFetch)("".concat(t,"?").concat(n))];case 1:return(r=o.sent()).ok?[3,3]:[4,r.text()];case 2:throw a=o.sent(),new Error("Request failed with ".concat(r.status,": ").concat(a));case 3:return[2,r.json()]}}))},function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){ce(o,r,a,i,l,"next",e)}function l(e){ce(o,r,a,i,l,"throw",e)}i(void 0)}))})();var t}var se=n(3754),de={};de.styleTagTransform=_(),de.setAttributes=m(),de.insert=d().bind(null,"head"),de.domAPI=u(),de.insertStyleElement=A(),l()(se.A,de);const fe=se.A&&se.A.locals?se.A.locals:void 0;function me(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function pe(e){return(t=function(){var t,n,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(a){switch(a.label){case 0:return t="".concat(N.restBaseUrl,"/location"),n="".concat(t,"/").concat(e),[4,(0,N.openmrsFetch)(n)];case 1:return[4,a.sent().json()];case 2:return[2,null!=(r=a.sent())?r:null]}}))},function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(e){me(o,r,a,i,l,"next",e)}function l(e){me(o,r,a,i,l,"throw",e)}i(void 0)}))})();var t}function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function he(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function _e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){he(o,r,a,i,l,"next",e)}function l(e){he(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ye(e){return function(e){if(Array.isArray(e))return Ae(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function we(e){return _e((function(){var t,n,r,a;return be(this,(function(o){switch(o.label){case 0:return t="".concat(N.restBaseUrl,"/queue"),n=new URLSearchParams({v:"custom:(uuid,display,name,description,service:(uuid,display),allowedPriorities:(uuid,display),allowedStatuses:(uuid,display),location:(uuid,display))",location:e}).toString(),[4,(0,N.openmrsFetch)("".concat(t,"?").concat(n))];case 1:return(r=o.sent()).ok?[3,3]:[4,r.text()];case 2:throw a=o.sent(),new Error("Request failed with ".concat(r.status,": ").concat(a));case 3:return[2,r.json()]}}))}))()}function ge(e){return _e((function(){var t,n,r,a,o,i,l,c,u,s;return be(this,(function(d){switch(d.label){case 0:return[4,pe(e)];case 1:return(t=d.sent())&&(n=t.parentLocation)?[4,pe(n.uuid)]:[2];case 2:if(r=d.sent(),o=null!==(a=r.childLocations)&&void 0!==a?a:[],l=null!==(i=o.map((function(e){return e.uuid})))&&void 0!==i?i:[],c=[],!(l.length>0))return[3,6];u=0,d.label=3;case 3:return u<l.length?[4,we(l[u])]:[3,6];case 4:s=d.sent(),c=ye(c).concat(ye(s.results)),d.label=5;case 5:return u++,[3,3];case 6:return[2,c]}}))}))()}var ve=n(75862),Ce=n(25838);function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Se(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){xe(o,r,a,i,l,"next",e)}function l(e){xe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}const Te=function(e){var t=e.patients,n=e.open,i=e.onModalClose,l=(e.onSubmit,e.client),c=e.onCreateAmrsPatient,u=e.onManualRegistration,s=ke((0,a.useState)(),2),d=s[0],f=s[1],m=ke((0,a.useState)(),2),p=m[0],A=m[1],h=ke((0,a.useState)(),2),_=h[0],y=h[1],b=ke((0,a.useState)(),2),w=b[0],g=b[1],v=ke((0,a.useState)(""),2),C=v[0],E=v[1],x=ke((0,a.useState)(!1),2),S=x[0],k=x[1],I=(0,N.useVisitTypes)(),T=(0,N.useSession)().sessionLocation.uuid,D=(0,a.useMemo)((function(){return I.map((function(e){return{id:e.uuid,text:e.display}}))}),[I]);if((0,a.useEffect)((function(){Se((function(){var e,t,n;return Ie(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,ge(T)];case 1:return(e=r.sent()).length>0&&y(e),[3,3];case 2:return t=r.sent(),(0,N.showSnackbar)({kind:"error",title:"An error occurred while fetching service queues",subtitle:null!==(n=t.message)&&void 0!==n?n:"An error occurred while fetching service queues, please try agin"}),[3,3];case 3:return[2]}}))}))()}),[t]),!t)return o().createElement(o().Fragment,null,"No Client data");var P=function(e){return e.location?e.patient?!!e.visitType||(R("error","Please select a visit",""),!1):(R("error","Please select a patient",""),!1):(R("error","Missing location in create visits",""),!1)},O=function(){var e;return{visitType:p,location:T,startDatetime:null,stopDatetime:null,patient:null!==(e=null==d?void 0:d.uuid)&&void 0!==e?e:""}},R=function(e,t,n){(0,N.showSnackbar)({kind:e,title:t,subtitle:n})};return o().createElement(o().Fragment,null,o().createElement(r.aFV,{open:n,size:"md",onSecondarySubmit:function(){return i({success:!1})},onRequestClose:function(){return i({success:!1})},onRequestSubmit:function(){window.open("https://afyayangu.go.ke/","_blank")},primaryButtonText:"Register on Afya Yangu",secondaryButtonText:"Cancel"},o().createElement(r.cwr,null,o().createElement("div",{className:fe.clientDetailsLayout},o().createElement("div",{className:fe.sectionHeader},o().createElement("h4",{className:fe.sectionTitle},"Send To Triage")),t.length>0?o().createElement("div",{className:fe.sectionContent},o().createElement("div",{className:fe.patientSelect},o().createElement(r.XIK,null,o().createElement(r.ndF,null,o().createElement(r.Hjg,null,o().createElement(r.A0N,null,"No"),o().createElement(r.A0N,null,"Name"),o().createElement(r.A0N,null,"Gender"),o().createElement(r.A0N,null,"Select Patient"))),o().createElement(r.BFY,null,t.map((function(e,t){return o().createElement(r.Hjg,{key:e.uuid},o().createElement(r.nA6,null,t+1),o().createElement(r.nA6,null,e.person.preferredName.display),o().createElement(r.nA6,null,e.person.gender),o().createElement(r.nA6,null,o().createElement(r.Sc0,{id:e.uuid,labelText:"",onChange:function(){f(e)}})))}))))),o().createElement("div",{className:fe.formSection},o().createElement("div",{className:fe.formRow},o().createElement("div",{className:fe.formControl},o().createElement(r.a32,{onChange:function(e){var t=e.selectedItem.id;A(t)},id:"visit-type-combobox",items:D,itemToString:function(e){return e?e.text:""},titleText:"Select a Visit Type"})),o().createElement("div",{className:fe.formControl},o().createElement(r.l6P,{id:"service",labelText:"Select a Service",onChange:function(e){var t=e.target.value;g(t)}},o().createElement(r.ebT,{value:"",text:"Select"}),";",_&&_.map((function(e){var t;return o().createElement(r.ebT,{value:e.uuid,text:"".concat(e.display," (").concat(null!==(t=e.location.display)&&void 0!==t?t:"",")")})}))))),o().createElement("div",{className:fe.formRow},o().createElement("div",{className:fe.formControl},o().createElement(r.l6P,{id:"priority",labelText:"Select Priority",onChange:function(e){return t=e.target.value,void E(t);var t}},o().createElement(r.ebT,{value:"",text:"Select"}),";",o().createElement(r.ebT,{value:ve.i3.NORMAL_PRIORITY_UUID,text:"NORMAL"}),";",o().createElement(r.ebT,{value:ve.i3.EMERGENCY_PRIORITY_UUID,text:"EMERGENCY"}),";"))))):o().createElement(o().Fragment,null),o().createElement("div",{className:fe.actionSection},t.length>0?o().createElement("div",{className:fe.btnContainer},o().createElement(r.$nd,{className:fe.greenBtn,onClick:function(){return Se((function(){var e,t;return Ie(this,(function(n){switch(n.label){case 0:k(!0),n.label=1;case 1:return n.trys.push([1,5,6,7]),[4,Se((function(){var e,t;return Ie(this,(function(n){switch(n.label){case 0:return e=O(),P(e)?[4,(0,Ce._)(e)]:[2,!1];case 1:if(t=n.sent())return R("success","Visit has been created succesfully",""),[2,t];throw R("error","Error creating patient visit",""),new Error("Error creating patient visit")}}))}))()];case 2:return(e=n.sent())?(r=e.uuid,t={visit:{uuid:r},queueEntry:{status:{uuid:ve.cn.WAITING_UUID},priority:{uuid:null!=C?C:ve.i3.NORMAL_PRIORITY_UUID},queue:{uuid:w},patient:{uuid:d.uuid},startedAt:(new Date).toISOString(),sortWeight:0}},[4,(a=t,_e((function(){var e,t,n;return be(this,(function(r){switch(r.label){case 0:return e="".concat(N.restBaseUrl,"/visit-queue-entry"),[4,(0,N.openmrsFetch)(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a)})];case 1:return(t=r.sent()).ok?[3,3]:[4,t.text()];case 2:throw n=r.sent(),new Error("Request failed with ".concat(t.status,": ").concat(n));case 3:return[2,t.json()]}}))}))())]):[3,4];case 3:n.sent()&&(R("success","Patient has succesfully been moved to the Triage queue",""),i({success:!0})),n.label=4;case 4:return[3,7];case 5:return n.sent(),R("error","Error creating visit",""),[3,7];case 6:return k(!1),[7];case 7:return[2]}var r,a}))}))()}},S?o().createElement(r.OuH,{description:"Sending To Triage..."}):"Send To Triage")):o().createElement(o().Fragment,null,o().createElement("div",{className:fe.patientAction},o().createElement("div",{className:fe.btnContainer},o().createElement(r.$nd,{kind:"primary",onClick:function(){return c(l)}},"Automatically Register in AMRS")),o().createElement("div",{className:fe.btnContainer},o().createElement(r.$nd,{kind:"secondary",onClick:u},"Manually Register")))))))))};function Ne(e,t){return"".concat(e.first_name," ").concat(j(e.middle_name)," (").concat(e.gender,") (DOB: ").concat(e.date_of_birth,") (").concat(t,") (CR: ").concat(e.id,")")}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pe(e){return function(e){if(Array.isArray(e))return De(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Oe=Pe([C.Cr,C.SHANumber,C.HouseholdNumber,C.RefugeeID,C.MandateNumber,C.AlienID,C.NationalID,C.TemporaryDependantID]).concat(Pe(["first_name","middle_name","last_name"]),Pe(["gender","date_of_birth","is_alive","deceased_datetime"]),Pe(["phone","email","civil_status","place_of_birth","citizenship"]),Pe(["country","county","sub_county","ward","village_estate","longitude","latitude"]));function Re(e){var t="";switch(e){case"Divorced":t="a899ad58-1350-11df-a1f1-0026b9348838";break;case"Married":t="a8aa76b0-1350-11df-a1f1-0026b9348838";break;case"Single":t="a899ac7c-1350-11df-a1f1-0026b9348838";break;default:t="a89ad3a4-1350-11df-a1f1-0026b9348838"}return t}function je(e){var t;switch(e){case C.NationalID:t="58a47054-1359-11df-a1f1-0026b9348838";break;case C.HouseholdNumber:t="bb74b20e-dcee-4f59-bdf1-2dffc3abf106";break;case C.AlienID:t="12f5b147-3403-4a73-913d-7ded9ffec094";break;case C.SHANumber:t="cf5362b2-8049-4442-b3c6-36f870e320cb";break;case C.MandateNumber:t="aae2d097-20ba-43ca-9b71-fd8296068f39";break;case C.RefugeeID:t="465e81af-8d69-47e9-9127-53a94adc75fb";break;case C.Cr:t="e88dc246-3614-4ee3-8141-1f2a83054e72";break;case C.BirthCertificate:t="7924e13b-131a-4da8-8efa-e294184a1b0d";break;case C.TemporaryDependantID:t="a3d34214-93e8-4faf-bf4d-0272eee079eb"}return t}function Fe(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Be(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Fe(o,r,a,i,l,"next",e)}function l(e){Fe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Ue(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}var Ye=function(e,t){return Be((function(){var n,r;return Ue(this,(function(a){switch(a.label){case 0:return[4,Be((function(){var e,t,n,r;return Ue(this,(function(a){switch(a.label){case 0:return[4,(0,E.E$)()];case 1:return e=a.sent(),t=new AbortController,[4,(0,N.openmrsFetch)("".concat(e,"/amrs-id-generator/generateidentifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{user:1},signal:t.signal})];case 2:return[4,a.sent().json()];case 3:return n=a.sent(),[2,null!==(r=n.identifier)&&void 0!==r?r:""]}}))}))()];case 1:return n=a.sent(),r=function(e,t){var n=[];return n.push({identifierType:je(C.Cr),identifier:e.id,location:t}),n.push({identifierType:je(e.identification_type),identifier:e.identification_number,location:t}),n}(t,e),r.push({identifierType:"58a4732e-1359-11df-a1f1-0026b9348838",identifier:n,location:e,preferred:!0}),[2,r]}}))}))()};function He(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Me(e,t){return(n=function(){var n,r;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}(this,(function(a){switch(a.label){case 0:return n=function(e){var t={},n={},r={},a=[];Oe.forEach((function(o){"first_name"===o&&(n.givenName=e.first_name),"middle_name"===o&&(n.middleName=e.middle_name),"last_name"===o&&(n.familyName=e.last_name),"gender"===o&&(t.gender="Male"===e.gender?"M":"F"),"date_of_birth"===o&&(t.birthdate=e.date_of_birth,t.birthdateEstimated=!1),"is_alive"===o&&(t.dead=0===e.is_alive),"deceased_datetime"===o&&e.deceased_datetime.length>0&&(t.deathDate=e.deceased_datetime),"country"===o&&e.country.length>0&&(r.country=e.country,r.address1=e.country),"place_of_birth"===o&&e.place_of_birth.length>0&&(r.address10=e.place_of_birth),"county"===o&&e.county.length>0&&(r.countyDistrict=e.county),"sub_county"===o&&e.sub_county.length>0&&(r.address2=e.sub_county,r.stateProvince=e.sub_county),"ward"===o&&e.sub_county.length>0&&(r.address7=e.sub_county,r.address4=e.sub_county),"village_estate"===o&&e.village_estate.length>0&&(r.cityVillage=e.village_estate),"longitude"===o&&e.longitude.length>0&&(r.longitude=e.longitude),"latitude"===o&&e.latitude.length>0&&(r.latitude=e.latitude),"place_of_birth"===o&&e.place_of_birth.length>0&&a.push({value:e.place_of_birth,attributeType:"8d8718c2-c2cc-11de-8d13-0010c6dffd0f"}),"phone"===o&&e.phone.length>0&&a.push({value:e.phone,attributeType:"72a759a8-1359-11df-a1f1-0026b9348838"}),"email"===o&&e.email.length>0&&a.push({value:e.email,attributeType:"2f65dbcb-3e58-45a3-8be7-fd1dc9aa0faa"}),"civil_status"===o&&e.civil_status.length>0&&a.push({value:Re(e.civil_status),attributeType:"8d871f2a-c2cc-11de-8d13-0010c6dffd0f"}),"id"===o&&e.id&&a.push({value:e.id,attributeType:"e068e02b-faac-4baf-bd58-fe6e0c29a81f"}),"citizenship"===o&&e.citizenship&&a.push({value:e.citizenship,attributeType:"8d871afc-c2cc-11de-8d13-0010c6dffd0f"})}));var o=function(e){var t=[],n=e.find((function(e){return"Alternative Phone Number"===e.relationship})),r=e.find((function(e){return"Next Of Kin"===e.remarks}));return n&&"Phone"===n.contact_type&&t.push({value:n.contact_id,attributeType:"c725f524-c14a-4468-ac19-4a0e6661c930"}),r&&("Phone"===r.contact_type&&t.push({value:r.contact_id,attributeType:"a657a4f1-9c0f-444b-a1fd-445bb91dd12d"}),t.push({value:r.relationship,attributeType:"5730994e-c267-426b-87b6-c152b606973d"}),t.push({value:r.contact_name,attributeType:"72a75bec-1359-11df-a1f1-0026b9348838"})),t}(e.alternative_contacts);return a=Pe(a).concat(Pe(o)),Object.keys(n).length>0&&(t.names=[n]),Object.keys(r).length>0&&(t.addresses=[r]),a.length>0&&(t.attributes=a),t}(e),[4,Ye(t,e)];case 1:return r=a.sent(),[4,(o={person:n,identifiers:r},Be((function(){return Ue(this,(function(e){switch(e.label){case 0:return[4,(0,N.openmrsFetch)("".concat(N.restBaseUrl,"/patient"),{method:"POST",headers:{"Content-Type":"application/json"},body:o})];case 1:return[2,e.sent()]}}))}))())];case 2:return[4,a.sent().json()];case 3:return[2,a.sent()]}var o}))},function(){var e=this,t=arguments;return new Promise((function(r,a){var o=n.apply(e,t);function i(e){He(o,r,a,i,l,"next",e)}function l(e){He(o,r,a,i,l,"throw",e)}i(void 0)}))})();var n}function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qe(e,t,n,r,a,o,i){try{var l=e[o](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,a)}function Ve(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){qe(o,r,a,i,l,"next",e)}function l(e){qe(o,r,a,i,l,"throw",e)}i(void 0)}))}}function Ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Le(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=l(0),i.throw=l(1),i.return=l(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]<a[3])){o.label=l[1];break}if(6===l[0]&&o.label<a[1]){o.label=a[1],a=l;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(l);break}a[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=a=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}const Je=function(){var e=Ge((0,a.useState)("National ID"),2),t=e[0],n=e[1],i=Ge((0,a.useState)(""),2),l=i[0],c=i[1],u=Ge((0,a.useState)(!1),2),s=u[0],d=u[1],f=Ge((0,a.useState)(),2),m=f[0],p=f[1],A=Ge((0,a.useState)(),2),h=A[0],_=A[1],y=Ge((0,a.useState)([]),2),b=y[0],v=y[1],C=Ge((0,a.useState)("principal"),2),E=C[0],x=C[1],S=Ge((0,a.useState)(!1),2),k=S[0],I=S[1],D=Ge((0,a.useState)(!1),2),P=D[0],O=D[1],F=Ge((0,a.useState)(!1),2),B=F[0],U=F[1],Y=Ge((0,a.useState)(),2),H=Y[0],M=Y[1],L=(0,N.useSession)().sessionLocation.uuid,q=function(e,t,n){(0,N.showSnackbar)({kind:e,title:t,subtitle:n})},V=function(){O(!1)},G=function(){window.location.href="".concat(window.spaBase,"/patient-registration")},W=function(){return"principal"===E?m:"dependants"===E?h:m},J=function(){p(null),_(null),v([]),x(null),c(""),n("National ID"),O(!1),I(!1),U(!1),x("principal")};return o().createElement(o().Fragment,null,o().createElement("div",{className:w.registryLayout},o().createElement("div",{className:w.mainContent},o().createElement("div",{className:w.registryHeader},o().createElement("h4",null,"Client Registry"),o().createElement("p",null,"Please enter identification number to begin")),o().createElement("div",{className:w.registryContent},o().createElement("div",{className:w.formRow},o().createElement("div",{className:w.formControl},o().createElement(r.msM,{id:"identifier-type-dropdown",label:"Identifier Type",titleText:"Select Identifier Type",items:g,selectedItem:t,onChange:function(e){var t=e.selectedItem;return n(t)}})),o().createElement("div",{className:w.formControl},o().createElement(r.ksK,{id:"identifier-value",labelText:"".concat(t," Value"),value:l,onChange:function(e){return c(e.target.value)},placeholder:"Enter ".concat(t.toLowerCase()," value")}))),o().createElement("div",{className:w.formRow},o().createElement("div",{className:w.formControl},o().createElement("div",{className:w.formBtn},o().createElement(r.$nd,{className:w.registrySearchBtn,kind:"primary",onClick:function(){return Ve((function(){var e,n,r,a,o,i;return We(this,(function(c){switch(c.label){case 0:d(!0),c.label=1;case 1:return c.trys.push([1,3,4,5]),function(e){return e.identificationNumber?e.identificationType?!!e.locationUuid||(q("error","No default location selected",""),!1):(q("error","Please enter a valid identification type",""),!1):(q("error","Please enter a valid identification number",""),!1)}(e={identificationNumber:l,identificationType:t,locationUuid:L})?(M(e),[4,T(e)]):[2,!1];case 2:if(n=c.sent(),0===(r=Array.isArray(n)?n:[]).length)throw J(),new Error("No matching patient found in Client Registry.");return a=r[0],p(a),q("success","Client Data Loaded","Patient fetched successfully"),[3,5];case 3:return o=c.sent(),i=o.message||"Failed to fetch client data",J(),q("error","Fetch Failed",i),[3,5];case 4:return d(!1),[7];case 5:return[2]}}))}))()},disabled:s},s?o().createElement(r.OuH,{description:"Searching..."}):"Search"),o().createElement(r.$nd,{className:w.registrySearchBtn,kind:"secondary",onClick:G},"Emergency Registration"),o().createElement(r.$nd,{className:w.registrySearchBtn,kind:"tertiary",onClick:function(){window.open("https://afyayangu.go.ke/","_blank")}},"Register on Afya Yangu")))),m?o().createElement("div",{className:w.formRow},o().createElement("div",{className:w.hieData},o().createElement("div",{className:w.selectionHeader},o().createElement("h5",null,"Please select one patient and request patient to share the OTP sent")),o().createElement("div",{className:w.patientSelect},o().createElement("div",{className:w.patientSelectRadio},o().createElement(r.zWQ,{defaultSelected:"principal",legendText:"Patient",onChange:function(e){x(e)},name:"radio-button-default-group"},o().createElement(r.aaP,{id:"principal",labelText:"Principal",value:"principal"}),o().createElement(r.aaP,{id:"dependants",labelText:"Dependants",value:"dependants"}))),o().createElement("div",{className:w.patientConfirmSelection},o().createElement("div",{className:w.btnContainer},o().createElement(r.$nd,{kind:"primary",onClick:function(){I(!0)}}," ","Confirm")),o().createElement("div",{className:w.btnContainer},o().createElement(r.$nd,{kind:"secondary",onClick:J},"Cancel")))),o().createElement("div",{className:w.principalDependantSection},"principal"===E?o().createElement(o().Fragment,null,o().createElement(r.XIK,null,o().createElement(r.ndF,null,o().createElement(r.Hjg,null,o().createElement(r.A0N,null,"Name"),o().createElement(r.A0N,null,"CR"),o().createElement(r.A0N,null,"Phone No"),o().createElement(r.A0N,null,"ID No"))),o().createElement(r.BFY,null,o().createElement(r.Hjg,null,o().createElement(r.nA6,null,m.first_name," ",j(m.middle_name)," ",j(m.last_name)),o().createElement(r.nA6,null,R(m.id)),o().createElement(r.nA6,null,R(m.phone)),o().createElement(r.nA6,null,R(m.identification_number)))))):o().createElement(o().Fragment,null),"dependants"===E?o().createElement(o().Fragment,null,o().createElement(r.zWQ,{defaultSelected:"",helperText:"",invalidText:"",legendText:"",name:"dependant-group",onChange:function(e){return function(e){var t=m.dependants;if(t.length>0){var n=t.find((function(t){return t.result[0].id===e}));n&&_(n.result[0])}}(e)}},m.dependants.map((function(e){var t=e.result[0],n=e.relationship;return o().createElement(r.aaP,{id:t.id,labelText:Ne(t,n),value:t.id})})))):o().createElement(o().Fragment,null),k?o().createElement(Z,{requestCustomOtpDto:H,phoneNumber:m.phone,open:k,onModalClose:function(){I(!1)},onOtpSuccessfullVerification:function(){I(!1),O(!0)}}):o().createElement(o().Fragment,null),m&&P?o().createElement(o().Fragment,null,o().createElement(le,{client:W(),open:P,onModalClose:V,onSubmit:function(){},onSendClientToTriage:function(e){return Ve((function(){var t;return We(this,(function(n){switch(n.label){case 0:return V(),[4,ue(e)];case 1:return(t=n.sent()).totalCount>0?(q("success","".concat(t.totalCount," ").concat(t.totalCount>0?"Patients":"Patient"," found in the system with ").concat(e),""),v(t.results),U(!0)):(q("error","Patient not found in the system",""),v([]),U(!0)),[2]}}))}))()}})," "):o().createElement(o().Fragment,null),m&&B?o().createElement(o().Fragment,null,o().createElement(Te,{client:W(),patients:b,open:B,onModalClose:function(e){U(!1),e&&e.success&&(window.location.href="".concat(window.spaBase,"/home/triage"))},onSubmit:function(){},onCreateAmrsPatient:function(){return Ve((function(){var e,t,n,r,a,o,i,l,c,u,s,d;return We(this,(function(f){switch(f.label){case 0:if(!(e=W()))return q("error","Principal or dependant not selected",""),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Me(e,L)];case 2:return(t=f.sent())&&(q("success","Patient created succesfully",""),v([t])),[3,4];case 3:if(n=f.sent(),a=null!==(r=n.responseBody)&&void 0!==r?r:n.message,q("error","Error Creating Patient",""),o=function(e){var t=[];if(e&&e.error)if(e.error.error){var n=e.error.error.globalErrors||null;if(n){var r=!0,a=!1,o=void 0;try{for(var i,l=n[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var c=i.value;t.push(c.message)}}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}}}else if(e.error)if(e.error.globalErrors){var u=e.error.globalErrors||null;if(u){var s=!0,d=!1,f=void 0;try{for(var m,p=u[Symbol.iterator]();!(s=(m=p.next()).done);s=!0){var A=m.value;t.push(A.message)}}catch(e){d=!0,f=e}finally{try{s||null==p.return||p.return()}finally{if(d)throw f}}}}else e.error.message&&t.push(e.error.message);else t.push(e.error.error.message||"An error occurred while creating the patient. Please try again or contact support");return t}(a),o&&o.length>0){i=!0,l=!1,c=void 0;try{for(u=o[Symbol.iterator]();!(i=(s=u.next()).done);i=!0)d=s.value,q("error",d,"")}catch(e){l=!0,c=e}finally{try{i||null==u.return||u.return()}finally{if(l)throw c}}}return[3,4];case 4:return[2]}}))}))()},onManualRegistration:function(){U(!1),G()}})):o().createElement(o().Fragment,null)))):o().createElement(o().Fragment,null)))))}},75485:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__timer-component__timerData___FgxzS{height:3rem;font-size:30px;color:#0055a5}","",{version:3,sources:["webpack://./src/shared/ui/timer/timer.component.scss"],names:[],mappings:"AAAA,uDACG,WAAA,CACA,cAAA,CACA,aAAA",sourcesContent:[".timerData{\n height: 3rem;\n font-size: 30px;\n color: #0055a5;\n}"],sourceRoot:""}]),i.locals={timerData:"-esm-dha-workflow__timer-component__timerData___FgxzS"};const l=i},75862:(e,t,n)=>{n.d(t,{XA:()=>o,cn:()=>a,i3:()=>r});var r={NORMAL_PRIORITY_UUID:"bbd99c12-67e9-4381-8b4c-1f231e86f8e2",EMERGENCY_PRIORITY_UUID:"8e86ff12-ec83-41e8-a534-bb410739d880"},a={WAITING_UUID:"89d01aa5-0ab0-4626-934b-37766b4cd779",IN_SERVICE_UUID:"f9cf5768-508f-45de-8d40-eaf6ea3f3b02",COMPLETED_UUID:"a89c1ef8-1350-11df-a1f1-0026b9348838"},o={TRIAGE_SERVICE_UUID:"2d4472e2-d7ab-4430-8e0e-a9ffcd809bf4",CLINICAL_CONSULTATION_SERVICE_UUID:"7f7ec7ad-cdd7-4ed9-bc2e-5c5bd9f065b2",MCH_TRIAGE_SERVICE_UUID:"7e4452bf-f9b7-4977-a21f-1c8b94831bac",MCH_CLINICAL_CONSULTATION_SERVICE_UUID:"0026e273-5f8c-46b5-8bb4-0d8301d50321"}},84497:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__otp-verification-modal__modalVerificationLayout___MST8n{display:flex;flex-direction:column;row-gap:10px;width:100%}.-esm-dha-workflow__otp-verification-modal__sectionHeader___g62oo{display:flex;flex-direction:column;column-gap:5px;margin-top:5px;margin-bottom:5px}.-esm-dha-workflow__otp-verification-modal__otpSection___R\\+cLH{display:flex;flex-direction:row;width:100%;column-gap:15px}.-esm-dha-workflow__otp-verification-modal__otpForm___6EDu\\+{display:flex;flex-direction:column;width:50%;row-gap:15px}.-esm-dha-workflow__otp-verification-modal__otpTimer___ckBNm{display:flex;flex-direction:column;width:50%;padding-top:6%}","",{version:3,sources:["webpack://./src/registry/modal/otp-verification-modal/otp-verification-modal.scss"],names:[],mappings:"AAAA,4EACE,YAAA,CACA,qBAAA,CACA,YAAA,CACA,UAAA,CAEF,kEACE,YAAA,CACA,qBAAA,CACA,cAAA,CACA,cAAA,CACA,iBAAA,CAEF,gEACE,YAAA,CACA,kBAAA,CACA,UAAA,CACA,eAAA,CAEF,6DACE,YAAA,CACA,qBAAA,CACA,SAAA,CACA,YAAA,CAEF,6DACE,YAAA,CACA,qBAAA,CACA,SAAA,CACA,cAAA",sourcesContent:[".modalVerificationLayout {\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n width: 100%;\n}\n.sectionHeader{\n display: flex;\n flex-direction: column;\n column-gap: 5px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n.otpSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 15px;\n}\n.otpForm{\n display: flex;\n flex-direction: column;\n width: 50%;\n row-gap: 15px;\n}\n.otpTimer{\n display: flex;\n flex-direction: column;\n width: 50%;\n padding-top: 6%;\n}"],sourceRoot:""}]),i.locals={modalVerificationLayout:"-esm-dha-workflow__otp-verification-modal__modalVerificationLayout___MST8n",sectionHeader:"-esm-dha-workflow__otp-verification-modal__sectionHeader___g62oo",otpSection:"-esm-dha-workflow__otp-verification-modal__otpSection___R+cLH",otpForm:"-esm-dha-workflow__otp-verification-modal__otpForm___6EDu+",otpTimer:"-esm-dha-workflow__otp-verification-modal__otpTimer___ckBNm"};const l=i},86575:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(72996),a=n.n(r),o=n(70159),i=n.n(o)()(a());i.push([e.id,".-esm-dha-workflow__client-details-modal__clientDetailsLayout___r5WF\\+{display:flex;flex-direction:column;width:100%;row-gap:5px}.-esm-dha-workflow__client-details-modal__sectionHeader___lH-gL{display:flex;flex-direction:column;row-gap:5px;margin-top:5px;margin-bottom:10px}.-esm-dha-workflow__client-details-modal__sectionContent___QDFT7{display:flex;flex-direction:column;row-gap:5px}.-esm-dha-workflow__client-details-modal__actionSection___okVDp{display:flex;flex-direction:row;width:100%;column-gap:5px}.-esm-dha-workflow__client-details-modal__btnContainer___ETNEk{margin-top:2px;margin-bottom:2px}","",{version:3,sources:["webpack://./src/registry/modal/client-details-modal/client-details-modal.scss"],names:[],mappings:"AAAA,uEACI,YAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CAEJ,gEACI,YAAA,CACA,qBAAA,CACA,WAAA,CACA,cAAA,CACA,kBAAA,CAEJ,iEACI,YAAA,CACA,qBAAA,CACA,WAAA,CAEJ,gEACI,YAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA,CAEJ,+DACI,cAAA,CACA,iBAAA",sourcesContent:[".clientDetailsLayout{\n display: flex;\n flex-direction: column;\n width: 100%;\n row-gap: 5px;\n}\n.sectionHeader{\n display: flex;\n flex-direction: column;\n row-gap: 5px;\n margin-top: 5px;\n margin-bottom: 10px;\n}\n.sectionContent{\n display: flex;\n flex-direction: column;\n row-gap: 5px;\n}\n.actionSection{\n display: flex;\n flex-direction: row;\n width: 100%;\n column-gap: 5px;\n}\n.btnContainer{\n margin-top: 2px;\n margin-bottom: 2px;\n}"],sourceRoot:""}]),i.locals={clientDetailsLayout:"-esm-dha-workflow__client-details-modal__clientDetailsLayout___r5WF+",sectionHeader:"-esm-dha-workflow__client-details-modal__sectionHeader___lH-gL",sectionContent:"-esm-dha-workflow__client-details-modal__sectionContent___QDFT7",actionSection:"-esm-dha-workflow__client-details-modal__actionSection___okVDp",btnContainer:"-esm-dha-workflow__client-details-modal__btnContainer___ETNEk"};const l=i}}]);
|