@openmrs/esm-dispensing-app 1.9.2-pre.902 → 1.9.2-pre.911
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/.eslintrc +8 -0
- package/.turbo/cache/f51081d8cd33122b-meta.json +1 -0
- package/.turbo/cache/{c12da28d78393da6.tar.zst → f51081d8cd33122b.tar.zst} +0 -0
- package/.turbo/turbo-build.log +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js +1 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +2 -2
- package/dist/routes.json +1 -1
- package/e2e/commands/drug-order-operations.ts +2 -3
- package/e2e/commands/encounter-operations.ts +3 -4
- package/e2e/commands/index.ts +3 -3
- package/e2e/commands/patient-operations.ts +1 -1
- package/e2e/commands/provider-operations.ts +2 -5
- package/e2e/commands/visit-operations.ts +1 -1
- package/e2e/fixtures/api.ts +1 -1
- package/e2e/support/github/Dockerfile +1 -1
- package/e2e/support/github/run-e2e-docker-env.sh +23 -29
- package/package.json +1 -1
- package/.turbo/cache/c12da28d78393da6-meta.json +0 -1
- package/e2e/commands/medication-request-operation.ts +0 -97
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_dispensing_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,c,h,m,v,g,b,y,w,_={35092:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2177),t.e(6741),t.e(67),t.e(6072),t.e(4024),t.e(1282)]).then((()=>()=>t(61282)))},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})}},P={};function j(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return _[e].call(t.exports,t,t.exports,j),t.exports}j.m=_,j.c=P,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);j.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-dispensing-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);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")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],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)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{j.S={};var e={},r={};j.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];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@openmrs/esm-dispensing-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","8.0.1-pre.3331",(()=>Promise.all([j.e(2177),j.e(7268),j.e(6741),j.e(7935),j.e(6072),j.e(1997),j.e(4024)]).then((()=>()=>j(87935))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.
|
|
1
|
+
var _openmrs_esm_dispensing_app;(()=>{"use strict";var e,r,t,n,o,a,i,s,l,u,p,f,d,c,h,m,v,g,b,y,w,_={35092:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(2177),t.e(6741),t.e(67),t.e(6072),t.e(4024),t.e(1282)]).then((()=>()=>t(61282)))},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})}},P={};function j(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return _[e].call(t.exports,t,t.exports,j),t.exports}j.m=_,j.c=P,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);j.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;"object"==typeof i&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@openmrs/esm-dispensing-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);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")==e||p.getAttribute("data-webpack")==n+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],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)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{j.S={};var e={},r={};j.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];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@openmrs/esm-dispensing-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","8.0.1-pre.3331",(()=>Promise.all([j.e(2177),j.e(7268),j.e(6741),j.e(7935),j.e(6072),j.e(1997),j.e(4024)]).then((()=>()=>j(87935))))),s("@openmrs/esm-patient-common-lib","11.3.1-pre.8936",(()=>Promise.all([j.e(2177),j.e(7268),j.e(6741),j.e(7556),j.e(6072),j.e(1997),j.e(4024),j.e(8651)]).then((()=>()=>j(47556))))),s("dayjs","1.11.13",(()=>j.e(4353).then((()=>()=>j(74353))))),s("react-dom","18.2.0",(()=>Promise.all([j.e(961),j.e(6072)]).then((()=>()=>j(40961))))),s("react-i18next","11.18.6",(()=>Promise.all([j.e(6072),j.e(1033)]).then((()=>()=>j(93414))))),s("react","18.2.0",(()=>j.e(6540).then((()=>()=>j(96540))))),s("rxjs","6.6.7",(()=>j.e(3184).then((()=>()=>j(63184))))),s("swr/immutable","2.3.3",(()=>Promise.all([j.e(2177),j.e(6072),j.e(4225)]).then((()=>()=>j(54225))))),s("swr/infinite","2.3.3",(()=>Promise.all([j.e(2177),j.e(6072),j.e(3041)]).then((()=>()=>j(23041)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;j.g.importScripts&&(e=j.g.location+"");var r=j.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=e})(),o=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},a=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],a=(typeof n)[0];if(t>=r.length)return"u"==a;var i=r[t],s=(typeof i)[0];if(a!=s)return"o"==a&&"n"==s||"s"==s||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(s=e[o]))[0]?"-":(n>0?".":"")+(n=2,s);return t}var a=[];for(o=1;o<e.length;o++){var s=e[o];a.push(0===s?"not("+l()+")":1===s?"("+l()+" || "+l()+")":2===s?a.pop()+" "+a.pop():i(s))}return l();function l(){return a.pop().replace(/^\((.+)\)$/,"$1")}},s=(e,r)=>{if(0 in e){r=o(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var a=0,i=1,l=!0;;i++,a++){var u,p,f=i<e.length?(typeof e[i])[0]:"";if(a>=r.length||"o"==(p=(typeof(u=r[a]))[0]))return!l||("u"==f?i>t&&!n:""==f!=n);if("u"==p){if(!l||"u"!=f)return!1}else if(l)if(f==p)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(l=!1)}else if("s"!=f&&"n"!=f){if(n||i<=t)return!1;l=!1,i--}else{if(i<=t||p<f!=n)return!1;l=!1}else"s"!=f&&"n"!=f&&(l=!1,i--)}}var d=[],c=d.pop.bind(d);for(a=1;a<e.length;a++){var h=e[a];d.push(1==h?c()|c():2==h?c()&c():h?s(h,r):!c())}return!!c()},l=(e,r)=>e&&j.o(e,r),u=e=>(e.loaded=1,e.get()),p=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),f=(e,r,t)=>{var n=t?p(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},d=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",c=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>c("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,o,a){var i=j.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,j.S[r],t,!1,o,a)):e(r,j.S[r],t,n,o,a)})(((e,r,t,n,o,a)=>{if(!l(r,t))return m(e,t,a);var i=f(r,t,n);return s(o,i)||h(d(r,t,i,o)),u(r[t][i])})),g={},b={16072:()=>v("default","react",!1,[1,18],(()=>j.e(6540).then((()=>()=>j(96540))))),44209:()=>v("default","swr/immutable",!1,[1,2],(()=>j.e(6606).then((()=>()=>j(54225))))),53083:()=>v("default","rxjs",!1,[1,6],(()=>j.e(3184).then((()=>()=>j(63184))))),56339:()=>v("default","swr/infinite",!1,[1,2],(()=>j.e(5422).then((()=>()=>j(23041))))),25987:()=>v("default","@openmrs/esm-framework",!1,[0],(()=>Promise.all([j.e(7268),j.e(7935),j.e(1997)]).then((()=>()=>j(87935))))),53941:()=>v("default","react-i18next",!1,[1,11],(()=>j.e(3414).then((()=>()=>j(93414))))),70231:()=>v("default","dayjs",!1,[1,1],(()=>j.e(4353).then((()=>()=>j(74353))))),92646:()=>v("default","react-dom",!1,[1,18],(()=>j.e(961).then((()=>()=>j(40961))))),51354:()=>v("default","@openmrs/esm-patient-common-lib",!1,[0],(()=>Promise.all([j.e(7268),j.e(7556),j.e(1997)]).then((()=>()=>j(47556)))))},y={1354:[51354],1997:[44209,53083,56339],4024:[25987,53941,70231,92646],6072:[16072]},w={},j.f.consumes=(e,r)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return r.push(g[e]);if(!w[e]){var t=r=>{g[e]=0,j.m[e]=t=>{delete j.c[e],t.exports=r()}};w[e]=!0;var n=r=>{delete g[e],j.m[e]=t=>{throw delete j.c[e],r}};try{var o=b[e]();o.then?r.push(g[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={9986:0};j.f.j=(r,t)=>{var n=j.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(1354|1997|4024|6072)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=j.p+j.u(r),i=new Error;j.l(a,(t=>{if(j.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)j.o(i,n)&&(j.m[n]=i[n]);s&&s(j)}for(r&&r(t);l<a.length;l++)o=a[l],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_dispensing_app=globalThis.webpackChunk_openmrs_esm_dispensing_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var S=j(35092);_openmrs_esm_dispensing_app=S})();
|
|
@@ -1436,7 +1436,7 @@
|
|
|
1436
1436
|
"auxiliaryFiles": [
|
|
1437
1437
|
"main.js.map"
|
|
1438
1438
|
],
|
|
1439
|
-
"hash": "
|
|
1439
|
+
"hash": "79e9f6a941819684",
|
|
1440
1440
|
"childrenByOrder": {}
|
|
1441
1441
|
},
|
|
1442
1442
|
{
|
|
@@ -1617,7 +1617,7 @@
|
|
|
1617
1617
|
"auxiliaryFiles": [
|
|
1618
1618
|
"openmrs-esm-dispensing-app.js.map"
|
|
1619
1619
|
],
|
|
1620
|
-
"hash": "
|
|
1620
|
+
"hash": "ac2228660ebb58b0",
|
|
1621
1621
|
"childrenByOrder": {}
|
|
1622
1622
|
}
|
|
1623
1623
|
]
|
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"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","type":"dispense","title":"Close prescription"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","type":"dispense","title":"Pause prescription"},{"name":"dispense-workspace","component":"dispenseWorkspace","type":"dispense","title":"Dispense prescription","width":"wider"}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"}],"version":"1.9.2-pre.
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":"^2.2.0"},"pages":[{"component":"dispensing","route":"dispensing","online":true,"offline":true}],"extensions":[{"name":"dispensing-link","slot":"app-menu-slot","component":"dispensingLink","online":true,"offline":true},{"name":"patient-diagnoses","component":"patientDiagnoses","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"patient-conditions","component":"patientConditions","slot":"dispensing-condition-and-diagnoses","online":true,"offline":true},{"name":"dispensing-dashboard","slot":"dispensing-dashboard-slot","component":"dispensingDashboard","online":true,"offline":true},{"name":"dispensing-dashboard-link","component":"dispensingDashboardLink","meta":{"name":"dispensing","slot":"dispensing-dashboard-slot","title":"Dispensing"}},{"name":"dispense-action-button","slot":"prescription-action-button-slot","component":"dispenseActionButton"},{"name":"pause-action-button","slot":"prescription-action-button-slot","component":"pauseActionButton"},{"name":"close-action-button","slot":"prescription-action-button-slot","component":"closeActionButton"}],"workspaces":[{"name":"close-dispense-workspace","component":"closeDispenseWorkspace","type":"dispense","title":"Close prescription"},{"name":"pause-dispense-workspace","component":"pauseDispenseWorkspace","type":"dispense","title":"Pause prescription"},{"name":"dispense-workspace","component":"dispenseWorkspace","type":"dispense","title":"Dispense prescription","width":"wider"}],"modals":[{"name":"prescription-print-preview-modal","component":"printPrescriptionPreviewModal"},{"name":"delete-confirm-modal","component":"deleteConfirmModal"}],"version":"1.9.2-pre.911"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/await-thenable */
|
|
2
1
|
import { type APIRequestContext, expect } from '@playwright/test';
|
|
3
2
|
import { type Order } from '@openmrs/esm-patient-common-lib';
|
|
4
3
|
import { type Encounter } from './types';
|
|
@@ -35,10 +34,10 @@ export const generateRandomDrugOrder = async (
|
|
|
35
34
|
orderReasonNonCoded: 'order reason',
|
|
36
35
|
},
|
|
37
36
|
});
|
|
38
|
-
|
|
37
|
+
expect(order.ok()).toBeTruthy();
|
|
39
38
|
return await order.json();
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
export const deleteDrugOrder = async (api: APIRequestContext, uuid: string) => {
|
|
43
|
-
await api.delete(`order/${uuid}
|
|
42
|
+
await api.delete(`order/${uuid}`);
|
|
44
43
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/await-thenable */
|
|
2
1
|
import { type APIRequestContext, expect } from '@playwright/test';
|
|
3
|
-
import { type Encounter } from './types';
|
|
4
2
|
import { type Visit } from '@openmrs/esm-framework';
|
|
3
|
+
import { type Encounter } from './types';
|
|
5
4
|
|
|
6
5
|
export interface Observation {
|
|
7
6
|
uuid: string;
|
|
@@ -52,10 +51,10 @@ export const createEncounter = async (
|
|
|
52
51
|
encounterType: '39da3525-afe4-45ff-8977-c53b7b359158',
|
|
53
52
|
},
|
|
54
53
|
});
|
|
55
|
-
|
|
54
|
+
expect(encounterRes.ok()).toBeTruthy();
|
|
56
55
|
return await encounterRes.json();
|
|
57
56
|
};
|
|
58
57
|
|
|
59
58
|
export const deleteEncounter = async (api: APIRequestContext, uuid: string) => {
|
|
60
|
-
await api.delete(`encounter/${uuid}
|
|
59
|
+
await api.delete(`encounter/${uuid}`);
|
|
61
60
|
};
|
package/e2e/commands/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './patient-operations';
|
|
2
|
-
export * from './visit-operations';
|
|
3
|
-
export * from './encounter-operations';
|
|
4
1
|
export * from './drug-order-operations';
|
|
2
|
+
export * from './encounter-operations';
|
|
3
|
+
export * from './patient-operations';
|
|
5
4
|
export * from './provider-operations';
|
|
5
|
+
export * from './visit-operations';
|
|
@@ -105,5 +105,5 @@ export const getPatient = async (api: APIRequestContext, uuid: string): Promise<
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
export const deletePatient = async (api: APIRequestContext, uuid: string) => {
|
|
108
|
-
await api.delete(`patient/${uuid}
|
|
108
|
+
await api.delete(`patient/${uuid}`);
|
|
109
109
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/await-thenable */
|
|
2
1
|
import { type APIRequestContext, expect } from '@playwright/test';
|
|
3
2
|
import { type Provider } from './types';
|
|
4
3
|
|
|
5
4
|
export const getProvider = async (api: APIRequestContext): Promise<Provider> => {
|
|
6
|
-
const providerRes = await api.get('provider?q=admin'
|
|
7
|
-
|
|
8
|
-
});
|
|
9
|
-
await expect(providerRes.ok()).toBeTruthy();
|
|
5
|
+
const providerRes = await api.get('provider?q=admin');
|
|
6
|
+
expect(providerRes.ok()).toBeTruthy();
|
|
10
7
|
const { results } = await providerRes.json();
|
|
11
8
|
return await results[0];
|
|
12
9
|
};
|
package/e2e/fixtures/api.ts
CHANGED
|
@@ -4,45 +4,39 @@
|
|
|
4
4
|
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
5
5
|
# create a temporary working directory
|
|
6
6
|
working_dir=$(mktemp -d "${TMPDIR:-/tmp/}openmrs-e2e-frontends.XXXXXXXXXX")
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
#
|
|
10
|
-
|
|
7
|
+
# cleanup temp directory on exit
|
|
8
|
+
trap 'rm -rf "$working_dir"' EXIT
|
|
9
|
+
# get the app name
|
|
10
|
+
app_name=$(jq -r '.name' "$script_dir/../../../package.json")
|
|
11
11
|
|
|
12
|
-
echo "
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
echo "Creating packed archive of the app for Docker build..."
|
|
13
|
+
# @openmrs/esm-whatever -> _openmrs_esm_whatever
|
|
14
|
+
packed_app_name=$(echo "$app_name" | tr '[:punct:]' '_');
|
|
15
|
+
# run yarn pack for our app and add it to the working directory
|
|
16
|
+
yarn pack -o "$working_dir/$packed_app_name.tgz" >/dev/null;
|
|
17
|
+
echo "Successfully created packed app archive: $packed_app_name.tgz"
|
|
15
18
|
|
|
16
|
-
echo "
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
app_names+=("$app_name.tgz")
|
|
21
|
-
yarn workspace "$app" pack -o "$working_dir/$app_name.tgz" >/dev/null
|
|
22
|
-
fi
|
|
23
|
-
done
|
|
24
|
-
|
|
25
|
-
echo "Generating spa-assemble-config.json..."
|
|
19
|
+
echo "Creating dynamic spa-assemble-config.json with frontend modules..."
|
|
20
|
+
# dynamically assemble our list of frontend modules, prepending the primary navigation
|
|
21
|
+
# and patient banner apps; apps will all be in the /app directory of the Docker
|
|
22
|
+
# container
|
|
26
23
|
jq -n \
|
|
27
|
-
--arg
|
|
28
|
-
--arg
|
|
24
|
+
--arg app_name "$app_name" \
|
|
25
|
+
--arg app_file "/app/$packed_app_name.tgz" \
|
|
29
26
|
'{
|
|
30
27
|
"@openmrs/esm-primary-navigation-app": "next",
|
|
31
28
|
"@openmrs/esm-patient-banner-app": "next"
|
|
32
|
-
} +
|
|
33
|
-
($
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
| transpose
|
|
37
|
-
| map({"key": .[0], "value": .[1]})
|
|
38
|
-
| from_entries
|
|
39
|
-
)' | jq '{"frontendModules": .}' > "$working_dir/spa-assemble-config.json"
|
|
29
|
+
} + {
|
|
30
|
+
($app_name): $app_file
|
|
31
|
+
}' | jq '{"frontendModules": .}' > "$working_dir/spa-assemble-config.json"
|
|
32
|
+
echo "Successfully created spa-assemble-config.json with frontend modules"
|
|
40
33
|
|
|
41
|
-
echo "
|
|
34
|
+
echo "Copying Docker configuration files to working directory..."
|
|
42
35
|
cp "$script_dir/Dockerfile" "$working_dir/Dockerfile"
|
|
43
36
|
cp "$script_dir/docker-compose.yml" "$working_dir/docker-compose.yml"
|
|
44
37
|
|
|
45
38
|
cd "$working_dir"
|
|
39
|
+
echo "Building and starting Docker containers for e2e testing..."
|
|
40
|
+
# CACHE_BUST to ensure the assemble step is always run
|
|
46
41
|
docker compose build --build-arg CACHE_BUST=$(date +%s) frontend
|
|
47
42
|
docker compose up -d
|
|
48
|
-
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"hash":"c12da28d78393da6","duration":44199}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/await-thenable */
|
|
2
|
-
import { type APIRequestContext, expect } from '@playwright/test';
|
|
3
|
-
import { type Order } from '@openmrs/esm-patient-common-lib';
|
|
4
|
-
import { type Patient } from '../commands';
|
|
5
|
-
import { type Encounter } from './types';
|
|
6
|
-
import { type MedicationRequest } from '../../src/types';
|
|
7
|
-
|
|
8
|
-
export const generateRandomMedicationRequest = async (
|
|
9
|
-
fhirApi: APIRequestContext,
|
|
10
|
-
patient: Patient,
|
|
11
|
-
encounter: Encounter,
|
|
12
|
-
providerUuid: string,
|
|
13
|
-
drugOrder: Order,
|
|
14
|
-
): Promise<MedicationRequest> => {
|
|
15
|
-
const dispense = await fhirApi.post('MedicationRequest?_summary=data', {
|
|
16
|
-
data: {
|
|
17
|
-
resourceType: 'MedicationDispense',
|
|
18
|
-
medicationReference: {
|
|
19
|
-
reference: 'Medication/',
|
|
20
|
-
},
|
|
21
|
-
encounter: encounter,
|
|
22
|
-
intent: String,
|
|
23
|
-
priority: String,
|
|
24
|
-
subject: patient,
|
|
25
|
-
requester: [
|
|
26
|
-
{
|
|
27
|
-
actor: {
|
|
28
|
-
reference: providerUuid,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
quantity: {
|
|
33
|
-
value: 1,
|
|
34
|
-
unit: 'Tablet',
|
|
35
|
-
code: '1513AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
36
|
-
},
|
|
37
|
-
asNeededBoolean: false,
|
|
38
|
-
location: process.env.E2E_LOGIN_DEFAULT_LOCATION_UUID,
|
|
39
|
-
dosageInstruction: [
|
|
40
|
-
{
|
|
41
|
-
timing: {
|
|
42
|
-
code: {
|
|
43
|
-
coding: [
|
|
44
|
-
{
|
|
45
|
-
code: '160862AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
46
|
-
display: 'Once daily',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
system: 'https://cielterminology.org',
|
|
50
|
-
code: '160862',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
system: 'http://snomed.info/sct/',
|
|
54
|
-
code: '229797004',
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
text: 'Once daily',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
asNeededBoolean: false,
|
|
61
|
-
route: {
|
|
62
|
-
coding: [
|
|
63
|
-
{
|
|
64
|
-
code: '160240AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
65
|
-
display: 'Oral',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
system: 'https://cielterminology.org',
|
|
69
|
-
code: '160240',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
system: 'http://snomed.info/sct/',
|
|
73
|
-
code: '26643006',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
text: 'Oral',
|
|
77
|
-
},
|
|
78
|
-
doseAndRate: [
|
|
79
|
-
{
|
|
80
|
-
doseQuantity: {
|
|
81
|
-
value: 1,
|
|
82
|
-
unit: 'Milligram',
|
|
83
|
-
code: '161553AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
await expect(dispense.ok()).toBeTruthy();
|
|
92
|
-
return await dispense.json();
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export const deleteMedicationRequest = async (fhirApi: APIRequestContext, uuid: string) => {
|
|
96
|
-
await fhirApi.delete(`MedicationDispense/${uuid}`, { data: {} });
|
|
97
|
-
};
|