@openmrs/esm-patient-registration-app 4.0.1-pre.621 → 4.0.2-pre.624
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/.turbo/turbo-build.log +32 -32
- package/dist/206.js +1 -1
- package/dist/242.js +1 -1
- package/dist/686.js +1 -1
- package/dist/735.js +1 -1
- package/dist/{103.js → 767.js} +2 -2
- package/dist/{103.js.LICENSE.txt → 767.js.LICENSE.txt} +0 -0
- package/dist/858.js +1 -1
- package/dist/859.js +1 -1
- 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 +39 -39
- package/dist/openmrs-esm-patient-registration-app.old +1 -1
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
1
|
+
[35m@openmrs/esm-patient-registration-app:build[0m: cache hit, replaying output [2mda4ad6e70c630c8e[0m
|
|
2
|
+
[35m@openmrs/esm-patient-registration-app:build: [0massets by chunk 892 KiB (id hint: vendors)
|
|
3
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[33m858.js[39m[22m [1m[33m407 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
4
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[32m767.js[39m[22m 244 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
5
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[32m553.js[39m[22m 95.1 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
6
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[32m854.js[39m[22m 70.2 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
7
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[32m460.js[39m[22m 39 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
8
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[32m100.js[39m[22m 19.6 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
9
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m asset [1m[32m290.js[39m[22m 16.6 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
10
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m+ 13 assets
|
|
11
|
+
[35m@openmrs/esm-patient-registration-app:build: [0morphan modules 3.61 MiB [1m[33m[orphan][39m[22m 617 modules
|
|
12
|
+
[35m@openmrs/esm-patient-registration-app:build: [0mruntime modules 38 KiB 28 modules
|
|
13
|
+
[35m@openmrs/esm-patient-registration-app:build: [0mbuilt modules 3.36 MiB (javascript) 168 bytes (share-init) 168 bytes (consume-shared) [1m[33m[built][39m[22m
|
|
14
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m modules by path [1m../../node_modules/[39m[22m 3.04 MiB 409 modules
|
|
15
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m modules by path [1m./[39m[22m 326 KiB
|
|
16
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m modules by path [1m./src/[39m[22m 323 KiB 23 modules
|
|
17
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m modules by path [1m./translations/[39m[22m 3.13 KiB 2 modules
|
|
18
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m provide-module modules 168 bytes
|
|
19
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m [1mprovide shared module (default) @openmrs/esm-framework@4.0.2 = ../../node_modules/@openmrs/esm-framework/src/internal.ts[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
20
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m + 3 modules
|
|
21
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m consume-shared-module modules 168 bytes
|
|
22
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m [1mconsume shared module (default) @openmrs/esm-framework@^4 (singleton) (fallback: ../../node_modules/@openmrs/esm-framework/src/internal.ts)[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
23
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m [1mconsume shared module (default) react@^18 (singleton) (fallback: ../../node_modules/react/index.js)[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
24
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m + 2 modules
|
|
25
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m [1mcontainer entry[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
26
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m
|
|
27
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m[1m[33mWARNING[39m[22m in [1masset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
|
28
|
+
[35m@openmrs/esm-patient-registration-app:build: [0mThis can impact web performance.
|
|
29
|
+
[35m@openmrs/esm-patient-registration-app:build: [0mAssets:
|
|
30
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m 858.js (407 KiB)[39m[22m
|
|
31
|
+
[35m@openmrs/esm-patient-registration-app:build: [0m
|
|
32
|
+
[35m@openmrs/esm-patient-registration-app:build: [0mwebpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in 112876 ms
|
package/dist/206.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[206],{2553:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(2609),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,".-esm-patient-registration__add-patient-link__slotStyles___ejEWZ{background-color:rgba(0,0,0,0)}",""]),a.locals={slotStyles:"-esm-patient-registration__add-patient-link__slotStyles___ejEWZ"};const o=a},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&a[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},6062:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},i=[],s=0;s<e.length;s++){var c=e[s],l=r.base?c[0]+r.base:c[0],u=o[l]||0,p="".concat(l," ").concat(u);o[l]=u+1;var d=n(p),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var m=a(f,r);r.byIndex=s,t.splice(s,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var o=r(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var s=n(o[i]);t[s].references--}for(var c=r(e,a),l=0;l<o.length;l++){var u=n(o[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=c}}},6793:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7892:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},4036:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},8206:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var r=n(268),a=n.n(r),o=n(
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[206],{2553:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(2609),a=n.n(r)()((function(e){return e[1]}));a.push([e.id,".-esm-patient-registration__add-patient-link__slotStyles___ejEWZ{background-color:rgba(0,0,0,0)}",""]),a.locals={slotStyles:"-esm-patient-registration__add-patient-link__slotStyles___ejEWZ"};const o=a},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(r)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&a[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},6062:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},i=[],s=0;s<e.length;s++){var c=e[s],l=r.base?c[0]+r.base:c[0],u=o[l]||0,p="".concat(l," ").concat(u);o[l]=u+1;var d=n(p),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var m=a(f,r);r.byIndex=s,t.splice(s,0,{identifier:p,updater:m,references:1})}i.push(p)}return i}function a(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,a){var o=r(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var s=n(o[i]);t[s].references--}for(var c=r(e,a),l=0;l<o.length;l++){var u=n(o[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=c}}},6793:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},1173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7892:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},4036:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},8206:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var r=n(268),a=n.n(r),o=n(2767),i=n(5508),s=n(906),c=n(6062),l=n.n(c),u=n(4036),p=n.n(u),d=n(6793),f=n.n(d),m=n(7892),v=n.n(m),h=n(1173),y=n.n(h),_=n(2464),b=n.n(_),g=n(2553),C={};C.styleTagTransform=b(),C.setAttributes=v(),C.insert=f().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=y(),l()(g.Z,C);const S=g.Z&&g.Z.locals?g.Z.locals:void 0;function k(){var e=a().useCallback((function(){return(0,s.navigate)({to:"${openmrsSpaBase}/patient-registration"})}),[]);return a().createElement(o.JMr,{"aria-label":"Add Patient","aria-labelledby":"Add Patient",name:"AddPatientIcon",onClick:e,className:S.slotStyles},a().createElement(i.JT,{size:20}))}}}]);
|
package/dist/242.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[242],{8416:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(2609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__delete-identifier-modal__title___IYrb0{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__delete-identifier-modal__submit___MBdJN{width:250px}.-esm-patient-registration__delete-identifier-modal__submit___MBdJN:hover{cursor:pointer}.-esm-patient-registration__delete-identifier-modal__cancelButton___NJsZ0{width:11.688rem}.-esm-patient-registration__delete-identifier-modal__submitButton___YII8d{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__delete-identifier-modal__infoGrid___nCKmS{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__delete-identifier-modal__label01___n5dqp{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__delete-identifier-modal__productiveHeading02___hEZaw{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__delete-identifier-modal__space05___4OrQd{margin:1rem 0 1rem 0}.-esm-patient-registration__delete-identifier-modal__formContainer___ujX\\+F{display:flex;width:100%}.-esm-patient-registration__delete-identifier-modal__stickyColumn___gXAjk{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__delete-identifier-modal__touchTarget___hEAR9 a:active{color:#161616}.-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt:active{text-decoration:none;color:#161616}.-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__delete-identifier-modal__main___SgZdz{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__delete-identifier-modal__infoGrid___nCKmS{max-width:unset}.-esm-patient-registration__delete-identifier-modal__productiveHeading___J6to9{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-registration__delete-identifier-modal__modalContent___6kx2w{width:100%;background-color:#f4f4f4;padding:1rem}.-esm-patient-registration__delete-identifier-modal__modalSubtitle___jQR\\+L{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-registration__delete-identifier-modal__modalBody___p0O42{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);margin:1rem 0}.-esm-patient-registration__delete-identifier-modal__buttonSet___l8UDX{display:grid;grid-template-columns:1fr 1fr;margin-left:-1rem;margin-right:-1rem;margin-bottom:-1rem}.-esm-patient-registration__delete-identifier-modal__buttonSet___l8UDX>button{max-width:unset !important}",""]),r.locals={title:"-esm-patient-registration__delete-identifier-modal__title___IYrb0",submit:"-esm-patient-registration__delete-identifier-modal__submit___MBdJN",cancelButton:"-esm-patient-registration__delete-identifier-modal__cancelButton___NJsZ0",submitButton:"-esm-patient-registration__delete-identifier-modal__submitButton___YII8d",infoGrid:"-esm-patient-registration__delete-identifier-modal__infoGrid___nCKmS",label01:"-esm-patient-registration__delete-identifier-modal__label01___n5dqp",productiveHeading02:"-esm-patient-registration__delete-identifier-modal__productiveHeading02___hEZaw",space05:"-esm-patient-registration__delete-identifier-modal__space05___4OrQd",formContainer:"-esm-patient-registration__delete-identifier-modal__formContainer___ujX+F",stickyColumn:"-esm-patient-registration__delete-identifier-modal__stickyColumn___gXAjk",touchTarget:"-esm-patient-registration__delete-identifier-modal__touchTarget___hEAR9",linkName:"-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt",main:"-esm-patient-registration__delete-identifier-modal__main___SgZdz",productiveHeading:"-esm-patient-registration__delete-identifier-modal__productiveHeading___J6to9",modalContent:"-esm-patient-registration__delete-identifier-modal__modalContent___6kx2w",modalSubtitle:"-esm-patient-registration__delete-identifier-modal__modalSubtitle___jQR+L",modalBody:"-esm-patient-registration__delete-identifier-modal__modalBody___p0O42",buttonSet:"-esm-patient-registration__delete-identifier-modal__buttonSet___l8UDX"};const a=r},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var d=0;d<e.length;d++){var _=[].concat(e[d]);n&&r[_[0]]||(i&&(_[2]?_[2]="".concat(i," and ").concat(_[2]):_[2]=i),t.push(_))}},t}},6062:e=>{var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var a={},o=[],d=0;d<e.length;d++){var _=e[d],s=n.base?_[0]+n.base:_[0],l=a[s]||0,m="".concat(s," ").concat(l);a[s]=l+1;var c=i(m),p={css:_[1],media:_[2],sourceMap:_[3],supports:_[4],layer:_[5]};if(-1!==c)t[c].references++,t[c].updater(p);else{var f=r(p,n);n.byIndex=d,t.splice(d,0,{identifier:m,updater:f,references:1})}o.push(m)}return o}function r(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,r){var a=n(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var d=i(a[o]);t[d].references--}for(var _=n(e,r),s=0;s<a.length;s++){var l=i(a[s]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=_}}},6793:e=>{var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},1173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7892:(e,t,i)=>{e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},4036:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,r&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var a=i.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5242:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var n=i(268),r=i.n(n),a=i(6062),o=i.n(a),d=i(4036),_=i.n(d),s=i(6793),l=i.n(s),m=i(7892),c=i.n(m),p=i(1173),f=i.n(p),u=i(2464),g=i.n(u),h=i(8416),v={};v.styleTagTransform=g(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=_(),v.insertStyleElement=f(),o()(h.Z,v);const b=h.Z&&h.Z.locals?h.Z.locals:void 0;var y=i(4924),w=i(
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[242],{8416:(e,t,i)=>{i.d(t,{Z:()=>a});var n=i(2609),r=i.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__delete-identifier-modal__title___IYrb0{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__delete-identifier-modal__submit___MBdJN{width:250px}.-esm-patient-registration__delete-identifier-modal__submit___MBdJN:hover{cursor:pointer}.-esm-patient-registration__delete-identifier-modal__cancelButton___NJsZ0{width:11.688rem}.-esm-patient-registration__delete-identifier-modal__submitButton___YII8d{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__delete-identifier-modal__infoGrid___nCKmS{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__delete-identifier-modal__label01___n5dqp{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__delete-identifier-modal__productiveHeading02___hEZaw{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__delete-identifier-modal__space05___4OrQd{margin:1rem 0 1rem 0}.-esm-patient-registration__delete-identifier-modal__formContainer___ujX\\+F{display:flex;width:100%}.-esm-patient-registration__delete-identifier-modal__stickyColumn___gXAjk{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__delete-identifier-modal__touchTarget___hEAR9 a:active{color:#161616}.-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt:active{text-decoration:none;color:#161616}.-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__delete-identifier-modal__main___SgZdz{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__delete-identifier-modal__infoGrid___nCKmS{max-width:unset}.-esm-patient-registration__delete-identifier-modal__productiveHeading___J6to9{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-registration__delete-identifier-modal__modalContent___6kx2w{width:100%;background-color:#f4f4f4;padding:1rem}.-esm-patient-registration__delete-identifier-modal__modalSubtitle___jQR\\+L{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px)}.-esm-patient-registration__delete-identifier-modal__modalBody___p0O42{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);margin:1rem 0}.-esm-patient-registration__delete-identifier-modal__buttonSet___l8UDX{display:grid;grid-template-columns:1fr 1fr;margin-left:-1rem;margin-right:-1rem;margin-bottom:-1rem}.-esm-patient-registration__delete-identifier-modal__buttonSet___l8UDX>button{max-width:unset !important}",""]),r.locals={title:"-esm-patient-registration__delete-identifier-modal__title___IYrb0",submit:"-esm-patient-registration__delete-identifier-modal__submit___MBdJN",cancelButton:"-esm-patient-registration__delete-identifier-modal__cancelButton___NJsZ0",submitButton:"-esm-patient-registration__delete-identifier-modal__submitButton___YII8d",infoGrid:"-esm-patient-registration__delete-identifier-modal__infoGrid___nCKmS",label01:"-esm-patient-registration__delete-identifier-modal__label01___n5dqp",productiveHeading02:"-esm-patient-registration__delete-identifier-modal__productiveHeading02___hEZaw",space05:"-esm-patient-registration__delete-identifier-modal__space05___4OrQd",formContainer:"-esm-patient-registration__delete-identifier-modal__formContainer___ujX+F",stickyColumn:"-esm-patient-registration__delete-identifier-modal__stickyColumn___gXAjk",touchTarget:"-esm-patient-registration__delete-identifier-modal__touchTarget___hEAR9",linkName:"-esm-patient-registration__delete-identifier-modal__linkName___Lz1Nt",main:"-esm-patient-registration__delete-identifier-modal__main___SgZdz",productiveHeading:"-esm-patient-registration__delete-identifier-modal__productiveHeading___J6to9",modalContent:"-esm-patient-registration__delete-identifier-modal__modalContent___6kx2w",modalSubtitle:"-esm-patient-registration__delete-identifier-modal__modalSubtitle___jQR+L",modalBody:"-esm-patient-registration__delete-identifier-modal__modalBody___p0O42",buttonSet:"-esm-patient-registration__delete-identifier-modal__buttonSet___l8UDX"};const a=r},2609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var d=0;d<e.length;d++){var _=[].concat(e[d]);n&&r[_[0]]||(i&&(_[2]?_[2]="".concat(i," and ").concat(_[2]):_[2]=i),t.push(_))}},t}},6062:e=>{var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var a={},o=[],d=0;d<e.length;d++){var _=e[d],s=n.base?_[0]+n.base:_[0],l=a[s]||0,m="".concat(s," ").concat(l);a[s]=l+1;var c=i(m),p={css:_[1],media:_[2],sourceMap:_[3],supports:_[4],layer:_[5]};if(-1!==c)t[c].references++,t[c].updater(p);else{var f=r(p,n);n.byIndex=d,t.splice(d,0,{identifier:m,updater:f,references:1})}o.push(m)}return o}function r(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,r){var a=n(e=e||[],r=r||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var d=i(a[o]);t[d].references--}for(var _=n(e,r),s=0;s<a.length;s++){var l=i(a[s]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=_}}},6793:e=>{var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},1173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},7892:(e,t,i)=>{e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},4036:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,r&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var a=i.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},2464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},5242:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var n=i(268),r=i.n(n),a=i(6062),o=i.n(a),d=i(4036),_=i.n(d),s=i(6793),l=i.n(s),m=i(7892),c=i.n(m),p=i(1173),f=i.n(p),u=i(2464),g=i.n(u),h=i(8416),v={};v.styleTagTransform=g(),v.setAttributes=c(),v.insert=l().bind(null,"head"),v.domAPI=_(),v.insertStyleElement=f(),o()(h.Z,v);const b=h.Z&&h.Z.locals?h.Z.locals:void 0;var y=i(4924),w=i(2767);const k=function(e){var t=e.deleteIdentifier,i=e.identifierName,n=e.identifierValue,a=(0,y.useTranslation)().t;return r().createElement("div",{className:b.modalContent},r().createElement("h1",{className:b.productiveHeading},a("deleteIdentifierModalHeading","Remove identifier?")),r().createElement("h3",{className:b.modalSubtitle},i,a("deleteIdentifierModalText"," has a value of ")," ",n),r().createElement("p",{className:b.modalBody},a("confirmIdentifierDeletionText","Are you sure you want to remove this identifier?")),r().createElement("div",{className:b.buttonSet},r().createElement(w.zxk,{kind:"secondary",size:"lg",onClick:function(){return t(!1)}},a("cancel","Cancel")),r().createElement(w.zxk,{kind:"danger",size:"lg",onClick:function(){return t(!0)}},a("removeIdentifierButton","Remove Identifier"))))}}}]);
|
package/dist/686.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[686],{225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>s,bT:()=>u,bs:()=>o});var r=n(906);function i(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 a(e){return function(e){if(Array.isArray(e))return i(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 i(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)?i(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 o=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone & email"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],s=["name","gender","dob","address","id","phone & email"],u={sections:{_type:r.Type.Array,_default:["demographics","contact","relationships"],_description:"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(o.map((function(e){return e.id})).join("', '"),"'."),_elements:{_type:r.Type.String}},sectionDefinitions:{_type:r.Type.Array,_elements:{id:{_type:r.Type.String,_description:"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(o.map((function(e){return e.id})).join("', '"),"'.")},name:{_type:r.Type.String,_description:"The title to display at the top of the section."},fields:{_type:r.Type.Array,_default:[],_description:"The parts to include in the section. Can be any of the following built-in fields: ".concat(s.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),_elements:{_type:r.Type.String}}},_default:[]},fieldDefinitions:{_type:r.Type.Array,_elements:{id:{_type:r.Type.String,_description:"How this field will be referred to in the `fields` element of the `sectionDefinitions` configuration."},type:{_type:r.Type.String,_description:"How this field's data will be stored—a person attribute or an obs."},uuid:{_type:r.Type.UUID,_description:"Person attribute type UUID that this field's data should be saved to."},label:{_type:r.Type.String,_default:null,_description:"The label of the input. By default, uses the metadata `display` attribute."},placeholder:{_type:r.Type.String,_default:"",_description:"Placeholder that will appear in the input."},validation:{required:{_type:r.Type.Boolean,_default:!1},matches:{_type:r.Type.String,_default:null,_description:"Optional RegEx for testing the validity of the input."}},answerConceptSetUuid:{_type:r.Type.ConceptUuid,_default:null,_description:"For coded questions only. A concept which has the possible responses either as answers or as set members."},customConceptAnswers:{_type:r.Type.Array,_elements:{uuid:{_type:r.Type.UUID,_description:"Answer concept UUID"},label:{_type:r.Type.String,_default:null,_description:"The custom label for the answer concept."}},_default:[],_description:"For coded questions only. Provide ability to add custom concept answers."}},_default:[],_description:"Definitions for custom fields that can be used in sectionDefinitions. Can also be used to override built-in fields."},fieldConfigurations:{name:{displayMiddleName:{_type:r.Type.Boolean,_default:!0},unidentifiedPatient:{_type:r.Type.Boolean,_default:!0,_description:"Whether to allow patients to be registered without names."},defaultUnknownGivenName:{_type:r.Type.String,_default:"UNKNOWN",_description:"The given/first name to record for unidentified patients."},defaultUnknownFamilyName:{_type:r.Type.String,_default:"UNKNOWN",_description:"The family/last name to record for unidentified patients."}},gender:{_type:r.Type.Array,_elements:{value:{_type:r.Type.String,_description:"The value for sex option"},label:{_type:r.Type.String,_default:null,_description:"The label displayed for sex option."},id:{_type:r.Type.String,_default:null,_description:"The id for sex option."}},_default:[{id:"male",value:"Male",label:"Male"},{id:"female",value:"Female",label:"Female"},{id:"other",value:"Other",label:"Other"},{id:"unknown",value:"Unknown",label:"Unknown"}],_description:"Provide ability to configure sex options."}},links:{submitButton:{_type:r.Type.String,_default:"${openmrsSpaBase}/patient/${patientUuid}/chart",_validators:[r.validators.isUrlWithTemplateParameters(["patientUuid"])]}},concepts:{patientPhotoUuid:{_type:r.Type.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5"}},defaultPatientIdentifierTypes:{_type:r.Type.Array,_elements:{_type:r.Type.PatientIdentifierTypeUuid},_default:[]},registrationObs:{encounterTypeUuid:{_type:r.Type.UUID,_default:null,_description:"Obs created during registration will be associated with an encounter of this type. This must be set in order to use fields of type `obs`."},encounterProviderRoleUuid:{_type:r.Type.UUID,_default:"a0b03050-c99b-11e0-9572-0800200c9a66",_description:"The provider role to use for the registration encounter. Default is 'Unkown'."},registrationFormUuid:{_type:r.Type.UUID,_default:null,_description:"The form UUID to associate with the registration encounter. By default no form will be associated."}},_validators:[(0,r.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(e){return e.sections.every((function(t){return a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(c(o))+(e.sectionDefinitions.length?"; and the defined sections ".concat(c(e.sectionDefinitions),"."):".")})),(0,r.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),r=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(s.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(c(e.fieldDefinitions),"."):".")}))]};function c(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>c,QT:()=>l,UO:()=>s,e1:()=>u});var r,i,a,o=n(906),s="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",u="@openmrs/esm-patient-registration-app",c="patient-registration",l=(r={},a="network-first",(i=o.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r)},1686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{backendDependencies:()=>g,importTranslation:()=>b,setupOpenMRS:()=>w,version:()=>v});var r=n(906),i=n(3076),a=n(225),o=n(8179),s=n(5047),u=n.n(s),c=n(6279);function l(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){l(a,r,i,o,s,"next",e)}function s(e){l(a,r,i,o,s,"throw",e)}o(void 0)}))}}function d(e){return["/ws/fhir2/R4/Patient/".concat(e),"/ws/rest/v1/relationship?v=".concat(o.UO,"&person=").concat(e),"/ws/rest/v1/person/".concat(e,"/attribute"),"/ws/rest/v1/patient/".concat(e,"/identifier?v=custom:(uuid,identifier,identifierType:(uuid,required,name),preferred)")].map((function(e){return window.origin+(0,r.makeUrl)(e)}))}function f(){return y.apply(this,arguments)}function y(){return(y=p(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,c.X1)(),(0,c.Te)(),(0,c.mt)(),(0,c.St)()]);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t){return m.apply(this,arguments)}function m(){return(m=p(u().mark((function e(t,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.y.savePatientFormOnline(t._patientRegistrationData.isNewPatient,t._patientRegistrationData.formValues,t._patientRegistrationData.patientUuidMap,t._patientRegistrationData.initialAddressFieldValues,t._patientRegistrationData.capturePhotoProps,t._patientRegistrationData.currentLocation,t._patientRegistrationData.initialIdentifierValues,t._patientRegistrationData.currentUser,t._patientRegistrationData.config,t._patientRegistrationData.savePatientTransactionManager,n.abort);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var v="4.0.1-pre.621",b=n(3979),g={"webservices.rest":"^2.24.0"};function w(){var e={featureName:"Patient Registration",moduleName:o.e1};return(0,r.defineConfigSchema)(o.e1,a.bT),(0,r.registerBreadcrumbs)([{path:"".concat(window.spaBase,"/").concat(o.Kt),title:"Patient Registration",parent:"".concat(window.spaBase,"/home")}]),(0,r.setupOfflineSync)(o.Kt,[],h,{onBeginEditSyncItem:function(e){(0,r.navigate)({to:"${openmrsSpaBase}/patient/".concat(e.content.fhirPatient.id,"/edit")})}}),(0,r.subscribePrecacheStaticDependencies)(f),(0,r.setupDynamicOfflineDataHandler)({id:"esm-patient-registration-app:patient",type:"patient",displayName:"Patient registration",isSynced:function(e){return p(u().mark((function t(){var n,r,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d(e),t.next=3,caches.open("omrs-spa-cache-v1");case 3:return r=t.sent,t.next=6,r.keys();case 6:return i=t.sent.map((function(e){return e.url})),t.abrupt("return",n.every((function(e){return i.includes(e)})));case 8:case"end":return t.stop()}}),t)})))()},sync:function(e){return p(u().mark((function t(){var n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d(e),t.next=3,Promise.allSettled(n.map(function(){var e=p(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,r.messageOmrsServiceWorker)({type:"registerDynamicRoute",url:t});case 2:return e.next=4,fetch(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:case"end":return t.stop()}}),t)})))()}}),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(103),n.e(553),n.e(924),n.e(859)]).then(n.bind(n,1859))}),e),route:"patient-registration",online:{savePatientForm:i.y.savePatientFormOnline,isOffline:!1},offline:{savePatientForm:i.y.savePatientFormOffline,isOffline:!0}}],extensions:[{id:"add-patient-action",slot:"top-nav-actions-slot",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(103),n.e(206)]).then(n.bind(n,8206))}),e),online:!0,offline:!0},{id:"cancel-patient-edit-modal",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(103),n.e(924),n.e(735)]).then(n.bind(n,5735))}),e),online:!0,offline:!0},{id:"patient-photo-widget",slot:"patient-photo-slot",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(854),n.e(975)]).then(n.bind(n,9975))}),e),online:!0,offline:!0},{id:"edit-patient-details-button",slot:"patient-search-actions-slot",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(924),n.e(635)]).then(n.bind(n,2635))}),e),online:!0,offline:!0},{id:"delete-identifier-confirmation-modal",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(103),n.e(924),n.e(242)]).then(n.bind(n,5242))}),e),online:!0,offline:!0}]}}},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>g,St:()=>D,Te:()=>_,X1:()=>w,mt:()=>O});var r=n(5047),i=n.n(r),a=n(268),o=n.n(a),s=n(3662),u=n(2777),c=n(8407),l=n(906),p=n(8179);function d(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 f(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){f(a,r,i,o,s,"next",e)}function s(e){f(a,r,i,o,s,"throw",e)}o(void 0)}))}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(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){h(e,t,n[t])}))}return e}function v(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function b(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,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(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.")}()}var g=o().createContext(null);function w(e){return T.apply(this,arguments)}function T(){return(T=y(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/session",t);case 2:return n=e.sent.data,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return P.apply(this,arguments)}function P(){return(P=y(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)",t);case 2:return n=e.sent.data,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return x.apply(this,arguments)}function x(){return(x=y(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/relationshiptype?v=default",t);case 2:return n=e.sent.data,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e){return U.apply(this,arguments)}function U(){return(U=y(i().mark((function e(t){var n,r,a,o,u,c,l,p,d,f,y;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k(t);case 2:n=e.sent,r=n.filter(Boolean),a=!0,o=!1,u=void 0,e.prev=5,c=r[Symbol.iterator]();case 7:if(a=(l=c.next()).done){e.next=20;break}return p=l.value,e.t0=b,e.next=12,Promise.all([j(p.uuid,t),N(t)]);case 12:e.t1=e.sent,d=(0,e.t0)(e.t1,2),f=d[0],y=d[1],p.identifierSources=f.data.results.map((function(e){var t=(0,s.Z)(y.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e}));case 17:a=!0,e.next=7;break;case 20:e.next=26;break;case 22:e.prev=22,e.t2=e.catch(5),o=!0,u=e.t2;case 26:e.prev=26,e.prev=27,a||null==c.return||c.return();case 29:if(e.prev=29,!o){e.next=32;break}throw u;case 32:return e.finish(29);case 33:return e.finish(26);case 34:return e.abrupt("return",r);case 35:case"end":return e.stop()}}),e,null,[[5,22,26,34],[27,,29,33]])})))).apply(this,arguments)}function k(e){return S.apply(this,arguments)}function S(){return(S=y(i().mark((function e(t){var n,r,a,o,s,c,l,p,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/patientidentifiertype?v=full",t);case 2:return n=e.sent,e.next=5,F("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType",t);case 5:if(r=e.sent,!n.ok){e.next=13;break}return l=null==n||null===(a=n.data)||void 0===a?void 0:a.results,p=null==r||null===(o=r.data)||void 0===o||null===(s=o.results)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.metadataUuid,d=(null==r?void 0:r.ok)?[E(null==l?void 0:l.find((function(e){return e.uuid===p})),!0)]:[],l.forEach((function(e){e.uuid!==p&&d.push(E(e,!1))})),e.abrupt("return",d.map((function(e){return v(m({},e),{fieldName:(0,u.Z)(e.name)})})));case 13:return e.abrupt("return",[]);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e,t){return A.apply(this,arguments)}function A(){return(A=y(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(t),n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){return I.apply(this,arguments)}function I(){return(I=y(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/idgen/autogenerationoption?v=full",t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e,t){return C.apply(this,arguments)}function C(){return(C=y(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,c.Z)(t)});case 2:return e.next=4,(0,l.openmrsFetch)(t,{headers:p.QT,signal:null==n?void 0:n.signal});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t){return{name:e.display,fieldName:(0,u.Z)(e.display),required:e.required,uuid:e.uuid,format:e.format,isPrimary:t,uniquenessBehavior:e.uniquenessBehavior}}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>b,y:()=>v});var r=n(5047),i=n.n(r),a=n(906),o=n(8179),s=n(7117),u=n(5741);function c(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 l(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){l(a,r,i,o,s,"next",e)}function s(e){l(a,r,i,o,s,"throw",e)}o(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(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){f(e,t,n[t])}))}return e}function h(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,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(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.")}()}var m,v=function(){function e(){d(this,e)}return e.saveRelationships=function(e,t,n){return p(i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var r=e.relatedPersonUuid,i=e.relationshipType,a=e.uuid,o=e.action,u=h(i.split("/"),2),c=u[0],l=u[1],p=t.data.uuid,d="aIsToB"===l,f={personA:d?r:p,personB:d?p:r,relationshipType:c};switch(o){case"ADD":return(0,s.bL)(n,f);case"UPDATE":return(0,s.r6)(n,a,f);case"DELETE":return(0,s.kE)(n,a)}}))));case 1:case"end":return r.stop()}}),r)})))()},e.saveObservations=function(e,t,n,r,a,o){return p(i().mark((function u(){var c;return i().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!(e&&Object.keys(e).length>0)){i.next=7;break}if(a.registrationObs.encounterTypeUuid){i.next=5;break}console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved."),i.next=7;break;case 5:return c={encounterDatetime:new Date,patient:t.data.uuid,encounterType:a.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:a.registrationObs.encounterProviderRoleUuid}],form:a.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},i.abrupt("return",(0,s.M1)(o,c));case 7:case"end":return i.stop()}}),u)})))()},e.savePatientIdentifiers=function(e,t,n,r,a,o){return p(i().mark((function u(){var c;return i().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return c=Object.values(n).map(function(){var n=p(i().mark((function n(r){var u,c,l,p,d,f,y,h,m;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(u=r.identifierTypeUuid,c=r.identifierValue,l=r.identifierUuid,p=r.selectedSource,d=r.preferred,f=r.autoGeneration,y=r.initialValue,!(c||f&&p)){n.next=23;break}if(f){n.next=6;break}n.t0=c,n.next=11;break;case 6:return n.next=8,(0,s.fX)(r.selectedSource.uuid,o);case 8:return n.next=10,n.sent.data.identifier;case 10:n.t0=n.sent;case 11:if(h=n.t0,m={uuid:l,identifier:h,identifierType:u,location:a,preferred:d},e){n.next=22;break}if(y){n.next=19;break}return n.next=17,(0,s.eb)(t,m,o);case 17:n.next=22;break;case 19:if(y===h){n.next=22;break}return n.next=22,(0,s.nI)(t,l,m.identifier,o);case 22:return n.abrupt("return",m);case 23:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()),t&&Object.keys(r).filter((function(e){return!n[e]})).forEach(function(){var e=p(i().mark((function e(n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.ZB)(t,r[n].identifierUuid,o);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),u.abrupt("return",Promise.all(c));case 3:case"end":return u.stop()}}),u)})))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,r,i){var a,o,s,c=e.getPatientAddressField(t,r);return o=t.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](o):o instanceof s)?[t.birthdate.getFullYear(),t.birthdate.getMonth()+1,t.birthdate.getDate()].join("-"):t.birthdate,(0,u.Z)(r,c)&&(c={}),{uuid:t.patientUuid,person:y({uuid:t.patientUuid,names:e.getNames(t,n),gender:t.gender.charAt(0),birthdate:a,birthdateEstimated:t.birthdateEstimated,attributes:e.getPatientAttributes(t),addresses:[c]},e.getPatientDeathInfo(t)),identifiers:i}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e){var t=[];if(e.attributes){var n=!0,r=!1,i=void 0;try{for(var a,o=Object.entries(e.attributes)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=h(a.value,2),u=s[0],c=s[1];t.push({attributeType:u,value:c})}}catch(e){r=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}return e.unidentifiedPatient&&t.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),t},e.getPatientAddressField=function(e,t){return Object.keys(t).reduce((function(t,n){return r=y({},t),i=null!=(i=f({},n,e[n]))?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})),r;var r,i}),{})},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,r=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?r:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,r,i,a,o;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(r=e.person)||void 0===r||null===(i=r.names)||void 0===i?void 0:i.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(a=e.person)||void 0===a?void 0:a.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(o=e.person.attributes)||void 0===o?void 0:o.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();v.savePatientFormOffline=(m=p(i().mark((function e(t,n,r,s,u,c,l,p,d){var f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f={fhirPatient:v.mapPatientToFhirPatient(v.getPatientToCreate(n,r,s,[])),_patientRegistrationData:{isNewPatient:t,formValues:n,patientUuidMap:r,initialAddressFieldValues:s,capturePhotoProps:u,currentLocation:c,initialIdentifierValues:l,currentUser:p,config:d,savePatientTransactionManager:new b}},e.next=3,(0,a.queueSynchronizationItem)(o.Kt,f,{id:n.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]});case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)}))),function(e,t,n,r,i,a,o,s,u){return m.apply(this,arguments)}),v.savePatientFormOnline=function(){var e=p(i().mark((function e(t,n,r,a,o,u,c,l,d,f,y){var h,m,b;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.savePatientIdentifiers(t,n.patientUuid,n.identifiers,c,u,y);case 2:return h=e.sent,m=v.getPatientToCreate(n,r,a,h),v.getDeletedNames(n.patientUuid,r).forEach(function(){var e=p(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.uO)(t.nameUuid,t.personUuid,y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=7,(0,s.co)(y,m,t&&!f.patientSaved?void 0:n.patientUuid);case 7:if(!(b=e.sent).ok){e.next=17;break}return f.patientSaved=!0,e.next=12,v.saveRelationships(n.relationships,b,y);case 12:return e.next=14,v.saveObservations(n.obs,b,u,l,d,y);case 14:if(!d.concepts.patientPhotoUuid||!(null==o?void 0:o.imageData)){e.next=17;break}return e.next=17,(0,s.oV)(b.data.uuid,o.imageData,"/ws/rest/v1/obs",o.dateTime||(new Date).toISOString(),d.concepts.patientPhotoUuid,y);case 17:return e.abrupt("return",b.data.uuid);case 18:case"end":return e.stop()}}),e)})));return function(t,n,r,i,a,o,s,u,c,l,p){return e.apply(this,arguments)}}();var b=function e(){d(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>p,M8:()=>w,Uu:()=>g,ZB:()=>D,bL:()=>y,co:()=>l,eb:()=>_,fX:()=>d,kE:()=>m,nI:()=>O,oV:()=>v,r6:()=>h,uO:()=>f});var r=n(5047),i=n.n(r),a=n(9857),o=n(906);function s(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){s(a,r,i,o,u,"next",e)}function u(e){s(a,r,i,o,u,"throw",e)}o(void 0)}))}}function c(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);var a=new Blob([r],{type:n});return new File([a],"patient-photo.png")}function l(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(n||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function d(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function f(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function y(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function h(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:n.relationshipType},signal:e.signal})}function m(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function v(e,t,n,r,i,a){return b.apply(this,arguments)}function b(){return(b=u(i().mark((function e(t,n,r,a,s,u){var l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(l=new FormData).append("patient",t),l.append("file",c(n)),l.append("json",JSON.stringify({person:t,concept:s,groupMembers:[],obsDatetime:a})),e.abrupt("return",(0,o.openmrsFetch)(r,{method:"POST",signal:u.signal,body:l}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){var t,n,r,i=(0,o.useConfig)().concepts.patientPhotoUuid,s="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(i,"&v=full"),u=(0,a.ZP)(e?s:null,o.openmrsFetch),c=u.data,l=u.error,p=null==c||null===(t=c.data)||void 0===t?void 0:t.results[0];return{data:p?{dateTime:null==p?void 0:p.obsDatetime,imageSrc:null==p||null===(n=p.value)||void 0===n||null===(r=n.links)||void 0===r?void 0:r.uri}:null,isError:l,isLoading:!c&&!l}}function w(e,t){return T.apply(this,arguments)}function T(){return(T=u(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/person?q=".concat(t),{signal:n.signal}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,t,n){return P.apply(this,arguments)}function P(){return(P=u(i().mark((function e(t,n,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e,t,n,r){return x.apply(this,arguments)}function x(){return(x=u(i().mark((function e(t,n,r,a){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(n),{method:"POST",headers:{"Content-Type":"application/json"},signal:a.signal,body:{identifier:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e,t,n){return U.apply(this,arguments)}function U(){return(U=u(i().mark((function e(t,n,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(n,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:r.signal}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},3979:(e,t,n)=>{var r={"./en.json":[3574,574]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i}}]);
|
|
1
|
+
(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[686],{225:(e,t,n)=>{"use strict";n.d(t,{X8:()=>s,bT:()=>u,bs:()=>o});var r=n(906);function i(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 a(e){return function(e){if(Array.isArray(e))return i(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 i(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)?i(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 o=[{id:"demographics",name:"Basic Info",fields:["name","gender","dob","id"]},{id:"contact",name:"Contact Details",fields:["address","phone & email"]},{id:"death",name:"Death Info",fields:[]},{id:"relationships",name:"Relationships",fields:[]}],s=["name","gender","dob","address","id","phone & email"],u={sections:{_type:r.Type.Array,_default:["demographics","contact","relationships"],_description:"An array of strings which are the keys from 'sectionDefinitions' or any of the following built-in sections: '".concat(o.map((function(e){return e.id})).join("', '"),"'."),_elements:{_type:r.Type.String}},sectionDefinitions:{_type:r.Type.Array,_elements:{id:{_type:r.Type.String,_description:"How this section will be referred to in the `sections` configuration. To override a built-in section, use that section's id. The built in section ids are '".concat(o.map((function(e){return e.id})).join("', '"),"'.")},name:{_type:r.Type.String,_description:"The title to display at the top of the section."},fields:{_type:r.Type.Array,_default:[],_description:"The parts to include in the section. Can be any of the following built-in fields: ".concat(s.join(", "),". Can also be an id from an object in the `fieldDefinitions` array, which you can use to define custom fields."),_elements:{_type:r.Type.String}}},_default:[]},fieldDefinitions:{_type:r.Type.Array,_elements:{id:{_type:r.Type.String,_description:"How this field will be referred to in the `fields` element of the `sectionDefinitions` configuration."},type:{_type:r.Type.String,_description:"How this field's data will be stored—a person attribute or an obs."},uuid:{_type:r.Type.UUID,_description:"Person attribute type UUID that this field's data should be saved to."},label:{_type:r.Type.String,_default:null,_description:"The label of the input. By default, uses the metadata `display` attribute."},placeholder:{_type:r.Type.String,_default:"",_description:"Placeholder that will appear in the input."},validation:{required:{_type:r.Type.Boolean,_default:!1},matches:{_type:r.Type.String,_default:null,_description:"Optional RegEx for testing the validity of the input."}},answerConceptSetUuid:{_type:r.Type.ConceptUuid,_default:null,_description:"For coded questions only. A concept which has the possible responses either as answers or as set members."},customConceptAnswers:{_type:r.Type.Array,_elements:{uuid:{_type:r.Type.UUID,_description:"Answer concept UUID"},label:{_type:r.Type.String,_default:null,_description:"The custom label for the answer concept."}},_default:[],_description:"For coded questions only. Provide ability to add custom concept answers."}},_default:[],_description:"Definitions for custom fields that can be used in sectionDefinitions. Can also be used to override built-in fields."},fieldConfigurations:{name:{displayMiddleName:{_type:r.Type.Boolean,_default:!0},unidentifiedPatient:{_type:r.Type.Boolean,_default:!0,_description:"Whether to allow patients to be registered without names."},defaultUnknownGivenName:{_type:r.Type.String,_default:"UNKNOWN",_description:"The given/first name to record for unidentified patients."},defaultUnknownFamilyName:{_type:r.Type.String,_default:"UNKNOWN",_description:"The family/last name to record for unidentified patients."}},gender:{_type:r.Type.Array,_elements:{value:{_type:r.Type.String,_description:"The value for sex option"},label:{_type:r.Type.String,_default:null,_description:"The label displayed for sex option."},id:{_type:r.Type.String,_default:null,_description:"The id for sex option."}},_default:[{id:"male",value:"Male",label:"Male"},{id:"female",value:"Female",label:"Female"},{id:"other",value:"Other",label:"Other"},{id:"unknown",value:"Unknown",label:"Unknown"}],_description:"Provide ability to configure sex options."}},links:{submitButton:{_type:r.Type.String,_default:"${openmrsSpaBase}/patient/${patientUuid}/chart",_validators:[r.validators.isUrlWithTemplateParameters(["patientUuid"])]}},concepts:{patientPhotoUuid:{_type:r.Type.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5"}},defaultPatientIdentifierTypes:{_type:r.Type.Array,_elements:{_type:r.Type.PatientIdentifierTypeUuid},_default:[]},registrationObs:{encounterTypeUuid:{_type:r.Type.UUID,_default:null,_description:"Obs created during registration will be associated with an encounter of this type. This must be set in order to use fields of type `obs`."},encounterProviderRoleUuid:{_type:r.Type.UUID,_default:"a0b03050-c99b-11e0-9572-0800200c9a66",_description:"The provider role to use for the registration encounter. Default is 'Unkown'."},registrationFormUuid:{_type:r.Type.UUID,_default:null,_description:"The form UUID to associate with the registration encounter. By default no form will be associated."}},_validators:[(0,r.validator)((function(e){return!e.fieldDefinitions.some((function(e){return"obs"==e.type}))||null!=e.registrationObs.encounterTypeUuid}),"If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified."),(0,r.validator)((function(e){return e.sections.every((function(t){return a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})).includes(t)}))}),(function(e){var t=a(o).concat(a(e.sectionDefinitions)).map((function(e){return e.id})),n=e.sections.find((function(e){return!t.includes(e)}));return"'".concat(n,"' is not a valid section ID. Valid section IDs include the built-in sections ").concat(c(o))+(e.sectionDefinitions.length?"; and the defined sections ".concat(c(e.sectionDefinitions),"."):".")})),(0,r.validator)((function(e){return e.sectionDefinitions.every((function(t){return t.fields.every((function(t){return a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))).includes(t)}))}))}),(function(e){var t=a(s).concat(a(e.fieldDefinitions.map((function(e){return e.id})))),n=e.sectionDefinitions.find((function(e){return e.fields.some((function(e){return!t.includes(e)}))})),r=n.fields.find((function(e){return!t.includes(e)}));return"The section definition '".concat(n.id,"' contains an invalid field '").concat(r,"'. 'fields' can only contain the built-in fields '").concat(s.join("', '"),"'")+(e.fieldDefinitions.length?"; or the defined fields ".concat(c(e.fieldDefinitions),"."):".")}))]};function c(e){return"'".concat(e.map((function(e){return e.id})).join("', '"),"'")}},8179:(e,t,n)=>{"use strict";n.d(t,{Kt:()=>c,QT:()=>l,UO:()=>s,e1:()=>u});var r,i,a,o=n(906),s="custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))",u="@openmrs/esm-patient-registration-app",c="patient-registration",l=(r={},a="network-first",(i=o.omrsOfflineCachingStrategyHttpHeaderName)in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r)},1686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{backendDependencies:()=>g,importTranslation:()=>b,setupOpenMRS:()=>w,version:()=>v});var r=n(906),i=n(3076),a=n(225),o=n(8179),s=n(5047),u=n.n(s),c=n(6279);function l(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){l(a,r,i,o,s,"next",e)}function s(e){l(a,r,i,o,s,"throw",e)}o(void 0)}))}}function d(e){return["/ws/fhir2/R4/Patient/".concat(e),"/ws/rest/v1/relationship?v=".concat(o.UO,"&person=").concat(e),"/ws/rest/v1/person/".concat(e,"/attribute"),"/ws/rest/v1/patient/".concat(e,"/identifier?v=custom:(uuid,identifier,identifierType:(uuid,required,name),preferred)")].map((function(e){return window.origin+(0,r.makeUrl)(e)}))}function f(){return y.apply(this,arguments)}function y(){return(y=p(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([(0,c.X1)(),(0,c.Te)(),(0,c.mt)(),(0,c.St)()]);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t){return m.apply(this,arguments)}function m(){return(m=p(u().mark((function e(t,n){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.y.savePatientFormOnline(t._patientRegistrationData.isNewPatient,t._patientRegistrationData.formValues,t._patientRegistrationData.patientUuidMap,t._patientRegistrationData.initialAddressFieldValues,t._patientRegistrationData.capturePhotoProps,t._patientRegistrationData.currentLocation,t._patientRegistrationData.initialIdentifierValues,t._patientRegistrationData.currentUser,t._patientRegistrationData.config,t._patientRegistrationData.savePatientTransactionManager,n.abort);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var v="4.0.2-pre.624",b=n(3979),g={"webservices.rest":"^2.24.0"};function w(){var e={featureName:"Patient Registration",moduleName:o.e1};return(0,r.defineConfigSchema)(o.e1,a.bT),(0,r.registerBreadcrumbs)([{path:"".concat(window.spaBase,"/").concat(o.Kt),title:"Patient Registration",parent:"".concat(window.spaBase,"/home")}]),(0,r.setupOfflineSync)(o.Kt,[],h,{onBeginEditSyncItem:function(e){(0,r.navigate)({to:"${openmrsSpaBase}/patient/".concat(e.content.fhirPatient.id,"/edit")})}}),(0,r.subscribePrecacheStaticDependencies)(f),(0,r.setupDynamicOfflineDataHandler)({id:"esm-patient-registration-app:patient",type:"patient",displayName:"Patient registration",isSynced:function(e){return p(u().mark((function t(){var n,r,i;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d(e),t.next=3,caches.open("omrs-spa-cache-v1");case 3:return r=t.sent,t.next=6,r.keys();case 6:return i=t.sent.map((function(e){return e.url})),t.abrupt("return",n.every((function(e){return i.includes(e)})));case 8:case"end":return t.stop()}}),t)})))()},sync:function(e){return p(u().mark((function t(){var n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=d(e),t.next=3,Promise.allSettled(n.map(function(){var e=p(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,r.messageOmrsServiceWorker)({type:"registerDynamicRoute",url:t});case 2:return e.next=4,fetch(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:case"end":return t.stop()}}),t)})))()}}),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(767),n.e(553),n.e(924),n.e(859)]).then(n.bind(n,1859))}),e),route:"patient-registration",online:{savePatientForm:i.y.savePatientFormOnline,isOffline:!1},offline:{savePatientForm:i.y.savePatientFormOffline,isOffline:!0}}],extensions:[{id:"add-patient-action",slot:"top-nav-actions-slot",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(767),n.e(206)]).then(n.bind(n,8206))}),e),online:!0,offline:!0},{id:"cancel-patient-edit-modal",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(767),n.e(924),n.e(735)]).then(n.bind(n,5735))}),e),online:!0,offline:!0},{id:"patient-photo-widget",slot:"patient-photo-slot",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(854),n.e(975)]).then(n.bind(n,9975))}),e),online:!0,offline:!0},{id:"edit-patient-details-button",slot:"patient-search-actions-slot",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(924),n.e(635)]).then(n.bind(n,2635))}),e),online:!0,offline:!0},{id:"delete-identifier-confirmation-modal",load:(0,r.getAsyncLifecycle)((function(){return Promise.all([n.e(767),n.e(924),n.e(242)]).then(n.bind(n,5242))}),e),online:!0,offline:!0}]}}},6279:(e,t,n)=>{"use strict";n.d(t,{Cg:()=>g,St:()=>D,Te:()=>_,X1:()=>w,mt:()=>O});var r=n(5047),i=n.n(r),a=n(268),o=n.n(a),s=n(3662),u=n(2777),c=n(8407),l=n(906),p=n(8179);function d(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 f(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){f(a,r,i,o,s,"next",e)}function s(e){f(a,r,i,o,s,"throw",e)}o(void 0)}))}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(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){h(e,t,n[t])}))}return e}function v(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function b(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,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(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.")}()}var g=o().createContext(null);function w(e){return T.apply(this,arguments)}function T(){return(T=y(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/session",t);case 2:return n=e.sent.data,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return P.apply(this,arguments)}function P(){return(P=y(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/systemsetting?q=layout.address.format&v=custom:(value)",t);case 2:return n=e.sent.data,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return x.apply(this,arguments)}function x(){return(x=y(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/relationshiptype?v=default",t);case 2:return n=e.sent.data,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e){return U.apply(this,arguments)}function U(){return(U=y(i().mark((function e(t){var n,r,a,o,u,c,l,p,d,f,y;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k(t);case 2:n=e.sent,r=n.filter(Boolean),a=!0,o=!1,u=void 0,e.prev=5,c=r[Symbol.iterator]();case 7:if(a=(l=c.next()).done){e.next=20;break}return p=l.value,e.t0=b,e.next=12,Promise.all([j(p.uuid,t),N(t)]);case 12:e.t1=e.sent,d=(0,e.t0)(e.t1,2),f=d[0],y=d[1],p.identifierSources=f.data.results.map((function(e){var t=(0,s.Z)(y.data.results,{source:{uuid:e.uuid}});return e.autoGenerationOption=t,e}));case 17:a=!0,e.next=7;break;case 20:e.next=26;break;case 22:e.prev=22,e.t2=e.catch(5),o=!0,u=e.t2;case 26:e.prev=26,e.prev=27,a||null==c.return||c.return();case 29:if(e.prev=29,!o){e.next=32;break}throw u;case 32:return e.finish(29);case 33:return e.finish(26);case 34:return e.abrupt("return",r);case 35:case"end":return e.stop()}}),e,null,[[5,22,26,34],[27,,29,33]])})))).apply(this,arguments)}function k(e){return S.apply(this,arguments)}function S(){return(S=y(i().mark((function e(t){var n,r,a,o,s,c,l,p,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/patientidentifiertype?v=full",t);case 2:return n=e.sent,e.next=5,F("/ws/rest/v1/metadatamapping/termmapping?v=full&code=emr.primaryIdentifierType",t);case 5:if(r=e.sent,!n.ok){e.next=13;break}return l=null==n||null===(a=n.data)||void 0===a?void 0:a.results,p=null==r||null===(o=r.data)||void 0===o||null===(s=o.results)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.metadataUuid,d=(null==r?void 0:r.ok)?[E(null==l?void 0:l.find((function(e){return e.uuid===p})),!0)]:[],l.forEach((function(e){e.uuid!==p&&d.push(E(e,!1))})),e.abrupt("return",d.map((function(e){return v(m({},e),{fieldName:(0,u.Z)(e.name)})})));case 13:return e.abrupt("return",[]);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e,t){return A.apply(this,arguments)}function A(){return(A=y(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/idgen/identifiersource?v=default&identifierType=".concat(t),n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){return I.apply(this,arguments)}function I(){return(I=y(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F("/ws/rest/v1/idgen/autogenerationoption?v=full",t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e,t){return C.apply(this,arguments)}function C(){return(C=y(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:(0,c.Z)(t)});case 2:return e.next=4,(0,l.openmrsFetch)(t,{headers:p.QT,signal:null==n?void 0:n.signal});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t){return{name:e.display,fieldName:(0,u.Z)(e.display),required:e.required,uuid:e.uuid,format:e.format,isPrimary:t,uniquenessBehavior:e.uniquenessBehavior}}},3076:(e,t,n)=>{"use strict";n.d(t,{I:()=>b,y:()=>v});var r=n(5047),i=n.n(r),a=n(906),o=n(8179),s=n(7117),u=n(5741);function c(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 l(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){l(a,r,i,o,s,"next",e)}function s(e){l(a,r,i,o,s,"throw",e)}o(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(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){f(e,t,n[t])}))}return e}function h(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,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(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.")}()}var m,v=function(){function e(){d(this,e)}return e.saveRelationships=function(e,t,n){return p(i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(e.filter((function(e){return e.relationshipType})).filter((function(e){return!!e.action})).map((function(e){var r=e.relatedPersonUuid,i=e.relationshipType,a=e.uuid,o=e.action,u=h(i.split("/"),2),c=u[0],l=u[1],p=t.data.uuid,d="aIsToB"===l,f={personA:d?r:p,personB:d?p:r,relationshipType:c};switch(o){case"ADD":return(0,s.bL)(n,f);case"UPDATE":return(0,s.r6)(n,a,f);case"DELETE":return(0,s.kE)(n,a)}}))));case 1:case"end":return r.stop()}}),r)})))()},e.saveObservations=function(e,t,n,r,a,o){return p(i().mark((function u(){var c;return i().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!(e&&Object.keys(e).length>0)){i.next=7;break}if(a.registrationObs.encounterTypeUuid){i.next=5;break}console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs field values will not be saved."),i.next=7;break;case 5:return c={encounterDatetime:new Date,patient:t.data.uuid,encounterType:a.registrationObs.encounterTypeUuid,location:n,encounterProviders:[{provider:r.currentProvider.uuid,encounterRole:a.registrationObs.encounterProviderRoleUuid}],form:a.registrationObs.registrationFormUuid,obs:Object.keys(e).map((function(t){return{concept:t,value:e[t]}}))},i.abrupt("return",(0,s.M1)(o,c));case 7:case"end":return i.stop()}}),u)})))()},e.savePatientIdentifiers=function(e,t,n,r,a,o){return p(i().mark((function u(){var c;return i().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return c=Object.values(n).map(function(){var n=p(i().mark((function n(r){var u,c,l,p,d,f,y,h,m;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(u=r.identifierTypeUuid,c=r.identifierValue,l=r.identifierUuid,p=r.selectedSource,d=r.preferred,f=r.autoGeneration,y=r.initialValue,!(c||f&&p)){n.next=23;break}if(f){n.next=6;break}n.t0=c,n.next=11;break;case 6:return n.next=8,(0,s.fX)(r.selectedSource.uuid,o);case 8:return n.next=10,n.sent.data.identifier;case 10:n.t0=n.sent;case 11:if(h=n.t0,m={uuid:l,identifier:h,identifierType:u,location:a,preferred:d},e){n.next=22;break}if(y){n.next=19;break}return n.next=17,(0,s.eb)(t,m,o);case 17:n.next=22;break;case 19:if(y===h){n.next=22;break}return n.next=22,(0,s.nI)(t,l,m.identifier,o);case 22:return n.abrupt("return",m);case 23:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()),t&&Object.keys(r).filter((function(e){return!n[e]})).forEach(function(){var e=p(i().mark((function e(n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.ZB)(t,r[n].identifierUuid,o);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),u.abrupt("return",Promise.all(c));case 3:case"end":return u.stop()}}),u)})))()},e.getDeletedNames=function(e,t){return(null==t?void 0:t.additionalNameUuid)?[{nameUuid:t.additionalNameUuid,personUuid:e}]:[]},e.getPatientToCreate=function(t,n,r,i){var a,o,s,c=e.getPatientAddressField(t,r);return o=t.birthdate,a=(null!=(s=Date)&&"undefined"!=typeof Symbol&&s[Symbol.hasInstance]?s[Symbol.hasInstance](o):o instanceof s)?[t.birthdate.getFullYear(),t.birthdate.getMonth()+1,t.birthdate.getDate()].join("-"):t.birthdate,(0,u.Z)(r,c)&&(c={}),{uuid:t.patientUuid,person:y({uuid:t.patientUuid,names:e.getNames(t,n),gender:t.gender.charAt(0),birthdate:a,birthdateEstimated:t.birthdateEstimated,attributes:e.getPatientAttributes(t),addresses:[c]},e.getPatientDeathInfo(t)),identifiers:i}},e.getNames=function(e,t){var n=[{uuid:t.preferredNameUuid,preferred:!0,givenName:e.givenName,middleName:e.middleName,familyName:e.familyName}];return e.addNameInLocalLanguage&&n.push({uuid:t.additionalNameUuid,preferred:!1,givenName:e.additionalGivenName,middleName:e.additionalMiddleName,familyName:e.additionalFamilyName}),n},e.getPatientAttributes=function(e){var t=[];if(e.attributes){var n=!0,r=!1,i=void 0;try{for(var a,o=Object.entries(e.attributes)[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=h(a.value,2),u=s[0],c=s[1];t.push({attributeType:u,value:c})}}catch(e){r=!0,i=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}return e.unidentifiedPatient&&t.push({attributeType:"8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47",value:"true"}),t},e.getPatientAddressField=function(e,t){return Object.keys(t).reduce((function(t,n){return r=y({},t),i=null!=(i=f({},n,e[n]))?i:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})),r;var r,i}),{})},e.getPatientDeathInfo=function(e){var t=e.isDead,n=e.deathDate,r=e.deathCause;return{dead:t,deathDate:t?n:void 0,causeOfDeath:t?r:void 0}},e.mapPatientToFhirPatient=function(e){var t,n,r,i,a,o;return{id:e.uuid,gender:{M:"male",F:"female",O:"other",U:"unknown"}[null===(t=e.person)||void 0===t?void 0:t.gender],birthDate:null===(n=e.person)||void 0===n?void 0:n.birthdate,deceasedBoolean:e.person.dead,deceasedDateTime:e.person.deathDate,name:null===(r=e.person)||void 0===r||null===(i=r.names)||void 0===i?void 0:i.map((function(e){return{given:[e.givenName,e.middleName].filter(Boolean),family:e.familyName}})),address:null===(a=e.person)||void 0===a?void 0:a.addresses.map((function(e){return{city:e.cityVillage,country:e.country,postalCode:e.postalCode,state:e.stateProvince,use:"home"}})),telecom:null===(o=e.person.attributes)||void 0===o?void 0:o.filter((function(e){return"Telephone Number"===e.attributeType}))}},e}();v.savePatientFormOffline=(m=p(i().mark((function e(t,n,r,s,u,c,l,p,d){var f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f={fhirPatient:v.mapPatientToFhirPatient(v.getPatientToCreate(n,r,s,[])),_patientRegistrationData:{isNewPatient:t,formValues:n,patientUuidMap:r,initialAddressFieldValues:s,capturePhotoProps:u,currentLocation:c,initialIdentifierValues:l,currentUser:p,config:d,savePatientTransactionManager:new b}},e.next=3,(0,a.queueSynchronizationItem)(o.Kt,f,{id:n.patientUuid,displayName:"Patient registration",patientUuid:f.fhirPatient.id,dependencies:[]});case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}}),e)}))),function(e,t,n,r,i,a,o,s,u){return m.apply(this,arguments)}),v.savePatientFormOnline=function(){var e=p(i().mark((function e(t,n,r,a,o,u,c,l,d,f,y){var h,m,b;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.savePatientIdentifiers(t,n.patientUuid,n.identifiers,c,u,y);case 2:return h=e.sent,m=v.getPatientToCreate(n,r,a,h),v.getDeletedNames(n.patientUuid,r).forEach(function(){var e=p(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.uO)(t.nameUuid,t.personUuid,y);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=7,(0,s.co)(y,m,t&&!f.patientSaved?void 0:n.patientUuid);case 7:if(!(b=e.sent).ok){e.next=17;break}return f.patientSaved=!0,e.next=12,v.saveRelationships(n.relationships,b,y);case 12:return e.next=14,v.saveObservations(n.obs,b,u,l,d,y);case 14:if(!d.concepts.patientPhotoUuid||!(null==o?void 0:o.imageData)){e.next=17;break}return e.next=17,(0,s.oV)(b.data.uuid,o.imageData,"/ws/rest/v1/obs",o.dateTime||(new Date).toISOString(),d.concepts.patientPhotoUuid,y);case 17:return e.abrupt("return",b.data.uuid);case 18:case"end":return e.stop()}}),e)})));return function(t,n,r,i,a,o,s,u,c,l,p){return e.apply(this,arguments)}}();var b=function e(){d(this,e),this.patientSaved=!1}},7117:(e,t,n)=>{"use strict";n.d(t,{M1:()=>p,M8:()=>w,Uu:()=>g,ZB:()=>D,bL:()=>y,co:()=>l,eb:()=>_,fX:()=>d,kE:()=>m,nI:()=>O,oV:()=>v,r6:()=>h,uO:()=>f});var r=n(5047),i=n.n(r),a=n(9857),o=n(906);function s(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){s(a,r,i,o,u,"next",e)}function u(e){s(a,r,i,o,u,"throw",e)}o(void 0)}))}}function c(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new Uint8Array(t.length),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);var a=new Blob([r],{type:n});return new File([a],"patient-photo.png")}function l(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(n||""),{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function p(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/encounter",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function d(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/idgen/identifiersource/".concat(e,"/identifier"),{headers:{"Content-Type":"application/json"},method:"POST",body:{},signal:t.signal})}function f(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/person/".concat(t,"/name/").concat(e),{method:"DELETE",signal:n.signal})}function y(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship",{headers:{"Content-Type":"application/json"},method:"POST",body:t,signal:e.signal})}function h(e,t,n){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"POST",body:{relationshipType:n.relationshipType},signal:e.signal})}function m(e,t){return(0,o.openmrsFetch)("/ws/rest/v1/relationship/".concat(t),{headers:{"Content-Type":"application/json"},method:"DELETE",signal:e.signal})}function v(e,t,n,r,i,a){return b.apply(this,arguments)}function b(){return(b=u(i().mark((function e(t,n,r,a,s,u){var l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(l=new FormData).append("patient",t),l.append("file",c(n)),l.append("json",JSON.stringify({person:t,concept:s,groupMembers:[],obsDatetime:a})),e.abrupt("return",(0,o.openmrsFetch)(r,{method:"POST",signal:u.signal,body:l}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){var t,n,r,i=(0,o.useConfig)().concepts.patientPhotoUuid,s="/ws/rest/v1/obs?patient=".concat(e,"&concept=").concat(i,"&v=full"),u=(0,a.ZP)(e?s:null,o.openmrsFetch),c=u.data,l=u.error,p=null==c||null===(t=c.data)||void 0===t?void 0:t.results[0];return{data:p?{dateTime:null==p?void 0:p.obsDatetime,imageSrc:null==p||null===(n=p.value)||void 0===n||null===(r=n.links)||void 0===r?void 0:r.uri}:null,isError:l,isLoading:!c&&!l}}function w(e,t){return T.apply(this,arguments)}function T(){return(T=u(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/person?q=".concat(t),{signal:n.signal}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,t,n){return P.apply(this,arguments)}function P(){return(P=u(i().mark((function e(t,n,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/"),{method:"POST",headers:{"Content-Type":"application/json"},signal:r.signal,body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e,t,n,r){return x.apply(this,arguments)}function x(){return(x=u(i().mark((function e(t,n,r,a){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(n),{method:"POST",headers:{"Content-Type":"application/json"},signal:a.signal,body:{identifier:r}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function D(e,t,n){return U.apply(this,arguments)}function U(){return(U=u(i().mark((function e(t,n,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,o.openmrsFetch)("/ws/rest/v1/patient/".concat(t,"/identifier/").concat(n,"?purge"),{method:"DELETE",headers:{"Content-Type":"application/json"},signal:r.signal}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},3979:(e,t,n)=>{var r={"./en.json":[3574,574]};function i(e){if(!n.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=3979,e.exports=i}}]);
|
package/dist/735.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[735],{5735:(e,a,n)=>{n.r(a),n.d(a,{default:()=>r});var t=n(268),s=n.n(t),c=n(
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_registration_app=self.webpackChunk_openmrs_esm_patient_registration_app||[]).push([[735],{5735:(e,a,n)=>{n.r(a),n.d(a,{default:()=>r});var t=n(268),s=n.n(t),c=n(2767),d=n(4924);const r=function(e){var a=e.close,n=e.onConfirm,t=(0,d.useTranslation)().t;return s().createElement(s().Fragment,null,s().createElement("div",{className:"cds--modal-header"},s().createElement("h3",{className:"cds--modal-header__heading"},t("discardModalHeader","Confirm Discard Changes"))),s().createElement("div",{className:"cds--modal-content"},s().createElement("p",null,t("discardModalBody","The changes you made to this patient's details have not been saved. Discard changes?"))),s().createElement("div",{className:"cds--modal-footer"},s().createElement(c.zxk,{kind:"secondary",onClick:a},t("cancel","Cancel")),s().createElement(c.zxk,{kind:"danger",onClick:n},t("discard","Discard"))))}}}]);
|