@ampath/esm-patient-registration-app 9.2.0-next.18 → 9.2.0-next.20
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/1453.js +1 -0
- package/dist/1453.js.map +1 -0
- package/dist/4300.js +1 -1
- package/dist/5365.js +2 -0
- package/dist/5365.js.map +1 -0
- package/dist/6168.js +1 -0
- package/dist/6168.js.map +1 -0
- package/dist/6583.js +1 -0
- package/dist/6583.js.map +1 -0
- package/dist/7821.js +1 -1
- package/dist/8414.js +1 -1
- package/dist/8414.js.map +1 -1
- package/dist/8487.js +1 -0
- package/dist/8487.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-patient-registration-app.js +1 -1
- package/dist/openmrs-esm-patient-registration-app.js.buildmanifest.json +129 -129
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/patient-registration/client-registry/client-registry-search.component.tsx +9 -48
- package/src/patient-registration/client-registry/client-registry.resource.ts +8 -29
- package/src/patient-registration/client-registry/constants/civil-status.ts +29 -0
- package/src/patient-registration/client-registry/constants/person-attribute-types.ts +21 -0
- package/src/patient-registration/client-registry/existing-client/client-dependants-comparison/client-dependants-comparison.component.tsx +26 -0
- package/src/patient-registration/client-registry/existing-client/client-dependants-comparison/dependant-comparison-rows.component.tsx +153 -0
- package/src/patient-registration/client-registry/existing-client/client-details-comparison/client-details-comparison.component.tsx +181 -0
- package/src/patient-registration/client-registry/existing-client/client-details-comparison/comparison-table-row.component.tsx +42 -0
- package/src/patient-registration/client-registry/existing-client/client-registry-verification-tag.component.tsx +54 -0
- package/src/patient-registration/client-registry/existing-client/existing-client-tab.component.tsx +85 -0
- package/src/patient-registration/client-registry/existing-client/existing-client.resource.ts +78 -0
- package/src/patient-registration/client-registry/existing-client/mapper-utils.ts +419 -0
- package/src/patient-registration/{client-registry-search/client-registry.types.ts → client-registry/existing-client/types/index.ts} +91 -149
- package/src/patient-registration/client-registry/hie-client-adapter.ts +289 -1
- package/src/patient-registration/client-registry/mock-client.ts +627 -0
- package/src/patient-registration/client-registry/{client-dependants → new-client/client-dependants}/list/client-depandants.component.tsx +1 -1
- package/src/patient-registration/client-registry/{client-details → new-client/client-details}/client-details.tsx +2 -2
- package/src/patient-registration/client-registry/new-client/new-client-registration/new-client-registration.scss +25 -0
- package/src/patient-registration/client-registry/new-client/new-client-registration/new-client-registration.tsx +272 -0
- package/src/patient-registration/client-registry/new-client/new-client-tab.component.tsx +32 -0
- package/src/patient-registration/client-registry/new-client/registration-form-data.ts +251 -0
- package/src/patient-registration/client-registry/types/index.ts +324 -6
- package/src/patient-registration/client-registry-search/client-registry-dependant-details.component.tsx +1 -1
- package/src/patient-registration/client-registry-search/client-registry-details.component.tsx +1 -1
- package/src/patient-registration/client-registry-search/client-registry-patient-details.component.tsx +1 -1
- package/src/patient-registration/client-registry-search/client-registry-search.component.tsx +1 -1
- package/src/patient-registration/client-registry-search/client-registry-verification-tag.component.tsx +1 -1
- package/src/patient-registration/client-registry-search/client-registry.resource.ts +16 -3
- package/src/patient-registration/client-registry-search/map-client-registry-to-form-utils.ts +1 -1
- package/src/patient-registration/patient-registration.component.tsx +1 -0
- package/src/widgets/client-registry-verification.modal.tsx +13 -0
- package/translations/en.json +1 -0
- package/dist/4395.js +0 -1
- package/dist/4395.js.map +0 -1
- package/dist/5239.js +0 -2
- package/dist/5239.js.map +0 -1
- package/dist/6741.js +0 -1
- package/dist/6741.js.map +0 -1
- package/dist/8882.js +0 -1
- package/dist/8882.js.map +0 -1
- package/dist/9898.js +0 -1
- package/dist/9898.js.map +0 -1
- /package/dist/{5239.js.LICENSE.txt → 5365.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var _ampath_esm_patient_registration_app;(()=>{"use strict";var e,r,t,n,a,o,i,l,s,u,f,p,d,h,c,m,v,g,b,y,w,_={3174:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(3144),t.e(2498),t.e(1343),t.e(7243),t.e(7821)]).then(()=>()=>t(87821))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>a,init:()=>o})}},P={};function S(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,loaded:!1,exports:{}};return _[e].call(t.exports,t,t.exports,S),t.loaded=!0,t.exports}S.m=_,S.c=P,S.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return S.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,S.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var a=Object.create(null);S.r(a);var o={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(e=>o[e]=()=>t[e]);return o.default=()=>t,S.d(a,o),a},S.d=(e,r)=>{for(var t in r)S.o(r,t)&&!S.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce((r,t)=>(S.f[t](e,r),r),[])),S.u=e=>e+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@ampath/esm-patient-registration-app:",S.l=(e,r,a,o)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==a)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var f=s[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+a){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,S.nc&&i.setAttribute("nonce",S.nc),i.setAttribute("data-webpack",n+a),i.src=e),t[e]=[r];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),l&&document.head.appendChild(i)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{S.S={};var e={},r={};S.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];S.o(S.S,t)||(S.S[t]={});var o=S.S[t],i="@ampath/esm-patient-registration-app",l=(e,r,t,n)=>{var a=o[e]=o[e]||{},l=a[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(a[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3444",()=>Promise.all([S.e(
|
|
1
|
+
var _ampath_esm_patient_registration_app;(()=>{"use strict";var e,r,t,n,a,o,i,l,s,u,f,p,d,h,c,m,v,g,b,y,w,_={3174:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(3144),t.e(2498),t.e(1343),t.e(7243),t.e(7821)]).then(()=>()=>t(87821))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>a,init:()=>o})}},P={};function S(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,loaded:!1,exports:{}};return _[e].call(t.exports,t,t.exports,S),t.loaded=!0,t.exports}S.m=_,S.c=P,S.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return S.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,S.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var a=Object.create(null);S.r(a);var o={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach(e=>o[e]=()=>t[e]);return o.default=()=>t,S.d(a,o),a},S.d=(e,r)=>{for(var t in r)S.o(r,t)&&!S.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce((r,t)=>(S.f[t](e,r),r),[])),S.u=e=>e+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@ampath/esm-patient-registration-app:",S.l=(e,r,a,o)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==a)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var f=s[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+a){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,S.nc&&i.setAttribute("nonce",S.nc),i.setAttribute("data-webpack",n+a),i.src=e),t[e]=[r];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),l&&document.head.appendChild(i)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{S.S={};var e={},r={};S.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];S.o(S.S,t)||(S.S[t]={});var o=S.S[t],i="@ampath/esm-patient-registration-app",l=(e,r,t,n)=>{var a=o[e]=o[e]||{},l=a[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(a[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","8.0.1-pre.3444",()=>Promise.all([S.e(8487),S.e(3144),S.e(5365),S.e(2498),S.e(1343),S.e(5434),S.e(2086),S.e(7243),S.e(8394)]).then(()=>()=>S(15365))),l("dayjs","1.11.13",()=>S.e(3464).then(()=>()=>S(23464))),l("react-i18next","16.0.0",()=>Promise.all([S.e(6336),S.e(1343)]).then(()=>()=>S(16336))),l("react-router-dom","6.30.1",()=>Promise.all([S.e(3144),S.e(2913),S.e(1343)]).then(()=>()=>S(52913))),l("react","18.3.1",()=>S.e(4041).then(()=>()=>S(14041))),l("swr/_internal","2.2.5",()=>Promise.all([S.e(2372),S.e(1343)]).then(()=>()=>S(42372))),l("swr/immutable","2.2.5",()=>Promise.all([S.e(1343),S.e(5434),S.e(7495)]).then(()=>()=>S(29876))),l("swr/infinite","2.2.5",()=>Promise.all([S.e(1343),S.e(5434),S.e(89)]).then(()=>()=>S(52470)))),e[t]=s.length?Promise.all(s).then(()=>e[t]=1):1}}})(),(()=>{var e;S.g.importScripts&&(e=S.g.location+"");var r=S.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),S.p=e})(),a=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},o=(e,r)=>{e=a(e),r=a(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],o=(typeof n)[0];if(t>=r.length)return"u"==o;var i=r[t],l=(typeof i)[0];if(o!=l)return"o"==o&&"n"==l||"s"==l||"u"==o;if("o"!=o&&"u"!=o&&n!=i)return n<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var o=[];for(a=1;a<e.length;a++){var l=e[a];o.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?o.pop()+" "+o.pop():i(l))}return s();function s(){return o.pop().replace(/^\((.+)\)$/,"$1")}},l=(e,r)=>{if(0 in e){r=a(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var o=0,i=1,s=!0;;i++,o++){var u,f,p=i<e.length?(typeof e[i])[0]:"";if(o>=r.length||"o"==(f=(typeof(u=r[o]))[0]))return!s||("u"==p?i>t&&!n:""==p!=n);if("u"==f){if(!s||"u"!=p)return!1}else if(s)if(p==f)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(s=!1)}else if("s"!=p&&"n"!=p){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||f<p!=n)return!1;s=!1}else"s"!=p&&"n"!=p&&(s=!1,i--)}}var d=[],h=d.pop.bind(d);for(o=1;o<e.length;o++){var c=e[o];d.push(1==c?h()|h():2==c?h()&h():c?l(c,r):!h())}return!!h()},s=(e,r)=>e&&S.o(e,r),u=e=>(e.loaded=1,e.get()),f=e=>Object.keys(e).reduce((r,t)=>(e[t].eager&&(r[t]=e[t]),r),{}),p=(e,r,t)=>{var n=t?f(e[r]):e[r];return Object.keys(n).reduce((e,r)=>!e||!n[e].loaded&&o(e,r)?r:e,0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",h=e=>{throw new Error(e)},c=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,a,o){var i=S.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,S.S[r],t,!1,a,o)):e(r,S.S[r],t,n,a,o)})((e,r,t,n,a,o)=>{if(!s(r,t))return m(e,t,o);var i=p(r,t,n);return l(a,i)||c(d(r,t,i,a)),u(r[t][i])}),g={},b={1343:()=>v("default","react",!1,[1,18],()=>S.e(4041).then(()=>()=>S(14041))),55434:()=>v("default","swr/_internal",!1,[1,2],()=>S.e(2372).then(()=>()=>S(42372))),8877:()=>v("default","react-router-dom",!1,[1,6],()=>S.e(2913).then(()=>()=>S(52913))),88010:()=>v("default","swr/immutable",!1,[1,2],()=>S.e(9876).then(()=>()=>S(29876))),46372:()=>v("default","dayjs",!1,[1,1],()=>S.e(3464).then(()=>()=>S(23464))),54440:()=>v("default","@openmrs/esm-framework",!1,[1,8],()=>Promise.all([S.e(8487),S.e(5365),S.e(5434),S.e(2086),S.e(8394)]).then(()=>()=>S(15365))),72339:()=>v("default","react-i18next",!1,[1,16],()=>S.e(6336).then(()=>()=>S(16336))),98394:()=>v("default","swr/infinite",!1,[1,2],()=>S.e(2470).then(()=>()=>S(52470)))},y={1343:[1343],2086:[8877,88010],5434:[55434],7243:[46372,54440,72339],8394:[98394]},w={},S.f.consumes=(e,r)=>{S.o(y,e)&&y[e].forEach(e=>{if(S.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,S.m[e]=t=>{delete S.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],S.m[e]=t=>{throw delete S.c[e],r}};try{var a=b[e]();a.then?r.push(g[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}})},(()=>{var e={5898:0};S.f.j=(r,t)=>{var n=S.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^((13|72)43|2086|5434|8394)$/.test(r))e[r]=0;else{var a=new Promise((t,a)=>n=e[r]=[t,a]);t.push(n[2]=a);var o=S.p+S.u(r),i=new Error;S.l(o,t=>{if(S.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,l]=t,s=0;if(o.some(r=>0!==e[r])){for(n in i)S.o(i,n)&&(S.m[n]=i[n]);l&&l(S)}for(r&&r(t);s<o.length;s++)a=o[s],S.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=globalThis.webpackChunk_ampath_esm_patient_registration_app=globalThis.webpackChunk_ampath_esm_patient_registration_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),S.nc=void 0;var j=S(3174);_ampath_esm_patient_registration_app=j})();
|
|
@@ -177,6 +177,31 @@
|
|
|
177
177
|
"hash": "8015d68cc6468b4f",
|
|
178
178
|
"childrenByOrder": {}
|
|
179
179
|
},
|
|
180
|
+
{
|
|
181
|
+
"rendered": true,
|
|
182
|
+
"initial": false,
|
|
183
|
+
"entry": false,
|
|
184
|
+
"recorded": false,
|
|
185
|
+
"reason": "split chunk (cache group: default)",
|
|
186
|
+
"size": 254257,
|
|
187
|
+
"sizes": {
|
|
188
|
+
"javascript": 254257
|
|
189
|
+
},
|
|
190
|
+
"names": [],
|
|
191
|
+
"idHints": [],
|
|
192
|
+
"runtime": [
|
|
193
|
+
"@ampath/esm-patient-registration-app",
|
|
194
|
+
"main"
|
|
195
|
+
],
|
|
196
|
+
"files": [
|
|
197
|
+
"1453.js"
|
|
198
|
+
],
|
|
199
|
+
"auxiliaryFiles": [
|
|
200
|
+
"1453.js.map"
|
|
201
|
+
],
|
|
202
|
+
"hash": "383f39924fb660d3",
|
|
203
|
+
"childrenByOrder": {}
|
|
204
|
+
},
|
|
180
205
|
{
|
|
181
206
|
"rendered": false,
|
|
182
207
|
"initial": false,
|
|
@@ -539,9 +564,9 @@
|
|
|
539
564
|
"initial": false,
|
|
540
565
|
"entry": false,
|
|
541
566
|
"recorded": false,
|
|
542
|
-
"size":
|
|
567
|
+
"size": 6247,
|
|
543
568
|
"sizes": {
|
|
544
|
-
"javascript":
|
|
569
|
+
"javascript": 6247
|
|
545
570
|
},
|
|
546
571
|
"names": [],
|
|
547
572
|
"idHints": [],
|
|
@@ -553,7 +578,7 @@
|
|
|
553
578
|
"4300.js"
|
|
554
579
|
],
|
|
555
580
|
"auxiliaryFiles": [],
|
|
556
|
-
"hash": "
|
|
581
|
+
"hash": "1d71ecd05e3d8109",
|
|
557
582
|
"childrenByOrder": {}
|
|
558
583
|
},
|
|
559
584
|
{
|
|
@@ -578,30 +603,6 @@
|
|
|
578
603
|
"hash": "93419d8f25067437",
|
|
579
604
|
"childrenByOrder": {}
|
|
580
605
|
},
|
|
581
|
-
{
|
|
582
|
-
"rendered": true,
|
|
583
|
-
"initial": false,
|
|
584
|
-
"entry": false,
|
|
585
|
-
"recorded": false,
|
|
586
|
-
"size": 53431,
|
|
587
|
-
"sizes": {
|
|
588
|
-
"javascript": 53431
|
|
589
|
-
},
|
|
590
|
-
"names": [],
|
|
591
|
-
"idHints": [],
|
|
592
|
-
"runtime": [
|
|
593
|
-
"@ampath/esm-patient-registration-app",
|
|
594
|
-
"main"
|
|
595
|
-
],
|
|
596
|
-
"files": [
|
|
597
|
-
"4395.js"
|
|
598
|
-
],
|
|
599
|
-
"auxiliaryFiles": [
|
|
600
|
-
"4395.js.map"
|
|
601
|
-
],
|
|
602
|
-
"hash": "3c7d9adcd5a22b91",
|
|
603
|
-
"childrenByOrder": {}
|
|
604
|
-
},
|
|
605
606
|
{
|
|
606
607
|
"rendered": true,
|
|
607
608
|
"initial": false,
|
|
@@ -719,26 +720,21 @@
|
|
|
719
720
|
"initial": false,
|
|
720
721
|
"entry": false,
|
|
721
722
|
"recorded": false,
|
|
722
|
-
"
|
|
723
|
-
"size": 4421473,
|
|
723
|
+
"size": 6021,
|
|
724
724
|
"sizes": {
|
|
725
|
-
"javascript":
|
|
725
|
+
"javascript": 6021
|
|
726
726
|
},
|
|
727
727
|
"names": [],
|
|
728
|
-
"idHints": [
|
|
729
|
-
"vendors"
|
|
730
|
-
],
|
|
728
|
+
"idHints": [],
|
|
731
729
|
"runtime": [
|
|
732
730
|
"@ampath/esm-patient-registration-app",
|
|
733
731
|
"main"
|
|
734
732
|
],
|
|
735
733
|
"files": [
|
|
736
|
-
"
|
|
737
|
-
],
|
|
738
|
-
"auxiliaryFiles": [
|
|
739
|
-
"5239.js.map"
|
|
734
|
+
"5241.js"
|
|
740
735
|
],
|
|
741
|
-
"
|
|
736
|
+
"auxiliaryFiles": [],
|
|
737
|
+
"hash": "11d6c538ff8696d5",
|
|
742
738
|
"childrenByOrder": {}
|
|
743
739
|
},
|
|
744
740
|
{
|
|
@@ -746,21 +742,26 @@
|
|
|
746
742
|
"initial": false,
|
|
747
743
|
"entry": false,
|
|
748
744
|
"recorded": false,
|
|
749
|
-
"
|
|
745
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
746
|
+
"size": 4341505,
|
|
750
747
|
"sizes": {
|
|
751
|
-
"javascript":
|
|
748
|
+
"javascript": 4341505
|
|
752
749
|
},
|
|
753
750
|
"names": [],
|
|
754
|
-
"idHints": [
|
|
751
|
+
"idHints": [
|
|
752
|
+
"vendors"
|
|
753
|
+
],
|
|
755
754
|
"runtime": [
|
|
756
755
|
"@ampath/esm-patient-registration-app",
|
|
757
756
|
"main"
|
|
758
757
|
],
|
|
759
758
|
"files": [
|
|
760
|
-
"
|
|
759
|
+
"5365.js"
|
|
761
760
|
],
|
|
762
|
-
"auxiliaryFiles": [
|
|
763
|
-
|
|
761
|
+
"auxiliaryFiles": [
|
|
762
|
+
"5365.js.map"
|
|
763
|
+
],
|
|
764
|
+
"hash": "c3426e56fab0c62a",
|
|
764
765
|
"childrenByOrder": {}
|
|
765
766
|
},
|
|
766
767
|
{
|
|
@@ -852,7 +853,7 @@
|
|
|
852
853
|
"auxiliaryFiles": [
|
|
853
854
|
"openmrs-esm-patient-registration-app.js.map"
|
|
854
855
|
],
|
|
855
|
-
"hash": "
|
|
856
|
+
"hash": "322891228c4392f2",
|
|
856
857
|
"childrenByOrder": {}
|
|
857
858
|
},
|
|
858
859
|
{
|
|
@@ -877,6 +878,30 @@
|
|
|
877
878
|
"hash": "4e6f3dcda3eb6b92",
|
|
878
879
|
"childrenByOrder": {}
|
|
879
880
|
},
|
|
881
|
+
{
|
|
882
|
+
"rendered": true,
|
|
883
|
+
"initial": false,
|
|
884
|
+
"entry": false,
|
|
885
|
+
"recorded": false,
|
|
886
|
+
"size": 622528,
|
|
887
|
+
"sizes": {
|
|
888
|
+
"javascript": 622528
|
|
889
|
+
},
|
|
890
|
+
"names": [],
|
|
891
|
+
"idHints": [],
|
|
892
|
+
"runtime": [
|
|
893
|
+
"@ampath/esm-patient-registration-app",
|
|
894
|
+
"main"
|
|
895
|
+
],
|
|
896
|
+
"files": [
|
|
897
|
+
"6168.js"
|
|
898
|
+
],
|
|
899
|
+
"auxiliaryFiles": [
|
|
900
|
+
"6168.js.map"
|
|
901
|
+
],
|
|
902
|
+
"hash": "5073900ba4bcb703",
|
|
903
|
+
"childrenByOrder": {}
|
|
904
|
+
},
|
|
880
905
|
{
|
|
881
906
|
"rendered": true,
|
|
882
907
|
"initial": false,
|
|
@@ -955,9 +980,9 @@
|
|
|
955
980
|
"initial": false,
|
|
956
981
|
"entry": false,
|
|
957
982
|
"recorded": false,
|
|
958
|
-
"size":
|
|
983
|
+
"size": 3883,
|
|
959
984
|
"sizes": {
|
|
960
|
-
"javascript":
|
|
985
|
+
"javascript": 3883
|
|
961
986
|
},
|
|
962
987
|
"names": [],
|
|
963
988
|
"idHints": [],
|
|
@@ -966,10 +991,12 @@
|
|
|
966
991
|
"main"
|
|
967
992
|
],
|
|
968
993
|
"files": [
|
|
969
|
-
"
|
|
994
|
+
"6583.js"
|
|
970
995
|
],
|
|
971
|
-
"auxiliaryFiles": [
|
|
972
|
-
|
|
996
|
+
"auxiliaryFiles": [
|
|
997
|
+
"6583.js.map"
|
|
998
|
+
],
|
|
999
|
+
"hash": "daeadc8b20933afa",
|
|
973
1000
|
"childrenByOrder": {}
|
|
974
1001
|
},
|
|
975
1002
|
{
|
|
@@ -977,26 +1004,21 @@
|
|
|
977
1004
|
"initial": false,
|
|
978
1005
|
"entry": false,
|
|
979
1006
|
"recorded": false,
|
|
980
|
-
"
|
|
981
|
-
"size": 80564,
|
|
1007
|
+
"size": 6547,
|
|
982
1008
|
"sizes": {
|
|
983
|
-
"javascript":
|
|
1009
|
+
"javascript": 6547
|
|
984
1010
|
},
|
|
985
1011
|
"names": [],
|
|
986
|
-
"idHints": [
|
|
987
|
-
"vendors"
|
|
988
|
-
],
|
|
1012
|
+
"idHints": [],
|
|
989
1013
|
"runtime": [
|
|
990
1014
|
"@ampath/esm-patient-registration-app",
|
|
991
1015
|
"main"
|
|
992
1016
|
],
|
|
993
1017
|
"files": [
|
|
994
|
-
"
|
|
995
|
-
],
|
|
996
|
-
"auxiliaryFiles": [
|
|
997
|
-
"6687.js.map"
|
|
1018
|
+
"6679.js"
|
|
998
1019
|
],
|
|
999
|
-
"
|
|
1020
|
+
"auxiliaryFiles": [],
|
|
1021
|
+
"hash": "6a2dc2d473cfe02a",
|
|
1000
1022
|
"childrenByOrder": {}
|
|
1001
1023
|
},
|
|
1002
1024
|
{
|
|
@@ -1004,23 +1026,26 @@
|
|
|
1004
1026
|
"initial": false,
|
|
1005
1027
|
"entry": false,
|
|
1006
1028
|
"recorded": false,
|
|
1007
|
-
"
|
|
1029
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
1030
|
+
"size": 80564,
|
|
1008
1031
|
"sizes": {
|
|
1009
|
-
"javascript":
|
|
1032
|
+
"javascript": 80564
|
|
1010
1033
|
},
|
|
1011
1034
|
"names": [],
|
|
1012
|
-
"idHints": [
|
|
1035
|
+
"idHints": [
|
|
1036
|
+
"vendors"
|
|
1037
|
+
],
|
|
1013
1038
|
"runtime": [
|
|
1014
1039
|
"@ampath/esm-patient-registration-app",
|
|
1015
1040
|
"main"
|
|
1016
1041
|
],
|
|
1017
1042
|
"files": [
|
|
1018
|
-
"
|
|
1043
|
+
"6687.js"
|
|
1019
1044
|
],
|
|
1020
1045
|
"auxiliaryFiles": [
|
|
1021
|
-
"
|
|
1046
|
+
"6687.js.map"
|
|
1022
1047
|
],
|
|
1023
|
-
"hash": "
|
|
1048
|
+
"hash": "09088578b9bade84",
|
|
1024
1049
|
"childrenByOrder": {}
|
|
1025
1050
|
},
|
|
1026
1051
|
{
|
|
@@ -1156,7 +1181,7 @@
|
|
|
1156
1181
|
],
|
|
1157
1182
|
"files": [],
|
|
1158
1183
|
"auxiliaryFiles": [],
|
|
1159
|
-
"hash": "
|
|
1184
|
+
"hash": "81a68e9d08d711a0",
|
|
1160
1185
|
"childrenByOrder": {}
|
|
1161
1186
|
},
|
|
1162
1187
|
{
|
|
@@ -1210,9 +1235,9 @@
|
|
|
1210
1235
|
"initial": false,
|
|
1211
1236
|
"entry": false,
|
|
1212
1237
|
"recorded": false,
|
|
1213
|
-
"size":
|
|
1238
|
+
"size": 145351,
|
|
1214
1239
|
"sizes": {
|
|
1215
|
-
"javascript":
|
|
1240
|
+
"javascript": 145351
|
|
1216
1241
|
},
|
|
1217
1242
|
"names": [],
|
|
1218
1243
|
"idHints": [],
|
|
@@ -1225,7 +1250,7 @@
|
|
|
1225
1250
|
"auxiliaryFiles": [
|
|
1226
1251
|
"7821.js.map"
|
|
1227
1252
|
],
|
|
1228
|
-
"hash": "
|
|
1253
|
+
"hash": "1a4a403e9b256933",
|
|
1229
1254
|
"childrenByOrder": {}
|
|
1230
1255
|
},
|
|
1231
1256
|
{
|
|
@@ -1298,9 +1323,9 @@
|
|
|
1298
1323
|
"initial": false,
|
|
1299
1324
|
"entry": false,
|
|
1300
1325
|
"recorded": false,
|
|
1301
|
-
"size":
|
|
1326
|
+
"size": 1240,
|
|
1302
1327
|
"sizes": {
|
|
1303
|
-
"javascript":
|
|
1328
|
+
"javascript": 1240
|
|
1304
1329
|
},
|
|
1305
1330
|
"names": [],
|
|
1306
1331
|
"idHints": [],
|
|
@@ -1314,7 +1339,7 @@
|
|
|
1314
1339
|
"auxiliaryFiles": [
|
|
1315
1340
|
"8414.js.map"
|
|
1316
1341
|
],
|
|
1317
|
-
"hash": "
|
|
1342
|
+
"hash": "ab4e9ca64444c78d",
|
|
1318
1343
|
"childrenByOrder": {}
|
|
1319
1344
|
},
|
|
1320
1345
|
{
|
|
@@ -1341,6 +1366,33 @@
|
|
|
1341
1366
|
"hash": "24d788ed851b0a74",
|
|
1342
1367
|
"childrenByOrder": {}
|
|
1343
1368
|
},
|
|
1369
|
+
{
|
|
1370
|
+
"rendered": true,
|
|
1371
|
+
"initial": false,
|
|
1372
|
+
"entry": false,
|
|
1373
|
+
"recorded": false,
|
|
1374
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
1375
|
+
"size": 106175,
|
|
1376
|
+
"sizes": {
|
|
1377
|
+
"javascript": 106175
|
|
1378
|
+
},
|
|
1379
|
+
"names": [],
|
|
1380
|
+
"idHints": [
|
|
1381
|
+
"vendors"
|
|
1382
|
+
],
|
|
1383
|
+
"runtime": [
|
|
1384
|
+
"@ampath/esm-patient-registration-app",
|
|
1385
|
+
"main"
|
|
1386
|
+
],
|
|
1387
|
+
"files": [
|
|
1388
|
+
"8487.js"
|
|
1389
|
+
],
|
|
1390
|
+
"auxiliaryFiles": [
|
|
1391
|
+
"8487.js.map"
|
|
1392
|
+
],
|
|
1393
|
+
"hash": "ac29863640da3c3e",
|
|
1394
|
+
"childrenByOrder": {}
|
|
1395
|
+
},
|
|
1344
1396
|
{
|
|
1345
1397
|
"rendered": true,
|
|
1346
1398
|
"initial": false,
|
|
@@ -1368,10 +1420,10 @@
|
|
|
1368
1420
|
"initial": true,
|
|
1369
1421
|
"entry": true,
|
|
1370
1422
|
"recorded": false,
|
|
1371
|
-
"size":
|
|
1423
|
+
"size": 2686905,
|
|
1372
1424
|
"sizes": {
|
|
1373
1425
|
"consume-shared": 168,
|
|
1374
|
-
"javascript":
|
|
1426
|
+
"javascript": 2664369,
|
|
1375
1427
|
"share-init": 336,
|
|
1376
1428
|
"runtime": 22032
|
|
1377
1429
|
},
|
|
@@ -1388,32 +1440,7 @@
|
|
|
1388
1440
|
"auxiliaryFiles": [
|
|
1389
1441
|
"main.js.map"
|
|
1390
1442
|
],
|
|
1391
|
-
"hash": "
|
|
1392
|
-
"childrenByOrder": {}
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
"rendered": true,
|
|
1396
|
-
"initial": false,
|
|
1397
|
-
"entry": false,
|
|
1398
|
-
"recorded": false,
|
|
1399
|
-
"reason": "split chunk (cache group: default)",
|
|
1400
|
-
"size": 116185,
|
|
1401
|
-
"sizes": {
|
|
1402
|
-
"javascript": 116185
|
|
1403
|
-
},
|
|
1404
|
-
"names": [],
|
|
1405
|
-
"idHints": [],
|
|
1406
|
-
"runtime": [
|
|
1407
|
-
"@ampath/esm-patient-registration-app",
|
|
1408
|
-
"main"
|
|
1409
|
-
],
|
|
1410
|
-
"files": [
|
|
1411
|
-
"8882.js"
|
|
1412
|
-
],
|
|
1413
|
-
"auxiliaryFiles": [
|
|
1414
|
-
"8882.js.map"
|
|
1415
|
-
],
|
|
1416
|
-
"hash": "04d2462c0d9d01e6",
|
|
1443
|
+
"hash": "a045cfc08fd05906",
|
|
1417
1444
|
"childrenByOrder": {}
|
|
1418
1445
|
},
|
|
1419
1446
|
{
|
|
@@ -1550,33 +1577,6 @@
|
|
|
1550
1577
|
"hash": "0a0d6aeaf46102cf",
|
|
1551
1578
|
"childrenByOrder": {}
|
|
1552
1579
|
},
|
|
1553
|
-
{
|
|
1554
|
-
"rendered": true,
|
|
1555
|
-
"initial": false,
|
|
1556
|
-
"entry": false,
|
|
1557
|
-
"recorded": false,
|
|
1558
|
-
"reason": "split chunk (cache group: defaultVendors)",
|
|
1559
|
-
"size": 26207,
|
|
1560
|
-
"sizes": {
|
|
1561
|
-
"javascript": 26207
|
|
1562
|
-
},
|
|
1563
|
-
"names": [],
|
|
1564
|
-
"idHints": [
|
|
1565
|
-
"vendors"
|
|
1566
|
-
],
|
|
1567
|
-
"runtime": [
|
|
1568
|
-
"@ampath/esm-patient-registration-app",
|
|
1569
|
-
"main"
|
|
1570
|
-
],
|
|
1571
|
-
"files": [
|
|
1572
|
-
"9898.js"
|
|
1573
|
-
],
|
|
1574
|
-
"auxiliaryFiles": [
|
|
1575
|
-
"9898.js.map"
|
|
1576
|
-
],
|
|
1577
|
-
"hash": "586b7b6b07d21666",
|
|
1578
|
-
"childrenByOrder": {}
|
|
1579
|
-
},
|
|
1580
1580
|
{
|
|
1581
1581
|
"rendered": true,
|
|
1582
1582
|
"initial": false,
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"pages":[{"component":"root","route":"patient-registration","online":true,"offline":true},{"component":"editPatient","routeRegex":"patient\\/([a-zA-Z0-9\\-]+)\\/edit","online":true,"offline":true}],"extensions":[{"component":"addPatientLink","name":"add-patient-action","slot":"top-nav-actions-slot","online":true,"offline":true,"order":30},{"component":"patientPhotoExtension","name":"patient-photo-widget","slot":"patient-photo-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-actions-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-search-actions-slot","online":true,"offline":true},{"component":"clientRegistryVerificationTag","name":"client-registry-verification-tag","slot":"patient-banner-tags-slot","online":true,"offline":true}],"modals":[{"name":"cancel-patient-edit-modal","component":"cancelPatientEditModal"},{"name":"delete-identifier-confirmation-modal","component":"deleteIdentifierConfirmationModal"},{"name":"client-registry-verification-modal","component":"clientRegistryVerificationModal"}],"version":"9.2.0-next.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":">=2.2.0"},"pages":[{"component":"root","route":"patient-registration","online":true,"offline":true},{"component":"editPatient","routeRegex":"patient\\/([a-zA-Z0-9\\-]+)\\/edit","online":true,"offline":true}],"extensions":[{"component":"addPatientLink","name":"add-patient-action","slot":"top-nav-actions-slot","online":true,"offline":true,"order":30},{"component":"patientPhotoExtension","name":"patient-photo-widget","slot":"patient-photo-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-actions-slot","online":true,"offline":true},{"component":"editPatientDetailsButton","name":"edit-patient-details-button","slot":"patient-search-actions-slot","online":true,"offline":true},{"component":"clientRegistryVerificationTag","name":"client-registry-verification-tag","slot":"patient-banner-tags-slot","online":true,"offline":true}],"modals":[{"name":"cancel-patient-edit-modal","component":"cancelPatientEditModal"},{"name":"delete-identifier-confirmation-modal","component":"deleteIdentifierConfirmationModal"},{"name":"client-registry-verification-modal","component":"clientRegistryVerificationModal"}],"version":"9.2.0-next.20"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -63,6 +63,6 @@ export const deleteIdentifierConfirmationModal = getAsyncLifecycle(
|
|
|
63
63
|
);
|
|
64
64
|
|
|
65
65
|
export const clientRegistryVerificationTag = getAsyncLifecycle(
|
|
66
|
-
() => import('./patient-registration/client-registry-
|
|
66
|
+
() => import('./patient-registration/client-registry/existing-client/client-registry-verification-tag.component'),
|
|
67
67
|
options,
|
|
68
68
|
);
|
|
@@ -1,54 +1,32 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
TextInput,
|
|
5
|
-
InlineLoading,
|
|
6
|
-
InlineNotification,
|
|
7
|
-
Dropdown,
|
|
8
|
-
Modal,
|
|
9
|
-
ModalBody,
|
|
10
|
-
Tabs,
|
|
11
|
-
TabList,
|
|
12
|
-
Tab,
|
|
13
|
-
TabPanels,
|
|
14
|
-
TabPanel,
|
|
15
|
-
} from '@carbon/react';
|
|
2
|
+
import { Button, TextInput, InlineLoading, InlineNotification, Dropdown, Modal, ModalBody } from '@carbon/react';
|
|
16
3
|
import { showSnackbar, useSession } from '@openmrs/esm-framework';
|
|
17
4
|
import { useFormikContext } from 'formik';
|
|
18
5
|
import styles from './client-registry-search.scss';
|
|
19
6
|
import { requestCustomOtp, validateCustomOtp, fetchClientRegistryData } from './client-registry.resource';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { type HieClient } from './types';
|
|
23
|
-
import ClientDependantList from './client-dependants/list/client-depandants.component';
|
|
7
|
+
import NewClientTab from './new-client/new-client-tab.component';
|
|
8
|
+
import ExistingClientTab from './existing-client/existing-client-tab.component';
|
|
9
|
+
import { type IdentifierType, type HieClient, IDENTIFIER_TYPES } from './types';
|
|
24
10
|
|
|
25
11
|
export interface ClientRegistryLookupSectionProps {
|
|
26
12
|
onClientVerified?: () => void;
|
|
27
13
|
onModalClose: () => void;
|
|
28
14
|
open: boolean;
|
|
15
|
+
isNewClient: boolean;
|
|
29
16
|
}
|
|
30
17
|
|
|
31
|
-
export type IdentifierType = 'National ID' | 'Alien ID' | 'Passport' | 'Mandate Number' | 'Refugee ID';
|
|
32
|
-
|
|
33
|
-
export const IDENTIFIER_TYPES: IdentifierType[] = [
|
|
34
|
-
'National ID',
|
|
35
|
-
'Alien ID',
|
|
36
|
-
'Passport',
|
|
37
|
-
'Mandate Number',
|
|
38
|
-
'Refugee ID',
|
|
39
|
-
];
|
|
40
|
-
|
|
41
18
|
const ClientRegistryLookupSection: React.FC<ClientRegistryLookupSectionProps> = ({
|
|
42
19
|
onClientVerified,
|
|
43
20
|
open,
|
|
44
21
|
onModalClose,
|
|
22
|
+
isNewClient = true,
|
|
45
23
|
}) => {
|
|
46
24
|
const { setFieldValue } = useFormikContext<any>();
|
|
47
25
|
const [identifierType, setIdentifierType] = useState<IdentifierType>('National ID');
|
|
48
26
|
const [identifierValue, setIdentifierValue] = useState('');
|
|
49
27
|
const [otp, setOtp] = useState('');
|
|
50
28
|
const [otpSent, setOtpSent] = useState(false);
|
|
51
|
-
const [otpVerified, setOtpVerified] = useState(false);
|
|
29
|
+
const [otpVerified, setOtpVerified] = useState<boolean>(false);
|
|
52
30
|
const [loading, setLoading] = useState(false);
|
|
53
31
|
const [sessionId, setSessionId] = useState('');
|
|
54
32
|
const [error, setError] = useState<string>('');
|
|
@@ -177,11 +155,6 @@ const ClientRegistryLookupSection: React.FC<ClientRegistryLookupSectionProps> =
|
|
|
177
155
|
setLoading(false);
|
|
178
156
|
}
|
|
179
157
|
};
|
|
180
|
-
|
|
181
|
-
const useHieData = () => {
|
|
182
|
-
applyClientRegistryMapping(client, setFieldValue);
|
|
183
|
-
onModalClose();
|
|
184
|
-
};
|
|
185
158
|
const registerOnAfyaYangu = () => {
|
|
186
159
|
window.open('https://afyayangu.go.ke/', '_blank');
|
|
187
160
|
};
|
|
@@ -189,7 +162,7 @@ const ClientRegistryLookupSection: React.FC<ClientRegistryLookupSectionProps> =
|
|
|
189
162
|
return (
|
|
190
163
|
<Modal
|
|
191
164
|
open={open}
|
|
192
|
-
size="
|
|
165
|
+
size="md"
|
|
193
166
|
onSecondarySubmit={onModalClose}
|
|
194
167
|
onRequestClose={onModalClose}
|
|
195
168
|
onRequestSubmit={registerOnAfyaYangu}
|
|
@@ -294,19 +267,7 @@ const ClientRegistryLookupSection: React.FC<ClientRegistryLookupSectionProps> =
|
|
|
294
267
|
|
|
295
268
|
{otpVerified && client ? (
|
|
296
269
|
<div className="clientDataSection">
|
|
297
|
-
<
|
|
298
|
-
<TabList contained>
|
|
299
|
-
<Tab>Patient</Tab>
|
|
300
|
-
<Tab>Dependants</Tab>
|
|
301
|
-
</TabList>
|
|
302
|
-
<TabPanels>
|
|
303
|
-
<TabPanel>{client ? <ClientDetails client={client} /> : <></>}</TabPanel>
|
|
304
|
-
<TabPanel>
|
|
305
|
-
{client.dependants ? <ClientDependantList hieDependants={client.dependants} /> : <></>}
|
|
306
|
-
</TabPanel>
|
|
307
|
-
</TabPanels>
|
|
308
|
-
</Tabs>
|
|
309
|
-
<Button onClick={useHieData}>Use Data</Button>
|
|
270
|
+
{isNewClient ? <NewClientTab client={client} /> : <ExistingClientTab hieClient={client} />}
|
|
310
271
|
</div>
|
|
311
272
|
) : (
|
|
312
273
|
<></>
|
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
type ClientRegistrySearchRequest,
|
|
3
|
+
type RequestCustomOtpDto,
|
|
4
|
+
type RequestCustomOtpResponse,
|
|
5
|
+
type ValidateCustomOtpResponse,
|
|
6
|
+
type ValidateHieCustomOtpDto,
|
|
7
|
+
} from './types';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
message: string;
|
|
11
|
-
sessionId: string;
|
|
12
|
-
maskedPhone: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface ValidateHieCustomOtpDto {
|
|
16
|
-
sessionId: string;
|
|
17
|
-
otp: number | string;
|
|
18
|
-
locationUuid: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface ValidateCustomOtpResponse {
|
|
22
|
-
message: string;
|
|
23
|
-
isValid?: boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type ClientRegistrySearchRequest = {
|
|
27
|
-
identificationNumber: string | number;
|
|
28
|
-
identificationType: string;
|
|
29
|
-
locationUuid: string;
|
|
30
|
-
};
|
|
9
|
+
const HIE_BASE_URL = 'https://staging.ampath.or.ke/hie';
|
|
31
10
|
|
|
32
11
|
export type ClientRegistrySearchResponse = any[];
|
|
33
12
|
|