@openmrs/esm-fast-data-entry-app 1.5.1-pre.910 → 1.5.1-pre.915
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1519.js +1 -1
- package/dist/1578.js +1 -1
- package/dist/1578.js.map +1 -1
- package/dist/2657.js +12 -12
- package/dist/2657.js.map +1 -1
- package/dist/3378.js +1 -1
- package/dist/3517.js +1 -0
- package/dist/3517.js.map +1 -0
- package/dist/4757.js +1 -1
- package/dist/5898.js +1 -1
- package/dist/5898.js.map +1 -1
- package/dist/6029.js +1 -0
- package/dist/6029.js.map +1 -0
- package/dist/6107.js +1 -1
- package/dist/6362.js +1 -1
- package/dist/6362.js.map +1 -1
- package/dist/6977.js +1 -1
- package/dist/7977.js +1 -0
- package/dist/7977.js.map +1 -0
- package/dist/8410.js +1 -0
- package/dist/8410.js.map +1 -0
- package/dist/9197.js +1 -0
- package/dist/9197.js.map +1 -0
- package/dist/9403.js +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js +2 -2
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +164 -98
- package/dist/openmrs-esm-fast-data-entry-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/dist/5789.js +0 -1
- package/dist/5789.js.map +0 -1
package/dist/3378.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["3378"],{4767(e,o,t){var s={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["9900","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["6468","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","997"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["4335","5940"],"./hi.json":["6840","2881"]};function n(e){if(!t.o(s,e))return Promise.resolve().then(function(){var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o});var o=s[e],n=o[0];return t.e(o[1]).then(function(){return t(n)})}n.keys=()=>Object.keys(s),n.id=4767,e.exports=n},7481(e,o,t){"use strict";t.r(o),t.d(o,{formsAppMenuLink:()=>c,cancelSessionModal:()=>d,importTranslation:()=>r,startupApp:()=>f,addGroupModal:()=>y,patientLocationMismatchModal:()=>l,completeSessionModal:()=>_,root:()=>p});var s=t(8345);let n={formCategories:{_type:s.Type.Array,_description:"Organize forms into categories. A form can belong to multiple categories.",_elements:{name:{_type:s.Type.String,_description:"Category name"},forms:{_type:s.Type.Array,_description:"List of forms for this category.",_elements:{formUUID:{_type:s.Type.UUID,_description:"UUID of form"},name:{_type:s.Type.String,_description:"Name of form"},disableGroupSession:{_type:s.Type.Boolean,_description:"Disable group sessions for this form",_default:!1}}}},_default:[]},formCategoriesToShow:{_type:s.Type.Array,_description:"Forms to show by default on the forms app home page.",_elements:{_type:s.Type.String,_description:"Name of category"},_default:[]},groupSessionConcepts:{sessionName:{_type:s.Type.UUID,_description:"UUID of concept for Session Name",_default:"e2559620-900b-4f66-ae41-0b9c4adfb654"},sessionDate:{_type:s.Type.UUID,_description:"UUID of concept for Session Date",_default:"ceaca505-6dff-4940-8a43-8c060a0924d7"},practitionerName:{_type:s.Type.UUID,_description:"UUID of concept for Practitioner Name",_default:"f1a2d58c-1a0e-4148-931a-aac224649fdc"},sessionNotes:{_type:s.Type.UUID,_description:"UUID of concept for Session Notes",_default:"fa8fedc0-c066-4da3-8dc1-2ad8621fc480"},cohortTypeId:{_type:s.Type.UUID,_description:"UUID of cohort type",_default:"eee9970e-7ca0-4e8c-a280-c33e9d5f6a04"},cohortId:{_type:s.Type.UUID,_description:"UUID of concept for cohort identifier",_default:"5461f231-7e59-4be8-93a4-6d49fd13c00a"},cohortName:{_type:s.Type.UUID,_description:"UUID of concept for cohort name",_default:"6029f289-92a6-4a68-80f1-3078d0152449"},sessionUuid:{_type:s.Type.UUID,_description:"UUID of concept for session identifier",_default:"6a803908-8a5b-4598-adea-19358c83529a"}},specificQuestions:{_type:s.Type.Array,_description:"List of specific questions to populate forms.",_elements:{forms:{_type:s.Type.Array,_description:"List of form UUIDs for which the question applies.",_elements:{_type:s.Type.UUID},_default:[]},questionId:{_type:s.Type.String,_description:"ID of the question.",_default:""}},_default:[]},patientLocationMismatchCheck:{_type:s.Type.Boolean,_description:"Whether to prompt for confirmation if the selected patient is not at the same location as the current session.",_default:!1},enforcePatientListLocationMatch:{_type:s.Type.Boolean,_description:"If true, prevents adding patients from a different location than the current session.",_default:!1}},i="@openmrs/esm-fast-data-entry-app",a={featureName:"fast-data-entry-app",moduleName:i},r=t(4767),p=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("2044"),t.e("9403")]).then(t.bind(t,2934)),a),c=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("4253")]).then(t.bind(t,4796)),a);function f(){(0,s.defineConfigSchema)(i,n),(0,s.registerBreadcrumbs)([{path:`${window.spaBase}/forms`,title:"Forms",parent:`${window.spaBase}/home`}])}let d=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("9177"),t.e("1801")]).then(t.bind(t,7136)),a),_=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("9177"),t.e("9228")]).then(t.bind(t,7927)),a),y=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("1617"),t.e("3080"),t.e("9823"),t.e("9177"),t.e("
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["3378"],{4767(e,o,t){var s={"./uk.json":["723","9072"],"./ar.json":["4132","7045"],"./ru_RU.json":["986","8359"],"./uz_UZ.json":["890","7175"],"./fr.json":["4055","6508"],"./sw_KE.json":["8618","903"],"./uz.json":["3584","6377"],"./en.json":["4300","5117"],"./ky.json":["8163","2416"],"./pl.json":["1119","6724"],"./sq.json":["8371","4928"],"./ka.json":["795","1480"],"./si.json":["6859","6904"],"./zh_TW.json":["439","556"],"./de.json":["4944","5145"],"./lg.json":["4618","8695"],"./vi.json":["9214","6371"],"./tr.json":["5241","434"],"./es_MX.json":["8349","1646"],"./tr_TR.json":["9900","1869"],"./zh_CN.json":["9879","5644"],"./en_US.json":["9569","4106"],"./he.json":["4652","2317"],"./id.json":["2690","6047"],"./ku.json":["9895","4348"],"./es.json":["3099","7912"],"./ne.json":["2146","5503"],"./ar_SY.json":["7617","282"],"./uz@Latn.json":["7097","4658"],"./bn.json":["7159","6444"],"./cs.json":["6589","7182"],"./zh.json":["5661","7742"],"./hi_IN.json":["5442","4383"],"./pt_BR.json":["6468","1877"],"./qu.json":["5173","8358"],"./ro_RO.json":["6022","3963"],"./sw.json":["9913","997"],"./am.json":["1197","9806"],"./pt.json":["6679","5132"],"./it.json":["9538","4111"],"./km.json":["4335","5940"],"./hi.json":["6840","2881"]};function n(e){if(!t.o(s,e))return Promise.resolve().then(function(){var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o});var o=s[e],n=o[0];return t.e(o[1]).then(function(){return t(n)})}n.keys=()=>Object.keys(s),n.id=4767,e.exports=n},7481(e,o,t){"use strict";t.r(o),t.d(o,{formsAppMenuLink:()=>c,cancelSessionModal:()=>d,importTranslation:()=>r,startupApp:()=>f,addGroupModal:()=>y,patientLocationMismatchModal:()=>l,completeSessionModal:()=>_,root:()=>p});var s=t(8345);let n={formCategories:{_type:s.Type.Array,_description:"Organize forms into categories. A form can belong to multiple categories.",_elements:{name:{_type:s.Type.String,_description:"Category name"},forms:{_type:s.Type.Array,_description:"List of forms for this category.",_elements:{formUUID:{_type:s.Type.UUID,_description:"UUID of form"},name:{_type:s.Type.String,_description:"Name of form"},disableGroupSession:{_type:s.Type.Boolean,_description:"Disable group sessions for this form",_default:!1}}}},_default:[]},formCategoriesToShow:{_type:s.Type.Array,_description:"Forms to show by default on the forms app home page.",_elements:{_type:s.Type.String,_description:"Name of category"},_default:[]},groupSessionConcepts:{sessionName:{_type:s.Type.UUID,_description:"UUID of concept for Session Name",_default:"e2559620-900b-4f66-ae41-0b9c4adfb654"},sessionDate:{_type:s.Type.UUID,_description:"UUID of concept for Session Date",_default:"ceaca505-6dff-4940-8a43-8c060a0924d7"},practitionerName:{_type:s.Type.UUID,_description:"UUID of concept for Practitioner Name",_default:"f1a2d58c-1a0e-4148-931a-aac224649fdc"},sessionNotes:{_type:s.Type.UUID,_description:"UUID of concept for Session Notes",_default:"fa8fedc0-c066-4da3-8dc1-2ad8621fc480"},cohortTypeId:{_type:s.Type.UUID,_description:"UUID of cohort type",_default:"eee9970e-7ca0-4e8c-a280-c33e9d5f6a04"},cohortId:{_type:s.Type.UUID,_description:"UUID of concept for cohort identifier",_default:"5461f231-7e59-4be8-93a4-6d49fd13c00a"},cohortName:{_type:s.Type.UUID,_description:"UUID of concept for cohort name",_default:"6029f289-92a6-4a68-80f1-3078d0152449"},sessionUuid:{_type:s.Type.UUID,_description:"UUID of concept for session identifier",_default:"6a803908-8a5b-4598-adea-19358c83529a"}},specificQuestions:{_type:s.Type.Array,_description:"List of specific questions to populate forms.",_elements:{forms:{_type:s.Type.Array,_description:"List of form UUIDs for which the question applies.",_elements:{_type:s.Type.UUID},_default:[]},questionId:{_type:s.Type.String,_description:"ID of the question.",_default:""}},_default:[]},patientLocationMismatchCheck:{_type:s.Type.Boolean,_description:"Whether to prompt for confirmation if the selected patient is not at the same location as the current session.",_default:!1},enforcePatientListLocationMatch:{_type:s.Type.Boolean,_description:"If true, prevents adding patients from a different location than the current session.",_default:!1}},i="@openmrs/esm-fast-data-entry-app",a={featureName:"fast-data-entry-app",moduleName:i},r=t(4767),p=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("2044"),t.e("9403")]).then(t.bind(t,2934)),a),c=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("4253")]).then(t.bind(t,4796)),a);function f(){(0,s.defineConfigSchema)(i,n),(0,s.registerBreadcrumbs)([{path:`${window.spaBase}/forms`,title:"Forms",parent:`${window.spaBase}/home`}])}let d=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("9177"),t.e("1801")]).then(t.bind(t,7136)),a),_=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("9177"),t.e("9228")]).then(t.bind(t,7927)),a),y=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("1617"),t.e("3080"),t.e("9823"),t.e("9177"),t.e("6028"),t.e("6977")]).then(t.bind(t,2263)),a),l=(0,s.getAsyncLifecycle)(()=>Promise.all([t.e("3080"),t.e("9823"),t.e("9177"),t.e("9147")]).then(t.bind(t,5078)),a)}}]);
|
package/dist/3517.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["3517"],{4225(e,a,t){t.r(a),t.d(a,{default:()=>_,immutable:()=>s});var r=t(2272),l=t(4993);let s=e=>(a,t,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,r.refreshInterval=0,e(a,t,r)),_=(0,l.withMiddleware)(r.u,s)}}]);
|
package/dist/3517.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3517.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/immutable/index.mjs"],"names":[],"mappings":"qOAGA,IAAM,EAAY,AAAC,GAAa,CAAC,EAAK,EAAS,KAEvC,EAAO,iBAAiB,CAAG,GAC3B,EAAO,iBAAiB,CAAG,GAC3B,EAAO,qBAAqB,CAAG,GAC/B,EAAO,eAAe,CAAG,EAClB,EAAW,EAAK,EAAS,IAElC,EAAkB,qBAAe,GAAM,CAAE,E"}
|
package/dist/4757.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["4757"],{5852(t,e,i){i.d(e,{Ay:()=>l,NX:()=>m,Z1:()=>U});var a=i(7979),o=i.n(a),r=i(3455),u=i(9943),n=i(5725),s=i(8345);let d={addPatient:t=>void 0,openPatientSearch:()=>void 0,saveEncounter:t=>void 0,editEncounter:t=>void 0,submitForNext:()=>void 0,submitForReview:()=>void 0,submitForComplete:()=>void 0,goToReview:()=>void 0,destroySession:()=>void 0,closeSession:()=>void 0},m={activeFormUuid:null,forms:{},workflowState:null,activePatientUuid:null,activeEncounterUuid:null,patientUuids:[],encounters:{},singleSessionVisitTypeUuid:null,userUuid:null},c=o().createContext({...m,...d}),U=({children:t})=>{let{user:e}=(0,s.useSession)(),{formUuid:i}=(0,u.useParams)(),U=i.split("&")[0],{search:l}=(0,u.useLocation)(),v=new URLSearchParams(l).get("patientUuid"),[f,E]=(0,a.useReducer)(r.Ay,{...m,...d}),F=(0,n.A)("@openmrs/esm-fast-data-entry-app.groupSessionVisitTypeUuid"),p=F?.result?.data?.results?.[0]?.value,S=(0,a.useMemo)(()=>({initializeWorkflowState:({activeFormUuid:t,newPatientUuid:i})=>E({type:"INITIALIZE_WORKFLOW_STATE",activeFormUuid:t,newPatientUuid:i,userUuid:e.uuid}),addPatient:t=>E({type:"ADD_PATIENT",patientUuid:t}),openPatientSearch:()=>E({type:"OPEN_PATIENT_SEARCH"}),saveEncounter:t=>E({type:"SAVE_ENCOUNTER",encounterUuid:t}),submitForNext:()=>E({type:"SUBMIT_FOR_NEXT"}),submitForReview:()=>E({type:"SUBMIT_FOR_REVIEW"}),submitForComplete:()=>E({type:"SUBMIT_FOR_COMPLETE"}),editEncounter:t=>E({type:"EDIT_ENCOUNTER",patientUuid:t}),goToReview:()=>E({type:"GO_TO_REVIEW"}),destroySession:()=>E({type:"DESTROY_SESSION"}),closeSession:()=>E({type:"CLOSE_SESSION"})}),[e]);return(0,a.useEffect)(()=>{f?.workflowState===null&&U&&S.initializeWorkflowState({activeFormUuid:U,newPatientUuid:v})},[U,v,f?.workflowState,S]),o().createElement(c.Provider,{value:{...f,...S,workflowState:f.forms?.[f.activeFormUuid]?.workflowState??m.workflowState,activePatientUuid:f.forms?.[f.activeFormUuid]?.activePatientUuid??m.activePatientUuid,activeEncounterUuid:f.forms?.[f.activeFormUuid]?.activeEncounterUuid??m.activeEncounterUuid,patientUuids:f.forms?.[f.activeFormUuid]?.patientUuids??m.patientUuids,encounters:f.forms?.[f.activeFormUuid]?.encounters??m.encounters,singleSessionVisitTypeUuid:p}},t)},l=c},3455(t,e,i){i.d(e,{Ay:()=>d,KA:()=>r,dd:()=>u});var a=i(8345),o=i(5852);let r="1.1.0",u="openmrs:fastDataEntryWorkflowState",n=t=>{localStorage.setItem(u+":"+t.userUuid,JSON.stringify(t))},s={workflowState:"NEW_PATIENT",activePatientUuid:null,activeEncounterUuid:null,patientUuids:[],encounters:{}},d=(t,e)=>{switch(e.type){case"INITIALIZE_WORKFLOW_STATE":{let t=localStorage.getItem(u+":"+e.userUuid),i=t?JSON.parse(t):{},a={},d=e.newPatientUuid?{activePatientUuid:e.newPatientUuid,workflowState:"EDIT_FORM"}:{};return t&&i._storageVersion===r?(a={...i,activeFormUuid:e.activeFormUuid,forms:{...i.forms,[e.activeFormUuid]:{...s,...i.forms[e.activeFormUuid],...d,patientUuids:i.forms[e.activeFormUuid]?.patientUuids||s.patientUuids}}},e.newPatientUuid&&!a.forms[e.activeFormUuid].patientUuids.includes(e.newPatientUuid)&&a.forms[e.activeFormUuid].patientUuids.push(e.newPatientUuid)):a={...o.NX,_storageVersion:r,forms:{[e.activeFormUuid]:s},activeFormUuid:e.activeFormUuid,userUuid:e.userUuid},n(a),{...a}}case"ADD_PATIENT":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],patientUuids:[...t.forms[t.activeFormUuid].patientUuids,e.patientUuid],activePatientUuid:e.patientUuid,activeEncounterUuid:null,workflowState:"EDIT_FORM"}}};return n(i),i}case"OPEN_PATIENT_SEARCH":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activePatientUuid:null,activeEncounterUuid:null,workflowState:"NEW_PATIENT"}}};return n(e),e}case"SAVE_ENCOUNTER":if("SUBMIT_FOR_COMPLETE"===t.forms[t.activeFormUuid].workflowState){let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return n(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),o}{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],encounters:{...t.forms[t.activeFormUuid].encounters,[t.forms[t.activeFormUuid].activePatientUuid]:e.encounterUuid},activePatientUuid:null,activeEncounterUuid:null,workflowState:"SUBMIT_FOR_NEXT"===t.forms[t.activeFormUuid].workflowState?"NEW_PATIENT":"SUBMIT_FOR_REVIEW"===t.forms[t.activeFormUuid].workflowState?"REVIEW":t.forms[t.activeFormUuid].workflowState}}};return n(i),i}case"EDIT_ENCOUNTER":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:t.forms[t.activeFormUuid].encounters[e.patientUuid],activePatientUuid:e.patientUuid,workflowState:"EDIT_FORM"}}};return n(i),i}case"SUBMIT_FOR_NEXT":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_NEXT"}}};case"SUBMIT_FOR_REVIEW":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_REVIEW"}}};case"SUBMIT_FOR_COMPLETE":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_COMPLETE"}}};case"GO_TO_REVIEW":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:null,activePatientUuid:null,workflowState:"REVIEW"}}};return n(e),e}case"DESTROY_SESSION":{let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return n(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),o}case"CLOSE_SESSION":{let e={...t,activeFormUuid:null};return n(e),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),e}default:return t}}},6984(t,e,i){i.d(e,{Ay:()=>m,D8:()=>u,oU:()=>n});var a=i(8345),o=i(5852),r=i(8414);let u="1.0.5",n="openmrs:fastDataEntryGroupWorkflowState",s=t=>{localStorage.setItem(n+":"+t.userUuid,JSON.stringify(t))},d={workflowState:"NEW_GROUP_SESSION",groupUuid:null,groupName:null,groupMembers:[],activePatientUuid:null,activeEncounterUuid:null,activeVisitUuid:null,activeSessionUuid:null,patientUuids:[],encounters:{},visits:{}},m=(t,e)=>{switch(e.type){case"INITIALIZE_WORKFLOW_STATE":{let t=localStorage.getItem(n+":"+e.userUuid),i=t?JSON.parse(t):{},a={};if(t&&i._storageVersion===u){let t=i.forms?.[e.activeFormUuid],o=t?.activePatientUuid||t?.patientUuids?.[0]||null,u=t?.activeSessionUuid||(0,r.A)();a={...i,activeFormUuid:e.activeFormUuid,forms:{...i.forms,[e.activeFormUuid]:{...d,...t,activePatientUuid:o,activeEncounterUuid:t?.encounters?.[o]||null,activeVisitUuid:t?.visits?.[o]||null,activeSessionUuid:u}}}}else a={...o.NX,_storageVersion:u,forms:{[e.activeFormUuid]:d},activeFormUuid:e.activeFormUuid,userUuid:e.userUuid};return s(a),a}case"SET_GROUP":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],groupUuid:e.group.uuid,groupName:e.group.name,patientUuids:e.group.cohortMembers?.map(t=>t?.patient?.uuid)??[],groupMembers:e.group.cohortMembers?.map(t=>t?.patient?.uuid)??[],activePatientUuid:null,activeEncounterUuid:null,activeVisitUuid:null,activeSessionUuid:null}}};return s(i),i}case"UNSET_GROUP":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],groupUuid:null,groupName:null,patientUuids:[],groupMembers:[],activePatientUuid:null,activeEncounterUuid:null,activeVisitUuid:null,activeSessionUuid:null}}};return s(e),e}case"SET_SESSION_META":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],sessionMeta:e.meta,activePatientUuid:t.forms[t.activeFormUuid].patientUuids?.[0],activeEncounterUuid:t.forms[t.activeFormUuid].encounters[t.forms[t.activeFormUuid].patientUuids?.[0]]||null,activeVisitUuid:t.forms[t.activeFormUuid].visits[t.forms[t.activeFormUuid].patientUuids?.[0]]||null,activeSessionUuid:(0,r.A)(),workflowState:"EDIT_FORM"}}};return s(i),i}case"ADD_PATIENT_UUID":{if(t.forms[t.activeFormUuid].patientUuids.includes(e.patientUuid))return t;let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],patientUuids:[...t.forms[t.activeFormUuid].patientUuids,e.patientUuid]}}};return s(i),i}case"REMOVE_PATIENT_UUID":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],patientUuids:t.forms[t.activeFormUuid].patientUuids?.filter(t=>e.patientUuid!==t)}}};return s(i),i}case"SAVE_ENCOUNTER":{let i=t.forms[t.activeFormUuid];if("SUBMIT_FOR_COMPLETE"===i.workflowState){let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return s(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),o}if("SUBMIT_FOR_NEXT"!==i.workflowState)return t;{let a=t.nextPatientUuid?t.nextPatientUuid:i.patientUuids[Math.min(i.patientUuids.indexOf(i.activePatientUuid)+1,i.patientUuids.length-1)],o={...i.encounters,[i.activePatientUuid]:e.encounterUuid},r={...t,forms:{...t.forms,[t.activeFormUuid]:{...i,encounters:o,activePatientUuid:a,activeEncounterUuid:o[a]||null,activeVisitUuid:i.visits[a]||null,activeSessionUuid:i.activeSessionUuid,workflowState:"EDIT_FORM"}}};return s(r),r}}case"EDIT_ENCOUNTER":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:t.forms[t.activeFormUuid].encounters[e.patientUuid],activeVisitUuid:t.forms[t.activeFormUuid].visits[e.patientUuid],activePatientUuid:e.patientUuid,activeSessionUuid:e.activeSessionUuid,workflowState:"EDIT_FORM"}}};return s(i),i}case"VALIDATE_FOR_NEXT":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"validateForm"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"VALIDATE_FOR_NEXT"}}};case"UPDATE_VISIT_UUID":return{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],visits:{...t.forms[t.activeFormUuid].visits,[t.forms[t.activeFormUuid].activePatientUuid]:e.visitUuid},activeVisitUuid:e.visitUuid}}};case"SUBMIT_FOR_NEXT":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_NEXT"}},nextPatientUuid:e.nextPatientUuid};case"SUBMIT_FOR_REVIEW":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_REVIEW"}}};case"VALIDATE_FOR_COMPLETE":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"validateForm"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"VALIDATE_FOR_COMPLETE"}}};case"SUBMIT_FOR_COMPLETE":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_COMPLETE"}}};case"GO_TO_REVIEW":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:null,activeVisitUuid:null,activePatientUuid:null,activeSessionUuid:null,workflowState:"REVIEW"}}};return s(e),e}case"DESTROY_SESSION":{let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return s(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),{...o,formDestroyed:!0}}case"CLOSE_SESSION":{let e={...t,activeFormUuid:null};return s(e),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),e}default:return t}}},1291(t,e,i){i.d(e,{A:()=>r});var a=i(8345),o=i(7979);let r=t=>{let[e,i]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let e=!1;return i(null),t&&(0,a.fetchCurrentPatient)(t).then(t=>{e||i(t)}),()=>{e=!0}},[t]),e}},5725(t,e,i){i.d(e,{A:()=>r});var a=i(7979),o=i(8345);let r=t=>{let[e,i]=(0,a.useState)(!1),[r,u]=(0,a.useState)(null),[n,s]=(0,a.useState)(null),d=(0,a.useCallback)(t=>{i(!1),s(!1),u(t)},[]),m=(0,a.useCallback)(t=>{i(!1),u(null),s(t)},[]),c=(0,a.useCallback)(()=>{(0,o.openmrsFetch)(`${o.restBaseUrl}/systemsetting?q=${t}&v=default`).then(d).catch(m)},[m,d,t]);return(0,a.useEffect)(()=>{c()},[c]),{result:r,error:n,isSubmitting:e}}},5301(t,e,i){i.d(e,{A:()=>s});var a=i(8345),o=i(9338),r=i.n(o),u=i(7979);let n=`${a.restBaseUrl}/o3/forms`,s=(t,e)=>{let i=(0,u.useMemo)(()=>{var i;return i=t,e.filter(t=>t.forms.includes(i))},[t,e]),{data:o,error:s}=r()(i?`${n}/${t}`:null,a.openmrsFetch);return{questions:function(t,e){if(!e||t.length<=0)return[];let i=new Map(t.map(t=>[t.questionId,t])),a=new Set(i.keys()),o=e.conceptReferences;return e.pages.flatMap(t=>t.sections.flatMap(t=>t.questions.filter(t=>a.has(t.id)).map(t=>{let e=i.get(t.id)||{},a=e.answers?.map(t=>({value:t,display:o[t]?.display}))||(t.questionOptions.answers??[]).map(t=>({value:t.concept,display:t.label??o[t.concept]?.display}));return{question:{display:t.label??o[t.questionOptions.concept]?.display,id:t.id,disabled:e.disabled,defaultAnswer:e.defaultAnswer},answers:a}})))}(i,o?.data)||null,isError:s,isLoading:!o&&!s}}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["4757"],{5852(t,e,i){i.d(e,{Ay:()=>l,NX:()=>m,Z1:()=>U});var a=i(7979),o=i.n(a),r=i(3455),u=i(9943),n=i(5725),s=i(8345);let d={addPatient:t=>void 0,openPatientSearch:()=>void 0,saveEncounter:t=>void 0,editEncounter:t=>void 0,submitForNext:()=>void 0,submitForReview:()=>void 0,submitForComplete:()=>void 0,goToReview:()=>void 0,destroySession:()=>void 0,closeSession:()=>void 0},m={activeFormUuid:null,forms:{},workflowState:null,activePatientUuid:null,activeEncounterUuid:null,patientUuids:[],encounters:{},singleSessionVisitTypeUuid:null,userUuid:null},c=o().createContext({...m,...d}),U=({children:t})=>{let{user:e}=(0,s.useSession)(),{formUuid:i}=(0,u.useParams)(),U=i.split("&")[0],{search:l}=(0,u.useLocation)(),v=new URLSearchParams(l).get("patientUuid"),[f,E]=(0,a.useReducer)(r.Ay,{...m,...d}),F=(0,n.A)("@openmrs/esm-fast-data-entry-app.groupSessionVisitTypeUuid"),p=F?.result?.data?.results?.[0]?.value,S=(0,a.useMemo)(()=>({initializeWorkflowState:({activeFormUuid:t,newPatientUuid:i})=>E({type:"INITIALIZE_WORKFLOW_STATE",activeFormUuid:t,newPatientUuid:i,userUuid:e.uuid}),addPatient:t=>E({type:"ADD_PATIENT",patientUuid:t}),openPatientSearch:()=>E({type:"OPEN_PATIENT_SEARCH"}),saveEncounter:t=>E({type:"SAVE_ENCOUNTER",encounterUuid:t}),submitForNext:()=>E({type:"SUBMIT_FOR_NEXT"}),submitForReview:()=>E({type:"SUBMIT_FOR_REVIEW"}),submitForComplete:()=>E({type:"SUBMIT_FOR_COMPLETE"}),editEncounter:t=>E({type:"EDIT_ENCOUNTER",patientUuid:t}),goToReview:()=>E({type:"GO_TO_REVIEW"}),destroySession:()=>E({type:"DESTROY_SESSION"}),closeSession:()=>E({type:"CLOSE_SESSION"})}),[e]);return(0,a.useEffect)(()=>{f?.workflowState===null&&U&&S.initializeWorkflowState({activeFormUuid:U,newPatientUuid:v})},[U,v,f?.workflowState,S]),o().createElement(c.Provider,{value:{...f,...S,workflowState:f.forms?.[f.activeFormUuid]?.workflowState??m.workflowState,activePatientUuid:f.forms?.[f.activeFormUuid]?.activePatientUuid??m.activePatientUuid,activeEncounterUuid:f.forms?.[f.activeFormUuid]?.activeEncounterUuid??m.activeEncounterUuid,patientUuids:f.forms?.[f.activeFormUuid]?.patientUuids??m.patientUuids,encounters:f.forms?.[f.activeFormUuid]?.encounters??m.encounters,singleSessionVisitTypeUuid:p}},t)},l=c},3455(t,e,i){i.d(e,{Ay:()=>d,KA:()=>r,dd:()=>u});var a=i(8345),o=i(5852);let r="1.1.0",u="openmrs:fastDataEntryWorkflowState",n=t=>{localStorage.setItem(u+":"+t.userUuid,JSON.stringify(t))},s={workflowState:"NEW_PATIENT",activePatientUuid:null,activeEncounterUuid:null,patientUuids:[],encounters:{}},d=(t,e)=>{switch(e.type){case"INITIALIZE_WORKFLOW_STATE":{let t=localStorage.getItem(u+":"+e.userUuid),i=t?JSON.parse(t):{},a={},d=e.newPatientUuid?{activePatientUuid:e.newPatientUuid,workflowState:"EDIT_FORM"}:{};return t&&i._storageVersion===r?(a={...i,activeFormUuid:e.activeFormUuid,forms:{...i.forms,[e.activeFormUuid]:{...s,...i.forms[e.activeFormUuid],...d,patientUuids:i.forms[e.activeFormUuid]?.patientUuids||s.patientUuids}}},e.newPatientUuid&&!a.forms[e.activeFormUuid].patientUuids.includes(e.newPatientUuid)&&a.forms[e.activeFormUuid].patientUuids.push(e.newPatientUuid)):a={...o.NX,_storageVersion:r,forms:{[e.activeFormUuid]:s},activeFormUuid:e.activeFormUuid,userUuid:e.userUuid},n(a),{...a}}case"ADD_PATIENT":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],patientUuids:[...t.forms[t.activeFormUuid].patientUuids,e.patientUuid],activePatientUuid:e.patientUuid,activeEncounterUuid:null,workflowState:"EDIT_FORM"}}};return n(i),i}case"OPEN_PATIENT_SEARCH":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activePatientUuid:null,activeEncounterUuid:null,workflowState:"NEW_PATIENT"}}};return n(e),e}case"SAVE_ENCOUNTER":if("SUBMIT_FOR_COMPLETE"===t.forms[t.activeFormUuid].workflowState){let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return n(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),o}{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],encounters:{...t.forms[t.activeFormUuid].encounters,[t.forms[t.activeFormUuid].activePatientUuid]:e.encounterUuid},activePatientUuid:null,activeEncounterUuid:null,workflowState:"SUBMIT_FOR_NEXT"===t.forms[t.activeFormUuid].workflowState?"NEW_PATIENT":"SUBMIT_FOR_REVIEW"===t.forms[t.activeFormUuid].workflowState?"REVIEW":t.forms[t.activeFormUuid].workflowState}}};return n(i),i}case"EDIT_ENCOUNTER":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:t.forms[t.activeFormUuid].encounters[e.patientUuid],activePatientUuid:e.patientUuid,workflowState:"EDIT_FORM"}}};return n(i),i}case"SUBMIT_FOR_NEXT":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_NEXT"}}};case"SUBMIT_FOR_REVIEW":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_REVIEW"}}};case"SUBMIT_FOR_COMPLETE":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_COMPLETE"}}};case"GO_TO_REVIEW":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:null,activePatientUuid:null,workflowState:"REVIEW"}}};return n(e),e}case"DESTROY_SESSION":{let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return n(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),o}case"CLOSE_SESSION":{let e={...t,activeFormUuid:null};return n(e),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),e}default:return t}}},6984(t,e,i){i.d(e,{Ay:()=>m,D8:()=>u,oU:()=>n});var a=i(8345),o=i(5852),r=i(8414);let u="1.0.5",n="openmrs:fastDataEntryGroupWorkflowState",s=t=>{localStorage.setItem(n+":"+t.userUuid,JSON.stringify(t))},d={workflowState:"NEW_GROUP_SESSION",groupUuid:null,groupName:null,groupMembers:[],activePatientUuid:null,activeEncounterUuid:null,activeVisitUuid:null,activeSessionUuid:null,patientUuids:[],encounters:{},visits:{}},m=(t,e)=>{switch(e.type){case"INITIALIZE_WORKFLOW_STATE":{let t=localStorage.getItem(n+":"+e.userUuid),i=t?JSON.parse(t):{},a={};if(t&&i._storageVersion===u){let t=i.forms?.[e.activeFormUuid],o=t?.activePatientUuid||t?.patientUuids?.[0]||null,u=t?.activeSessionUuid||(0,r.A)();a={...i,activeFormUuid:e.activeFormUuid,forms:{...i.forms,[e.activeFormUuid]:{...d,...t,activePatientUuid:o,activeEncounterUuid:t?.encounters?.[o]||null,activeVisitUuid:t?.visits?.[o]||null,activeSessionUuid:u}}}}else a={...o.NX,_storageVersion:u,forms:{[e.activeFormUuid]:d},activeFormUuid:e.activeFormUuid,userUuid:e.userUuid};return s(a),a}case"SET_GROUP":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],groupUuid:e.group.uuid,groupName:e.group.name,patientUuids:e.group.cohortMembers?.map(t=>t?.patient?.uuid)??[],groupMembers:e.group.cohortMembers?.map(t=>t?.patient?.uuid)??[],activePatientUuid:null,activeEncounterUuid:null,activeVisitUuid:null,activeSessionUuid:null}}};return s(i),i}case"UNSET_GROUP":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],groupUuid:null,groupName:null,patientUuids:[],groupMembers:[],activePatientUuid:null,activeEncounterUuid:null,activeVisitUuid:null,activeSessionUuid:null}}};return s(e),e}case"SET_SESSION_META":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],sessionMeta:e.meta,activePatientUuid:t.forms[t.activeFormUuid].patientUuids?.[0],activeEncounterUuid:t.forms[t.activeFormUuid].encounters[t.forms[t.activeFormUuid].patientUuids?.[0]]||null,activeVisitUuid:t.forms[t.activeFormUuid].visits[t.forms[t.activeFormUuid].patientUuids?.[0]]||null,activeSessionUuid:(0,r.A)(),workflowState:"EDIT_FORM"}}};return s(i),i}case"ADD_PATIENT_UUID":{if(t.forms[t.activeFormUuid].patientUuids.includes(e.patientUuid))return t;let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],patientUuids:[...t.forms[t.activeFormUuid].patientUuids,e.patientUuid]}}};return s(i),i}case"REMOVE_PATIENT_UUID":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],patientUuids:t.forms[t.activeFormUuid].patientUuids?.filter(t=>e.patientUuid!==t)}}};return s(i),i}case"SAVE_ENCOUNTER":{let i=t.forms[t.activeFormUuid];if("SUBMIT_FOR_COMPLETE"===i.workflowState){let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return s(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),o}if("SUBMIT_FOR_NEXT"!==i.workflowState)return t;{let a=t.nextPatientUuid?t.nextPatientUuid:i.patientUuids[Math.min(i.patientUuids.indexOf(i.activePatientUuid)+1,i.patientUuids.length-1)],o={...i.encounters,[i.activePatientUuid]:e.encounterUuid},r={...t,forms:{...t.forms,[t.activeFormUuid]:{...i,encounters:o,activePatientUuid:a,activeEncounterUuid:o[a]||null,activeVisitUuid:i.visits[a]||null,activeSessionUuid:i.activeSessionUuid,workflowState:"EDIT_FORM"}}};return s(r),r}}case"EDIT_ENCOUNTER":{let i={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:t.forms[t.activeFormUuid].encounters[e.patientUuid],activeVisitUuid:t.forms[t.activeFormUuid].visits[e.patientUuid],activePatientUuid:e.patientUuid,activeSessionUuid:e.activeSessionUuid,workflowState:"EDIT_FORM"}}};return s(i),i}case"VALIDATE_FOR_NEXT":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"validateForm"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"VALIDATE_FOR_NEXT"}}};case"UPDATE_VISIT_UUID":return{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],visits:{...t.forms[t.activeFormUuid].visits,[t.forms[t.activeFormUuid].activePatientUuid]:e.visitUuid},activeVisitUuid:e.visitUuid}}};case"SUBMIT_FOR_NEXT":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_NEXT"}},nextPatientUuid:e.nextPatientUuid};case"SUBMIT_FOR_REVIEW":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_REVIEW"}}};case"VALIDATE_FOR_COMPLETE":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"validateForm"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"VALIDATE_FOR_COMPLETE"}}};case"SUBMIT_FOR_COMPLETE":return window.dispatchEvent(new CustomEvent("ampath-form-action",{detail:{formUuid:t.activeFormUuid,patientUuid:t.forms[t.activeFormUuid].activePatientUuid,action:"onSubmit"}})),{...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],workflowState:"SUBMIT_FOR_COMPLETE"}}};case"GO_TO_REVIEW":{let e={...t,forms:{...t.forms,[t.activeFormUuid]:{...t.forms[t.activeFormUuid],activeEncounterUuid:null,activeVisitUuid:null,activePatientUuid:null,activeSessionUuid:null,workflowState:"REVIEW"}}};return s(e),e}case"DESTROY_SESSION":{let{[t.activeFormUuid]:e,...i}=t.forms,o={...t,forms:i,activeFormUuid:null};return s(o),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),{...o,formDestroyed:!0}}case"CLOSE_SESSION":{let e={...t,activeFormUuid:null};return s(e),(0,a.navigate)({to:"${openmrsSpaBase}/forms"}),e}default:return t}}},1291(t,e,i){i.d(e,{A:()=>r});var a=i(8345),o=i(7979);let r=t=>{let[e,i]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let e=!1;return i(null),t&&(0,a.fetchCurrentPatient)(t).then(t=>{e||i(t)}),()=>{e=!0}},[t]),e}},5725(t,e,i){i.d(e,{A:()=>r});var a=i(7979),o=i(8345);let r=t=>{let[e,i]=(0,a.useState)(!1),[r,u]=(0,a.useState)(null),[n,s]=(0,a.useState)(null),d=(0,a.useCallback)(t=>{i(!1),s(!1),u(t)},[]),m=(0,a.useCallback)(t=>{i(!1),u(null),s(t)},[]),c=(0,a.useCallback)(()=>{(0,o.openmrsFetch)(`${o.restBaseUrl}/systemsetting?q=${t}&v=default`).then(d).catch(m)},[m,d,t]);return(0,a.useEffect)(()=>{c()},[c]),{result:r,error:n,isSubmitting:e}}},5301(t,e,i){i.d(e,{A:()=>s});var a=i(8345),o=i(1943),r=i.n(o),u=i(7979);let n=`${a.restBaseUrl}/o3/forms`,s=(t,e)=>{let i=(0,u.useMemo)(()=>{var i;return i=t,e.filter(t=>t.forms.includes(i))},[t,e]),{data:o,error:s}=r()(i?`${n}/${t}`:null,a.openmrsFetch);return{questions:function(t,e){if(!e||t.length<=0)return[];let i=new Map(t.map(t=>[t.questionId,t])),a=new Set(i.keys()),o=e.conceptReferences;return e.pages.flatMap(t=>t.sections.flatMap(t=>t.questions.filter(t=>a.has(t.id)).map(t=>{let e=i.get(t.id)||{},a=e.answers?.map(t=>({value:t,display:o[t]?.display}))||(t.questionOptions.answers??[]).map(t=>({value:t.concept,display:t.label??o[t.concept]?.display}));return{question:{display:t.label??o[t.questionOptions.concept]?.display,id:t.id,disabled:e.disabled,defaultAnswer:e.defaultAnswer},answers:a}})))}(i,o?.data)||null,isError:s,isLoading:!o&&!s}}}}]);
|
package/dist/5898.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["5898"],{
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["5898"],{4225(e,a,t){t.r(a),t.d(a,{default:()=>_,immutable:()=>s});var r=t(2272),l=t(4993);let s=e=>(a,t,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,r.refreshInterval=0,e(a,t,r)),_=(0,l.withMiddleware)(r.u,s)}}]);
|
package/dist/5898.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"5898.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/
|
|
1
|
+
{"version":3,"file":"5898.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/immutable/index.mjs"],"names":[],"mappings":"qOAGA,IAAM,EAAY,AAAC,GAAa,CAAC,EAAK,EAAS,KAEvC,EAAO,iBAAiB,CAAG,GAC3B,EAAO,iBAAiB,CAAG,GAC3B,EAAO,qBAAqB,CAAG,GAC/B,EAAO,eAAe,CAAG,EAClB,EAAW,EAAK,EAAS,IAElC,EAAkB,qBAAe,GAAM,CAAE,E"}
|
package/dist/6029.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6029"],{2177(a,e,s){s.r(e),s.d(e,{SWRConfig:()=>t.S,default:()=>t.u,mutate:()=>_.k,preload:()=>l.preload,unload:()=>_.l,unstable_serialize:()=>n,useSWRConfig:()=>l.useSWRConfig});var t=s(2272),_=s(8444),l=s(4993);let n=a=>(0,_.s)(a)[0]}}]);
|
package/dist/6029.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6029.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/index/index.mjs"],"names":[],"mappings":"gWAMA,IAAM,EAAqB,AAAC,GAAM,QAAU,EAAI,CAAC,EAAE,A"}
|
package/dist/6107.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6107"],{8414(e,t,a){let n;a.d(t,{A:()=>l});let s="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i=new Uint8Array(16),r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));let l=function(e,t,a){if(s&&!t&&!e)return s();let l=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=l[e];return t}return function(e,t=0){return r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]}(l)}},5246(e,t,a){a.d(t,{A:()=>o});var n=a(7979),s=a.n(n),i=a(8345),r=a(1291),l=a(8269);let o=({formUuid:e,patientUuid:t,visitUuid:a,visitTypeUuid:o,encounterUuid:c,handlePostResponse:u,handleEncounterCreate:d,handleOnValidate:m,hidePatientBanner:_})=>{let p=(0,r.A)(t),v=p?.id===t,{activeSessionMeta:E}=(0,n.useContext)(l.Ay);(0,n.useEffect)(()=>()=>(0,i.detach)("form-widget-slot","form-widget-slot"),[]);let[y,f]=(0,n.useState)(!0),U=y&&e&&t&&p&&v;return s().createElement("div",null,U&&s().createElement(i.ExtensionSlot,{name:"form-widget-slot",state:{view:"form",formUuid:e,visitUuid:a??"",visitTypeUuid:o??"",patientUuid:t,patient:p,encounterUuid:c??"",closeWorkspace:()=>void 0,handlePostResponse:e=>{u(e),f(!1),setTimeout(()=>{f(!0)},1)},handleEncounterCreate:d,handleOnValidate:m,showDiscardSubmitButtons:!1,preFilledQuestions:{...E,encDate:E.sessionDate},hideControls:!0,hidePatientBanner:_}}))}},8269(e,t,a){a.d(t,{Ay:()=>_,SR:()=>m});var n=a(7979),s=a.n(n),i=a(6984),r=a(9943),l=a(8345),o=a(5725);let c={setGroup:e=>void 0,unsetGroup:()=>void 0,setSessionMeta:e=>void 0,openPatientSearch:()=>void 0,saveEncounter:e=>void 0,editEncounter:e=>void 0,validateForNext:()=>void 0,validateForComplete:()=>void 0,updateVisitUuid:e=>void 0,submitForNext:(e=null)=>void 0,submitForReview:()=>void 0,submitForComplete:()=>void 0,addPatientUuid:e=>void 0,removePatientUuid:e=>void 0,goToReview:()=>void 0,destroySession:()=>void 0,closeSession:()=>void 0},u={activeFormUuid:null,forms:{},workflowState:null,activePatientUuid:null,activeEncounterUuid:null,activeSessionUuid:null,activeVisitUuid:null,patientUuids:[],encounters:{},visits:{},activeGroupUuid:null,activeGroupName:null,activeGroupMembers:[],activeSessionMeta:{sessionName:null,practitionerName:null,sessionDate:null,sessionNotes:null},groupVisitTypeUuid:null,userUuid:null},d=s().createContext({...u,...c}),m=({children:e})=>{let{user:t}=(0,l.useSession)(),{formUuid:a}=(0,r.useParams)(),m=a.split("&")[0],_=(0,o.A)("@openmrs/esm-fast-data-entry-app.groupSessionVisitTypeUuid"),p=_?.result?.data?.results?.[0]?.value,[v,E]=(0,n.useReducer)(i.Ay,{...u,...c}),y=(0,n.useMemo)(()=>({initializeWorkflowState:({activeFormUuid:e})=>E({type:"INITIALIZE_WORKFLOW_STATE",activeFormUuid:e,userUuid:t.uuid}),setGroup:e=>E({type:"SET_GROUP",group:e}),unsetGroup:()=>E({type:"UNSET_GROUP"}),setSessionMeta:e=>E({type:"SET_SESSION_META",meta:e}),addPatientUuid:e=>E({type:"ADD_PATIENT_UUID",patientUuid:e}),removePatientUuid:e=>E({type:"REMOVE_PATIENT_UUID",patientUuid:e}),openPatientSearch:()=>E({type:"OPEN_PATIENT_SEARCH"}),saveEncounter:e=>E({type:"SAVE_ENCOUNTER",encounterUuid:e}),validateForNext:()=>E({type:"VALIDATE_FOR_NEXT"}),validateForComplete:()=>E({type:"VALIDATE_FOR_COMPLETE"}),updateVisitUuid:e=>E({type:"UPDATE_VISIT_UUID",visitUuid:e}),submitForNext:e=>E({type:"SUBMIT_FOR_NEXT",nextPatientUuid:e}),submitForComplete:()=>E({type:"SUBMIT_FOR_COMPLETE"}),editEncounter:e=>E({type:"EDIT_ENCOUNTER",patientUuid:e}),goToReview:()=>E({type:"GO_TO_REVIEW"}),destroySession:()=>E({type:"DESTROY_SESSION"}),closeSession:()=>E({type:"CLOSE_SESSION"})}),[t]);return(0,n.useEffect)(()=>{v?.workflowState===null&&m&&y.initializeWorkflowState({activeFormUuid:m})},[m,v?.workflowState,y]),s().createElement(d.Provider,{value:{groupVisitTypeUuid:p,...v,...y,workflowState:v.forms?.[v.activeFormUuid]?.workflowState??u.workflowState,activeSessionUuid:v.forms?.[v.activeFormUuid]?.activeSessionUuid??u.activeSessionUuid,activePatientUuid:v.forms?.[v.activeFormUuid]?.activePatientUuid??u.activePatientUuid,activeEncounterUuid:v.forms?.[v.activeFormUuid]?.activeEncounterUuid??u.activeEncounterUuid,activeVisitUuid:v.forms?.[v.activeFormUuid]?.activeVisitUuid??u.activeVisitUuid,patientUuids:v.forms?.[v.activeFormUuid]?.patientUuids??u.patientUuids,encounters:v.forms?.[v.activeFormUuid]?.encounters??u.encounters,activeGroupUuid:v.forms?.[v.activeFormUuid]?.groupUuid??u.activeGroupUuid,activeGroupName:v.forms?.[v.activeFormUuid]?.groupName??u.activeGroupName,activeGroupMembers:v.forms?.[v.activeFormUuid]?.groupMembers??u.activeGroupMembers,activeSessionMeta:v.forms?.[v.activeFormUuid]?.sessionMeta??u.activeSessionMeta}},e)},_=d},3462(e,t,a){a.r(t),a.d(t,{default:()=>F});var n=a(7979),s=a.n(n),i=a(3826),r=a(8414),l=a(3392),o=a(8345),c=a(5852),u=a(5246),d=a(6433);let m="-esm-fast-data-entry__styles__patientInfoRow___W+Ndf";var _=a(1291);let p=()=>s().createElement("div",{className:"-esm-fast-data-entry__styles__container___SoIRW"},s().createElement(l.SkeletonPlaceholder,{className:"-esm-fast-data-entry__styles__photoPlaceholder___54jNW"}),s().createElement("div",{className:"-esm-fast-data-entry__styles__patientInfoContent___E8vUq"},s().createElement("div",{className:m},s().createElement(l.SkeletonText,{width:"7rem",lineCount:1})),s().createElement("div",{className:m},s().createElement("span",null,s().createElement(l.SkeletonText,{width:"1rem",lineCount:1})),s().createElement("span",null,"\xb7"),s().createElement("span",null,s().createElement(l.SkeletonText,{width:"1rem",lineCount:1})),s().createElement("span",null,"\xb7"),s().createElement("span",null,s().createElement(l.SkeletonText,{width:"1rem",lineCount:1}))))),v=({patient:e,hideActionsOverflow:t})=>s().createElement("div",{className:"-esm-fast-data-entry__styles__patientBannerContainer___wVhFg"},s().createElement(o.ExtensionSlot,{name:"patient-header-slot",state:{patient:e,patientUuid:e.id,hideActionsOverflow:t}})),E=()=>{let{activePatientUuid:e,workflowState:t}=(0,n.useContext)(c.Ay),a=(0,_.A)(e),{t:r}=(0,i.useTranslation)(),l=`${a?.name?.[0].given?.join(" ")} ${a?.name?.[0]?.family}`;return((0,n.useMemo)(()=>({patientUuid:a?.id,patientName:l,size:"small"}),[a?.id,l]),"NEW_PATIENT"===t)?null:a?s().createElement(v,{patient:a,hideActionsOverflow:!0}):s().createElement(p,null)};var y=a(9943),f=a(2137),U=a(9184),S=a(4961);let N="-esm-fast-data-entry__styles__padded___zXmH0",C=()=>{let[e,t]=(0,n.useState)(),{hsuIdentifier:a}=(0,S.i)(e),{sessionLocation:r}=(0,o.useSession)(),{uuid:u,display:d}=r??{},{uuid:m,display:_}=a?.location??{},p=(0,o.useConfig)(),{addPatient:v,workflowState:E,activeFormUuid:C}=(0,n.useContext)(c.Ay),{t:h}=(0,i.useTranslation)(),T=(0,n.useCallback)(()=>{v(e),t(null)},[v,e]);(0,n.useEffect)(()=>{t(null)},[C]);let w=(0,n.useCallback)(e=>{t(e)},[]);if((0,n.useEffect)(()=>{if(!e||!m)return;let a=u!==m;if(p.enforcePatientListLocationMatch&&a)(0,o.showSnackbar)({kind:"error",title:h("locationMismatch","Location Mismatch"),subtitle:h("patientLocationMismatchEnforced","Cannot add patient from {{hsuLocation}} to a session at {{sessionLocation}}",{hsuLocation:_,sessionLocation:d})}),t(null);else if(p.patientLocationMismatchCheck&&a){let e=!0,a=(0,o.showModal)("fde-patient-location-mismatch-modal",{onConfirm:T,sessionLocation:{uuid:u,display:d},hsuLocation:{uuid:m,display:_}},()=>{e&&t(null)});return()=>{e=!1,a()}}else v(e),t(null)},[e,u,d,m,_,v,p.patientLocationMismatchCheck,p.enforcePatientListLocationMatch,h,T]),"NEW_PATIENT"!==E)return null;let k=encodeURIComponent(`\${openmrsSpaBase}/forms/form/${C}?patientUuid=\${patientUuid}`),g=(0,o.interpolateUrl)(`\${openmrsSpaBase}/patient-registration?afterUrl=${k}`);return s().createElement(s().Fragment,null,s().createElement("div",{className:"-esm-fast-data-entry__styles__searchHeaderContainer___TC41U"},s().createElement("span",{className:N},h("nextPatient","Next patient"),":"),s().createElement("span",{className:"-esm-fast-data-entry__styles__searchBarWrapper___DhwCd"},s().createElement(o.ExtensionSlot,{name:"patient-search-bar-slot",state:{selectPatientAction:w,buttonProps:{kind:"primary"}}})),s().createElement("span",{className:N},h("or","or")),s().createElement("span",null,s().createElement(l.Button,{onClick:()=>(0,o.navigate)({to:g})},h("createNewPatient","Create new patient")," ",s().createElement(f.OM,{size:20}))),s().createElement("span",{style:{flexGrow:1}}),s().createElement("span",null,s().createElement(y.Link,{to:"../"},s().createElement(l.Button,{kind:"ghost"},h("cancel","Cancel")," ",s().createElement(U.bm,{size:20}))))))};var h=a(5565);let T={formReviewCard:"-esm-fast-data-entry__styles__formReviewCard___d2pGC",dataField:"-esm-fast-data-entry__styles__dataField___6nD1e",displayName:"-esm-fast-data-entry__styles__displayName___UT2b0",identifier:"-esm-fast-data-entry__styles__identifier___aCyxC"},w=({patientUuid:e})=>{let{encounters:t,editEncounter:a}=(0,n.useContext)(c.Ay),r=(0,h.J0)(e),o=r?.name?.[0]?.given?.[0],u=r?.name?.[0]?.family,d=r?.identifier?.[0]?.value,m=t?.[e],{encounter:_}=(0,h.XT)(m),{t:p}=(0,i.useTranslation)();return s().createElement("div",{className:T.formReviewCard},s().createElement(l.Accordion,{align:"start"},s().createElement(l.AccordionItem,{title:s().createElement(s().Fragment,null,s().createElement("span",{className:T.identifier},d),s().createElement("span",{className:T.displayName},o," ",u)),className:T.accordionItem},_&&_?.obs&&_.obs?.length&&s().createElement("div",{className:T.dataField},s().createElement("ul",null,_.obs.map((e,t)=>s().createElement("li",{key:t},e.display)))),s().createElement(l.Button,{kind:"primary",onClick:()=>a(e)},p("goToForm","Go To Form")))))},k=()=>{let{patientUuids:e}=(0,n.useContext)(c.Ay),{t}=(0,i.useTranslation)(),a=(0,y.useNavigate)();return s().createElement("div",{className:"-esm-fast-data-entry__styles__workspaceWrapper___HTRkA"},s().createElement("div",{className:"-esm-fast-data-entry__styles__workspace___NUbti"},s().createElement("div",{className:"-esm-fast-data-entry__styles__leftPanel___6U81E"},s().createElement("h4",null,t("review","Review")),s().createElement("div",{className:"-esm-fast-data-entry__styles__navButtons___yACI6"},s().createElement(l.Button,{kind:"primary",onClick:()=>a("/")},t("save&close","Save & Close")),s().createElement(l.Button,{kind:"tertiary",onClick:()=>a("/")},t("cancel","Cancel")))),s().createElement("div",{className:"-esm-fast-data-entry__styles__formContainer___T-7kl"},e.map(e=>s().createElement(w,{patientUuid:e,key:e})))))},g=()=>{let e=(0,n.useContext)(c.Ay),{workflowState:t,destroySession:a}=e,r=(0,n.useRef)();(0,n.useEffect)(()=>()=>{r.current?.()},[e.activeFormUuid]);let{t:u}=(0,i.useTranslation)();return t?s().createElement(s().Fragment,null,s().createElement("div",{className:"-esm-fast-data-entry__styles__rightPanelActionButtons___iNYXP"},s().createElement(l.Button,{kind:"secondary",onClick:"NEW_PATIENT"===t?()=>a():()=>{r.current?.(),r.current=(0,o.showModal)("fde-complete-session-modal",{onComplete:e.submitForComplete})}},u("saveAndComplete","Save & Complete")),s().createElement(l.Button,{kind:"tertiary",onClick:()=>{r.current?.(),r.current=(0,o.showModal)("fde-cancel-session-modal",{onDiscard:e.destroySession,onSaveAndClose:e.closeSession})}},u("cancel","Cancel")))):null},A=()=>{let{patientUuids:e,activePatientUuid:t,activeEncounterUuid:a,saveEncounter:l,activeFormUuid:m,editEncounter:_,encounters:p,singleSessionVisitTypeUuid:v}=(0,n.useContext)(c.Ay),{t:E}=(0,i.useTranslation)(),[y,f]=(0,n.useState)(null),[U,S]=(0,n.useState)(null),{sessionLocation:N}=(0,o.useSession)(),{updateEncounter:C,success:h}=(({showSuccessNotification:e=!0,showErrorNotification:t=!0})=>{let{t:a}=(0,i.useTranslation)(),[s,r]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null),[u,d]=(0,n.useState)(null),m=(0,n.useCallback)(t=>{r(!1),d(!1),c(t),e&&(0,o.showSnackbar)({kind:"success",subtitle:a("visitStartedSuccessfully",`${t?.data?.visitType?.display} started successfully`),title:a("visitStarted","Visit started")})},[a,e]),_=(0,n.useCallback)(e=>{r(!1),c(!1),d(e),t&&(0,o.showNotification)({title:a("startVisitError","Error starting visit"),kind:"error",critical:!0,description:e?.message})},[a,t]);return{saveVisit:(0,n.useCallback)(e=>{let t={patient:e.patientUuid,startDatetime:e.startDatetime,stopDatetime:e.stopDatetime,visitType:e.visitType,location:e.location};(0,o.openmrsFetch)(`${o.restBaseUrl}/visit`,{method:"POST",body:t,headers:{"Content-Type":"application/json"}}).then(m).catch(_)},[_,m]),updateEncounter:(0,n.useCallback)(e=>{(0,o.openmrsFetch)(`${o.restBaseUrl}/encounter/`+e.uuid,{method:"POST",body:{visit:e.visit},headers:{"Content-Type":"application/json"}})},[]),success:l,error:u,isSubmitting:s}})({showSuccessNotification:!1,showErrorNotification:!0});(0,n.useEffect)(()=>{y&&U&&C({uuid:y.uuid,visit:U.uuid})},[y,U,C]),(0,n.useEffect)(()=>{h&&S(h.data)},[h]);let T=(0,n.useCallback)(e=>{e.location=N?.uuid,e.encounterDatetime=e.encounterDatetime?e.encounterDatetime:new Date().toISOString();let a={startDatetime:new Date(e.encounterDatetime),stopDatetime:new Date(e.encounterDatetime),uuid:(0,r.A)(),patient:{uuid:t},location:{uuid:N?.uuid},visitType:{uuid:v}};e.visit=a},[t,v,N]);return s().createElement("div",{className:"-esm-fast-data-entry__styles__workspace___IqIXu"},!e.length&&s().createElement("div",{className:"-esm-fast-data-entry__styles__selectPatientMessage___JbDJX"},E("selectPatientFirst","Please select a patient first")),!!e.length&&s().createElement("div",{className:"-esm-fast-data-entry__styles__formMainContent___tX0lw"},s().createElement("div",{className:"-esm-fast-data-entry__styles__formContainer___mWOmj"},s().createElement(u.A,{patientUuid:t,encounterUuid:a,formUuid:m,handlePostResponse:e=>{e&&e.uuid&&(l(e.uuid),f(e))},handleEncounterCreate:T,hidePatientBanner:!0})),s().createElement("div",{className:"-esm-fast-data-entry__styles__rightPanel___AHxE+"},s().createElement("h4",null,E("formsFilled","Forms filled")),s().createElement("div",{className:"-esm-fast-data-entry__styles__patientCardsSection___Agw0T"},e.map(e=>s().createElement(d.A,{key:e,patientUuid:e,activePatientUuid:t,editEncounter:_,encounters:p}))),s().createElement(g,null))))},b=()=>{let{workflowState:e}=(0,n.useContext)(c.Ay);return s().createElement(s().Fragment,null,s().createElement("div",{className:"-esm-fast-data-entry__styles__breadcrumbsContainer___JMrE6"},s().createElement(o.ExtensionSlot,{name:"breadcrumbs-slot"})),"REVIEW"===e&&s().createElement(k,null),"REVIEW"!==e&&s().createElement(s().Fragment,null,s().createElement(C,null),s().createElement(E,null),s().createElement("div",{className:"-esm-fast-data-entry__styles__workspaceWrapper___IV-DF"},s().createElement(A,null))))},F=()=>s().createElement(c.Z1,null,s().createElement(b,null))},5565(e,t,a){a.d(t,{J0:()=>d.A,XT:()=>u,mr:()=>o}),a(7979);var n=a(8345),s=a(9338),i=a.n(s);let r="(uuid,name,display,encounterType:(uuid,name,viewPrivilege,editPrivilege),version,published,retired,resources:(uuid,name,dataType,valueReference))",l=`${n.restBaseUrl}/form?v=custom:${r}`,o=(n.restBaseUrl,function(e=!1){let t=(0,n.useSession)(),{data:a,error:s}=i()([l,e],async()=>{let e=await (0,n.openmrsFetch)(l);return e.data?.results?.filter(e=>e.published&&!/component/i.test(e.name))??[]});return{forms:a?.filter(e=>!!(0,n.userHasAccess)(e.encounterType?.editPrivilege?.display,t?.user)),isLoading:!s&&!a,error:s}}),c=`${n.restBaseUrl}/encounter/`,u=e=>{let t=`${c}${e}`,{data:a,error:s}=i()(t,async()=>(await (0,n.openmrsFetch)(t)).data||null);return{encounter:a,isLoading:!s&&a,error:s}};var d=a(1291);a(5301)},4961(e,t,a){a.d(t,{i:()=>r});var n=a(9338),s=a.n(n),i=a(8345);function r(e){let t=e?`ws/rest/v1/patient/${e}/identifier`:null,{data:a,error:n,isValidating:r}=s()(t,i.openmrsFetch);return{hsuIdentifier:a?.data?.results.length?a.data.results.find(e=>"05a29f94-c0ed-11e2-94be-8c13b969e334"==e.identifierType.uuid):void 0,isLoading:!a&&!n,isError:n,isValidating:r}}},6433(e,t,a){a.d(t,{A:()=>u});var n=a(9184),s=a(2383),i=a(3392),r=a(7979),l=a.n(r),o=a(1291);let c=({onClick:e=()=>void 0,active:t,children:a})=>l().createElement("div",{onClick:e,className:`-esm-fast-data-entry__styles__cardContainer___r35b+ ${!t&&"-esm-fast-data-entry__styles__inactiveCard___mgnR5"}`,role:"button",tabIndex:0},a),u=({patientUuid:e,activePatientUuid:t,editEncounter:a,encounters:r})=>{let u=(0,o.A)(e),d=u?.name?.[0]?.given?.[0],m=u?.name?.[0]?.family,_=u?.identifier?.[0]?.value;if(!u)return l().createElement(c,{active:!0},l().createElement(i.SkeletonText,{className:"-esm-fast-data-entry__styles__skeletonText___W2uKh"}));let p=t===e;return l().createElement(c,{onClick:p?()=>void 0:()=>a(e),active:p},l().createElement("div",{className:"-esm-fast-data-entry__styles__patientInfo___dsLIV"},l().createElement("div",{className:"-esm-fast-data-entry__styles__identifier___pA+fq"},_),l().createElement("div",{className:`-esm-fast-data-entry__styles__displayName___n+VZ8 ${p&&"-esm-fast-data-entry__styles__activeDisplayName___furnV"}`},d," ",m)),l().createElement("div",null,e in r?l().createElement(n.cR,{size:16,className:"-esm-fast-data-entry__styles__statusSuccess___1nZk2"}):l().createElement(s.Cp,{size:16,className:"-esm-fast-data-entry__styles__statusWarning___QxLWO"})))}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6107"],{8414(e,t,a){let n;a.d(t,{A:()=>l});let s="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i=new Uint8Array(16),r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));let l=function(e,t,a){if(s&&!t&&!e)return s();let l=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)})();if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){a=a||0;for(let e=0;e<16;++e)t[a+e]=l[e];return t}return function(e,t=0){return r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]}(l)}},5246(e,t,a){a.d(t,{A:()=>o});var n=a(7979),s=a.n(n),i=a(8345),r=a(1291),l=a(8269);let o=({formUuid:e,patientUuid:t,visitUuid:a,visitTypeUuid:o,encounterUuid:c,handlePostResponse:u,handleEncounterCreate:d,handleOnValidate:m,hidePatientBanner:_})=>{let p=(0,r.A)(t),v=p?.id===t,{activeSessionMeta:E}=(0,n.useContext)(l.Ay);(0,n.useEffect)(()=>()=>(0,i.detach)("form-widget-slot","form-widget-slot"),[]);let[y,f]=(0,n.useState)(!0),U=y&&e&&t&&p&&v;return s().createElement("div",null,U&&s().createElement(i.ExtensionSlot,{name:"form-widget-slot",state:{view:"form",formUuid:e,visitUuid:a??"",visitTypeUuid:o??"",patientUuid:t,patient:p,encounterUuid:c??"",closeWorkspace:()=>void 0,handlePostResponse:e=>{u(e),f(!1),setTimeout(()=>{f(!0)},1)},handleEncounterCreate:d,handleOnValidate:m,showDiscardSubmitButtons:!1,preFilledQuestions:{...E,encDate:E.sessionDate},hideControls:!0,hidePatientBanner:_}}))}},8269(e,t,a){a.d(t,{Ay:()=>_,SR:()=>m});var n=a(7979),s=a.n(n),i=a(6984),r=a(9943),l=a(8345),o=a(5725);let c={setGroup:e=>void 0,unsetGroup:()=>void 0,setSessionMeta:e=>void 0,openPatientSearch:()=>void 0,saveEncounter:e=>void 0,editEncounter:e=>void 0,validateForNext:()=>void 0,validateForComplete:()=>void 0,updateVisitUuid:e=>void 0,submitForNext:(e=null)=>void 0,submitForReview:()=>void 0,submitForComplete:()=>void 0,addPatientUuid:e=>void 0,removePatientUuid:e=>void 0,goToReview:()=>void 0,destroySession:()=>void 0,closeSession:()=>void 0},u={activeFormUuid:null,forms:{},workflowState:null,activePatientUuid:null,activeEncounterUuid:null,activeSessionUuid:null,activeVisitUuid:null,patientUuids:[],encounters:{},visits:{},activeGroupUuid:null,activeGroupName:null,activeGroupMembers:[],activeSessionMeta:{sessionName:null,practitionerName:null,sessionDate:null,sessionNotes:null},groupVisitTypeUuid:null,userUuid:null},d=s().createContext({...u,...c}),m=({children:e})=>{let{user:t}=(0,l.useSession)(),{formUuid:a}=(0,r.useParams)(),m=a.split("&")[0],_=(0,o.A)("@openmrs/esm-fast-data-entry-app.groupSessionVisitTypeUuid"),p=_?.result?.data?.results?.[0]?.value,[v,E]=(0,n.useReducer)(i.Ay,{...u,...c}),y=(0,n.useMemo)(()=>({initializeWorkflowState:({activeFormUuid:e})=>E({type:"INITIALIZE_WORKFLOW_STATE",activeFormUuid:e,userUuid:t.uuid}),setGroup:e=>E({type:"SET_GROUP",group:e}),unsetGroup:()=>E({type:"UNSET_GROUP"}),setSessionMeta:e=>E({type:"SET_SESSION_META",meta:e}),addPatientUuid:e=>E({type:"ADD_PATIENT_UUID",patientUuid:e}),removePatientUuid:e=>E({type:"REMOVE_PATIENT_UUID",patientUuid:e}),openPatientSearch:()=>E({type:"OPEN_PATIENT_SEARCH"}),saveEncounter:e=>E({type:"SAVE_ENCOUNTER",encounterUuid:e}),validateForNext:()=>E({type:"VALIDATE_FOR_NEXT"}),validateForComplete:()=>E({type:"VALIDATE_FOR_COMPLETE"}),updateVisitUuid:e=>E({type:"UPDATE_VISIT_UUID",visitUuid:e}),submitForNext:e=>E({type:"SUBMIT_FOR_NEXT",nextPatientUuid:e}),submitForComplete:()=>E({type:"SUBMIT_FOR_COMPLETE"}),editEncounter:e=>E({type:"EDIT_ENCOUNTER",patientUuid:e}),goToReview:()=>E({type:"GO_TO_REVIEW"}),destroySession:()=>E({type:"DESTROY_SESSION"}),closeSession:()=>E({type:"CLOSE_SESSION"})}),[t]);return(0,n.useEffect)(()=>{v?.workflowState===null&&m&&y.initializeWorkflowState({activeFormUuid:m})},[m,v?.workflowState,y]),s().createElement(d.Provider,{value:{groupVisitTypeUuid:p,...v,...y,workflowState:v.forms?.[v.activeFormUuid]?.workflowState??u.workflowState,activeSessionUuid:v.forms?.[v.activeFormUuid]?.activeSessionUuid??u.activeSessionUuid,activePatientUuid:v.forms?.[v.activeFormUuid]?.activePatientUuid??u.activePatientUuid,activeEncounterUuid:v.forms?.[v.activeFormUuid]?.activeEncounterUuid??u.activeEncounterUuid,activeVisitUuid:v.forms?.[v.activeFormUuid]?.activeVisitUuid??u.activeVisitUuid,patientUuids:v.forms?.[v.activeFormUuid]?.patientUuids??u.patientUuids,encounters:v.forms?.[v.activeFormUuid]?.encounters??u.encounters,activeGroupUuid:v.forms?.[v.activeFormUuid]?.groupUuid??u.activeGroupUuid,activeGroupName:v.forms?.[v.activeFormUuid]?.groupName??u.activeGroupName,activeGroupMembers:v.forms?.[v.activeFormUuid]?.groupMembers??u.activeGroupMembers,activeSessionMeta:v.forms?.[v.activeFormUuid]?.sessionMeta??u.activeSessionMeta}},e)},_=d},3462(e,t,a){a.r(t),a.d(t,{default:()=>F});var n=a(7979),s=a.n(n),i=a(3826),r=a(8414),l=a(3392),o=a(8345),c=a(5852),u=a(5246),d=a(6433);let m="-esm-fast-data-entry__styles__patientInfoRow___W+Ndf";var _=a(1291);let p=()=>s().createElement("div",{className:"-esm-fast-data-entry__styles__container___SoIRW"},s().createElement(l.SkeletonPlaceholder,{className:"-esm-fast-data-entry__styles__photoPlaceholder___54jNW"}),s().createElement("div",{className:"-esm-fast-data-entry__styles__patientInfoContent___E8vUq"},s().createElement("div",{className:m},s().createElement(l.SkeletonText,{width:"7rem",lineCount:1})),s().createElement("div",{className:m},s().createElement("span",null,s().createElement(l.SkeletonText,{width:"1rem",lineCount:1})),s().createElement("span",null,"\xb7"),s().createElement("span",null,s().createElement(l.SkeletonText,{width:"1rem",lineCount:1})),s().createElement("span",null,"\xb7"),s().createElement("span",null,s().createElement(l.SkeletonText,{width:"1rem",lineCount:1}))))),v=({patient:e,hideActionsOverflow:t})=>s().createElement("div",{className:"-esm-fast-data-entry__styles__patientBannerContainer___wVhFg"},s().createElement(o.ExtensionSlot,{name:"patient-header-slot",state:{patient:e,patientUuid:e.id,hideActionsOverflow:t}})),E=()=>{let{activePatientUuid:e,workflowState:t}=(0,n.useContext)(c.Ay),a=(0,_.A)(e),{t:r}=(0,i.useTranslation)(),l=`${a?.name?.[0].given?.join(" ")} ${a?.name?.[0]?.family}`;return((0,n.useMemo)(()=>({patientUuid:a?.id,patientName:l,size:"small"}),[a?.id,l]),"NEW_PATIENT"===t)?null:a?s().createElement(v,{patient:a,hideActionsOverflow:!0}):s().createElement(p,null)};var y=a(9943),f=a(2137),U=a(9184),S=a(4961);let N="-esm-fast-data-entry__styles__padded___zXmH0",C=()=>{let[e,t]=(0,n.useState)(),{hsuIdentifier:a}=(0,S.i)(e),{sessionLocation:r}=(0,o.useSession)(),{uuid:u,display:d}=r??{},{uuid:m,display:_}=a?.location??{},p=(0,o.useConfig)(),{addPatient:v,workflowState:E,activeFormUuid:C}=(0,n.useContext)(c.Ay),{t:h}=(0,i.useTranslation)(),T=(0,n.useCallback)(()=>{v(e),t(null)},[v,e]);(0,n.useEffect)(()=>{t(null)},[C]);let w=(0,n.useCallback)(e=>{t(e)},[]);if((0,n.useEffect)(()=>{if(!e||!m)return;let a=u!==m;if(p.enforcePatientListLocationMatch&&a)(0,o.showSnackbar)({kind:"error",title:h("locationMismatch","Location Mismatch"),subtitle:h("patientLocationMismatchEnforced","Cannot add patient from {{hsuLocation}} to a session at {{sessionLocation}}",{hsuLocation:_,sessionLocation:d})}),t(null);else if(p.patientLocationMismatchCheck&&a){let e=!0,a=(0,o.showModal)("fde-patient-location-mismatch-modal",{onConfirm:T,sessionLocation:{uuid:u,display:d},hsuLocation:{uuid:m,display:_}},()=>{e&&t(null)});return()=>{e=!1,a()}}else v(e),t(null)},[e,u,d,m,_,v,p.patientLocationMismatchCheck,p.enforcePatientListLocationMatch,h,T]),"NEW_PATIENT"!==E)return null;let k=encodeURIComponent(`\${openmrsSpaBase}/forms/form/${C}?patientUuid=\${patientUuid}`),g=(0,o.interpolateUrl)(`\${openmrsSpaBase}/patient-registration?afterUrl=${k}`);return s().createElement(s().Fragment,null,s().createElement("div",{className:"-esm-fast-data-entry__styles__searchHeaderContainer___TC41U"},s().createElement("span",{className:N},h("nextPatient","Next patient"),":"),s().createElement("span",{className:"-esm-fast-data-entry__styles__searchBarWrapper___DhwCd"},s().createElement(o.ExtensionSlot,{name:"patient-search-bar-slot",state:{selectPatientAction:w,buttonProps:{kind:"primary"}}})),s().createElement("span",{className:N},h("or","or")),s().createElement("span",null,s().createElement(l.Button,{onClick:()=>(0,o.navigate)({to:g})},h("createNewPatient","Create new patient")," ",s().createElement(f.OM,{size:20}))),s().createElement("span",{style:{flexGrow:1}}),s().createElement("span",null,s().createElement(y.Link,{to:"../"},s().createElement(l.Button,{kind:"ghost"},h("cancel","Cancel")," ",s().createElement(U.bm,{size:20}))))))};var h=a(5565);let T={formReviewCard:"-esm-fast-data-entry__styles__formReviewCard___d2pGC",dataField:"-esm-fast-data-entry__styles__dataField___6nD1e",displayName:"-esm-fast-data-entry__styles__displayName___UT2b0",identifier:"-esm-fast-data-entry__styles__identifier___aCyxC"},w=({patientUuid:e})=>{let{encounters:t,editEncounter:a}=(0,n.useContext)(c.Ay),r=(0,h.J0)(e),o=r?.name?.[0]?.given?.[0],u=r?.name?.[0]?.family,d=r?.identifier?.[0]?.value,m=t?.[e],{encounter:_}=(0,h.XT)(m),{t:p}=(0,i.useTranslation)();return s().createElement("div",{className:T.formReviewCard},s().createElement(l.Accordion,{align:"start"},s().createElement(l.AccordionItem,{title:s().createElement(s().Fragment,null,s().createElement("span",{className:T.identifier},d),s().createElement("span",{className:T.displayName},o," ",u)),className:T.accordionItem},_&&_?.obs&&_.obs?.length&&s().createElement("div",{className:T.dataField},s().createElement("ul",null,_.obs.map((e,t)=>s().createElement("li",{key:t},e.display)))),s().createElement(l.Button,{kind:"primary",onClick:()=>a(e)},p("goToForm","Go To Form")))))},k=()=>{let{patientUuids:e}=(0,n.useContext)(c.Ay),{t}=(0,i.useTranslation)(),a=(0,y.useNavigate)();return s().createElement("div",{className:"-esm-fast-data-entry__styles__workspaceWrapper___HTRkA"},s().createElement("div",{className:"-esm-fast-data-entry__styles__workspace___NUbti"},s().createElement("div",{className:"-esm-fast-data-entry__styles__leftPanel___6U81E"},s().createElement("h4",null,t("review","Review")),s().createElement("div",{className:"-esm-fast-data-entry__styles__navButtons___yACI6"},s().createElement(l.Button,{kind:"primary",onClick:()=>a("/")},t("save&close","Save & Close")),s().createElement(l.Button,{kind:"tertiary",onClick:()=>a("/")},t("cancel","Cancel")))),s().createElement("div",{className:"-esm-fast-data-entry__styles__formContainer___T-7kl"},e.map(e=>s().createElement(w,{patientUuid:e,key:e})))))},g=()=>{let e=(0,n.useContext)(c.Ay),{workflowState:t,destroySession:a}=e,r=(0,n.useRef)();(0,n.useEffect)(()=>()=>{r.current?.()},[e.activeFormUuid]);let{t:u}=(0,i.useTranslation)();return t?s().createElement(s().Fragment,null,s().createElement("div",{className:"-esm-fast-data-entry__styles__rightPanelActionButtons___iNYXP"},s().createElement(l.Button,{kind:"secondary",onClick:"NEW_PATIENT"===t?()=>a():()=>{r.current?.(),r.current=(0,o.showModal)("fde-complete-session-modal",{onComplete:e.submitForComplete})}},u("saveAndComplete","Save & Complete")),s().createElement(l.Button,{kind:"tertiary",onClick:()=>{r.current?.(),r.current=(0,o.showModal)("fde-cancel-session-modal",{onDiscard:e.destroySession,onSaveAndClose:e.closeSession})}},u("cancel","Cancel")))):null},A=()=>{let{patientUuids:e,activePatientUuid:t,activeEncounterUuid:a,saveEncounter:l,activeFormUuid:m,editEncounter:_,encounters:p,singleSessionVisitTypeUuid:v}=(0,n.useContext)(c.Ay),{t:E}=(0,i.useTranslation)(),[y,f]=(0,n.useState)(null),[U,S]=(0,n.useState)(null),{sessionLocation:N}=(0,o.useSession)(),{updateEncounter:C,success:h}=(({showSuccessNotification:e=!0,showErrorNotification:t=!0})=>{let{t:a}=(0,i.useTranslation)(),[s,r]=(0,n.useState)(!1),[l,c]=(0,n.useState)(null),[u,d]=(0,n.useState)(null),m=(0,n.useCallback)(t=>{r(!1),d(!1),c(t),e&&(0,o.showSnackbar)({kind:"success",subtitle:a("visitStartedSuccessfully",`${t?.data?.visitType?.display} started successfully`),title:a("visitStarted","Visit started")})},[a,e]),_=(0,n.useCallback)(e=>{r(!1),c(!1),d(e),t&&(0,o.showNotification)({title:a("startVisitError","Error starting visit"),kind:"error",critical:!0,description:e?.message})},[a,t]);return{saveVisit:(0,n.useCallback)(e=>{let t={patient:e.patientUuid,startDatetime:e.startDatetime,stopDatetime:e.stopDatetime,visitType:e.visitType,location:e.location};(0,o.openmrsFetch)(`${o.restBaseUrl}/visit`,{method:"POST",body:t,headers:{"Content-Type":"application/json"}}).then(m).catch(_)},[_,m]),updateEncounter:(0,n.useCallback)(e=>{(0,o.openmrsFetch)(`${o.restBaseUrl}/encounter/`+e.uuid,{method:"POST",body:{visit:e.visit},headers:{"Content-Type":"application/json"}})},[]),success:l,error:u,isSubmitting:s}})({showSuccessNotification:!1,showErrorNotification:!0});(0,n.useEffect)(()=>{y&&U&&C({uuid:y.uuid,visit:U.uuid})},[y,U,C]),(0,n.useEffect)(()=>{h&&S(h.data)},[h]);let T=(0,n.useCallback)(e=>{e.location=N?.uuid,e.encounterDatetime=e.encounterDatetime?e.encounterDatetime:new Date().toISOString();let a={startDatetime:new Date(e.encounterDatetime),stopDatetime:new Date(e.encounterDatetime),uuid:(0,r.A)(),patient:{uuid:t},location:{uuid:N?.uuid},visitType:{uuid:v}};e.visit=a},[t,v,N]);return s().createElement("div",{className:"-esm-fast-data-entry__styles__workspace___IqIXu"},!e.length&&s().createElement("div",{className:"-esm-fast-data-entry__styles__selectPatientMessage___JbDJX"},E("selectPatientFirst","Please select a patient first")),!!e.length&&s().createElement("div",{className:"-esm-fast-data-entry__styles__formMainContent___tX0lw"},s().createElement("div",{className:"-esm-fast-data-entry__styles__formContainer___mWOmj"},s().createElement(u.A,{patientUuid:t,encounterUuid:a,formUuid:m,handlePostResponse:e=>{e&&e.uuid&&(l(e.uuid),f(e))},handleEncounterCreate:T,hidePatientBanner:!0})),s().createElement("div",{className:"-esm-fast-data-entry__styles__rightPanel___AHxE+"},s().createElement("h4",null,E("formsFilled","Forms filled")),s().createElement("div",{className:"-esm-fast-data-entry__styles__patientCardsSection___Agw0T"},e.map(e=>s().createElement(d.A,{key:e,patientUuid:e,activePatientUuid:t,editEncounter:_,encounters:p}))),s().createElement(g,null))))},b=()=>{let{workflowState:e}=(0,n.useContext)(c.Ay);return s().createElement(s().Fragment,null,s().createElement("div",{className:"-esm-fast-data-entry__styles__breadcrumbsContainer___JMrE6"},s().createElement(o.ExtensionSlot,{name:"breadcrumbs-slot"})),"REVIEW"===e&&s().createElement(k,null),"REVIEW"!==e&&s().createElement(s().Fragment,null,s().createElement(C,null),s().createElement(E,null),s().createElement("div",{className:"-esm-fast-data-entry__styles__workspaceWrapper___IV-DF"},s().createElement(A,null))))},F=()=>s().createElement(c.Z1,null,s().createElement(b,null))},5565(e,t,a){a.d(t,{J0:()=>d.A,XT:()=>u,mr:()=>o}),a(7979);var n=a(8345),s=a(1943),i=a.n(s);let r="(uuid,name,display,encounterType:(uuid,name,viewPrivilege,editPrivilege),version,published,retired,resources:(uuid,name,dataType,valueReference))",l=`${n.restBaseUrl}/form?v=custom:${r}`,o=(n.restBaseUrl,function(e=!1){let t=(0,n.useSession)(),{data:a,error:s}=i()([l,e],async()=>{let e=await (0,n.openmrsFetch)(l);return e.data?.results?.filter(e=>e.published&&!/component/i.test(e.name))??[]});return{forms:a?.filter(e=>!!(0,n.userHasAccess)(e.encounterType?.editPrivilege?.display,t?.user)),isLoading:!s&&!a,error:s}}),c=`${n.restBaseUrl}/encounter/`,u=e=>{let t=`${c}${e}`,{data:a,error:s}=i()(t,async()=>(await (0,n.openmrsFetch)(t)).data||null);return{encounter:a,isLoading:!s&&a,error:s}};var d=a(1291);a(5301)},4961(e,t,a){a.d(t,{i:()=>r});var n=a(1943),s=a.n(n),i=a(8345);function r(e){let t=e?`ws/rest/v1/patient/${e}/identifier`:null,{data:a,error:n,isValidating:r}=s()(t,i.openmrsFetch);return{hsuIdentifier:a?.data?.results.length?a.data.results.find(e=>"05a29f94-c0ed-11e2-94be-8c13b969e334"==e.identifierType.uuid):void 0,isLoading:!a&&!n,isError:n,isValidating:r}}},6433(e,t,a){a.d(t,{A:()=>u});var n=a(9184),s=a(2383),i=a(3392),r=a(7979),l=a.n(r),o=a(1291);let c=({onClick:e=()=>void 0,active:t,children:a})=>l().createElement("div",{onClick:e,className:`-esm-fast-data-entry__styles__cardContainer___r35b+ ${!t&&"-esm-fast-data-entry__styles__inactiveCard___mgnR5"}`,role:"button",tabIndex:0},a),u=({patientUuid:e,activePatientUuid:t,editEncounter:a,encounters:r})=>{let u=(0,o.A)(e),d=u?.name?.[0]?.given?.[0],m=u?.name?.[0]?.family,_=u?.identifier?.[0]?.value;if(!u)return l().createElement(c,{active:!0},l().createElement(i.SkeletonText,{className:"-esm-fast-data-entry__styles__skeletonText___W2uKh"}));let p=t===e;return l().createElement(c,{onClick:p?()=>void 0:()=>a(e),active:p},l().createElement("div",{className:"-esm-fast-data-entry__styles__patientInfo___dsLIV"},l().createElement("div",{className:"-esm-fast-data-entry__styles__identifier___pA+fq"},_),l().createElement("div",{className:`-esm-fast-data-entry__styles__displayName___n+VZ8 ${p&&"-esm-fast-data-entry__styles__activeDisplayName___furnV"}`},d," ",m)),l().createElement("div",null,e in r?l().createElement(n.cR,{size:16,className:"-esm-fast-data-entry__styles__statusSuccess___1nZk2"}):l().createElement(s.Cp,{size:16,className:"-esm-fast-data-entry__styles__statusWarning___QxLWO"})))}}}]);
|
package/dist/6362.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6362"],{4993(e,t,
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6362"],{4993(e,t,r){r.r(t),r.d(t,{INFINITE_PREFIX:()=>"$inf$",IS_REACT_LEGACY:()=>n.j,IS_SERVER:()=>n.I,OBJECT:()=>n.O,SWRConfig:()=>n.S,SWRGlobalState:()=>n.a,UNDEFINED:()=>n.U,cache:()=>n.o,compare:()=>n.v,createCacheHelper:()=>n.c,defaultConfig:()=>n.d,defaultConfigOptions:()=>n.w,getTimestamp:()=>n.g,hasRequestAnimationFrame:()=>n.x,initCache:()=>n.y,internalMutate:()=>n.f,isDocumentDefined:()=>n.z,isFunction:()=>n.e,isLegacyDeno:()=>n.A,isPromiseLike:()=>n.b,isUndefined:()=>n.i,isWindowDefined:()=>n.p,mergeConfigs:()=>n.t,mergeObjects:()=>n.m,mutate:()=>n.k,noop:()=>n.n,normalize:()=>u,preload:()=>s,preset:()=>n.B,rAF:()=>n.r,revalidateEvents:()=>n.C,serialize:()=>n.s,slowConnection:()=>n.D,stableHash:()=>n.G,subscribeCallback:()=>p,unload:()=>n.l,useIsomorphicLayoutEffect:()=>n.u,useSWRConfig:()=>c,withArgs:()=>d,withMiddleware:()=>g});var n=r(8444),i=r(7979),o=r.n(i);let a=n.p&&window.__SWR_DEVTOOLS_USE__,l=a?window.__SWR_DEVTOOLS_USE__:[],u=e=>(0,n.e)(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],c=()=>{let e=(0,i.useContext)(n.q);return(0,i.useMemo)(()=>(0,n.m)(n.d,e),[e])},s=(e,t)=>{if(n.I)return;let[r,i]=(0,n.s)(e),[,,,o]=n.a.get(n.o);if(o[r])return o[r];let a=t(i);return o[r]=a,a},f=l.concat(e=>(t,r,i)=>{let o=r&&((...e)=>{let[i]=(0,n.s)(t),[,,,o]=n.a.get(n.o);if(i.startsWith("$inf$"))return r(...e);let a=o[i];return(0,n.i)(a)?r(...e):(delete o[i],a)});return e(t,o,i)}),d=e=>function(...t){let r=c(),[i,o,a]=u(t),l=(0,n.t)(r,a),s=e,{use:d}=l,p=(d||[]).concat(f);for(let e=p.length;e--;)s=p[e](s);return s(i,o||l.fetcher||null,l)},p=(e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}},g=(e,t)=>(...r)=>{let[n,i,o]=u(r),a=(o.use||[]).concat(t);return e(n,i,{...o,use:a})};a&&(window.__SWR_DEVTOOLS_REACT__=o())},8444(e,t,r){r.d(t,{x:()=>T,I:()=>N,j:()=>j,u:()=>M,F:()=>a,g:()=>G,r:()=>F,C:()=>f,d:()=>Z,o:()=>Y,z:()=>R,a:()=>d,l:()=>Q,w:()=>L,S:()=>er,i:()=>_,t:()=>ee,E:()=>c,f:()=>B,q:()=>et,c:()=>C,B:()=>I,M:()=>u,n:()=>p,y:()=>H,U:()=>g,k:()=>K,v:()=>X,G:()=>$,R:()=>l,h:()=>s,s:()=>q,D:()=>W,O:()=>h,e:()=>E,p:()=>O,A:()=>S,b:()=>y,m:()=>m});var n=r(7979),i=r.n(n),o=Object.prototype.hasOwnProperty;let a=0,l=1,u=2,c=3,s=4;var f={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1,UNLOAD_EVENT:4};let d=new WeakMap,p=()=>{},g=p(),h=Object,_=e=>e===g,E=e=>"function"==typeof e,m=(e,t)=>({...e,...t}),y=e=>E(e.then),w={},b={},v="undefined",O=typeof window!=v,R=typeof document!=v,S=O&&"Deno"in window,T=()=>O&&typeof window.requestAnimationFrame!=v,C=(e,t)=>{let r=d.get(e);return[()=>!_(t)&&e.get(t)||w,n=>{if(!_(t)){let i=e.get(t);t in b||(b[t]=i),r[5](t,m(i,n),i||w)}},r[6],()=>!_(t)&&t in b?b[t]:!_(t)&&e.get(t)||w]},D=!0,[k,A]=O&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[p,p],I={isOnline:()=>D,isVisible:()=>{let e=R&&document.visibilityState;return _(e)||"hidden"!==e}},L={initFocus:e=>(R&&document.addEventListener("visibilitychange",e),k("focus",e),()=>{R&&document.removeEventListener("visibilitychange",e),A("focus",e)}),initReconnect:e=>{let t=()=>{D=!0,e()},r=()=>{D=!1};return k("online",t),k("offline",r),()=>{A("online",t),A("offline",r)}}},j=!i().useId,N=!O||S,F=e=>T()?window.requestAnimationFrame(e):setTimeout(e,1),M=N?n.useEffect:n.useLayoutEffect,V="u">typeof navigator&&navigator.connection,W=!N&&V&&(["slow-2g","2g"].includes(V.effectiveType)||V.saveData),x=new WeakMap,U=(e,t)=>e===`[object ${t}]`,P=0,$=e=>{let t,r,n=typeof e,i=h.prototype.toString.call(e),o=U(i,"Date"),a=U(i,"RegExp"),l=U(i,"Object");if(h(e)!==e||o||a)t=o?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=x.get(e))return t;if(t=++P+"~",x.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=$(e[r])+",";x.set(e,t)}if(l){t="#";let n=h.keys(e).sort();for(;!_(r=n.pop());)_(e[r])||(t+=r+":"+$(e[r])+",");x.set(e,t)}}return t},q=e=>{if(E(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?$(e):"",t]},z=0,G=()=>++z;async function B(...e){let[t,r,n,i]=e,o=m({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),a=o.populateCache,l=o.rollbackOnError,c=o.optimisticData,s=o.throwOnError;if(E(r)){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(f))}return f(r);async function f(r){let i,[f]=q(r);if(!f)return;let[p,h]=C(t,f),[m,w,b,v]=d.get(t),O=()=>{let e=m[f];return(E(o.revalidate)?o.revalidate(p().data,r):!1!==o.revalidate)&&(delete b[f],delete v[f],e&&e[0])?e[0](u).then(()=>p().data):p().data};if(e.length<3)return O();let R=n,S=!1,T=G();w[f]=[T,0];let D=!_(c),k=p(),A=k.data,I=k._c,L=_(I)?A:I;if(D&&h({data:c=E(c)?c(L,A):c,_c:L}),E(R))try{R=R(L)}catch(e){i=e,S=!0}if(R&&y(R)){let e;if(R=await R.catch(e=>{i=e,S=!0}),T!==w[f][0]){if(S)throw i;return R}S&&D&&(e=i,"function"==typeof l?l(e):!1!==l)&&(a=!0,h({data:L,_c:g}))}if(a&&!S&&(E(a)?h({data:a(R,L),error:g,_c:g}):h({data:R,error:g,_c:g})),w[f][1]=G(),Promise.resolve(O()).then(()=>{h({_c:g})}),S){if(s)throw i;return}return R}}let J=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},H=(e,t)=>{if(!d.has(e)){let r=m(L,t),n=Object.create(null),i=B.bind(g,e),o=p,u=Object.create(null),c=(e,t)=>{let r=u[e]||[];return u[e]=r,r.push(t),()=>{let e=r.indexOf(t);e>=0&&(r[e]=r[r.length-1],r.pop())}},f=(t,r,n)=>{e.set(t,r);let i=u[t];if(i)for(let e of i)e(r,n)},h=t=>{let r=d.get(e),[,i,o,a]=r,l=G();for(let e in r[8]++,o)delete o[e];for(let e in a)delete a[e];for(let e in i)i[e]=[l,l];let c={};for(let t of[...e.keys()]){let r=e.get(t);e.delete(t);let n=u[t];if(n)for(let e of n)e(c,r)}let f=!t||!1!==t.revalidate;for(let e in n){let t=n[e];for(let e=0;e<t.length;e++)t[e](s,{revalidate:f&&!e})}},_=()=>{if(!d.has(e)&&(d.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,f,c,h,0]),!N)){let t=r.initFocus(setTimeout.bind(g,J.bind(g,n,a))),i=r.initReconnect(setTimeout.bind(g,J.bind(g,n,l)));o=()=>{t&&t(),i&&i(),d.delete(e)}}};return _(),[e,i,_,o,h]}let r=d.get(e);return[e,r[4],g,g,r[7]]},X=function e(t,r){var n,i;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(o.call(t,n)&&++i&&!o.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},[Y,K,,,Q]=H(new Map),Z=m({onLoadingSlow:p,onSuccess:p,onError:p,onErrorRetry:(e,t,r,n,i)=>{let o=r.errorRetryCount,a=i.retryCount,l=~~((Math.random()+.5)*(1<<(a<8?a:8)))*r.errorRetryInterval;(_(o)||!(a>o))&&setTimeout(n,l,i)},onDiscarded:p,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:W?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:W?5e3:3e3,compare:X,isPaused:()=>!1,cache:Y,mutate:K,unload:Q,fallback:{}},I),ee=(e,t)=>{let r=m(e,t);if(t){let{use:n,fallback:i,cacheData:o}=e,{use:a,fallback:l,cacheData:u}=t;n&&a&&(r.use=n.concat(a)),i&&l&&(r.fallback=m(i,l)),o&&u&&(r.cacheData=m(o,u))}return r},et=(0,n.createContext)({}),er=e=>{let{value:t}=e,r=(0,n.useContext)(et),i=E(t),o=(0,n.useMemo)(()=>i?t(r):t,[i,r,t]),a=(0,n.useMemo)(()=>i?o:ee(r,o),[i,r,o]),l=o&&o.provider,u=(0,n.useRef)(g);l&&!u.current&&(u.current=H(l(a.cache||Y),o));let c=u.current;return c&&(a.cache=c[0],a.mutate=c[1],a.unload=c[4]),M(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,n.createElement)(et.Provider,m(e,{value:a}))}}}]);
|
package/dist/6362.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"6362.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/_internal/index.mjs"],"names":["Object","WeakMap","Date","RegExp","JSON","Array","window","document","I","setTimeout","navigator","o","Promise","e","t","s","Map","r","Math","i"],"mappings":"m5BAGA,IAAM,EAAO,KAAK,EAKZ,EAA8B,IAC9B,EAASA,OACT,EAAc,AAAC,GAAI,IAAM,EACzB,EAAa,AAAC,GAAI,AAAY,YAAZ,OAAO,EACzB,EAAe,CAAC,EAAG,IAAK,EACtB,GAAG,CAAC,CACJ,GAAG,CAAC,AACR,GACE,EAAgB,AAAC,GAAI,EAAW,EAAE,IAAI,EAMtC,EAAQ,IAAIC,QAEd,EAAU,EASR,EAAa,AAAC,IAChB,IAGI,EACA,EAJE,EAAO,OAAO,EACd,EAAc,GAAO,EAAI,WAAW,CACpC,EAAS,GAAeC,KAG9B,GAAI,EAAO,KAAS,GAAQ,GAAU,GAAeC,OA8BjD,EAAS,EAAS,EAAI,MAAM,GAAK,AAAQ,UAAR,EAAmB,EAAI,QAAQ,GAAK,AAAQ,UAAR,EAAmBC,KAAK,SAAS,CAAC,GAAO,GAAK,MA9B1D,CAIzD,GADA,EAAS,EAAM,GAAG,CAAC,GACP,OAAO,EAMnB,GAFA,EAAS,EAAE,EAAU,IACrB,EAAM,GAAG,CAAC,EAAK,GACX,GAAeC,MAAO,CAGtB,IAAI,EAAQ,EADZ,EAAS,IACM,EAAQ,EAAI,MAAM,CAAE,IAC/B,GAAU,EAAW,CAAG,CAAC,EAAM,EAAI,IAEvC,EAAM,GAAG,CAAC,EAAK,EACnB,CACA,GAAI,GAAe,EAAQ,CAEvB,EAAS,IACT,IAAM,EAAO,EAAO,IAAI,CAAC,GAAK,IAAI,GAClC,KAAM,CAAC,EAAY,EAAQ,EAAK,GAAG,KAC3B,AAAC,EAAY,CAAG,CAAC,EAAM,GACvB,IAAU,EAAQ,IAAM,EAAW,CAAG,CAAC,EAAM,EAAI,GAAE,EAG3D,EAAM,GAAG,CAAC,EAAK,EACnB,CACJ,CAGA,OAAO,CACX,EAGM,EAAiB,IAAIJ,QAErB,EAA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AAM,EAAO,OAAO,EAAI,KAAM,EACnD,EAKE,GAAoB,CAAC,EAAK,EAAW,KACvC,IAAM,EAAoB,CAAS,CAAC,EAAI,EAAK,EAAS,CAAC,EAAI,CAAG,EAAE,AAAD,EAE/D,OADA,EAAkB,IAAI,CAAC,GAChB,KACH,IAAM,EAAQ,EAAkB,OAAO,CAAC,GACpC,GAAS,IAET,CAAiB,CAAC,EAAM,CAAG,CAAiB,CAAC,EAAkB,MAAM,CAAG,EAAE,CAC1E,EAAkB,GAAG,GAE7B,CACJ,EAGM,GAAiB,CAAC,EAAQ,IACrB,CAAC,GAAG,KACP,GAAM,CAAC,EAAK,EAAI,EAAO,CAAG,EAAU,GAC9B,EAAO,AAAC,GAAO,GAAG,EAAI,EAAE,AAAD,EAAG,MAAM,CAAC,GACvC,OAAO,EAAO,EAAK,EAAI,CACnB,GAAG,CAAM,CACT,IAAK,CACT,EACJ,CAhGI,IAEAA,CAAAA,OAAO,sBAAsB,CAAG,I"}
|
|
1
|
+
{"version":3,"file":"6362.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/_internal/index.mjs","webpack://@openmrs/esm-fast-data-entry-app/./node_modules/dequal/lite/index.mjs","webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/config-context-ext53wcz.mjs"],"names":["window","Object","WeakMap","m","document","setTimeout","navigator","t","JSON","Array","o","Promise","e","Date","RegExp","Map","Math","i","c"],"mappings":"kgCAMA,IAAM,EAAiB,GAAe,EAAIA,OAAO,oBAAoB,CAC/D,EAAM,EAAiBA,OAAO,oBAAoB,CAAG,EAAE,CAQvD,EAAY,AAAC,GACR,QAAW,CAAI,CAAC,EAAE,EAAI,CACzB,CAAI,CAAC,EAAE,CACP,CAAI,CAAC,EAAE,CACP,CAAI,CAAC,EAAE,EAAI,CAAC,EACf,CAAG,CACA,CAAI,CAAC,EAAE,CACP,KACA,AAAC,CAAY,OAAZ,CAAI,CAAC,EAAE,CAAY,CAAI,CAAC,EAA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A,CAAY,CAAC,EAAE,EAAIA,CAAY,CAAC,EAAE,GAC3BA,CAAY,CAAC,EAAE,AAE9B,EAAG,EAAE,EACE,oBAAc,GAAiB,QAAQ,CAAEf,EAAa,EAAO,CAChE,MAAO,CACX,GACJ,C"}
|
package/dist/6977.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6977"],{1154(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,a;n=t,a=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{A:()=>d});var o=["width","height","viewBox"],s=["tabindex"],l={focusable:"false",preserveAspectRatio:"xMidYMid meet"},u=r(5556),c=r.n(u),p=r(7979),m=r.n(p);let d=m().forwardRef(function({className:e,children:t,tabIndex:r,xmlns:n="http://www.w3.org/2000/svg",preserveAspectRatio:u="xMidYMid meet",...c},p){let{tabindex:d,...f}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,r=e.height,n=e.viewBox,u=void 0===n?"0 0 ".concat(t," ").concat(r):n,c=i(e,o),p=c.tabindex,m=i(c,s),d=a(a(a({},l),m),{},{width:t,height:r,viewBox:u});return d["aria-label"]||d["aria-labelledby"]||d.title?(d.role="img",null!=p&&(d.focusable="true",d.tabindex=p)):d["aria-hidden"]=!0,d}({...c,tabindex:r});return e&&(f.className=e),null!=d&&("number"==typeof d?f.tabIndex=d:f.tabIndex=Number(r)),p&&(f.ref=p),n&&(f.xmlns=n),u&&(f.preserveAspectRatio=u),m().createElement("svg",f,t)});d.displayName="Icon",d.propTypes={"aria-hidden":c().oneOfType([c().bool,c().oneOf(["true","false"])]),"aria-label":c().string,"aria-labelledby":c().string,children:c().node,className:c().string,height:c().oneOfType([c().number,c().string]),preserveAspectRatio:c().string,tabIndex:c().oneOfType([c().number,c().string]),viewBox:c().string,width:c().oneOfType([c().number,c().string]),xmlns:c().string}},2694(e,t,r){"use strict";var n=r(6925);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,i,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2263(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(7979),a=r.n(n),i=r(3826),o=r(3392),s=r(5576),l=r(8345),u=r(4961);async function c(e){let t=`${l.restBaseUrl}/cohortm/cohort${e.uuid?`/${e.uuid}`:""}`,{data:r}=await (0,l.openmrsFetch)(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e});return r}let p={searchBar:"-esm-fast-data-entry__styles__searchBar___wo5xM",formError:"-esm-fast-data-entry__styles__formError___d-72S",patientRow:"-esm-fast-data-entry__styles__patientRow___a+mZz",patientName:"-esm-fast-data-entry__styles__patientName___U6z0i",loading:"-esm-fast-data-entry__styles__loading___sm3Fx"},m=({patient:e,removePatient:t})=>{let{t:r}=(0,i.useTranslation)(),{patient:u,error:c,isLoading:m}=(0,l.usePatient)(e?.uuid),d=(0,n.useCallback)(()=>t(e?.uuid),[e,t]),f=(0,n.useMemo)(()=>{if(m||c||!u)return"";let{identifier:e,name:t}=u,r=e?.[0]?.value||"",n=`${(t?.[0]?.given||[]).join(" ")} ${t?.[0]?.family||""}`;return`${r?`${r} -`:""}${n?` ${n}`:""}`.trim()},[m,c,u]);return a().createElement("li",{className:p.patientRow},a().createElement("span",null,a().createElement(o.Button,{kind:"tertiary",size:"sm",hasIconOnly:!0,onClick:d,renderIcon:s.zH,tooltipAlignment:"start",tooltipPosition:"top",iconDescription:r("remove","Remove")})),a().createElement("span",{className:p.patientName},f))},d=e=>{let{name:t,setName:r,patientList:s,updatePatientList:u,errors:c,validate:d,removePatient:f}=e,{t:y}=(0,i.useTranslation)(),b=(0,n.useMemo)(()=>({selectPatientAction:u,buttonProps:{kind:"secondary"}}),[u]);return a().createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"1rem"}},a().createElement(o.TextInput,{id:"newGroupName",labelText:y("newGroupName","New Group Name"),value:t,onChange:e=>r(e.target.value),onBlur:()=>d("name")}),c?.name&&a().createElement("p",{className:p.formError},"required"===c.name?y("groupNameError","Please enter a group name."):c.name),a().createElement(o.FormLabel,null,s.length," ",y("patientsInGroup","Patients in group")),c?.patientList&&a().createElement("p",{className:p.formError},y("noPatientError","Please enter at least one patient.")),!c?.patientList&&a().createElement("ul",{className:p.patientList},s?.map((e,t)=>a().createElement(m,{patient:e,removePatient:f,key:e.uuid}))),a().createElement(o.FormLabel,null,y("searchForPatientsToAddToGroup","Search for patients to add to group")),a().createElement("div",{className:p.searchBar},a().createElement(l.ExtensionSlot,{name:"patient-search-bar-slot",state:b})))},f=({patients:e,isCreate:t,groupName:r="",cohortUuid:s,close:p,onSave:m})=>{let{t:f}=(0,i.useTranslation)(),[y,b]=(0,n.useState)({}),[h,g]=(0,n.useState)(r),[_,v]=(0,n.useState)(e||[]),[E,w]=(0,n.useState)(!1),O=(0,l.useConfig)(),[P,T]=(0,n.useState)(),{hsuIdentifier:k}=(0,u.i)(P),{sessionLocation:x}=(0,l.useSession)(),{uuid:S,display:C}=x??{},{uuid:L,display:j}=k?.location??{},N=(0,n.useCallback)(e=>v(t=>t.filter(t=>t.uuid!==e)),[v]),M=(0,n.useCallback)(e=>{let t=!0;return e?(t="name"===e?!!h:!!_.length,b(r=>({...r,[e]:t?null:"required"}))):(h?b(e=>({...e,name:null})):(b(e=>({...e,name:"required"})),t=!1),_.length?b(e=>({...e,patientList:null})):(b(e=>({...e,patientList:"required"})),t=!1)),t},[h,_.length]),B=(0,n.useCallback)(()=>{function e(e){return[e?.name?.[0]?.given,e?.name?.[0]?.family].join(" ")}_.find(e=>e.uuid===P)||(0,l.fetchCurrentPatient)(P).then(t=>{v([..._,{uuid:P,...t}].sort((t,r)=>e(t).localeCompare(e(r),void 0,{sensitivity:"base"})))}),b(e=>({...e,patientList:null})),T(null)},[P,_,v]);(0,n.useEffect)(()=>{if(!P||!L)return;let e=S!==L;if(e&&O.enforcePatientListLocationMatch)(0,l.showSnackbar)({kind:"error",title:f("locationMismatch","Location Mismatch"),subtitle:f("patientLocationMismatchEnforced","Cannot add patient from {{hsuLocation}} to a session at {{sessionLocation}}",{hsuLocation:j,sessionLocation:C})}),T(null);else if(O.patientLocationMismatchCheck&&e){let e=!0,t=(0,l.showModal)("fde-patient-location-mismatch-modal",{onConfirm:B,sessionLocation:{uuid:S,display:C},hsuLocation:{uuid:L,display:j}},()=>{e&&T(null)});return()=>{e=!1,t()}}else B()},[P,S,C,L,j,B,O.patientLocationMismatchCheck,O.enforcePatientListLocationMatch,f]);let I=async()=>{let e;if(!M())return;w(!0);let t=_.map(e=>({patient:{uuid:e.uuid}}));try{e=await c({uuid:s,name:h,cohortType:O?.groupSessionConcepts?.cohortTypeId,location:x?.uuid,cohortMembers:_.map(e=>({patient:e.uuid,startDate:new Date().toISOString()}))})}catch(t){let e=t?.responseBody?.error??t?.responseBody??t;(0,l.showSnackbar)({kind:"error",title:f("postError","POST Error"),subtitle:e?.message??f("unknownPostError","An unknown error occurred while saving data")}),e?.fieldErrors&&b(Object.fromEntries(Object.entries(e.fieldErrors).map(([e,t])=>[e,t?.[0]?.message])));return}finally{w(!1)}m({...e,cohortMembers:t}),p()};return a().createElement(a().Fragment,null,a().createElement(o.ModalHeader,{closeModal:p},t?f("createNewGroup","Create New Group"):f("editGroup","Edit Group")),a().createElement(o.ModalBody,null,a().createElement(d,{name:h,setName:g,patientList:_,updatePatientList:e=>{T(e)},errors:y,validate:M,removePatient:N})),a().createElement(o.ModalFooter,null,a().createElement(o.Button,{kind:"secondary",onClick:p},f("cancel","Cancel")),a().createElement(o.Button,{kind:"primary",onClick:I,disabled:E},t?f("createGroup","Create Group"):f("save","Save"))))}},4961(e,t,r){"use strict";r.d(t,{i:()=>o});var n=r(
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["6977"],{1154(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n,a;n=t,a=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{A:()=>d});var o=["width","height","viewBox"],s=["tabindex"],l={focusable:"false",preserveAspectRatio:"xMidYMid meet"},u=r(5556),c=r.n(u),p=r(7979),m=r.n(p);let d=m().forwardRef(function({className:e,children:t,tabIndex:r,xmlns:n="http://www.w3.org/2000/svg",preserveAspectRatio:u="xMidYMid meet",...c},p){let{tabindex:d,...f}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,r=e.height,n=e.viewBox,u=void 0===n?"0 0 ".concat(t," ").concat(r):n,c=i(e,o),p=c.tabindex,m=i(c,s),d=a(a(a({},l),m),{},{width:t,height:r,viewBox:u});return d["aria-label"]||d["aria-labelledby"]||d.title?(d.role="img",null!=p&&(d.focusable="true",d.tabindex=p)):d["aria-hidden"]=!0,d}({...c,tabindex:r});return e&&(f.className=e),null!=d&&("number"==typeof d?f.tabIndex=d:f.tabIndex=Number(r)),p&&(f.ref=p),n&&(f.xmlns=n),u&&(f.preserveAspectRatio=u),m().createElement("svg",f,t)});d.displayName="Icon",d.propTypes={"aria-hidden":c().oneOfType([c().bool,c().oneOf(["true","false"])]),"aria-label":c().string,"aria-labelledby":c().string,children:c().node,className:c().string,height:c().oneOfType([c().number,c().string]),preserveAspectRatio:c().string,tabIndex:c().oneOfType([c().number,c().string]),viewBox:c().string,width:c().oneOfType([c().number,c().string]),xmlns:c().string}},2694(e,t,r){"use strict";var n=r(6925);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,i,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return r.PropTypes=r,r}},5556(e,t,r){e.exports=r(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2263(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(7979),a=r.n(n),i=r(3826),o=r(3392),s=r(5576),l=r(8345),u=r(4961);async function c(e){let t=`${l.restBaseUrl}/cohortm/cohort${e.uuid?`/${e.uuid}`:""}`,{data:r}=await (0,l.openmrsFetch)(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e});return r}let p={searchBar:"-esm-fast-data-entry__styles__searchBar___wo5xM",formError:"-esm-fast-data-entry__styles__formError___d-72S",patientRow:"-esm-fast-data-entry__styles__patientRow___a+mZz",patientName:"-esm-fast-data-entry__styles__patientName___U6z0i",loading:"-esm-fast-data-entry__styles__loading___sm3Fx"},m=({patient:e,removePatient:t})=>{let{t:r}=(0,i.useTranslation)(),{patient:u,error:c,isLoading:m}=(0,l.usePatient)(e?.uuid),d=(0,n.useCallback)(()=>t(e?.uuid),[e,t]),f=(0,n.useMemo)(()=>{if(m||c||!u)return"";let{identifier:e,name:t}=u,r=e?.[0]?.value||"",n=`${(t?.[0]?.given||[]).join(" ")} ${t?.[0]?.family||""}`;return`${r?`${r} -`:""}${n?` ${n}`:""}`.trim()},[m,c,u]);return a().createElement("li",{className:p.patientRow},a().createElement("span",null,a().createElement(o.Button,{kind:"tertiary",size:"sm",hasIconOnly:!0,onClick:d,renderIcon:s.zH,tooltipAlignment:"start",tooltipPosition:"top",iconDescription:r("remove","Remove")})),a().createElement("span",{className:p.patientName},f))},d=e=>{let{name:t,setName:r,patientList:s,updatePatientList:u,errors:c,validate:d,removePatient:f}=e,{t:y}=(0,i.useTranslation)(),b=(0,n.useMemo)(()=>({selectPatientAction:u,buttonProps:{kind:"secondary"}}),[u]);return a().createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"1rem"}},a().createElement(o.TextInput,{id:"newGroupName",labelText:y("newGroupName","New Group Name"),value:t,onChange:e=>r(e.target.value),onBlur:()=>d("name")}),c?.name&&a().createElement("p",{className:p.formError},"required"===c.name?y("groupNameError","Please enter a group name."):c.name),a().createElement(o.FormLabel,null,s.length," ",y("patientsInGroup","Patients in group")),c?.patientList&&a().createElement("p",{className:p.formError},y("noPatientError","Please enter at least one patient.")),!c?.patientList&&a().createElement("ul",{className:p.patientList},s?.map((e,t)=>a().createElement(m,{patient:e,removePatient:f,key:e.uuid}))),a().createElement(o.FormLabel,null,y("searchForPatientsToAddToGroup","Search for patients to add to group")),a().createElement("div",{className:p.searchBar},a().createElement(l.ExtensionSlot,{name:"patient-search-bar-slot",state:b})))},f=({patients:e,isCreate:t,groupName:r="",cohortUuid:s,close:p,onSave:m})=>{let{t:f}=(0,i.useTranslation)(),[y,b]=(0,n.useState)({}),[h,g]=(0,n.useState)(r),[_,v]=(0,n.useState)(e||[]),[E,w]=(0,n.useState)(!1),O=(0,l.useConfig)(),[P,T]=(0,n.useState)(),{hsuIdentifier:k}=(0,u.i)(P),{sessionLocation:x}=(0,l.useSession)(),{uuid:S,display:C}=x??{},{uuid:L,display:j}=k?.location??{},N=(0,n.useCallback)(e=>v(t=>t.filter(t=>t.uuid!==e)),[v]),M=(0,n.useCallback)(e=>{let t=!0;return e?(t="name"===e?!!h:!!_.length,b(r=>({...r,[e]:t?null:"required"}))):(h?b(e=>({...e,name:null})):(b(e=>({...e,name:"required"})),t=!1),_.length?b(e=>({...e,patientList:null})):(b(e=>({...e,patientList:"required"})),t=!1)),t},[h,_.length]),B=(0,n.useCallback)(()=>{function e(e){return[e?.name?.[0]?.given,e?.name?.[0]?.family].join(" ")}_.find(e=>e.uuid===P)||(0,l.fetchCurrentPatient)(P).then(t=>{v([..._,{uuid:P,...t}].sort((t,r)=>e(t).localeCompare(e(r),void 0,{sensitivity:"base"})))}),b(e=>({...e,patientList:null})),T(null)},[P,_,v]);(0,n.useEffect)(()=>{if(!P||!L)return;let e=S!==L;if(e&&O.enforcePatientListLocationMatch)(0,l.showSnackbar)({kind:"error",title:f("locationMismatch","Location Mismatch"),subtitle:f("patientLocationMismatchEnforced","Cannot add patient from {{hsuLocation}} to a session at {{sessionLocation}}",{hsuLocation:j,sessionLocation:C})}),T(null);else if(O.patientLocationMismatchCheck&&e){let e=!0,t=(0,l.showModal)("fde-patient-location-mismatch-modal",{onConfirm:B,sessionLocation:{uuid:S,display:C},hsuLocation:{uuid:L,display:j}},()=>{e&&T(null)});return()=>{e=!1,t()}}else B()},[P,S,C,L,j,B,O.patientLocationMismatchCheck,O.enforcePatientListLocationMatch,f]);let I=async()=>{let e;if(!M())return;w(!0);let t=_.map(e=>({patient:{uuid:e.uuid}}));try{e=await c({uuid:s,name:h,cohortType:O?.groupSessionConcepts?.cohortTypeId,location:x?.uuid,cohortMembers:_.map(e=>({patient:e.uuid,startDate:new Date().toISOString()}))})}catch(t){let e=t?.responseBody?.error??t?.responseBody??t;(0,l.showSnackbar)({kind:"error",title:f("postError","POST Error"),subtitle:e?.message??f("unknownPostError","An unknown error occurred while saving data")}),e?.fieldErrors&&b(Object.fromEntries(Object.entries(e.fieldErrors).map(([e,t])=>[e,t?.[0]?.message])));return}finally{w(!1)}m({...e,cohortMembers:t}),p()};return a().createElement(a().Fragment,null,a().createElement(o.ModalHeader,{closeModal:p},t?f("createNewGroup","Create New Group"):f("editGroup","Edit Group")),a().createElement(o.ModalBody,null,a().createElement(d,{name:h,setName:g,patientList:_,updatePatientList:e=>{T(e)},errors:y,validate:M,removePatient:N})),a().createElement(o.ModalFooter,null,a().createElement(o.Button,{kind:"secondary",onClick:p},f("cancel","Cancel")),a().createElement(o.Button,{kind:"primary",onClick:I,disabled:E},t?f("createGroup","Create Group"):f("save","Save"))))}},4961(e,t,r){"use strict";r.d(t,{i:()=>o});var n=r(1943),a=r.n(n),i=r(8345);function o(e){let t=e?`ws/rest/v1/patient/${e}/identifier`:null,{data:r,error:n,isValidating:o}=a()(t,i.openmrsFetch);return{hsuIdentifier:r?.data?.results.length?r.data.results.find(e=>"05a29f94-c0ed-11e2-94be-8c13b969e334"==e.identifierType.uuid):void 0,isLoading:!r&&!n,isError:n,isValidating:o}}}}]);
|
package/dist/7977.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["7977"],{8493(e,r,t){var n=t(7979),a="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},i=n.useState,u=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!a(e,t)}catch(e){return!0}}var o="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),n=i({inst:{value:t,getSnapshot:r}}),a=n[0].inst,o=n[1];return s(function(){a.value=t,a.getSnapshot=r,c(a)&&o({inst:a})},[e,t,r]),u(function(){return c(a)&&o({inst:a}),e(function(){c(a)&&o({inst:a})})},[e]),l(t),t};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:o},9888(e,r,t){e.exports=t(8493)},2272(e,r,t){t.d(r,{S:()=>v,u:()=>h});var n=t(7979),a=t.n(n),i=t(9888),u=t(4993),s=t(8444);let l=a().use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(r=>{e.status="fulfilled",e.value=r},r=>{e.status="rejected",e.reason=r}),e}}),c={dedupe:!0},o=(e,r,t)=>{var n;return!!r&&(null==(n=e.get(r))?void 0:n.has(t))===!0},d=(e,r,t)=>{if(!r)return;let n=e.get(r);n||(n=new Set,e.set(r,n)),n.add(t)},f=Promise.resolve(s.U);f.status="fulfilled",f.value=s.U;let g=()=>s.n,v=s.O.defineProperty(s.S,"defaultValue",{value:s.d}),h=(0,u.withArgs)((e,r,t)=>{let{cache:a,compare:v,suspense:h,fallbackData:p,revalidateOnMount:b,revalidateIfStale:w,refreshInterval:S,refreshWhenHidden:k,refreshWhenOffline:y,keepPreviousData:m,strictServerPrefetchWarning:_}=t,[R,V,E,U]=s.a.get(a),[C,D]=(0,s.s)(e),L=(0,n.useRef)(!1),O=(0,n.useRef)(!1),T=(0,n.useRef)(C),P=(0,n.useRef)(r),I=(0,n.useRef)(t),j=()=>I.current.isVisible()&&I.current.isOnline(),[x,F,M,W]=(0,s.c)(a,C),q=(0,n.useRef)({}).current,z=(0,s.i)(p)?(0,s.i)(t.fallback)?s.U:t.fallback[C]:p,A=t.cacheData,Y=C?null==A?void 0:A[C]:s.U,$=C?U[C]:s.U,B=(0,s.i)($)&&!(0,s.i)(Y),G=B?Y:$,H=(e,r)=>{for(let t in q)if("data"===t){if(!v(e[t],r[t])&&(!(0,s.i)(e[t])||!v(ei,r[t])))return!1}else if(r[t]!==e[t])return!1;return!0},J=!L.current,K=(0,n.useMemo)(()=>{let e=x(),t=W(),n=e=>{let t=(0,s.m)(e);return(delete t._k,(()=>{if(!C||!r||I.current.isPaused())return!1;if(J&&!(0,s.i)(b))return b;let e=(0,s.i)(z)?t.data:z;return!(h&&B&&(0,s.i)(e))&&((0,s.i)(e)||w)})())?{isValidating:!0,isLoading:!0,...t}:t},a=n(e),i=e===t?a:n(t),u=a;return[()=>{let e=n(x());return H(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>i]},[a,C]),N=(0,i.useSyncExternalStore)((0,n.useCallback)(e=>M(C,(r,t)=>{H(t,r)||e()}),[a,C]),K[0],K[1]),Q=R[C]&&R[C].length>0,X=N.data,Z=(0,s.i)(X)?z&&(0,s.b)(z)?l(z):z:X,ee=N.error,er=(0,n.useRef)(Z),et=(0,n.useRef)(s.U),en=et.current;en||(et.current=en=new WeakMap);let ea=(0,n.useRef)(null),ei=m?(0,s.i)(X)?(0,s.i)(er.current)?Z:er.current:X:Z,eu=C&&(0,s.i)(Z),es=(0,n.useRef)(null);s.I||(0,i.useSyncExternalStore)(g,()=>(es.current=!1,es),()=>(es.current=!0,es));let el=es.current;_&&el&&!h&&eu&&console.warn(`Missing pre-initiated data for serialized key "${C}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ec=!(!C||!r||I.current.isPaused())&&(!Q||!!(0,s.i)(ee))&&(J&&!(0,s.i)(b)?b:(!h||!B||!eu)&&(h?!(0,s.i)(Z)&&w:(0,s.i)(Z)||w)),eo=J&&ec,ed=(0,s.i)(N.isValidating)?eo:N.isValidating,ef=(0,s.i)(N.isLoading)?eo:N.isLoading,eg=(0,n.useCallback)(async e=>{let r,n,a=P.current;if(!C||!a||O.current||I.current.isPaused())return!1;let i=!0,u=e||{},l=!E[C]||!u.dedupe,c=B&&!o(en,A,C)&&!(0,s.i)(G)&&(0,s.i)(x().data),f=()=>s.j?!O.current&&C===T.current&&L.current:C===T.current,g={isValidating:!1,isLoading:!1},h=()=>{F(g)},p=()=>{let e=E[C];e&&e[1]===n&&delete E[C]},b={isValidating:!0};(0,s.i)(x().data)&&(b.isLoading=!0);try{if(l&&(F(b),t.loadingTimeout&&(0,s.i)(x().data)&&setTimeout(()=>{i&&f()&&I.current.onLoadingSlow(C,t)},t.loadingTimeout),c&&d(en,A,C),E[C]=[c?G:a(D),(0,s.g)()],c&&U[C]&&delete U[C]),[r,n]=E[C],r=await r,l&&setTimeout(p,t.dedupingInterval),!E[C]||E[C][1]!==n)return l&&f()&&I.current.onDiscarded(C),!1;g.error=s.U;let e=V[C];if(!(0,s.i)(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return h(),l&&f()&&I.current.onDiscarded(C),!1;let u=x().data;g.data=v(u,r)?u:r,l&&f()&&I.current.onSuccess(r,C,t)}catch(t){p();let e=I.current,{shouldRetryOnError:r}=e;!e.isPaused()&&(g.error=t,l&&f()&&(e.onError(t,C,e),(!0===r||(0,s.e)(r)&&r(t))&&(!I.current.revalidateOnFocus||!I.current.revalidateOnReconnect||j())&&e.onErrorRetry(t,C,e,e=>{let r=R[C];r&&r[0]&&r[0](s.E,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0})))}return i=!1,h(),!0},[C,a]),ev=(0,n.useCallback)((...e)=>(0,s.f)(a,T.current,...e),[]);if((0,s.u)(()=>{let e=ea.current;e&&(ea.current=null,d(en,e.cacheData,e.key),(0,s.i)(x().data)&&F({data:e.data,error:s.U,_k:e._k}),U[e.key]&&delete U[e.key])}),(0,s.u)(()=>{P.current=r,I.current=t,(0,s.i)(X)||(er.current=X)}),(0,s.u)(()=>{if(r||!B||(0,s.i)(G)||o(en,A,C)||!(0,s.i)(x().data))return;d(en,A,C);let e=V[C];(({value:e,getCacheData:r,canCommit:t,setCache:n})=>{let a=e=>{t()&&(0,s.i)(r())&&n(e)};Promise.resolve(e).then(e=>{a({data:e,error:s.U})},e=>{a({error:e})})})({value:G,getCacheData:()=>x().data,canCommit:()=>!O.current&&C===T.current&&V[C]===e,setCache:e=>F({...e,_k:D})})}),(0,s.u)(()=>{if(!C)return;let e=eg.bind(s.U,c),r=0;I.current.revalidateOnFocus&&(r=Date.now()+I.current.focusThrottleInterval);let t=(0,u.subscribeCallback)(C,R,(t,n={})=>{if(t==s.F){let t=Date.now();I.current.revalidateOnFocus&&t>r&&j()&&(r=t+I.current.focusThrottleInterval,e())}else if(t==s.R)I.current.revalidateOnReconnect&&j()&&e();else if(t==s.M)return eg();else if(t==s.E)return eg(n);else if(t==s.h&&(er.current=s.U,n.revalidate))return eg()});return O.current=!1,T.current=C,L.current=!0,F({_k:D}),ec&&!E[C]&&((0,s.i)(Z)||s.I?e():(0,s.r)(e)),()=>{O.current=!0,t()}},[C]),(0,s.u)(()=>{let e;function r(){let r=(0,s.e)(S)?S(x().data):S;r&&-1!==e&&(e=setTimeout(t,r))}function t(){!x().error&&(k||I.current.isVisible())&&(y||I.current.isOnline())?eg(c).then(r):r()}return r(),()=>{e&&(clearTimeout(e),e=-1)}},[S,k,y,C]),(0,n.useDebugValue)(ei),h){if(!s.j&&s.I&&eu&&(0,s.i)(G))throw Error("Fallback data is required when using Suspense in SSR.");eu&&(P.current=r,I.current=t,O.current=!1);let e=!(0,s.i)(G)&&eu,n=s.U;if(e&&B?(Z=n=G&&(0,s.b)(G)?l(G):G,ei=n,s.I||(ea.current={data:n,_k:D,key:C,cacheData:A})):l(e?ev(G):f),!(0,s.i)(ee)&&eu)throw ee;let a=eu&&(0,s.i)(n)?eg(c):f;!(0,s.i)(ei)&&eu&&(a.status="fulfilled",a.value=!0),l(a)}return{mutate:ev,get data(){return q.data=!0,ei},get error(){return q.error=!0,ee},get isValidating(){return q.isValidating=!0,ed},get isLoading(){return q.isLoading=!0,ef}}})}}]);
|
package/dist/7977.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7977.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","webpack://@openmrs/esm-fast-data-entry-app/./node_modules/use-sync-external-store/shim/index.js","webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/use-swr-emll9s78.mjs"],"names":["Object","u","c","e","window","Set","Promise","s","WeakMap","console","setTimeout","r","Date","t","clearTimeout","Error"],"mappings":"+JAWA,IAAI,EAAQ,EAAQ,MAIhB,EAAW,YAAe,OAAOA,OAAO,EAAE,CAAGA,OAAO,EAAE,CAH1D,SAAY,CAAC,CAAE,CAAC,EACd,OAAO,AAAC,IAAM,GAAM,KAAM,GAAK,EAAI,GAAM,EAAI,IAAQ,GAAM,GAAK,GAAM,CACxE,EAEE,EAAW,EAAM,QAAQ,CACzBC,EAAY,EAAM,SAAS,CAC3B,EAAkB,EAAM,eAAe,CACvC,EAAgB,EAAM,aAAa,CA0BrC,SAASC,EAAuB,CAAI,EAClC,IAAI,EAAoB,EAAK,WAAW,CACxC,EAAO,EAAK,KAAK,CACjB,GAAI,CACF,IAAI,EAAY,IAChB,MAAO,CAAC,EAAS,EAAM,EACzB,CAAE,MAAOC,EAAO,CACd,MAAO,CAAC,CACV,CACF,CAIA,IAAI,EACF,IAAgB,OAAOC,QACvB,SAAuBA,OAAO,QAAQ,EACtC,SAAuBA,OAAO,QAAQ,CAAC,aAAa,CANtD,SAAgC,CAAS,CAAE,CAAW,EACpD,OAAO,GACT,EArCA,SAAgC,CAAS,CAAE,CAAW,EACpD,IAAI,EAAQ,IACV,EAAY,EAAS,CAAE,KAAM,CAAE,MAAO,EAAO,YAAa,CAAY,CAAE,GACxE,EAAO,CAAS,CAAC,EAAE,CAAC,IAAI,CACxB,EAAc,CAAS,CAAC,EAAE,CAmB5B,OAlBA,EACE,WACE,EAAK,KAAK,CAAG,EACb,EAAK,WAAW,CA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,OAAO,CAAG,EACpB,EAAa,OAAO,CAAG,IAE3B,IAAM,EAAuB,CAAC,QAAY,IAAkB,GACxD,EAAc,GAAS,CAiB3B,GAhBI,GAAwB,GAExB,EADA,EAAc,GAAiB,QAAc,GAAiB,EAAI,GAAiB,EAEnF,GAAe,EACX,AAAC,GAAS,EACV,IAAgB,OAAO,CAAG,CACtB,KAAM,EACN,GAAI,EACJ,MACA,UAAW,CACf,IAIJ,EADkB,EAAuB,GAAY,GAAiB,GAGtE,CAAC,QAAY,KAAU,GACvB,MAAM,GAEV,IAAM,EAAe,IAAmB,QAAY,GAAe,GAAW,GAAe,CACzF,EAAC,QAAY,KAAiB,KAE9B,EAAa,MAAM,CAAG,YAEtB,EAAa,KAAK,CAAG,IAEzB,EAAI,EACR,CAoBA,MAnBoB,CAChB,OAAQ,GACR,IAAI,MAAQ,CAER,OADA,EAAkB,IAAI,CAAG,GAClB,EACX,EACA,IAAI,OAAS,CAET,OADA,EAAkB,KAAK,CAAG,GACnB,EACX,EACA,IAAI,cAAgB,CAEhB,OADA,EAAkB,YAAY,CAAG,GAC1B,EACX,EACA,IAAI,WAAa,CAEb,OADA,EAAkB,SAAS,CAAG,GACvB,EACX,CACJ,CAEJ,E"}
|
package/dist/8410.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["8410"],{2177(a,e,s){s.r(e),s.d(e,{SWRConfig:()=>t.S,default:()=>t.u,mutate:()=>_.k,preload:()=>l.preload,unload:()=>_.l,unstable_serialize:()=>n,useSWRConfig:()=>l.useSWRConfig});var t=s(2272),_=s(8444),l=s(4993);let n=a=>(0,_.s)(a)[0]}}]);
|
package/dist/8410.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"8410.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/index/index.mjs"],"names":[],"mappings":"gWAMA,IAAM,EAAqB,AAAC,GAAM,QAAU,EAAI,CAAC,EAAE,A"}
|
package/dist/9197.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["9197"],{3041(e,t,a){a.r(t),a.d(t,{default:()=>d,infinite:()=>o,unstable_serialize:()=>c});var r=a(7979),l=a(2272),i=a(8444),n=a(4993),u=a(9888);let s=e=>(0,i.s)(e?e(0,null):null)[0],c=e=>"$inf$"+s(e),_=Promise.resolve(),o=e=>(t,a,l)=>{let n,c=(0,r.useRef)(!1),{cache:o,initialSize:d=1,revalidateAll:f=!1,persistSize:p=!1,revalidateFirstPage:b=!0,revalidateOnMount:g=!1,parallel:m=!1}=l,[,,,h]=i.a.get(i.o);try{(n=s(t))&&(n="$inf$"+n)}catch(e){}let[k,y,w]=(0,i.c)(o,n),v=(0,r.useCallback)(()=>(0,i.i)(k()._l)?d:k()._l,[o,n,d]);(0,u.useSyncExternalStore)((0,r.useCallback)(e=>n?w(n,()=>{e()}):()=>{},[o,n]),v,v);let C=(0,r.useCallback)(()=>{let e=k()._l;return(0,i.i)(e)?d:e},[n,d]),$=(0,r.useRef)(C());(0,i.u)(()=>{if(!c.current){c.current=!0;return}n&&y({_l:p?$.current:C()})},[n,o]);let U=g&&!c.current,z=e(n,async e=>{let r=k()._i,n=k()._r,u=i.a.get(o),s=u[8],c=()=>u[8]!==s;y({_r:i.U});let _=[],d=C(),[p]=(0,i.c)(o,e),g=p().data,w=[],v=null;for(let e=0;e<d;++e){let[u,s]=(0,i.s)(t(e,m?null:v));if(!u)break;let[d,p]=(0,i.c)(o,u),k=d().data,y=f||r||(0,i.i)(k)||b&&!e&&!(0,i.i)(g)||U||g&&!(0,i.i)(g[e])&&!l.compare(g[e],k);if(a&&("function"==typeof n?n(k,s):y)){let t=async()=>{if(u in h){let e=h[u];delete h[u],k=await e}else k=await a(s);c()||p({data:k,_k:s}),_[e]=k};m?w.push(t):await t()}else _[e]=k;m||(v=k)}return m&&await Promise.all(w.map(e=>e())),c()||y({_i:i.U}),_},l),L=(0,r.useCallback)(function(e,t){let a="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==a.revalidate;return n?(r&&((0,i.i)(e)?y({_i:!0,_r:a.revalidate}):y({_i:!1,_r:a.revalidate})),arguments.length?z.mutate(e,{...a,revalidate:r}):z.mutate()):_},[n,o]),P=(0,r.useCallback)(e=>{let a;if(!n)return _;let[,r]=(0,i.c)(o,n);if((0,i.e)(e)?a=e(C()):"number"==typeof e&&(a=e),"number"!=typeof a)return _;r({_l:a}),$.current=a;let l=[],[u]=(0,i.c)(o,n),s=null;for(let e=0;e<a;++e){let[a]=(0,i.s)(t(e,s)),[r]=(0,i.c)(o,a),n=a?r().data:i.U;if((0,i.i)(n))return L(u().data);l.push(n),s=n}return L(l)},[n,o,L,C]);return{size:C(),setSize:P,mutate:L,get data(){return z.data},get error(){return z.error},get isValidating(){return z.isValidating},get isLoading(){return z.isLoading}}},d=(0,n.withMiddleware)(l.u,o)}}]);
|
package/dist/9197.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"9197.js","sources":["webpack://@openmrs/esm-fast-data-entry-app/./node_modules/swr/dist/infinite/index.mjs"],"names":["Promise","p","e","i","u","arguments"],"mappings":"2RAOA,IAAM,EAAkB,AAAC,GACd,QAAU,EAAS,EAAO,EAAG,MAAQ,KAAK,CAAC,EAAE,CAElD,EAAqB,AAAC,GACjB,QAAkB,EAAgB,GAKvC,EAAgBA,QAAQ,OAAO,GAC/B,EAAW,AAAC,GAAa,CAAC,EAAQ,EAAI,KACpC,IAKI,EALE,EAAc,aAAO,IACrB,CAAE,MAAO,CAAO,CAAE,cAAc,CAAC,CAAE,gBAAgB,EAAK,CAAEC,YAAAA,EAAc,EAAK,CAAE,sBAAsB,EAAI,CAAE,oBAAoB,EAAK,CAAE,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mrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["9403"],{2934(e,t,a){a.r(t),a.d(t,{default:()=>i});var l=a(7979),n=a.n(l),r=a(9943);let m=window.spaBase,o=`${m}/forms`,s=n().lazy(()=>Promise.all([a.e("9823"),a.e("9177"),a.e("
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_fast_data_entry_app=globalThis.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([["9403"],{2934(e,t,a){a.r(t),a.d(t,{default:()=>i});var l=a(7979),n=a.n(l),r=a(9943);let m=window.spaBase,o=`${m}/forms`,s=n().lazy(()=>Promise.all([a.e("9823"),a.e("9177"),a.e("6028"),a.e("4757"),a.e("1519")]).then(a.bind(a,957))),u=n().lazy(()=>Promise.all([a.e("6323"),a.e("9823"),a.e("9177"),a.e("6028"),a.e("4757"),a.e("6107")]).then(a.bind(a,3462))),p=n().lazy(()=>Promise.all([a.e("6323"),a.e("4480"),a.e("5273"),a.e("9823"),a.e("9177"),a.e("6028"),a.e("4757"),a.e("4811"),a.e("6606")]).then(a.bind(a,125))),i=()=>n().createElement("main",null,n().createElement(r.BrowserRouter,{basename:o},n().createElement(r.Routes,null,n().createElement(r.Route,{path:"/",element:n().createElement(s,null)}),n().createElement(r.Route,{path:"/form/:formUuid",element:n().createElement(u,null)}),n().createElement(r.Route,{path:"/groupform/:formUuid",element:n().createElement(p,null)}))))}}]);
|