@openmrs/esm-patient-notes-app 9.2.3-pre.6975 → 9.2.3-pre.6985
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 +1 -1
- package/dist/8504.js +1 -1
- package/dist/8504.js.map +1 -1
- package/dist/8745.js +1 -1
- package/dist/8745.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-notes-app.js +1 -1
- package/dist/openmrs-esm-patient-notes-app.js.buildmanifest.json +10 -10
- package/dist/routes.json +1 -1
- package/package.json +3 -3
- package/src/config-schema.ts +4 -10
- package/src/notes/visit-notes-form.workspace.tsx +4 -3
- package/src/notes/visit-notes.resource.ts +19 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_patient_notes_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,h,c,m={4852:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(8917),t.e(583),t.e(1343),t.e(6112),t.e(4875),t.e(8504)]).then((()=>()=>t(8504)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return m[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}g.m=m,g.c=v,g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-notes-app:",g.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-patient-notes-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","6.2.1-pre.2750",(()=>Promise.all([g.e(367),g.e(1343)]).then((()=>()=>g(367))))),s("@openmrs/esm-patient-common-lib","9.2.3-pre.
|
|
1
|
+
var _openmrs_esm_patient_notes_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,h,c,m={4852:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(8917),t.e(583),t.e(1343),t.e(6112),t.e(4875),t.e(8504)]).then((()=>()=>t(8504)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return m[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}g.m=m,g.c=v,g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-patient-notes-app:",g.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,s;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var p=l[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),s&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-patient-notes-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},s=o[r];(!s||!s.loaded&&(!n!=!s.eager?n:i>s.from))&&(o[r]={get:t,from:i,eager:!!n})},l=[];return"default"===t&&(s("@openmrs/esm-framework","6.2.1-pre.2750",(()=>Promise.all([g.e(367),g.e(1343)]).then((()=>()=>g(367))))),s("@openmrs/esm-patient-common-lib","9.2.3-pre.6985",(()=>Promise.all([g.e(8917),g.e(583),g.e(1343),g.e(6112),g.e(8771),g.e(4875)]).then((()=>()=>g(8771))))),s("dayjs","1.11.11",(()=>g.e(3464).then((()=>()=>g(3464))))),s("react-i18next","11.18.6",(()=>Promise.all([g.e(4641),g.e(1343)]).then((()=>()=>g(4641))))),s("react-router-dom","6.16.0",(()=>Promise.all([g.e(2913),g.e(1343)]).then((()=>()=>g(2913))))),s("react","18.3.1",(()=>g.e(4041).then((()=>()=>g(4041))))),s("swr/_internal","2.2.4",(()=>Promise.all([g.e(9074),g.e(1343)]).then((()=>()=>g(9074))))),s("swr/immutable","2.2.4",(()=>Promise.all([g.e(8917),g.e(1343),g.e(6112),g.e(2610)]).then((()=>()=>g(2610))))),s("swr/infinite","2.2.4",(()=>Promise.all([g.e(8917),g.e(1343),g.e(6112),g.e(6165)]).then((()=>()=>g(8546)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;g.g.importScripts&&(e=g.g.location+"");var r=g.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(s=e[a]))[0]?"-":(n>0?".":"")+(n=2,s);return t}var i=[];for(a=1;a<e.length;a++){var s=e[a];i.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?i.pop()+" "+i.pop():o(s))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,s=1,l=!0;;s++,i++){var u,p,f=s<e.length?(typeof e[s])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!l||("u"==f?s>n&&!o:""==f!=o);if("u"==p){if(!l||"u"!=f)return!1}else if(l)if(f==p)if(s<=n){if(u!=e[s])return!1}else{if(o?u>e[s]:u<e[s])return!1;u!=e[s]&&(l=!1)}else if("s"!=f&&"n"!=f){if(o||s<=n)return!1;l=!1,s--}else{if(s<=n||p<f!=o)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,s--)}}var d=[],h=d.pop.bind(d);for(i=1;i<e.length;i++){var c=e[i];d.push(1==c?h()|h():2==c?h()&h():c?a(c,r):!h())}return!!h()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},s=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",l=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||u(s(e,t,o,n)),p(e[t][o])},u=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},p=e=>(e.loaded=1,e.get()),f=(e=>function(r,t,n,o){var a=g.I(r);return a&&a.then?a.then(e.bind(e,r,g.S[r],t,n,o)):e(0,g.S[r],t,n,o)})(((e,r,t,n,o)=>r&&g.o(r,t)?l(r,0,t,n):o())),d={},h={1343:()=>f("default","react",[1,18],(()=>g.e(4041).then((()=>()=>g(4041))))),6112:()=>f("default","swr/_internal",[1,2],(()=>g.e(9074).then((()=>()=>g(9074))))),5260:()=>f("default","swr/immutable",[1,2],(()=>g.e(229).then((()=>()=>g(2610))))),8877:()=>f("default","react-router-dom",[1,6],(()=>g.e(2913).then((()=>()=>g(2913))))),3150:()=>f("default","react-i18next",[1,11],(()=>g.e(4641).then((()=>()=>g(4641))))),7223:()=>f("default","@openmrs/esm-patient-common-lib",[1,9],(()=>g.e(8771).then((()=>()=>g(8771))))),8254:()=>f("default","@openmrs/esm-framework",[1,6],(()=>g.e(367).then((()=>()=>g(367))))),454:()=>f("default","swr/infinite",[1,2],(()=>g.e(8546).then((()=>()=>g(8546))))),6372:()=>f("default","dayjs",[1,1],(()=>g.e(3464).then((()=>()=>g(3464)))))},c={1343:[1343],4875:[3150,7223,8254],6112:[6112],8504:[454],8745:[6372],8771:[5260,8877]},g.f.consumes=(e,r)=>{g.o(c,e)&&c[e].forEach((e=>{if(g.o(d,e))return r.push(d[e]);var t=r=>{d[e]=0,g.m[e]=t=>{delete g.c[e],t.exports=r()}},n=r=>{delete d[e],g.m[e]=t=>{throw delete g.c[e],r}};try{var o=h[e]();o.then?r.push(d[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={8109:0};g.f.j=(r,t)=>{var n=g.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1343|4875|6112)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=g.p+g.u(r),i=new Error;g.l(a,(t=>{if(g.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,s]=t,l=0;if(a.some((r=>0!==e[r]))){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);s&&s(g)}for(r&&r(t);l<a.length;l++)o=a[l],g.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_patient_notes_app=globalThis.webpackChunk_openmrs_esm_patient_notes_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),g.nc=void 0;var b=g(4852);_openmrs_esm_patient_notes_app=b})();
|
|
@@ -870,7 +870,7 @@
|
|
|
870
870
|
"auxiliaryFiles": [
|
|
871
871
|
"openmrs-esm-patient-notes-app.js.map"
|
|
872
872
|
],
|
|
873
|
-
"hash": "
|
|
873
|
+
"hash": "36507c1cd2dd1faf",
|
|
874
874
|
"childrenByOrder": {}
|
|
875
875
|
},
|
|
876
876
|
{
|
|
@@ -900,9 +900,9 @@
|
|
|
900
900
|
"initial": false,
|
|
901
901
|
"entry": false,
|
|
902
902
|
"recorded": false,
|
|
903
|
-
"size":
|
|
903
|
+
"size": 70643,
|
|
904
904
|
"sizes": {
|
|
905
|
-
"javascript":
|
|
905
|
+
"javascript": 70601,
|
|
906
906
|
"consume-shared": 42
|
|
907
907
|
},
|
|
908
908
|
"names": [],
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
"auxiliaryFiles": [
|
|
917
917
|
"8504.js.map"
|
|
918
918
|
],
|
|
919
|
-
"hash": "
|
|
919
|
+
"hash": "0a02f32982c6bf81",
|
|
920
920
|
"childrenByOrder": {}
|
|
921
921
|
},
|
|
922
922
|
{
|
|
@@ -970,10 +970,10 @@
|
|
|
970
970
|
"initial": false,
|
|
971
971
|
"entry": false,
|
|
972
972
|
"recorded": false,
|
|
973
|
-
"size":
|
|
973
|
+
"size": 92951,
|
|
974
974
|
"sizes": {
|
|
975
975
|
"consume-shared": 42,
|
|
976
|
-
"javascript":
|
|
976
|
+
"javascript": 92909
|
|
977
977
|
},
|
|
978
978
|
"names": [],
|
|
979
979
|
"idHints": [],
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
"auxiliaryFiles": [
|
|
988
988
|
"8745.js.map"
|
|
989
989
|
],
|
|
990
|
-
"hash": "
|
|
990
|
+
"hash": "5b9f8002666f3ac0",
|
|
991
991
|
"childrenByOrder": {}
|
|
992
992
|
},
|
|
993
993
|
{
|
|
@@ -1021,10 +1021,10 @@
|
|
|
1021
1021
|
"initial": true,
|
|
1022
1022
|
"entry": true,
|
|
1023
1023
|
"recorded": false,
|
|
1024
|
-
"size":
|
|
1024
|
+
"size": 2007472,
|
|
1025
1025
|
"sizes": {
|
|
1026
1026
|
"consume-shared": 252,
|
|
1027
|
-
"javascript":
|
|
1027
|
+
"javascript": 1985017,
|
|
1028
1028
|
"share-init": 378,
|
|
1029
1029
|
"runtime": 21825
|
|
1030
1030
|
},
|
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
"auxiliaryFiles": [
|
|
1042
1042
|
"main.js.map"
|
|
1043
1043
|
],
|
|
1044
|
-
"hash": "
|
|
1044
|
+
"hash": "dd0824d39b72a1cf",
|
|
1045
1045
|
"childrenByOrder": {}
|
|
1046
1046
|
},
|
|
1047
1047
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"extensions":[{"name":"notes-overview-widget","component":"notesOverview","meta":{"fullWidth":false},"order":5},{"name":"visit-note-nav-button","component":"visitNotesActionButton","slot":"action-menu-patient-chart-items-slot","order":1}],"workspaces":[{"name":"visit-notes-form-workspace","title":"visitNoteWorkspaceTitle","component":"visitNotesFormWorkspace","type":"visit-note","canHide":true}],"version":"9.2.3-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"extensions":[{"name":"notes-overview-widget","component":"notesOverview","meta":{"fullWidth":false},"order":5},{"name":"visit-note-nav-button","component":"visitNotesActionButton","slot":"action-menu-patient-chart-items-slot","order":1}],"workspaces":[{"name":"visit-notes-form-workspace","title":"visitNoteWorkspaceTitle","component":"visitNotesFormWorkspace","type":"visit-note","canHide":true}],"version":"9.2.3-pre.6985"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-notes-app",
|
|
3
|
-
"version": "9.2.3-pre.
|
|
3
|
+
"version": "9.2.3-pre.6985",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Patient notes microfrontend for the OpenMRS SPA",
|
|
6
6
|
"browser": "dist/openmrs-esm-patient-notes-app.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "https://github.com/openmrs/openmrs-esm-patient-chart/issues"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@openmrs/esm-patient-common-lib": "^9.2.3-pre.
|
|
40
|
+
"@openmrs/esm-patient-common-lib": "^9.2.3-pre.6985",
|
|
41
41
|
"lodash-es": "^4.17.21"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"swr": "2.x"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@openmrs/esm-patient-common-lib": "9.2.3-pre.
|
|
54
|
+
"@openmrs/esm-patient-common-lib": "9.2.3-pre.6985",
|
|
55
55
|
"webpack": "^5.94.0"
|
|
56
56
|
},
|
|
57
57
|
"stableVersion": "9.2.2"
|
package/src/config-schema.ts
CHANGED
|
@@ -2,21 +2,15 @@ import { Type } from '@openmrs/esm-framework';
|
|
|
2
2
|
import notesConfigSchema, { type VisitNoteConfigObject } from './notes/visit-note-config-schema';
|
|
3
3
|
|
|
4
4
|
export const configSchema = {
|
|
5
|
-
visitNoteConfig: notesConfigSchema,
|
|
6
|
-
numberOfVisitsToLoad: {
|
|
7
|
-
_type: Type.Number,
|
|
8
|
-
_description: 'The number of visits to load initially in the Visits Summary tab. Defaults to 5',
|
|
9
|
-
_default: 5,
|
|
10
|
-
},
|
|
11
5
|
diagnosisConceptClass: {
|
|
12
|
-
_type: Type.UUID,
|
|
13
|
-
_description: 'The concept class to use for the diagnoses',
|
|
14
6
|
_default: '8d4918b0-c2cc-11de-8d13-0010c6dffd0f',
|
|
7
|
+
_description: 'The concept class to use for the diagnoses',
|
|
8
|
+
_type: Type.UUID,
|
|
15
9
|
},
|
|
10
|
+
visitNoteConfig: notesConfigSchema,
|
|
16
11
|
};
|
|
17
12
|
|
|
18
13
|
export interface ConfigObject {
|
|
19
|
-
visitNoteConfig: VisitNoteConfigObject;
|
|
20
|
-
numberOfVisitsToLoad: number;
|
|
21
14
|
diagnosisConceptClass: string;
|
|
15
|
+
visitNoteConfig: VisitNoteConfigObject;
|
|
22
16
|
}
|
|
@@ -170,7 +170,8 @@ const VisitNotesForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
170
170
|
const currentImages = watch('images');
|
|
171
171
|
|
|
172
172
|
const { mutateVisitNotes } = useVisitNotes(patientUuid);
|
|
173
|
-
const { mutateVisits } = useInfiniteVisits(patientUuid);
|
|
173
|
+
const { mutateVisits: mutateInfiniteVisits } = useInfiniteVisits(patientUuid);
|
|
174
|
+
|
|
174
175
|
const mutateAttachments = () =>
|
|
175
176
|
mutate((key) => typeof key === 'string' && key.startsWith(`${restBaseUrl}/attachment`));
|
|
176
177
|
|
|
@@ -389,8 +390,8 @@ const VisitNotesForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
389
390
|
}
|
|
390
391
|
})
|
|
391
392
|
.then(() => {
|
|
393
|
+
mutateInfiniteVisits();
|
|
392
394
|
mutateVisitNotes();
|
|
393
|
-
mutateVisits();
|
|
394
395
|
|
|
395
396
|
if (images?.length) {
|
|
396
397
|
mutateAttachments();
|
|
@@ -424,8 +425,8 @@ const VisitNotesForm: React.FC<DefaultPatientWorkspaceProps> = ({
|
|
|
424
425
|
encounterTypeUuid,
|
|
425
426
|
formConceptUuid,
|
|
426
427
|
locationUuid,
|
|
428
|
+
mutateInfiniteVisits,
|
|
427
429
|
mutateVisitNotes,
|
|
428
|
-
mutateVisits,
|
|
429
430
|
patientUuid,
|
|
430
431
|
providerUuid,
|
|
431
432
|
selectedPrimaryDiagnoses.length,
|
|
@@ -65,12 +65,17 @@ export function useVisitNotes(patientUuid: string): UseVisitNotes {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export function useInfiniteVisits(patientUuid: string) {
|
|
68
|
-
const
|
|
68
|
+
const { numberOfVisitsToLoad } = useConfig<{
|
|
69
|
+
numberOfVisitsToLoad: number;
|
|
70
|
+
}>({
|
|
71
|
+
externalModuleName: '@openmrs/esm-patient-chart-app',
|
|
72
|
+
});
|
|
73
|
+
|
|
69
74
|
const customRepresentation =
|
|
70
|
-
'custom:(uuid,encounters:(uuid,diagnoses:(uuid,display,rank,diagnosis),form:(uuid,display),encounterDatetime,orders:full,obs:
|
|
75
|
+
'custom:(uuid,location,encounters:(uuid,diagnoses:(uuid,display,rank,diagnosis,voided),form:(uuid,display),encounterDatetime,orders:full,obs:(uuid,concept:(uuid,display,conceptClass:(uuid,display)),display,groupMembers:(uuid,concept:(uuid,display),value:(uuid,display),display),value,obsDatetime),encounterType:(uuid,display,viewPrivilege,editPrivilege),encounterProviders:(uuid,display,encounterRole:(uuid,display),provider:(uuid,person:(uuid,display)))),visitType:(uuid,name,display),startDatetime,stopDatetime,patient,attributes:(attributeType:ref,display,uuid,value)';
|
|
71
76
|
|
|
72
77
|
const getKey = (pageIndex, previousPageData) => {
|
|
73
|
-
const pageSize =
|
|
78
|
+
const pageSize = numberOfVisitsToLoad;
|
|
74
79
|
|
|
75
80
|
if (previousPageData && !previousPageData?.data?.links.some((link) => link.rel === 'next')) {
|
|
76
81
|
return null;
|
|
@@ -85,19 +90,23 @@ export function useInfiniteVisits(patientUuid: string) {
|
|
|
85
90
|
return url;
|
|
86
91
|
};
|
|
87
92
|
|
|
88
|
-
const {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
const {
|
|
94
|
+
data,
|
|
95
|
+
error,
|
|
96
|
+
isLoading,
|
|
97
|
+
isValidating,
|
|
98
|
+
mutate: localMutate,
|
|
99
|
+
size,
|
|
100
|
+
setSize,
|
|
101
|
+
} = useSWRInfinite(patientUuid ? getKey : null, openmrsFetch, { parallel: true });
|
|
93
102
|
|
|
94
103
|
return {
|
|
95
|
-
visits: data ? [].concat(data?.flatMap((page) => page
|
|
104
|
+
visits: data ? [].concat(data?.flatMap((page) => page?.data?.results)) : null,
|
|
96
105
|
error,
|
|
97
106
|
hasMore: data?.length ? !!data[data.length - 1].data?.links?.some((link) => link.rel === 'next') : false,
|
|
98
107
|
isLoading,
|
|
99
108
|
isValidating,
|
|
100
|
-
mutateVisits:
|
|
109
|
+
mutateVisits: localMutate,
|
|
101
110
|
setSize,
|
|
102
111
|
size,
|
|
103
112
|
};
|